From 891b203e5c89efa1a4b2a73d336dfbbab98fd9c4 Mon Sep 17 00:00:00 2001 From: Angela Stegmaier Date: Mon, 2 Apr 2018 16:25:19 -0500 Subject: OMX: videoencoder: Set CSF3 flag to indicate Level 1b For baseline profile encoding at level 1b, the CSF3 bit should be set to convey the level as 1b as per the user guide. This patch updates the constraintSetFlags to set the CSF3 flag to 1 in case of encoding for baseline profile, level 1b. Otherwise level is returning at 1.1 when the user requests 1b. Change-Id: Ic98fecd5b6f5a00cc9056fe2310dc095e92467b7 Signed-off-by: Angela Stegmaier --- omx/videoencode/omx_h264_enc/inc/omx_H264videoencoderutils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/omx/videoencode/omx_h264_enc/inc/omx_H264videoencoderutils.h b/omx/videoencode/omx_h264_enc/inc/omx_H264videoencoderutils.h index 8ce942b..9a1541f 100644 --- a/omx/videoencode/omx_h264_enc/inc/omx_H264videoencoderutils.h +++ b/omx/videoencode/omx_h264_enc/inc/omx_H264videoencoderutils.h @@ -30,6 +30,7 @@ /* For Baseline Profile :: FLAG to indicate Constrained Baseline profile in the Bitstream generated by codec conforming to the H264Standard */ #define OMX_H264_SET_CONSTRAINT_SET1_FLAG 0x14 +#define OMX_H264_SET_CONSTRAINT_SET1b_FLAG 0x15 #define OMX_H264_DISBALE_ALL_CONSTRAINT_SET_FLAGS 0x0 /* OMX Component Version */ @@ -353,6 +354,9 @@ typedef enum PARAMS_UPDATE_STATUS { break;\ case OMX_VIDEO_AVCLevel1b :\ _pCompPvtStruct_->pVidEncStaticParams->videnc2Params.level = IH264_LEVEL_1b;\ + if (((OMX_VIDEO_PARAM_AVCTYPE *)_pParamStruct_)->eProfile == OMX_VIDEO_AVCProfileBaseline) {\ + _pCompPvtStruct_->pVidEncStaticParams->constraintSetFlags = OMX_H264_SET_CONSTRAINT_SET1b_FLAG;\ + }\ break;\ case OMX_VIDEO_AVCLevel11 :\ _pCompPvtStruct_->pVidEncStaticParams->videnc2Params.level = IH264_LEVEL_11;\ -- cgit v1.2.3