mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
msm: vidc: Fix criteria for hierp num_ref calc
[1] num_ref for hierp has to be calculated only if
max_layer value is > 1. Since max_layer value
0/1 indicates absence of layer encoding.
[2] Fix hybrid_hp num_ref calculation inline with
FW calc.
Change-Id: I507d58c33529e5976974cc2d5a6e2d3fd8c55026
This commit is contained in:
parent
9fa40378bf
commit
e8004219db
1 changed files with 2 additions and 2 deletions
|
|
@ -493,11 +493,11 @@ int msm_vidc_get_num_ref_frames(struct msm_vidc_inst *inst)
|
|||
max_layer = get_ctrl(inst,
|
||||
V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER);
|
||||
if (frame_t->val == V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P &&
|
||||
max_layer->val > 0) {
|
||||
max_layer->val > 1) {
|
||||
codec = get_v4l2_codec(inst);
|
||||
/* LTR and B - frame not supported with hybrid HP */
|
||||
if (inst->hybrid_hp)
|
||||
num_ref = max_layer->val >> 1;
|
||||
num_ref = (max_layer->val + 1) >> 1;
|
||||
else if (codec == V4L2_PIX_FMT_HEVC)
|
||||
num_ref = ((max_layer->val + 1) / 2) + ltr_count;
|
||||
else if ((codec == V4L2_PIX_FMT_H264) && (max_layer->val < 4))
|
||||
|
|
|
|||
Loading…
Reference in a new issue