mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-02 08:42:42 +07:00
[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.
This commit is contained in:
parent
816221d81e
commit
8e4247c53e
4 changed files with 39 additions and 1 deletions
|
|
@ -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 */
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -1086,6 +1086,12 @@ WORD32 ihevcd_init(codec_t *ps_codec)
|
|||
ps_codec->i4_max_prev_poc_lsb = -1;
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ 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;
|
||||
ps_dec_op->u4_bit_depth = ps_codec->i4_bit_depth_luma;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1819,6 +1819,31 @@ struct _codec_t
|
|||
*/
|
||||
IV_PICTURE_CODING_TYPE_T e_dec_pic_type;
|
||||
|
||||
/**
|
||||
* ChromaFormatIDC
|
||||
*/
|
||||
WORD32 i4_chroma_format_idc;
|
||||
|
||||
/**
|
||||
* Luma bit depth - 8 and 10 bits are supported
|
||||
*/
|
||||
WORD32 i4_bit_depth_luma;
|
||||
|
||||
/**
|
||||
* Chroma bit depth - 8 and 10 bits are supported
|
||||
*/
|
||||
WORD32 i4_bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Luma sample size in bytes - 1 for 8 bit, 2 for hbd
|
||||
*/
|
||||
WORD32 i4_pixel_size_y;
|
||||
|
||||
/**
|
||||
* Chroma sample size in bytes - 1 for 8 bit, 2 for hbd
|
||||
*/
|
||||
WORD32 i4_pixel_size_uv;
|
||||
|
||||
/**
|
||||
* Flag to signal if a frame was decoded in this call
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue