Skip to content

Commit 77e414f

Browse files
Christopher83mikeNG
authored andcommitted
mm-video: venc: Don't align chroma on legacy msm7x30 devices
On legacy msm7x30 devices with a 720p max resolution, the alignment of chroma to 2K for non-camera YUV420SP input causes wrong recording of 480p video (eg. the video layers are completely disaligned during playback). Change-Id: I794bacc2f714a648073b805e8c02bb568d59fc5f
1 parent 3b6006b commit 77e414f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mm-video/vidc/venc/src/omx_video_base.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7676
#define VC1_STRUCT_B_POS 24
7777
#define VC1_SEQ_LAYER_SIZE 36
7878

79+
#ifndef MAX_RES_720P
7980
#define IS_NOT_ALIGNED( num, to) (num & (to-1))
8081
#define ALIGN( num, to ) (((num) + (to-1)) & (~(to-1)))
8182
#define SZ_2K (2048)
83+
#endif
8284

8385
typedef struct OMXComponentCapabilityFlagsType
8486
{
@@ -3576,6 +3578,7 @@ OMX_ERRORTYPE omx_video::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE
35763578
memcpy (pmem_data_buf, (buffer->pBuffer + buffer->nOffset),
35773579
buffer->nFilledLen);
35783580
DEBUG_PRINT_LOW("memcpy() done in ETBProxy for i/p Heap UseBuf");
3581+
#ifndef MAX_RES_720P
35793582
} else if (m_sInPortDef.format.video.eColorFormat ==
35803583
OMX_COLOR_FormatYUV420SemiPlanar) {
35813584
//For the case where YUV420SP buffers are qeueued to component
@@ -3598,6 +3601,7 @@ OMX_ERRORTYPE omx_video::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE
35983601
chromaOffset+chromaSize);
35993602
}
36003603
}
3604+
#endif
36013605
}
36023606
#ifdef _COPPER_
36033607
if(dev_empty_buf(buffer, pmem_data_buf,nBufIndex,m_pInput_pmem[nBufIndex].fd) != true)

0 commit comments

Comments
 (0)