Coverage Report

Created: 2024-09-06 07:53

/src/ffmpeg/libavcodec/hevc/sei.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * HEVC Supplementary Enhancement Information messages
3
 *
4
 * This file is part of FFmpeg.
5
 *
6
 * FFmpeg is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11
 * FFmpeg is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with FFmpeg; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
 */
20
21
#ifndef AVCODEC_HEVC_SEI_H
22
#define AVCODEC_HEVC_SEI_H
23
24
#include <stdint.h>
25
26
#include "libavutil/buffer.h"
27
28
#include "libavcodec/get_bits.h"
29
#include "libavcodec/h2645_sei.h"
30
#include "libavcodec/sei.h"
31
32
#include "hevc.h"
33
34
35
typedef enum {
36
        HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING = 7,
37
        HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING = 8
38
} HEVC_SEI_PicStructType;
39
40
typedef struct HEVCSEIPictureHash {
41
    uint8_t       md5[3][16];
42
    uint8_t is_md5;
43
} HEVCSEIPictureHash;
44
45
typedef struct HEVCSEIFramePacking {
46
    int present;
47
    int arrangement_type;
48
    int content_interpretation_type;
49
    int quincunx_subsampling;
50
    int current_frame_is_frame0_flag;
51
} HEVCSEIFramePacking;
52
53
typedef struct HEVCSEIPictureTiming {
54
    int picture_struct;
55
} HEVCSEIPictureTiming;
56
57
typedef struct HEVCSEIAlternativeTransfer {
58
    int present;
59
    int preferred_transfer_characteristics;
60
} HEVCSEIAlternativeTransfer;
61
62
typedef struct HEVCSEITimeCode {
63
    int      present;
64
    uint8_t  num_clock_ts;
65
    uint8_t  clock_timestamp_flag[3];
66
    uint8_t  units_field_based_flag[3];
67
    uint8_t  counting_type[3];
68
    uint8_t  full_timestamp_flag[3];
69
    uint8_t  discontinuity_flag[3];
70
    uint8_t  cnt_dropped_flag[3];
71
    uint16_t n_frames[3];
72
    uint8_t  seconds_value[3];
73
    uint8_t  minutes_value[3];
74
    uint8_t  hours_value[3];
75
    uint8_t  seconds_flag[3];
76
    uint8_t  minutes_flag[3];
77
    uint8_t  hours_flag[3];
78
    uint8_t  time_offset_length[3];
79
    int32_t  time_offset_value[3];
80
} HEVCSEITimeCode;
81
82
typedef struct HEVCSEI {
83
    H2645SEI common;
84
    HEVCSEIPictureHash picture_hash;
85
    HEVCSEIPictureTiming picture_timing;
86
    int active_seq_parameter_set_id;
87
    HEVCSEITimeCode timecode;
88
} HEVCSEI;
89
90
struct HEVCParamSets;
91
92
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
93
                           const struct HEVCParamSets *ps, enum HEVCNALUnitType type);
94
95
static inline int ff_hevc_sei_ctx_replace(HEVCSEI *dst, const HEVCSEI *src)
96
0
{
97
0
    return ff_h2645_sei_ctx_replace(&dst->common, &src->common);
98
0
}
Unexecuted instantiation: parser.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: sei.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: parse.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: hevcdec.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: mvs.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: pred.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: refs.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: cabac.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: dsp.c:ff_hevc_sei_ctx_replace
Unexecuted instantiation: filter.c:ff_hevc_sei_ctx_replace
99
100
/**
101
 * Reset SEI values that are stored on the Context.
102
 * e.g. Caption data that was extracted during NAL
103
 * parsing.
104
 *
105
 * @param sei HEVCSEI.
106
 */
107
static inline void ff_hevc_reset_sei(HEVCSEI *sei)
108
320k
{
109
320k
    ff_h2645_sei_reset(&sei->common);
110
320k
}
parser.c:ff_hevc_reset_sei
Line
Count
Source
108
228k
{
109
228k
    ff_h2645_sei_reset(&sei->common);
110
228k
}
Unexecuted instantiation: sei.c:ff_hevc_reset_sei
Unexecuted instantiation: parse.c:ff_hevc_reset_sei
hevcdec.c:ff_hevc_reset_sei
Line
Count
Source
108
91.9k
{
109
91.9k
    ff_h2645_sei_reset(&sei->common);
110
91.9k
}
Unexecuted instantiation: mvs.c:ff_hevc_reset_sei
Unexecuted instantiation: pred.c:ff_hevc_reset_sei
Unexecuted instantiation: refs.c:ff_hevc_reset_sei
Unexecuted instantiation: cabac.c:ff_hevc_reset_sei
Unexecuted instantiation: dsp.c:ff_hevc_reset_sei
Unexecuted instantiation: filter.c:ff_hevc_reset_sei
111
112
#endif /* AVCODEC_HEVC_SEI_H */