diff options
Diffstat (limited to 'msmcobalt/mm-video-v4l2/vidc/vdec')
-rw-r--r-- | msmcobalt/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 8 | ||||
-rw-r--r-- | msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp | 1 | ||||
-rw-r--r-- | msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 80 |
3 files changed, 44 insertions, 45 deletions
diff --git a/msmcobalt/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/msmcobalt/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h index 2f44cd8..2376b62 100644 --- a/msmcobalt/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/msmcobalt/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -1173,8 +1173,8 @@ class omx_vdec: public qc_omx_component OMX_COLOR_FORMATTYPE formatsDefault[] = { [0] = (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed, [1] = (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m, - [2] = OMX_COLOR_FormatYUV420Planar, - [3] = OMX_COLOR_FormatYUV420SemiPlanar, + [2] = OMX_COLOR_FormatYUV420SemiPlanar, + [3] = OMX_COLOR_FormatYUV420Planar, [4] = (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView, }; format = (index < sizeof(formatsDefault) / sizeof(OMX_COLOR_FORMATTYPE)) ? @@ -1182,8 +1182,8 @@ class omx_vdec: public qc_omx_component } else { OMX_COLOR_FORMATTYPE formatsDefault[] = { [0] = (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m, - [1] = OMX_COLOR_FormatYUV420Planar, - [2] = OMX_COLOR_FormatYUV420SemiPlanar, + [1] = OMX_COLOR_FormatYUV420SemiPlanar, + [2] = OMX_COLOR_FormatYUV420Planar, [3] = (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView, }; format = (index < sizeof(formatsDefault) / sizeof(OMX_COLOR_FORMATTYPE)) ? diff --git a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp index 2698d52..eda46e4 100644 --- a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp +++ b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp @@ -3213,6 +3213,7 @@ OMX_ERRORTYPE omx_swvdec::describe_color_format( case OMX_COLOR_FormatYUV420SemiPlanar: { // do nothing; standard OMX color formats should not be described + retval = OMX_ErrorUnsupportedSetting; break; } diff --git a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp index 90b930a..b722408 100644 --- a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp +++ b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp @@ -8163,47 +8163,6 @@ OMX_ERRORTYPE omx_vdec::fill_buffer_done(OMX_HANDLETYPE hComp, } } - if (!output_flush_progress && (buffer->nFilledLen > 0)) { - // set the default colorspace advised by client, since the bitstream may be - // devoid of colorspace-info. - if (m_enable_android_native_buffers) { - ColorSpace_t color_space = ITU_R_601; - - // Disabled ? - // WA for VP8. Vp8 encoder does not embed color-info (yet!). - // Encoding RGBA results in 601-LR for all resolutions. - // This conflicts with the client't defaults which are based on resolution. - // Eg: 720p will be encoded as 601-LR. Client will say 709. - // Re-enable this code once vp8 encoder generates color-info and hence the - // decoder will be able to override with the correct source color. -#if 0 - switch (m_client_color_space.sAspects.mPrimaries) { - case ColorAspects::PrimariesBT601_6_625: - case ColorAspects::PrimariesBT601_6_525: - { - color_space = m_client_color_space.sAspects.mRange == ColorAspects::RangeFull ? - ITU_R_601_FR : ITU_R_601; - break; - } - case ColorAspects::PrimariesBT709_5: - { - color_space = ITU_R_709; - break; - } - default: - { - break; - } - } -#endif - DEBUG_PRINT_LOW("setMetaData for Color Space (client) = 0x%x (601=%u FR=%u 709=%u)", - color_space, ITU_R_601, ITU_R_601_FR, ITU_R_709); - set_colorspace_in_handle(color_space, buffer - m_out_mem_ptr); - } - DEBUG_PRINT_LOW("Processing extradata"); - handle_extradata(buffer); - } - #ifdef OUTPUT_EXTRADATA_LOG if (outputExtradataFile) { int buf_index = buffer - m_out_mem_ptr; @@ -8684,6 +8643,45 @@ int omx_vdec::async_message_process (void *context, void* message) } if (vdec_msg->msgdata.output_frame.len) { + if (!omx->output_flush_progress && (omxhdr->nFilledLen > 0)) { + // set the default colorspace advised by client, since the bitstream may be + // devoid of colorspace-info. + if (omx->m_enable_android_native_buffers) { + ColorSpace_t color_space = ITU_R_601; + + // Disabled ? + // WA for VP8. Vp8 encoder does not embed color-info (yet!). + // Encoding RGBA results in 601-LR for all resolutions. + // This conflicts with the client't defaults which are based on resolution. + // Eg: 720p will be encoded as 601-LR. Client will say 709. + // Re-enable this code once vp8 encoder generates color-info and hence the + // decoder will be able to override with the correct source color. +#if 0 + switch (omx->m_client_color_space.sAspects.mPrimaries) { + case ColorAspects::PrimariesBT601_6_625: + case ColorAspects::PrimariesBT601_6_525: + { + color_space = omx->m_client_color_space.sAspects.mRange == ColorAspects::RangeFull ? + ITU_R_601_FR : ITU_R_601; + break; + } + case ColorAspects::PrimariesBT709_5: + { + color_space = ITU_R_709; + break; + } + default: + { + break; + } + } +#endif + DEBUG_PRINT_LOW("setMetaData for Color Space (client) = 0x%x (601=%u FR=%u 709=%u)", + color_space, ITU_R_601, ITU_R_601_FR, ITU_R_709); + omx->set_colorspace_in_handle(color_space, omxhdr - omx->m_out_mem_ptr); + } + } + DEBUG_PRINT_LOW("Processing extradata"); omx->handle_extradata(omxhdr); |