Loading media/codec2/components/avc/C2SoftAvcDec.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -812,19 +812,19 @@ void C2SoftAvcDec::process( ALOGV("decodeTime=%6d delay=%6d numBytes=%6d", decodeTime, delay, s_decode_op.u4_num_bytes_consumed); } if (IVD_MEM_ALLOC_FAILED == (s_decode_op.u4_error_code & 0xFF)) { if (IVD_MEM_ALLOC_FAILED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGE("allocation failure in decoder"); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } else if (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_decode_op.u4_error_code & 0xFF)) { } else if (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGE("unsupported resolution : %dx%d", mWidth, mHeight); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } else if (IVD_RES_CHANGED == (s_decode_op.u4_error_code & 0xFF)) { } else if (IVD_RES_CHANGED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGV("resolution changed"); drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); resetDecoder(); Loading @@ -834,6 +834,12 @@ void C2SoftAvcDec::process( /* Decode header and get new dimensions */ setParams(mStride, IVD_DECODE_HEADER); (void) ivdec_api_function(mDecHandle, &s_decode_ip, &s_decode_op); } else if (IS_IVD_FATAL_ERROR(s_decode_op.u4_error_code)) { ALOGE("Fatal error in decoder 0x%x", s_decode_op.u4_error_code); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } if (0 < s_decode_op.u4_pic_wd && 0 < s_decode_op.u4_pic_ht) { if (mHeaderDecoded == false) { Loading media/libstagefright/codecs/avcdec/SoftAVCDec.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -580,7 +580,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { status = ivdec_api_function(mCodecCtx, (void *)&s_dec_ip, (void *)&s_dec_op); bool unsupportedResolution = (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & 0xFF)); (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); /* Check for unsupported dimensions */ if (unsupportedResolution) { Loading @@ -590,7 +590,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { return; } bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & 0xFF)); bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); if (allocationFailed) { ALOGE("Allocation failure in decoder"); notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); Loading @@ -598,7 +598,14 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { return; } bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & 0xFF)); if (IS_IVD_FATAL_ERROR(s_dec_op.u4_error_code)) { ALOGE("Fatal Error : 0x%x", s_dec_op.u4_error_code); notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); mSignalledError = true; return; } bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); getVUIParams(); Loading Loading
media/codec2/components/avc/C2SoftAvcDec.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -812,19 +812,19 @@ void C2SoftAvcDec::process( ALOGV("decodeTime=%6d delay=%6d numBytes=%6d", decodeTime, delay, s_decode_op.u4_num_bytes_consumed); } if (IVD_MEM_ALLOC_FAILED == (s_decode_op.u4_error_code & 0xFF)) { if (IVD_MEM_ALLOC_FAILED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGE("allocation failure in decoder"); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } else if (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_decode_op.u4_error_code & 0xFF)) { } else if (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGE("unsupported resolution : %dx%d", mWidth, mHeight); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } else if (IVD_RES_CHANGED == (s_decode_op.u4_error_code & 0xFF)) { } else if (IVD_RES_CHANGED == (s_decode_op.u4_error_code & IVD_ERROR_MASK)) { ALOGV("resolution changed"); drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); resetDecoder(); Loading @@ -834,6 +834,12 @@ void C2SoftAvcDec::process( /* Decode header and get new dimensions */ setParams(mStride, IVD_DECODE_HEADER); (void) ivdec_api_function(mDecHandle, &s_decode_ip, &s_decode_op); } else if (IS_IVD_FATAL_ERROR(s_decode_op.u4_error_code)) { ALOGE("Fatal error in decoder 0x%x", s_decode_op.u4_error_code); mSignalledError = true; work->workletsProcessed = 1u; work->result = C2_CORRUPTED; return; } if (0 < s_decode_op.u4_pic_wd && 0 < s_decode_op.u4_pic_ht) { if (mHeaderDecoded == false) { Loading
media/libstagefright/codecs/avcdec/SoftAVCDec.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -580,7 +580,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { status = ivdec_api_function(mCodecCtx, (void *)&s_dec_ip, (void *)&s_dec_op); bool unsupportedResolution = (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & 0xFF)); (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); /* Check for unsupported dimensions */ if (unsupportedResolution) { Loading @@ -590,7 +590,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { return; } bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & 0xFF)); bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); if (allocationFailed) { ALOGE("Allocation failure in decoder"); notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); Loading @@ -598,7 +598,14 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { return; } bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & 0xFF)); if (IS_IVD_FATAL_ERROR(s_dec_op.u4_error_code)) { ALOGE("Fatal Error : 0x%x", s_dec_op.u4_error_code); notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); mSignalledError = true; return; } bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & IVD_ERROR_MASK)); getVUIParams(); Loading