summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChinmay Sawarkar <chinmays@codeaurora.org>2016-03-31 16:10:38 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-18 18:47:03 -0700
commitdd5ea1bc0f4326160700435401c419a5cfaa69b5 (patch)
treeabbee9db1a840f44e453bb65ff0cc681e3058c8c
parentc4873787c3ee5bbbf33082273cbce2f7c8dc16de (diff)
msm: vidc: Increase output port buffer size for VP9 decode
For some VP9 Decode bitstreams, current buffer size is not sufficient. Hence increasing to the full YUV size supported by HW. CRs-Fixed: 986311 Change-Id: Ie7720001edbbaed8b202655445707b2b49a69cb1 Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/vidc/msm_vdec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vdec.c b/drivers/media/platform/msm/vidc/msm_vdec.c
index 54cb04fcc4f0..d8c6e30204d1 100644
--- a/drivers/media/platform/msm/vidc/msm_vdec.c
+++ b/drivers/media/platform/msm/vidc/msm_vdec.c
@@ -615,6 +615,12 @@ static u32 get_frame_size_nv12_ubwc(int plane, u32 height, u32 width)
return VENUS_BUFFER_SIZE(COLOR_FMT_NV12_UBWC, width, height);
}
+static u32 get_frame_size_compressed_full_yuv(int plane,
+ u32 max_mbs_per_frame, u32 size_per_mb)
+{
+ return (max_mbs_per_frame * size_per_mb * 3 / 2);
+}
+
static u32 get_frame_size_compressed(int plane,
u32 max_mbs_per_frame, u32 size_per_mb)
{
@@ -791,7 +797,7 @@ struct msm_vidc_format vdec_formats[] = {
.description = "VP9 compressed format",
.fourcc = V4L2_PIX_FMT_VP9,
.num_planes = 1,
- .get_frame_size = get_frame_size_compressed,
+ .get_frame_size = get_frame_size_compressed_full_yuv,
.type = OUTPUT_PORT,
},
{
@@ -2835,4 +2841,3 @@ int msm_vdec_ctrl_init(struct msm_vidc_inst *inst)
return msm_comm_ctrl_init(inst, msm_vdec_ctrls,
ARRAY_SIZE(msm_vdec_ctrls), &msm_vdec_ctrl_ops);
}
-