FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
v210enc.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "v210enc.h"

Go to the source code of this file.

Macros

#define CLIP(v)   av_clip(v, 4, 1019)
 
#define CLIP8(v)   av_clip(v, 1, 254)
 
#define WRITE_PIXELS(a, b, c)
 
#define WRITE_PIXELS8(a, b, c)
 

Functions

static void v210_planar_pack_8_c (const uint8_t *y, const uint8_t *u, const uint8_t *v, uint8_t *dst, ptrdiff_t width)
 
static void v210_planar_pack_10_c (const uint16_t *y, const uint16_t *u, const uint16_t *v, uint8_t *dst, ptrdiff_t width)
 
static av_cold int encode_init (AVCodecContext *avctx)
 
static int encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet)
 
static av_cold int encode_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_v210_encoder
 

Macro Definition Documentation

#define CLIP (   v)    av_clip(v, 4, 1019)

Definition at line 29 of file v210enc.c.

Referenced by encode_frame().

#define CLIP8 (   v)    av_clip(v, 1, 254)

Definition at line 30 of file v210enc.c.

Referenced by encode_frame().

#define WRITE_PIXELS (   a,
  b,
  c 
)
Value:
do { \
val = CLIP(*a++); \
val |= (CLIP(*b++) << 10) | \
(CLIP(*c++) << 20); \
AV_WL32(dst, val); \
dst += 4; \
} while (0)

Definition at line 32 of file v210enc.c.

Referenced by encode_frame(), and v210_planar_pack_10_c().

#define WRITE_PIXELS8 (   a,
  b,
  c 
)
Value:
do { \
val = (CLIP8(*a++) << 2); \
val |= (CLIP8(*b++) << 12) | \
(CLIP8(*c++) << 22); \
AV_WL32(dst, val); \
dst += 4; \
} while (0)

Definition at line 41 of file v210enc.c.

Referenced by encode_frame(), and v210_planar_pack_8_c().

Function Documentation

static void v210_planar_pack_8_c ( const uint8_t y,
const uint8_t u,
const uint8_t v,
uint8_t dst,
ptrdiff_t  width 
)
static

Definition at line 50 of file v210enc.c.

Referenced by encode_init().

static void v210_planar_pack_10_c ( const uint16_t *  y,
const uint16_t *  u,
const uint16_t *  v,
uint8_t dst,
ptrdiff_t  width 
)
static

Definition at line 70 of file v210enc.c.

Referenced by encode_init().

static av_cold int encode_init ( AVCodecContext avctx)
static

Definition at line 85 of file v210enc.c.

static int encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pic,
int *  got_packet 
)
static

Definition at line 109 of file v210enc.c.

static av_cold int encode_close ( AVCodecContext avctx)
static

Definition at line 216 of file v210enc.c.

Variable Documentation

AVCodec ff_v210_encoder
Initial value:
= {
.name = "v210",
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
.priv_data_size = sizeof(V210EncContext),
.encode2 = encode_frame,
}

Definition at line 223 of file v210enc.c.