mirror of
https://github.com/followmsi/android_hardware_qcom_media.git
synced 2024-10-31 22:47:35 +00:00
Revert "mm-video-v4l2: venc: Use client allocated memory if available"
This reverts commit38641613a6
. Bug: 67670457 Bug: 62452543 Test: capture a video (cherry picked from commit99560b95dc
) Change-Id: I4b6cc58d582c2aaf72c818008bca2870b02f4c3e
This commit is contained in:
parent
c2caf728ea
commit
870657969b
3 changed files with 1 additions and 10 deletions
|
@ -703,7 +703,6 @@ class omx_video: public qc_omx_component
|
||||||
|
|
||||||
uint64_t m_out_bm_count;
|
uint64_t m_out_bm_count;
|
||||||
uint64_t m_client_out_bm_count;
|
uint64_t m_client_out_bm_count;
|
||||||
uint64_t m_client_in_bm_count;
|
|
||||||
uint64_t m_inp_bm_count;
|
uint64_t m_inp_bm_count;
|
||||||
uint64_t m_flags;
|
uint64_t m_flags;
|
||||||
uint64_t m_etb_count;
|
uint64_t m_etb_count;
|
||||||
|
|
|
@ -290,7 +290,6 @@ omx_video::omx_video():
|
||||||
allocate_native_handle(false),
|
allocate_native_handle(false),
|
||||||
m_out_bm_count(0),
|
m_out_bm_count(0),
|
||||||
m_client_out_bm_count(0),
|
m_client_out_bm_count(0),
|
||||||
m_client_in_bm_count(0),
|
|
||||||
m_inp_bm_count(0),
|
m_inp_bm_count(0),
|
||||||
m_flags(0),
|
m_flags(0),
|
||||||
m_etb_count(0),
|
m_etb_count(0),
|
||||||
|
@ -2625,7 +2624,6 @@ OMX_ERRORTYPE omx_video::use_input_buffer(
|
||||||
|
|
||||||
*bufferHdr = (m_inp_mem_ptr + i);
|
*bufferHdr = (m_inp_mem_ptr + i);
|
||||||
BITMASK_SET(&m_inp_bm_count,i);
|
BITMASK_SET(&m_inp_bm_count,i);
|
||||||
BITMASK_SET(&m_client_in_bm_count,i);
|
|
||||||
|
|
||||||
(*bufferHdr)->pBuffer = (OMX_U8 *)buffer;
|
(*bufferHdr)->pBuffer = (OMX_U8 *)buffer;
|
||||||
(*bufferHdr)->nSize = sizeof(OMX_BUFFERHEADERTYPE);
|
(*bufferHdr)->nSize = sizeof(OMX_BUFFERHEADERTYPE);
|
||||||
|
@ -3646,10 +3644,6 @@ OMX_ERRORTYPE omx_video::free_buffer(OMX_IN OMX_HANDLETYPE hComp,
|
||||||
nPortIndex = buffer - (OMX_BUFFERHEADERTYPE*)m_out_mem_ptr;
|
nPortIndex = buffer - (OMX_BUFFERHEADERTYPE*)m_out_mem_ptr;
|
||||||
if(BITMASK_PRESENT(&m_client_out_bm_count, nPortIndex))
|
if(BITMASK_PRESENT(&m_client_out_bm_count, nPortIndex))
|
||||||
BITMASK_CLEAR(&m_client_out_bm_count,nPortIndex);
|
BITMASK_CLEAR(&m_client_out_bm_count,nPortIndex);
|
||||||
} else if (port == PORT_INDEX_IN) {
|
|
||||||
nPortIndex = buffer - (meta_mode_enable?meta_buffer_hdr:m_inp_mem_ptr);
|
|
||||||
if(BITMASK_PRESENT(&m_client_in_bm_count, nPortIndex))
|
|
||||||
BITMASK_CLEAR(&m_client_in_bm_count,nPortIndex);
|
|
||||||
}
|
}
|
||||||
if (m_state == OMX_StateIdle &&
|
if (m_state == OMX_StateIdle &&
|
||||||
(BITMASK_PRESENT(&m_flags ,OMX_COMPONENT_LOADING_PENDING))) {
|
(BITMASK_PRESENT(&m_flags ,OMX_COMPONENT_LOADING_PENDING))) {
|
||||||
|
@ -4012,7 +4006,7 @@ OMX_ERRORTYPE omx_video::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE hComp,
|
||||||
|
|
||||||
auto_lock l(m_buf_lock);
|
auto_lock l(m_buf_lock);
|
||||||
pmem_data_buf = (OMX_U8 *)m_pInput_pmem[nBufIndex].buffer;
|
pmem_data_buf = (OMX_U8 *)m_pInput_pmem[nBufIndex].buffer;
|
||||||
if (pmem_data_buf && BITMASK_PRESENT(&m_client_in_bm_count, nBufIndex)) {
|
if (pmem_data_buf && BITMASK_PRESENT(&m_inp_bm_count, nBufIndex)) {
|
||||||
memcpy (pmem_data_buf, (buffer->pBuffer + buffer->nOffset),
|
memcpy (pmem_data_buf, (buffer->pBuffer + buffer->nOffset),
|
||||||
buffer->nFilledLen);
|
buffer->nFilledLen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2391,8 +2391,6 @@ OMX_ERRORTYPE omx_venc::component_deinit(OMX_IN OMX_HANDLETYPE hComp)
|
||||||
for (i=0; i<m_sInPortDef.nBufferCountActual; i++ ) {
|
for (i=0; i<m_sInPortDef.nBufferCountActual; i++ ) {
|
||||||
if (BITMASK_PRESENT(&m_inp_bm_count, i)) {
|
if (BITMASK_PRESENT(&m_inp_bm_count, i)) {
|
||||||
BITMASK_CLEAR(&m_inp_bm_count, i);
|
BITMASK_CLEAR(&m_inp_bm_count, i);
|
||||||
if (BITMASK_PRESENT(&m_client_in_bm_count, i))
|
|
||||||
BITMASK_CLEAR(&m_client_in_bm_count, i);
|
|
||||||
free_input_buffer (&m_inp_mem_ptr[i]);
|
free_input_buffer (&m_inp_mem_ptr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue