video-driver: fix encoder output buffer size
Fix encoder output buffer size for CQ mode to YUVSizex2x1.25. Change-Id: Ib4581a0dc7fbb99fee827c676106806d4ea89157 Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
06643c1de9
commit
cd799e6c31
@@ -360,6 +360,11 @@ u32 msm_vidc_encoder_output_size(struct msm_vidc_inst *inst)
|
||||
u32 width, height;
|
||||
struct v4l2_format *f;
|
||||
|
||||
if (!inst || !inst->capabilities) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
f = &inst->fmts[OUTPUT_PORT];
|
||||
/*
|
||||
* Encoder output size calculation: 32 Align width/height
|
||||
@@ -376,7 +381,8 @@ u32 msm_vidc_encoder_output_size(struct msm_vidc_inst *inst)
|
||||
frame_size = (width * height * 3);
|
||||
|
||||
/* Image session: 2 x yuv size */
|
||||
if (is_image_session(inst))
|
||||
if (is_image_session(inst) ||
|
||||
inst->capabilities->cap[BITRATE_MODE].value == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ)
|
||||
goto skip_calc;
|
||||
|
||||
if (mbs_per_frame <= NUM_MBS_360P)
|
||||
|
Reference in New Issue
Block a user