From 60a5701bfadb3371c8bbd0331957dca92abc6df0 Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Thu, 17 Sep 2026 12:35:02 -0700 Subject: [PATCH] [decoder]: Add few entries in codec_t and initialize them for default paths Added few members in codec_t and initialized them for 420P, 8bit path. When HBD support is added these will be updated based on the parsed headers. (cherry picked from commit f35c5b197129d74f4470ce762cd7e652a0e20200) --- common/ihevc_defs.h | 7 +++++++ decoder/ihevcd_api.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/common/ihevc_defs.h b/common/ihevc_defs.h index d0b11b7..fb9f979 100644 --- a/common/ihevc_defs.h +++ b/common/ihevc_defs.h @@ -272,6 +272,13 @@ enum #define BIT_DEPTH 8 #define BIT_DEPTH_LUMA BIT_DEPTH #define BIT_DEPTH_CHROMA BIT_DEPTH + +#define BIT_DEPTH_8BITS 8 +#define BIT_DEPTH_10BITS 10 + +#define PIXEL_SIZE_1BYTE sizeof(UWORD8) +#define PIXEL_SIZE_2BYTES sizeof(UWORD16) + /*****************************************************************************/ /* Profile tier level defs */ /*****************************************************************************/ diff --git a/decoder/ihevcd_api.c b/decoder/ihevcd_api.c index 386adb7..7f918f5 100644 --- a/decoder/ihevcd_api.c +++ b/decoder/ihevcd_api.c @@ -1168,6 +1168,10 @@ WORD32 ihevcd_init(codec_t *ps_codec) ps_codec->s_parse.i4_abs_pic_order_cnt = -1; ps_codec->i4_chroma_format_idc = CHROMA_FMT_IDC_YUV420; + ps_codec->i4_pixel_size_y = PIXEL_SIZE_1BYTE; + ps_codec->i4_pixel_size_uv = PIXEL_SIZE_1BYTE; + ps_codec->i4_bit_depth_luma = BIT_DEPTH_8BITS; + ps_codec->i4_bit_depth_chroma = BIT_DEPTH_8BITS; /* Set ref chroma format by default to 420SP UV interleaved */ ps_codec->e_ref_chroma_fmt = IV_YUV_420SP_UV;