diff options
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c index 3b0691f2deb4..9b0187ecfa6a 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | |||
@@ -487,7 +487,6 @@ static int vidioc_venc_s_fmt_out(struct file *file, void *priv, | |||
487 | struct mtk_q_data *q_data; | 487 | struct mtk_q_data *q_data; |
488 | int ret, i; | 488 | int ret, i; |
489 | struct mtk_video_fmt *fmt; | 489 | struct mtk_video_fmt *fmt; |
490 | unsigned int pitch_w_div16; | ||
491 | struct v4l2_pix_format_mplane *pix_fmt_mp = &f->fmt.pix_mp; | 490 | struct v4l2_pix_format_mplane *pix_fmt_mp = &f->fmt.pix_mp; |
492 | 491 | ||
493 | vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); | 492 | vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); |
@@ -530,15 +529,6 @@ static int vidioc_venc_s_fmt_out(struct file *file, void *priv, | |||
530 | q_data->coded_width = f->fmt.pix_mp.width; | 529 | q_data->coded_width = f->fmt.pix_mp.width; |
531 | q_data->coded_height = f->fmt.pix_mp.height; | 530 | q_data->coded_height = f->fmt.pix_mp.height; |
532 | 531 | ||
533 | pitch_w_div16 = DIV_ROUND_UP(q_data->visible_width, 16); | ||
534 | if (pitch_w_div16 % 8 != 0) { | ||
535 | /* Adjust returned width/height, so application could correctly | ||
536 | * allocate hw required memory | ||
537 | */ | ||
538 | q_data->visible_height += 32; | ||
539 | vidioc_try_fmt(f, q_data->fmt); | ||
540 | } | ||
541 | |||
542 | q_data->field = f->fmt.pix_mp.field; | 532 | q_data->field = f->fmt.pix_mp.field; |
543 | ctx->colorspace = f->fmt.pix_mp.colorspace; | 533 | ctx->colorspace = f->fmt.pix_mp.colorspace; |
544 | ctx->ycbcr_enc = f->fmt.pix_mp.ycbcr_enc; | 534 | ctx->ycbcr_enc = f->fmt.pix_mp.ycbcr_enc; |