Skip to content

Commit ea75570

Browse files
jernejskmchehab
authored andcommitted
media: cedrus: h264: Fix 4K decoding on H6
Due to unknown reason, H6 needs larger intraprediction buffer for 4K videos than other SoCs. This was discovered by playing 4096x2304 video, which is maximum what H6 VPU is supposed to support. Fixes: 03e612e ("media: cedrus: Fix H264 4k support") Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent af72bc8 commit ea75570

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/staging/media/sunxi/cedrus/cedrus_h264.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,12 @@ static int cedrus_h264_start(struct cedrus_ctx *ctx)
610610
goto err_mv_col_buf;
611611
}
612612

613+
/*
614+
* NOTE: Multiplying by two deviates from CedarX logic, but it
615+
* is for some unknown reason needed for H264 4K decoding on H6.
616+
*/
613617
ctx->codec.h264.intra_pred_buf_size =
614-
ALIGN(ctx->src_fmt.width, 64) * 5;
618+
ALIGN(ctx->src_fmt.width, 64) * 5 * 2;
615619
ctx->codec.h264.intra_pred_buf =
616620
dma_alloc_coherent(dev->dev,
617621
ctx->codec.h264.intra_pred_buf_size,

0 commit comments

Comments
 (0)