FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
h264_metadata_bsf.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/display.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "cbs.h"
#include "cbs_h264.h"
#include "h264.h"
#include "h264_levels.h"
#include "h264_sei.h"

Go to the source code of this file.

Data Structures

struct  H264MetadataContext
 

Macros

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

Enumerations

enum  { PASS, INSERT, REMOVE, EXTRACT }
 
enum  { FLIP_HORIZONTAL = 1, FLIP_VERTICAL = 2 }
 
enum  { LEVEL_UNSET = -2, LEVEL_AUTO = -1 }
 

Functions

static int h264_metadata_update_sps (AVBSFContext *bsf, H264RawSPS *sps)
 
static int h264_metadata_filter (AVBSFContext *bsf, AVPacket *out)
 
static int h264_metadata_init (AVBSFContext *bsf)
 
static void h264_metadata_close (AVBSFContext *bsf)
 

Variables

static const AVOption h264_metadata_options []
 
static const AVClass h264_metadata_class
 
static enum AVCodecID h264_metadata_codec_ids []
 
const AVBitStreamFilter ff_h264_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)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
if(ret< 0)
Definition: vf_mcdeint.c:279
#define infer(name, value)
Definition: cbs_av1.c:741

Referenced by h264_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->frame_crop_ ## border ## _offset = \
ctx->crop_ ## border / unit; \
sps->frame_cropping_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 h264_metadata_update_sps().

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

Definition at line 658 of file h264_metadata_bsf.c.

Definition at line 659 of file h264_metadata_bsf.c.

#define LEVEL (   name,
  value 
)
Value:
{ .i64 = value }, .flags = FLAGS, .unit = "level"
#define NULL
Definition: coverity.c:32
#define FLAGS
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
const char * name
Definition: opengl_enc.c:103

Enumeration Type Documentation

anonymous enum
Enumerator
PASS 
INSERT 
REMOVE 
EXTRACT 

Definition at line 31 of file h264_metadata_bsf.c.

anonymous enum
Enumerator
FLIP_HORIZONTAL 
FLIP_VERTICAL 

Definition at line 38 of file h264_metadata_bsf.c.

anonymous enum
Enumerator
LEVEL_UNSET 
LEVEL_AUTO 

Definition at line 43 of file h264_metadata_bsf.c.

Function Documentation

static int h264_metadata_update_sps ( AVBSFContext bsf,
H264RawSPS sps 
)
static

Definition at line 88 of file h264_metadata_bsf.c.

Referenced by h264_metadata_filter(), and h264_metadata_init().

static int h264_metadata_filter ( AVBSFContext bsf,
AVPacket out 
)
static

Definition at line 277 of file h264_metadata_bsf.c.

static int h264_metadata_init ( AVBSFContext bsf)
static

Definition at line 614 of file h264_metadata_bsf.c.

static void h264_metadata_close ( AVBSFContext bsf)
static

Definition at line 652 of file h264_metadata_bsf.c.

Variable Documentation

const AVOption h264_metadata_options[]
static

Definition at line 660 of file h264_metadata_bsf.c.

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

Definition at line 779 of file h264_metadata_bsf.c.

enum AVCodecID h264_metadata_codec_ids[]
static
Initial value:

Definition at line 786 of file h264_metadata_bsf.c.

const AVBitStreamFilter ff_h264_metadata_bsf
Initial value:
= {
.name = "h264_metadata",
.priv_data_size = sizeof(H264MetadataContext),
.priv_class = &h264_metadata_class,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
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:153
static enum AVCodecID h264_metadata_codec_ids[]
static int h264_metadata_init(AVBSFContext *bsf)
static const AVClass h264_metadata_class
static void h264_metadata_close(AVBSFContext *bsf)
static enum AVCodecID codec_ids[]
static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)

Definition at line 790 of file h264_metadata_bsf.c.