mirror of https://github.com/FFmpeg/FFmpeg.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
3.1 KiB
113 lines
3.1 KiB
8 years ago
|
/*
|
||
|
* HEVC Supplementary Enhancement Information messages
|
||
|
*
|
||
|
* This file is part of FFmpeg.
|
||
|
*
|
||
|
* FFmpeg is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
* License along with FFmpeg; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*/
|
||
|
|
||
|
#ifndef AVCODEC_HEVC_SEI_H
|
||
|
#define AVCODEC_HEVC_SEI_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
4 years ago
|
#include "libavutil/buffer.h"
|
||
|
|
||
7 months ago
|
#include "libavcodec/get_bits.h"
|
||
|
#include "libavcodec/h2645_sei.h"
|
||
|
#include "libavcodec/sei.h"
|
||
|
|
||
3 years ago
|
#include "hevc.h"
|
||
8 years ago
|
|
||
|
|
||
5 years ago
|
typedef enum {
|
||
|
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING = 7,
|
||
|
HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING = 8
|
||
|
} HEVC_SEI_PicStructType;
|
||
|
|
||
8 years ago
|
typedef struct HEVCSEIPictureHash {
|
||
|
uint8_t md5[3][16];
|
||
|
uint8_t is_md5;
|
||
|
} HEVCSEIPictureHash;
|
||
|
|
||
|
typedef struct HEVCSEIFramePacking {
|
||
|
int present;
|
||
|
int arrangement_type;
|
||
|
int content_interpretation_type;
|
||
|
int quincunx_subsampling;
|
||
7 years ago
|
int current_frame_is_frame0_flag;
|
||
8 years ago
|
} HEVCSEIFramePacking;
|
||
|
|
||
|
typedef struct HEVCSEIPictureTiming {
|
||
|
int picture_struct;
|
||
|
} HEVCSEIPictureTiming;
|
||
|
|
||
8 years ago
|
typedef struct HEVCSEIAlternativeTransfer {
|
||
|
int present;
|
||
|
int preferred_transfer_characteristics;
|
||
|
} HEVCSEIAlternativeTransfer;
|
||
|
|
||
5 years ago
|
typedef struct HEVCSEITimeCode {
|
||
|
int present;
|
||
|
uint8_t num_clock_ts;
|
||
|
uint8_t clock_timestamp_flag[3];
|
||
|
uint8_t units_field_based_flag[3];
|
||
|
uint8_t counting_type[3];
|
||
|
uint8_t full_timestamp_flag[3];
|
||
|
uint8_t discontinuity_flag[3];
|
||
|
uint8_t cnt_dropped_flag[3];
|
||
|
uint16_t n_frames[3];
|
||
|
uint8_t seconds_value[3];
|
||
|
uint8_t minutes_value[3];
|
||
|
uint8_t hours_value[3];
|
||
|
uint8_t seconds_flag[3];
|
||
|
uint8_t minutes_flag[3];
|
||
|
uint8_t hours_flag[3];
|
||
|
uint8_t time_offset_length[3];
|
||
|
int32_t time_offset_value[3];
|
||
|
} HEVCSEITimeCode;
|
||
|
|
||
7 years ago
|
typedef struct HEVCSEI {
|
||
3 years ago
|
H2645SEI common;
|
||
8 years ago
|
HEVCSEIPictureHash picture_hash;
|
||
|
HEVCSEIPictureTiming picture_timing;
|
||
|
int active_seq_parameter_set_id;
|
||
5 years ago
|
HEVCSEITimeCode timecode;
|
||
7 years ago
|
} HEVCSEI;
|
||
8 years ago
|
|
||
|
struct HEVCParamSets;
|
||
|
|
||
7 years ago
|
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
|
||
3 years ago
|
const struct HEVCParamSets *ps, enum HEVCNALUnitType type);
|
||
8 years ago
|
|
||
3 years ago
|
static inline int ff_hevc_sei_ctx_replace(HEVCSEI *dst, const HEVCSEI *src)
|
||
|
{
|
||
|
return ff_h2645_sei_ctx_replace(&dst->common, &src->common);
|
||
|
}
|
||
|
|
||
8 years ago
|
/**
|
||
|
* Reset SEI values that are stored on the Context.
|
||
|
* e.g. Caption data that was extracted during NAL
|
||
|
* parsing.
|
||
|
*
|
||
3 years ago
|
* @param sei HEVCSEI.
|
||
8 years ago
|
*/
|
||
3 years ago
|
static inline void ff_hevc_reset_sei(HEVCSEI *sei)
|
||
|
{
|
||
|
ff_h2645_sei_reset(&sei->common);
|
||
|
}
|
||
8 years ago
|
|
||
|
#endif /* AVCODEC_HEVC_SEI_H */
|