Clean up HBD support before split
Some checks failed
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Harish Mahendrakar 2026-08-07 08:30:34 -07:00 committed by Harish Mahendrakar
parent a30bb77acf
commit 0cc032d9ff
9 changed files with 41 additions and 50 deletions

View file

@ -81,9 +81,7 @@ typedef enum {
IV_RGB_24 = 0xa,
IV_YUV_420SP_UV = 0xb,
IV_YUV_420SP_VU = 0xc,
IV_RGBA_8888 = 0xd,
IV_YUV_422SP_UV = 0xe,
IV_YUV_422SP_VU = 0xf
IV_RGBA_8888 = 0xd
}IV_COLOR_FORMAT_T;
/* IV_PICTURE_CODING_TYPE_T: VOP/Frame coding type Enumeration */
@ -262,14 +260,9 @@ typedef struct {
UWORD32 u4_v_strd;
/**
* Bit depth of the Luma (Y) Buffer
* Bit depth of the YUV Buffers
*/
UWORD32 u4_y_bit_depth;
/**
* Bit depth of the Chroma (U and V) Buffers
*/
UWORD32 u4_uv_bit_depth;
UWORD32 u4_bit_depth;
}iv_yuv_buf_t;

View file

@ -2880,9 +2880,7 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_GRAY;
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422;
else if((ps_codec->e_chroma_fmt == IV_YUV_422SP_UV)
|| (ps_codec->e_chroma_fmt == IV_YUV_422SP_VU))
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422SP;
ps_ctl_op->u4_num_disp_bufs = 1;

View file

