Merge "msm: vidc: Send appropriate picture_type while turning off PIC TYPE DECODE"
This commit is contained in:
commit
ca2ef91750
1 changed files with 17 additions and 5 deletions
|
@ -2235,6 +2235,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
||||||
struct hal_enable_picture enable_picture;
|
struct hal_enable_picture enable_picture;
|
||||||
struct hal_enable hal_property;
|
struct hal_enable hal_property;
|
||||||
enum hal_property property_id = 0;
|
enum hal_property property_id = 0;
|
||||||
|
enum hal_video_codec codec;
|
||||||
u32 property_val = 0;
|
u32 property_val = 0;
|
||||||
void *pdata = NULL;
|
void *pdata = NULL;
|
||||||
struct hfi_device *hdev;
|
struct hfi_device *hdev;
|
||||||
|
@ -2289,12 +2290,23 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
||||||
case V4L2_CID_MPEG_VIDC_VIDEO_PICTYPE_DEC_MODE:
|
case V4L2_CID_MPEG_VIDC_VIDEO_PICTYPE_DEC_MODE:
|
||||||
property_id = HAL_PARAM_VDEC_PICTURE_TYPE_DECODE;
|
property_id = HAL_PARAM_VDEC_PICTURE_TYPE_DECODE;
|
||||||
if (ctrl->val ==
|
if (ctrl->val ==
|
||||||
V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_ON)
|
V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_ON) {
|
||||||
enable_picture.picture_type = HAL_PICTURE_I;
|
enable_picture.picture_type = HAL_PICTURE_I;
|
||||||
else
|
} else {
|
||||||
enable_picture.picture_type = HAL_PICTURE_I |
|
codec = get_hal_codec(inst->fmts[OUTPUT_PORT].fourcc);
|
||||||
HAL_PICTURE_P | HAL_PICTURE_B |
|
if (codec == HAL_VIDEO_CODEC_H264) {
|
||||||
HAL_PICTURE_IDR;
|
enable_picture.picture_type = HAL_PICTURE_I |
|
||||||
|
HAL_PICTURE_P | HAL_PICTURE_B |
|
||||||
|
HAL_PICTURE_IDR;
|
||||||
|
} else if (codec == HAL_VIDEO_CODEC_HEVC) {
|
||||||
|
enable_picture.picture_type = HAL_PICTURE_I |
|
||||||
|
HAL_PICTURE_P | HAL_PICTURE_B |
|
||||||
|
HAL_PICTURE_IDR | HAL_PICTURE_CRA;
|
||||||
|
} else {
|
||||||
|
enable_picture.picture_type = HAL_PICTURE_I |
|
||||||
|
HAL_PICTURE_P | HAL_PICTURE_B;
|
||||||
|
}
|
||||||
|
}
|
||||||
pdata = &enable_picture;
|
pdata = &enable_picture;
|
||||||
break;
|
break;
|
||||||
case V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO:
|
case V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO:
|
||||||
|
|
Loading…
Add table
Reference in a new issue