FFmpeg
Data Structures | Macros | Functions | Variables
dv_error_marker_bsf.c File Reference
#include "bsf.h"
#include "bsf_internal.h"
#include "libavutil/colorspace.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  DVErrorMarkerContext
 

Macros

#define OFFSET(x)   offsetof(DVErrorMarkerContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
 

Functions

static void setdc (uint8_t *b, const uint8_t color_rgba[4], int cblocks, int y_step, int v_step, int u_step)
 
static int dv_error_marker_init (AVBSFContext *ctx)
 
static int dv_error_marker_filter (AVBSFContext *ctx, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass dv_error_marker_class
 
const FFBitStreamFilter ff_dv_error_marker_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 97 of file dv_error_marker_bsf.c.

◆ FLAGS

Definition at line 98 of file dv_error_marker_bsf.c.

Function Documentation

◆ setdc()

static void setdc ( uint8_t *  b,
const uint8_t  color_rgba[4],
int  cblocks,
int  y_step,
int  v_step,
int  u_step 
)
static

Definition at line 34 of file dv_error_marker_bsf.c.

Referenced by dv_error_marker_init().

◆ dv_error_marker_init()

static int dv_error_marker_init ( AVBSFContext ctx)
static

Definition at line 52 of file dv_error_marker_bsf.c.

◆ dv_error_marker_filter()

static int dv_error_marker_filter ( AVBSFContext ctx,
AVPacket pkt 
)
static

Definition at line 63 of file dv_error_marker_bsf.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "color" , "set color", OFFSET(color_rgba), AV_OPT_TYPE_COLOR, {.str = "yellow"}, 0, 0, FLAGS },
{ "sta" , "specify which error status value to match"
, OFFSET(sta ), AV_OPT_TYPE_FLAGS, {.i64 = 0xFFFE}, 0, 0xFFFF, FLAGS, "sta" },
{ "ok" , "No error, no concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0001}, 0, 0xFFFF, FLAGS, "sta"},
{ "Aa" , "No error, concealment from previous frame type a",0, AV_OPT_TYPE_CONST, {.i64 = 0x0004}, 0, 0xFFFF, FLAGS, "sta"},
{ "Ba" , "No error, concealment from next frame type a", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0010}, 0, 0xFFFF, FLAGS, "sta"},
{ "Ca" , "No error, unspecified concealment type a", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0040}, 0, 0xFFFF, FLAGS, "sta"},
{ "erri" , "Error with inserted code, No concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0080}, 0, 0xFFFF, FLAGS, "sta"},
{ "erru" , "Error with unidentified pos, No concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0x8000}, 0, 0xFFFF, FLAGS, "sta"},
{ "err" , "Error, No concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0x8080}, 0, 0xFFFF, FLAGS, "sta"},
{ "Ab" , "No error, concealment from previous frame type b",0, AV_OPT_TYPE_CONST, {.i64 = 0x0400}, 0, 0xFFFF, FLAGS, "sta"},
{ "Bb" , "No error, concealment from next frame type b", 0, AV_OPT_TYPE_CONST, {.i64 = 0x1000}, 0, 0xFFFF, FLAGS, "sta"},
{ "Cb" , "No error, unspecified concealment type b", 0, AV_OPT_TYPE_CONST, {.i64 = 0x4000}, 0, 0xFFFF, FLAGS, "sta"},
{ "A" , "No error, concealment from previous frame", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0404}, 0, 0xFFFF, FLAGS, "sta"},
{ "B" , "No error, concealment from next frame", 0, AV_OPT_TYPE_CONST, {.i64 = 0x1010}, 0, 0xFFFF, FLAGS, "sta"},
{ "C" , "No error, unspecified concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0x4040}, 0, 0xFFFF, FLAGS, "sta"},
{ "a" , "No error, concealment type a", 0, AV_OPT_TYPE_CONST, {.i64 = 0x0054}, 0, 0xFFFF, FLAGS, "sta"},
{ "b" , "No error, concealment type b", 0, AV_OPT_TYPE_CONST, {.i64 = 0x5400}, 0, 0xFFFF, FLAGS, "sta"},
{ "res" , "Reserved", 0, AV_OPT_TYPE_CONST, {.i64 = 0x2B2A}, 0, 0xFFFF, FLAGS, "sta"},
{ "notok" , "Error or concealment", 0, AV_OPT_TYPE_CONST, {.i64 = 0xD4D4}, 0, 0xFFFF, FLAGS, "sta"},
{ "notres" , "Not reserved", 0, AV_OPT_TYPE_CONST, {.i64 = 0xD4D5}, 0, 0xFFFF, FLAGS, "sta"},
{ NULL },
}

Definition at line 99 of file dv_error_marker_bsf.c.

◆ dv_error_marker_class

const AVClass dv_error_marker_class
static
Initial value:
= {
.class_name = "dv_error_marker",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 124 of file dv_error_marker_bsf.c.

◆ ff_dv_error_marker_bsf

const FFBitStreamFilter ff_dv_error_marker_bsf
Initial value:
= {
.p.name = "dv_error_marker",
.p.codec_ids = (const enum AVCodecID []){ AV_CODEC_ID_DVVIDEO, AV_CODEC_ID_NONE },
.p.priv_class = &dv_error_marker_class,
.priv_data_size = sizeof(DVErrorMarkerContext),
}

Definition at line 131 of file dv_error_marker_bsf.c.

DVErrorMarkerContext
Definition: dv_error_marker_bsf.c:27
dv_error_marker_class
static const AVClass dv_error_marker_class
Definition: dv_error_marker_bsf.c:124
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
FLAGS
#define FLAGS
Definition: dv_error_marker_bsf.c:98
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_TYPE_COLOR
@ AV_OPT_TYPE_COLOR
Definition: opt.h:240
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:49
dv_error_marker_init
static int dv_error_marker_init(AVBSFContext *ctx)
Definition: dv_error_marker_bsf.c:52
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
dv_error_marker_filter
static int dv_error_marker_filter(AVBSFContext *ctx, AVPacket *pkt)
Definition: dv_error_marker_bsf.c:63
OFFSET
#define OFFSET(x)
Definition: dv_error_marker_bsf.c:97
AV_CODEC_ID_DVVIDEO
@ AV_CODEC_ID_DVVIDEO
Definition: codec_id.h:76
options
static const AVOption options[]
Definition: dv_error_marker_bsf.c:99
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:224
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234