From fcdeaae045115dbae680dc6e788e504a409749ff Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Wed, 16 Sep 2026 14:22:22 -0700 Subject: [PATCH] [decoder] Add bit_depth to iv_yuv_buf_t and ivd_video_decode_op_t This new field is currently hard-coded to 8. This will be updated high bit-depth support is added later. --- common/iv.h | 5 +++++ common/ivd.h | 5 +++++ decoder/ihevcd_decode.c | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/common/iv.h b/common/iv.h index 8a5618b..b21f7df 100644 --- a/common/iv.h +++ b/common/iv.h @@ -258,6 +258,11 @@ typedef struct { * Stride/Pitch of the Chroma (Cr) Buffer */ UWORD32 u4_v_strd; + + /** + * Bit depth of the YUV Buffers + */ + UWORD32 u4_bit_depth; }iv_yuv_buf_t; diff --git a/common/ivd.h b/common/ivd.h index 3da4002..d711e68 100644 --- a/common/ivd.h +++ b/common/ivd.h @@ -466,6 +466,11 @@ typedef struct { */ WORD32 i4_display_index; + /** + * bit depth + */ + UWORD32 u4_bit_depth; + }ivd_video_decode_op_t; diff --git a/decoder/ihevcd_decode.c b/decoder/ihevcd_decode.c index 2012618..9be39b6 100644 --- a/decoder/ihevcd_decode.c +++ b/decoder/ihevcd_decode.c @@ -204,11 +204,13 @@ static void ihevcd_fill_outargs(codec_t *ps_codec, { ps_dec_op->u4_pic_wd = ps_codec->i4_disp_wd; ps_dec_op->u4_pic_ht = ps_codec->i4_disp_ht; + ps_dec_op->u4_bit_depth = 8; } else { ps_dec_op->u4_pic_wd = 0; ps_dec_op->u4_pic_ht = 0; + ps_dec_op->u4_bit_depth = 0; } ps_dec_op->e_pic_type = ps_codec->e_dec_pic_type; @@ -249,6 +251,8 @@ static void ihevcd_fill_outargs(codec_t *ps_codec, ps_dec_op->u4_frame_decoded_flag = 0; } + ps_dec_op->s_disp_frm_buf.u4_bit_depth = ps_dec_op->u4_bit_depth; + /* If there is a display buffer */ if(ps_codec->ps_disp_buf) {