diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c index 1122a60af3..b1b27eef09 100644 --- a/libavcodec/hevc_parse.c +++ b/libavcodec/hevc_parse.c @@ -22,7 +22,7 @@ #include "hevc_parse.h" static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets *ps, - HEVCSEIContext *sei, int is_nalff, int nal_length_size, + HEVCSEI *sei, int is_nalff, int nal_length_size, int err_recognition, int apply_defdispwin, void *logctx) { int i; @@ -75,7 +75,7 @@ done: } int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, - HEVCSEIContext *sei, int *is_nalff, int *nal_length_size, + HEVCSEI *sei, int *is_nalff, int *nal_length_size, int err_recognition, int apply_defdispwin, void *logctx) { int ret = 0; diff --git a/libavcodec/hevc_parse.h b/libavcodec/hevc_parse.h index 02e1d5b324..4ab96ab1cb 100644 --- a/libavcodec/hevc_parse.h +++ b/libavcodec/hevc_parse.h @@ -30,7 +30,7 @@ #include "hevc_sei.h" int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, - HEVCSEIContext *sei, int *is_nalff, int *nal_length_size, + HEVCSEI *sei, int *is_nalff, int *nal_length_size, int err_recognition, int apply_defdispwin, void *logctx); #endif /* AVCODEC_HEVC_PARSE_H */ diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index dc63c6b954..ff7e8a49d6 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -40,7 +40,7 @@ typedef struct HEVCParserContext { H2645Packet pkt; HEVCParamSets ps; - HEVCSEIContext sei; + HEVCSEI sei; SliceHeader sh; int parsed_extradata; @@ -54,7 +54,7 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, { HEVCParserContext *ctx = s->priv_data; HEVCParamSets *ps = &ctx->ps; - HEVCSEIContext *sei = &ctx->sei; + HEVCSEI *sei = &ctx->sei; SliceHeader *sh = &ctx->sh; GetBitContext *gb = &nal->gb; const HEVCWindow *ow; @@ -180,7 +180,7 @@ static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf, { HEVCParserContext *ctx = s->priv_data; HEVCParamSets *ps = &ctx->ps; - HEVCSEIContext *sei = &ctx->sei; + HEVCSEI *sei = &ctx->sei; int is_global = buf == avctx->extradata; int ret, i; diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c index d0f9966a29..1ea67836b0 100644 --- a/libavcodec/hevc_sei.c +++ b/libavcodec/hevc_sei.c @@ -124,7 +124,7 @@ static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetB return 0; } -static int decode_nal_sei_pic_timing(HEVCSEIContext *s, GetBitContext *gb, const HEVCParamSets *ps, +static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCParamSets *ps, void *logctx, int size) { HEVCSEIPictureTiming *h = &s->picture_timing; @@ -205,7 +205,7 @@ static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetB return 0; } -static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEIContext *s, GetBitContext *gb, +static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitContext *gb, int size) { uint32_t country_code; @@ -236,7 +236,7 @@ static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEIContext *s, GetB return 0; } -static int decode_nal_sei_active_parameter_sets(HEVCSEIContext *s, GetBitContext *gb, void *logctx) +static int decode_nal_sei_active_parameter_sets(HEVCSEI *s, GetBitContext *gb, void *logctx) { int num_sps_ids_minus1; int i; @@ -272,7 +272,7 @@ static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, Ge return 0; } -static int decode_nal_sei_prefix(GetBitContext *gb, HEVCSEIContext *s, const HEVCParamSets *ps, +static int decode_nal_sei_prefix(GetBitContext *gb, HEVCSEI *s, const HEVCParamSets *ps, int type, int size, void *logctx) { switch (type) { @@ -301,7 +301,7 @@ static int decode_nal_sei_prefix(GetBitContext *gb, HEVCSEIContext *s, const HEV } } -static int decode_nal_sei_suffix(GetBitContext *gb, HEVCSEIContext *s, +static int decode_nal_sei_suffix(GetBitContext *gb, HEVCSEI *s, int type, int size, void *logctx) { switch (type) { @@ -314,7 +314,7 @@ static int decode_nal_sei_suffix(GetBitContext *gb, HEVCSEIContext *s, } } -static int decode_nal_sei_message(GetBitContext *gb, HEVCSEIContext *s, +static int decode_nal_sei_message(GetBitContext *gb, HEVCSEI *s, const HEVCParamSets *ps, int nal_unit_type, void *logctx) { @@ -344,7 +344,7 @@ static int more_rbsp_data(GetBitContext *gb) return get_bits_left(gb) > 0 && show_bits(gb, 8) != 0x80; } -int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, +int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type) { int ret; @@ -357,7 +357,7 @@ int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, return 1; } -void ff_hevc_reset_sei(HEVCSEIContext *s) +void ff_hevc_reset_sei(HEVCSEI *s) { s->a53_caption.a53_caption_size = 0; av_freep(&s->a53_caption.a53_caption); diff --git a/libavcodec/hevc_sei.h b/libavcodec/hevc_sei.h index 1b522227ec..8daf2e3f2f 100644 --- a/libavcodec/hevc_sei.h +++ b/libavcodec/hevc_sei.h @@ -106,7 +106,7 @@ typedef struct HEVCSEIAlternativeTransfer { int preferred_transfer_characteristics; } HEVCSEIAlternativeTransfer; -typedef struct HEVCSEIContext { +typedef struct HEVCSEI { HEVCSEIPictureHash picture_hash; HEVCSEIFramePacking frame_packing; HEVCSEIDisplayOrientation display_orientation; @@ -116,11 +116,11 @@ typedef struct HEVCSEIContext { HEVCSEIContentLight content_light; int active_seq_parameter_set_id; HEVCSEIAlternativeTransfer alternative_transfer; -} HEVCSEIContext; +} HEVCSEI; struct HEVCParamSets; -int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, +int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const struct HEVCParamSets *ps, int type); /** @@ -130,6 +130,6 @@ int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, * * @param s HEVCContext. */ -void ff_hevc_reset_sei(HEVCSEIContext *s); +void ff_hevc_reset_sei(HEVCSEI *s); #endif /* AVCODEC_HEVC_SEI_H */ diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index ada2903222..1bfdaef73f 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -405,6 +405,7 @@ typedef struct HEVCContext { uint8_t *sao_pixel_buffer_v[3]; HEVCParamSets ps; + HEVCSEI sei; AVBufferPool *tab_mvf_pool; AVBufferPool *rpl_tab_pool; @@ -480,8 +481,6 @@ typedef struct HEVCContext { int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) int nuh_layer_id; - - HEVCSEIContext sei; } HEVCContext; /** diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c index 6962ce2474..0cf9419ea3 100644 --- a/libavcodec/mediacodecdec.c +++ b/libavcodec/mediacodecdec.c @@ -182,7 +182,7 @@ static int hevc_set_extradata(AVCodecContext *avctx, FFAMediaFormat *format) int ret; HEVCParamSets ps; - HEVCSEIContext sei; + HEVCSEI sei; const HEVCVPS *vps = NULL; const HEVCPPS *pps = NULL;