@ -254,8 +254,7 @@ 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_y_bit_depth = i4_bit_depth_luma;
ps_dec_op->s_disp_frm_buf.u4_uv_bit_depth = i4_bit_depth_chroma;
ps_dec_op->s_disp_frm_buf.u4_bit_depth = i4_bit_depth_luma;
/* If there is a display buffer */
if(ps_codec->ps_disp_buf)
@ -294,8 +293,7 @@ static void ihevcd_fill_outargs(codec_t *ps_codec,
ps_dec_op->u4_output_present = 0;
ps_dec_op->s_disp_frm_buf.u4_y_wd = ps_codec->i4_disp_wd;
ps_dec_op->s_disp_frm_buf.u4_y_ht = ps_codec->i4_disp_ht;
// ps_dec_op->s_disp_frm_buf.u4_y_bit_depth = i4_bit_depth_luma;
// ps_dec_op->s_disp_frm_buf.u4_uv_bit_depth = i4_bit_depth_chroma;
// ps_dec_op->s_disp_frm_buf.u4_bit_depth = i4_bit_depth_luma;
if(ps_codec->i4_share_disp_buf)
{
@ -642,18 +640,21 @@ WORD32 ihevcd_decode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
if(1 == ps_dec_op->u4_output_present)
{
WORD32 ypos = ps_codec->i4_disp_ht - 64 - LOGO_HT;
WORD32 xpos = ps_codec->i4_disp_wd - 32 - LOGO_WD;
WORD32 ypos = ps_codec->i4_disp_ht - 32 - LOGO_HT;
if(ypos < 0)
ypos = 0;
if(xpos < 0)
xpos = 0;
INSERT_LOGO(ps_dec_ip->s_out_buffer.pu1_bufs[0],
ps_dec_ip->s_out_buffer.pu1_bufs[1],
ps_dec_ip->s_out_buffer.pu1_bufs[2], ps_codec->i4_disp_strd,
32 ,
ps_codec->i4_disp_ht - 32 - LOGO_HT,
xpos,
ypos,
ps_codec->e_chroma_fmt,
ps_codec->i4_bit_depth_luma,
ps_codec->i4_disp_wd,
ps_codec->i4_disp_ht);
}
@ -1048,18 +1049,21 @@ WORD32 ihevcd_decode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
if(1 == ps_dec_op->u4_output_present)
{
WORD32 ypos = ps_codec->i4_disp_ht - 64 - LOGO_HT;
WORD32 xpos = ps_codec->i4_disp_wd - 32 - LOGO_WD;
WORD32 ypos = ps_codec->i4_disp_ht - 32 - LOGO_HT;
if(ypos < 0)
ypos = 0;
if(xpos < 0)
xpos = 0;
INSERT_LOGO(ps_dec_ip->s_out_buffer.pu1_bufs[0],
ps_dec_ip->s_out_buffer.pu1_bufs[1],
ps_dec_ip->s_out_buffer.pu1_bufs[2], ps_codec->i4_disp_strd,
32 ,
xpos,
ypos,
ps_codec->e_chroma_fmt,
ps_codec->i4_bit_depth_luma,
ps_codec->i4_disp_wd,
ps_codec->i4_disp_ht);
}

View file

@ -446,8 +446,7 @@ enum
#define MIN_OUT_BUFS_444 3
#define MIN_OUT_BUFS_420SP 2
#define MIN_OUT_BUFS_GRAY 1
#define MIN_OUT_BUFS_422 3
#define MIN_OUT_BUFS_422SP 2
/**
****************************************************************************

View file

@ -38,8 +38,8 @@
//#define LOGO_EN
#define LOGO_WD 164
#define LOGO_HT 48
#define LOGO_WD 90
#define LOGO_HT 36
#define LOGO_WD_Y LOGO_WD
#define LOGO_HT_Y LOGO_HT
@ -88,14 +88,13 @@ void ihevcd_insert_logo(UWORD8 *buf_y, UWORD8 *buf_u, UWORD8 *buf_v,
UWORD32 x_pos,
UWORD32 y_pos,
UWORD32 yuv_fmt,
WORD32 bit_depth_luma,
UWORD32 u4_disp_wd,
UWORD32 u4_disp_ht);
#ifdef LOGO_EN
#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,bit_depth_luma,disp_wd,disp_ht) ihevcd_insert_logo(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,bit_depth_luma,disp_wd,disp_ht);
#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht) ihevcd_insert_logo(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht);
#else
#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,bit_depth_luma,disp_wd,disp_ht)
#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht)
#endif
#endif /* LOGO_INSERT_H */

View file

@ -1751,6 +1751,9 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
ps_sps->i1_bit_depth_chroma_minus8 = value;
if (ps_sps->i1_bit_depth_luma_minus8 != ps_sps->i1_bit_depth_chroma_minus8)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
{
WORD8 intra_flag = s_ptl.s_ptl_gen.i1_general_intra_constraint_flag;
WORD8 still_flag = s_ptl.s_ptl_gen.i1_general_one_picture_only_constraint_flag;

View file

@ -51,15 +51,16 @@
#include "ihevc_debug.h"
#include "ihevc_structs.h"
/**
* Name of the codec and target platform (All Cortex A processors in this case)
* Name of the codec
*/
#define CODEC_NAME "HEVCDEC_CXA_HM-14.0+RExt-7.2"
#define CODEC_NAME "HEVCDEC"
/**
* Codec release type, production or evaluation
*/
#define CODEC_RELEASE_TYPE "production"
/**
* Version string. First two digits signify major version and last two minor
* Increment major version for API change or major feature update
*/
#define CODEC_RELEASE_VER "05.00"
/**

View file

@ -996,7 +996,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
WORD32 i4_pixel_size;
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_y_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_y_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_y_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size), ps_op_file);
@ -1005,7 +1005,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
if(ps_app_ctx->e_output_chroma_format != IV_GRAY)
{
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_uv_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
buf = (UWORD8*)s_dump_disp_frm_buf.pv_u_buf;
for(i = 0; i < s_dump_disp_frm_buf.u4_u_ht; i++)
{
@ -1026,7 +1026,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
UWORD8 au1_y_chksum[16];
WORD32 i4_pixel_size;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_y_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
calc_md5_cksum((UWORD8 *)s_dump_disp_frm_buf.pv_y_buf,
s_dump_disp_frm_buf.u4_y_strd * i4_pixel_size,
s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size,
@ -1038,7 +1038,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
{
UWORD8 au1_u_chksum[16];
UWORD8 au1_v_chksum[16];
WORD32 i4_pixel_size_uv = 1 + (s_dump_disp_frm_buf.u4_uv_bit_depth > 8);
WORD32 i4_pixel_size_uv = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
calc_md5_cksum((UWORD8 *)s_dump_disp_frm_buf.pv_u_buf,
s_dump_disp_frm_buf.u4_u_strd * i4_pixel_size_uv,
s_dump_disp_frm_buf.u4_u_wd * i4_pixel_size_uv,
@ -1056,9 +1056,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
#endif
}
else if((ps_app_ctx->e_output_chroma_format == IV_YUV_420SP_UV)
|| (ps_app_ctx->e_output_chroma_format == IV_YUV_420SP_VU)
|| (ps_app_ctx->e_output_chroma_format == IV_YUV_422SP_UV)
|| (ps_app_ctx->e_output_chroma_format == IV_YUV_422SP_VU))
|| (ps_app_ctx->e_output_chroma_format == IV_YUV_420SP_VU))
{
#if DUMP_SINGLE_BUF
{
@ -1074,7 +1072,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
WORD32 i4_pixel_size;
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_y_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_y_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_y_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size), ps_op_file);
@ -1082,7 +1080,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
}
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_u_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_uv_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_u_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_u_wd * i4_pixel_size), ps_op_file);
@ -1108,7 +1106,7 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
WORD32 i4_pixel_size;
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_y_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_y_bit_depth > 8);
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_y_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_strd * 2 * i4_pixel_size), ps_op_file);
@ -1277,10 +1275,6 @@ void parse_argument(vid_dec_ctx_t *ps_app_ctx, CHAR *argument, CHAR *value)
ps_app_ctx->e_output_chroma_format = IV_YUV_420SP_VU;
else if((strcmp(value, "GRAY")) == 0)
ps_app_ctx->e_output_chroma_format = IV_GRAY;
else if((strcmp(value, "YUV_422SP_UV")) == 0)
ps_app_ctx->e_output_chroma_format = IV_YUV_422SP_UV;
else if((strcmp(value, "YUV_422SP_VU")) == 0)
ps_app_ctx->e_output_chroma_format = IV_YUV_422SP_VU;
else if((strcmp(value, "YUV_422P")) == 0)
ps_app_ctx->e_output_chroma_format = IV_YUV_422P;
else

View file

@ -291,7 +291,7 @@ void Codec::decodeHeader(const uint8_t *data, size_t size) {
mWidth = std::min(dec_op.u4_pic_wd, (UWORD32)10240);
mHeight = std::min(dec_op.u4_pic_ht, (UWORD32)10240);
mBitDepth = dec_op.s_disp_frm_buf.u4_y_bit_depth;
mBitDepth = dec_op.s_disp_frm_buf.u4_bit_depth;
if (mBitDepth == 0) mBitDepth = 8;
/* Break after successful header decode */
@ -327,7 +327,7 @@ IV_API_CALL_STATUS_T Codec::decodeFrame(const uint8_t *data, size_t size,
/* In case of change in resolution, reset codec and feed the same data again
*/
if (IVD_RES_CHANGED == (dec_op.u4_error_code & 0xFF)) {
UWORD32 bitDepth = dec_op.s_disp_frm_buf.u4_y_bit_depth;
UWORD32 bitDepth = dec_op.s_disp_frm_buf.u4_bit_depth;
if (bitDepth == 0) bitDepth = 8;
if (dec_op.u4_pic_wd && dec_op.u4_pic_ht &&
@ -347,7 +347,7 @@ IV_API_CALL_STATUS_T Codec::decodeFrame(const uint8_t *data, size_t size,
* to feed next data */
if (!*bytesConsumed) *bytesConsumed = 4;
UWORD32 bitDepth = dec_op.s_disp_frm_buf.u4_y_bit_depth;
UWORD32 bitDepth = dec_op.s_disp_frm_buf.u4_bit_depth;
if (bitDepth == 0) bitDepth = 8;
if (dec_op.u4_pic_wd && dec_op.u4_pic_ht &&