FFmpeg
Macros | Functions | Variables
v210dec.c File Reference
#include "avcodec.h"
#include "internal.h"
#include "v210dec.h"
#include "libavutil/bswap.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define READ_PIXELS(a, b, c)
 
#define V210DEC_FLAGS   AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
 

Functions

static void v210_planar_unpack_c (const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width)
 
av_cold void ff_v210dec_init (V210DecContext *s)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

static const AVOption v210dec_options []
 
static const AVClass v210dec_class
 
AVCodec ff_v210_decoder
 

Macro Definition Documentation

◆ READ_PIXELS

#define READ_PIXELS (   a,
  b,
  c 
)
Value:
do { \
val = av_le2ne32(*src++); \
*a++ = val & 0x3FF; \
*b++ = (val >> 10) & 0x3FF; \
*c++ = (val >> 20) & 0x3FF; \
} while (0)

Definition at line 32 of file v210dec.c.

◆ V210DEC_FLAGS

Definition at line 175 of file v210dec.c.

Function Documentation

◆ v210_planar_unpack_c()

static void v210_planar_unpack_c ( const uint32_t *  src,
uint16_t *  y,
uint16_t *  u,
uint16_t *  v,
int  width 
)
static

Definition at line 40 of file v210dec.c.

Referenced by ff_v210dec_init().

◆ ff_v210dec_init()

av_cold void ff_v210dec_init ( V210DecContext s)

Definition at line 53 of file v210dec.c.

Referenced by checkasm_check_v210dec(), decode_frame(), and decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 60 of file v210dec.c.

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 73 of file v210dec.c.

Variable Documentation

◆ v210dec_options

const AVOption v210dec_options[]
static
Initial value:
= {
{"custom_stride", "Custom V210 stride", 0x42, AV_OPT_TYPE_INT,
{.i64 = 0}, INT_MIN, INT_MAX, V210DEC_FLAGS},
{NULL}
}

Definition at line 176 of file v210dec.c.

◆ v210dec_class

const AVClass v210dec_class
static
Initial value:
= {
.class_name = "V210 Decoder",
.item_name = av_default_item_name,
.option = v210dec_options,
}

Definition at line 182 of file v210dec.c.

◆ ff_v210_decoder

AVCodec ff_v210_decoder
Initial value:
= {
.name = "v210",
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
.priv_data_size = sizeof(V210DecContext),
.capabilities = AV_CODEC_CAP_DR1,
.priv_class = &v210dec_class,
}

Definition at line 189 of file v210dec.c.

v210dec_options
static const AVOption v210dec_options[]
Definition: v210dec.c:176
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: v210dec.c:60
b
#define b
Definition: input.c:41
src
#define src
Definition: vp8dsp.c:254
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
V210DecContext
Definition: v210dec.h:26
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: v210dec.c:73
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
AV_CODEC_ID_V210
@ AV_CODEC_ID_V210
Definition: avcodec.h:345
val
const char const char void * val
Definition: avisynth_c.h:863
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
v210dec_class
static const AVClass v210dec_class
Definition: v210dec.c:182
av_le2ne32
#define av_le2ne32(x)
Definition: bswap.h:96
V210DEC_FLAGS
#define V210DEC_FLAGS
Definition: v210dec.c:175
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201