video: driver: amend interlace detection logic

As per HFI_PROP_CODED_FRAMES details, 0x0 is field interlace,
0x1 is progressive and 0x2 is adaptive frame field bitstream.
Treat 0x1 as progressive and both 0x0 and 0x2 as interlace in
driver.

Change-Id: I07c7c8b4faaccc896249b2da84148ec05c2047da
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
This commit is contained in:
Maheshwar Ajja
2021-02-24 16:49:15 -08:00
committed by Gerrit - the friendly Code Review server
父節點 481a6117d8
當前提交 395d4a9ff5
共有 4 個文件被更改,包括 13 次插入8 次删除

查看文件

@@ -1016,8 +1016,8 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
MSM_VIDC_POWER_SAVE_MODE},
{CODED_FRAMES, DEC, CODECS_ALL,
CODED_FRAMES_MBS_ONLY, CODED_FRAMES_ADAPTIVE_FIELDS,
1, CODED_FRAMES_MBS_ONLY,
CODED_FRAMES_PROGRESSIVE, CODED_FRAMES_INTERLACE,
1, CODED_FRAMES_PROGRESSIVE,
0,
HFI_PROP_CODED_FRAMES},

查看文件

@@ -536,7 +536,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst* inst)
width = out_f->fmt.pix_mp.width;
res_ok = res_is_less_than_or_equal_to(width, height, 1280, 720);
if (inst->capabilities->cap[CODED_FRAMES].value ==
CODED_FRAMES_ADAPTIVE_FIELDS ||
CODED_FRAMES_INTERLACE ||
inst->capabilities->cap[LOWLATENCY_MODE].value ||
res_ok) {
work_mode = MSM_VIDC_STAGE_1;
@@ -588,7 +588,7 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst* inst)
if (is_decode_session(inst)) {
if (inst->capabilities->cap[CODED_FRAMES].value ==
CODED_FRAMES_ADAPTIVE_FIELDS)
CODED_FRAMES_INTERLACE)
work_route = MSM_VIDC_PIPE_1;
} else if (is_encode_session(inst)) {
u32 slice_mode, width, height;

查看文件

@@ -48,8 +48,8 @@
#define DEFAULT_MAX_HOST_ENC_SUPER_BUF_COUNT 256
#define BIT_DEPTH_8 (8 << 16 | 8)
#define BIT_DEPTH_10 (10 << 16 | 10)
#define CODED_FRAMES_MBS_ONLY HFI_BITMASK_FRAME_MBS_ONLY_FLAG
#define CODED_FRAMES_ADAPTIVE_FIELDS HFI_BITMASK_MB_ADAPTIVE_FRAME_FIELD_FLAG
#define CODED_FRAMES_PROGRESSIVE 0x0
#define CODED_FRAMES_INTERLACE 0x1
/* TODO
* #define MAX_SUPERFRAME_COUNT 32

查看文件

@@ -1324,7 +1324,12 @@ static int msm_vdec_update_properties(struct msm_vidc_inst *inst)
inst->capabilities->cap[HEVC_TIER].value = subsc_params.tier;
inst->capabilities->cap[POC].value = subsc_params.pic_order_cnt;
inst->capabilities->cap[BIT_DEPTH].value = subsc_params.bit_depth;
inst->capabilities->cap[CODED_FRAMES].value = subsc_params.coded_frames;
if (subsc_params.coded_frames & HFI_BITMASK_FRAME_MBS_ONLY_FLAG)
inst->capabilities->cap[CODED_FRAMES].value =
CODED_FRAMES_PROGRESSIVE;
else
inst->capabilities->cap[CODED_FRAMES].value =
CODED_FRAMES_INTERLACE;
return 0;
}
@@ -2124,7 +2129,7 @@ static int msm_vdec_check_colorformat_supported(struct msm_vidc_inst* inst,
!is_10bit_colorformat(colorformat))
supported = false;
if (inst->capabilities->cap[CODED_FRAMES].value ==
CODED_FRAMES_ADAPTIVE_FIELDS &&
CODED_FRAMES_INTERLACE &&
!is_ubwc_colorformat(colorformat))
supported = false;