From fe89da930fa070ea91a518fdf74a96f94c297e22 Mon Sep 17 00:00:00 2001 From: "sayon.chen" Date: Fri, 4 Dec 2020 10:13:45 +0800 Subject: [PATCH] [vp9_dec]: Fix 10bit stride set issue Change-Id: I7c4b342c7229322e589dd10a0582c71dc025a3a2 Signed-off-by: sayon.chen --- mpp/codec/dec/vp9/vp9d_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpp/codec/dec/vp9/vp9d_parser.c b/mpp/codec/dec/vp9/vp9d_parser.c index a1d6ac04..f714450b 100644 --- a/mpp/codec/dec/vp9/vp9d_parser.c +++ b/mpp/codec/dec/vp9/vp9d_parser.c @@ -384,7 +384,7 @@ static RK_S32 vp9_alloc_frame(Vp9CodecContext *ctx, VP9Frame *frame) mpp_frame_set_width(frame->f, ctx->width); mpp_frame_set_height(frame->f, ctx->height); - mpp_frame_set_hor_stride(frame->f, ctx->width); + mpp_frame_set_hor_stride(frame->f, ctx->width * s->bpp / 8); mpp_frame_set_ver_stride(frame->f, ctx->height); mpp_frame_set_errinfo(frame->f, 0); mpp_frame_set_discard(frame->f, 0); @@ -655,6 +655,7 @@ static RK_S32 decode_parser_header(Vp9CodecContext *ctx, mpp_err("Invalid sync code\n"); return MPP_ERR_STREAM; } + if ((fmt = read_colorspace_details(ctx)) < 0) return fmt; // for profile 1, here follows the subsampling bits