media: verisilicon: g2: Use common helpers to compute chroma and mv
offsets
HEVC and VP9 are running on the same hardware and share the same
chroma and motion vectors offset constraint.
Create common helpers functions for these computation.
Source and destination buffer height may not be the same because
alignment constraint are different so use destination height to
compute chroma offset because we target this buffer as hardware
output.
To be able to use the helpers in both VP9 HEVC code remove dec_params
and use context->bit_depth instead.
Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Philipp Zabel <p.zabel@pengutronix.de>
Showing
- drivers/media/platform/verisilicon/hantro_g2.c 14 additions, 0 deletionsdrivers/media/platform/verisilicon/hantro_g2.c
- drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c 2 additions, 16 deletionsdrivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
- drivers/media/platform/verisilicon/hantro_g2_vp9_dec.c 4 additions, 22 deletionsdrivers/media/platform/verisilicon/hantro_g2_vp9_dec.c
- drivers/media/platform/verisilicon/hantro_hw.h 3 additions, 0 deletionsdrivers/media/platform/verisilicon/hantro_hw.h
Loading
Please register or sign in to comment