diff options
author | Jonas Karlman <[email protected]> | 2019-11-06 23:34:22 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2019-11-10 17:58:45 +0100 |
commit | 79c523291ea22f5b3289d92f180ed6b76fd80502 (patch) | |
tree | 2fa22166f323240c7536da50d68bd712d0a85bd3 | |
parent | a8fe996084e358c6f4ec7c51ec28fd3c1ddf68d1 (diff) |
media: hantro: Use output buffer width and height for H264 decoding
Calculations for motion vector buffer offset is based on width and height
from the configured output format, lets use the same values for macroblock
width and height hw regs.
Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r-- | drivers/staging/media/hantro/hantro_g1_h264_dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c index 30d977c3d529..27d40d8d3728 100644 --- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c +++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c @@ -51,8 +51,8 @@ static void set_params(struct hantro_ctx *ctx) vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL0); /* Decoder control register 1. */ - reg = G1_REG_DEC_CTRL1_PIC_MB_WIDTH(sps->pic_width_in_mbs_minus1 + 1) | - G1_REG_DEC_CTRL1_PIC_MB_HEIGHT_P(sps->pic_height_in_map_units_minus1 + 1) | + reg = G1_REG_DEC_CTRL1_PIC_MB_WIDTH(MB_WIDTH(ctx->src_fmt.width)) | + G1_REG_DEC_CTRL1_PIC_MB_HEIGHT_P(MB_HEIGHT(ctx->src_fmt.height)) | G1_REG_DEC_CTRL1_REF_FRAMES(sps->max_num_ref_frames); vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL1); |