You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/hevc: Parse recovery point SEI
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
@ -4087,6 +4087,7 @@ static int hevc_update_thread_context(AVCodecContext *dst,
|
||||
s->sei.common.display_orientation = s0->sei.common.display_orientation;
|
||||
s->sei.common.alternative_transfer = s0->sei.common.alternative_transfer;
|
||||
s->sei.tdrdi = s0->sei.tdrdi;
|
||||
s->sei.recovery_point = s0->sei.recovery_point;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -79,6 +79,20 @@ static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int decode_nal_sei_recovery_point(HEVCSEI *s, GetBitContext *gb)
|
||||
{
|
||||
HEVCSEIRecoveryPoint *rec = &s->recovery_point;
|
||||
int recovery_poc_cnt = get_se_golomb(gb);
|
||||
|
||||
if (recovery_poc_cnt > INT16_MAX || recovery_poc_cnt < INT16_MIN)
|
||||
return AVERROR_INVALIDDATA;
|
||||
rec->recovery_poc_cnt = recovery_poc_cnt;
|
||||
rec->exact_match_flag = get_bits1(gb);
|
||||
rec->broken_link_flag = get_bits1(gb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int decode_nal_sei_active_parameter_sets(HEVCSEI *s, GetBitContext *gb, void *logctx)
|
||||
{
|
||||
int num_sps_ids_minus1;
|
||||
@ -212,6 +226,8 @@ static int decode_nal_sei_prefix(GetBitContext *gb, GetByteContext *gbyte,
|
||||
return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gbyte);
|
||||
case SEI_TYPE_PIC_TIMING:
|
||||
return decode_nal_sei_pic_timing(s, gb, ps, logctx);
|
||||
case SEI_TYPE_RECOVERY_POINT:
|
||||
return decode_nal_sei_recovery_point(s, gb);
|
||||
case SEI_TYPE_ACTIVE_PARAMETER_SETS:
|
||||
return decode_nal_sei_active_parameter_sets(s, gb, logctx);
|
||||
case SEI_TYPE_TIME_CODE:
|
||||
|
@ -95,6 +95,12 @@ typedef struct HEVCSEITDRDI {
|
||||
uint8_t three_dimensional_reference_displays_extension_flag;
|
||||
} HEVCSEITDRDI;
|
||||
|
||||
typedef struct HEVCSEIRecoveryPoint {
|
||||
int16_t recovery_poc_cnt;
|
||||
uint8_t exact_match_flag;
|
||||
uint8_t broken_link_flag;
|
||||
} HEVCSEIRecoveryPoint;
|
||||
|
||||
typedef struct HEVCSEI {
|
||||
H2645SEI common;
|
||||
HEVCSEIPictureHash picture_hash;
|
||||
@ -102,6 +108,7 @@ typedef struct HEVCSEI {
|
||||
int active_seq_parameter_set_id;
|
||||
HEVCSEITimeCode timecode;
|
||||
HEVCSEITDRDI tdrdi;
|
||||
HEVCSEIRecoveryPoint recovery_point;
|
||||
} HEVCSEI;
|
||||
|
||||
struct HEVCParamSets;
|
||||
|
Reference in New Issue
Block a user