FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
h265_metadata_bsf.c File Reference
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "cbs.h"
#include "cbs_h265.h"
#include "hevc.h"

Go to the source code of this file.

Data Structures

struct  H265MetadataContext
 

Macros

#define SET_OR_INFER(field, value, present_flag, infer)
 
#define CROP(border, unit)
 
#define OFFSET(x)   offsetof(H265MetadataContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
 

Enumerations

enum  { PASS, INSERT, REMOVE }
 

Functions

static int h265_metadata_update_vps (AVBSFContext *bsf, H265RawVPS *vps)
 
static int h265_metadata_update_sps (AVBSFContext *bsf, H265RawSPS *sps)
 
static int h265_metadata_filter (AVBSFContext *bsf, AVPacket *out)
 
static int h265_metadata_init (AVBSFContext *bsf)
 
static void h265_metadata_close (AVBSFContext *bsf)
 

Variables

static const AVOption h265_metadata_options []
 
static const AVClass h265_metadata_class
 
static enum AVCodecID h265_metadata_codec_ids []
 
const AVBitStreamFilter ff_hevc_metadata_bsf
 

Macro Definition Documentation

#define SET_OR_INFER (   field,
  value,
  present_flag,
  infer 
)
Value:
do { \
if (value >= 0) { \
field = value; \
need_vui = 1; \
} else if (!present_flag) \
field = infer; \
} while (0)
#define infer(name, value)
Definition: cbs_h2645.c:352
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
if(ret< 0)
Definition: vf_mcdeint.c:279

Referenced by h265_metadata_update_sps().

#define CROP (   border,
  unit 
)
Value:
do { \
if (ctx->crop_ ## border >= 0) { \
if (ctx->crop_ ## border % unit != 0) { \
av_log(bsf, AV_LOG_ERROR, "Invalid value for crop_%s: " \
"must be a multiple of %d.\n", #border, unit); \
return AVERROR(EINVAL); \
} \
sps->conf_win_ ## border ## _offset = \
ctx->crop_ ## border / unit; \
sps->conformance_window_flag = 1; \
} \
} while (0)
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define AVERROR(e)
Definition: error.h:43
return
AVFormatContext * ctx
Definition: movenc.c:48
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
if(ret< 0)
Definition: vf_mcdeint.c:279

Referenced by h265_metadata_update_sps().

#define OFFSET (   x)    offsetof(H265MetadataContext, x)

Definition at line 383 of file h265_metadata_bsf.c.

Definition at line 384 of file h265_metadata_bsf.c.

Enumeration Type Documentation

anonymous enum
Enumerator
PASS 
INSERT 
REMOVE 

Definition at line 27 of file h265_metadata_bsf.c.

Function Documentation

static int h265_metadata_update_vps ( AVBSFContext bsf,
H265RawVPS vps 
)
static

Definition at line 64 of file h265_metadata_bsf.c.

Referenced by h265_metadata_filter(), and h265_metadata_init().

static int h265_metadata_update_sps ( AVBSFContext bsf,
H265RawSPS sps 
)
static

Definition at line 92 of file h265_metadata_bsf.c.

Referenced by h265_metadata_filter(), and h265_metadata_init().

static int h265_metadata_filter ( AVBSFContext bsf,
AVPacket out 
)
static

Definition at line 233 of file h265_metadata_bsf.c.

static int h265_metadata_init ( AVBSFContext bsf)
static

Definition at line 334 of file h265_metadata_bsf.c.

static void h265_metadata_close ( AVBSFContext bsf)
static

Definition at line 377 of file h265_metadata_bsf.c.

Variable Documentation

const AVOption h265_metadata_options[]
static

Definition at line 385 of file h265_metadata_bsf.c.

const AVClass h265_metadata_class
static
Initial value:
= {
.class_name = "h265_metadata_bsf",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption h265_metadata_options[]

Definition at line 445 of file h265_metadata_bsf.c.

enum AVCodecID h265_metadata_codec_ids[]
static
Initial value:

Definition at line 452 of file h265_metadata_bsf.c.

const AVBitStreamFilter ff_hevc_metadata_bsf
Initial value:
= {
.name = "hevc_metadata",
.priv_data_size = sizeof(H265MetadataContext),
.priv_class = &h265_metadata_class,
}
static enum AVCodecID h265_metadata_codec_ids[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int h265_metadata_filter(AVBSFContext *bsf, AVPacket *out)
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
Definition: cfhd.c:114
static void h265_metadata_close(AVBSFContext *bsf)
static int h265_metadata_init(AVBSFContext *bsf)
static enum AVCodecID codec_ids[]
static const AVClass h265_metadata_class

Definition at line 456 of file h265_metadata_bsf.c.