FFmpeg
Macros | Functions
v210_template.c File Reference
#include "bytestream.h"
#include "internal.h"

Go to the source code of this file.

Macros

#define CLIP(v, depth)   av_clip(v, 1<<(depth-8), ((1<<depth)-(1<<(depth-8))-1))
 
#define WRITE_PIXELS(a, b, c, depth)
 

Functions

static void v210_enc_TMPL (AVCodecContext *avctx, uint8_t *dst, const AVFrame *pic)
 

Macro Definition Documentation

◆ CLIP

#define CLIP (   v,
  depth 
)    av_clip(v, 1<<(depth-8), ((1<<depth)-(1<<(depth-8))-1))

Definition at line 25 of file v210_template.c.

◆ WRITE_PIXELS

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

Definition at line 26 of file v210_template.c.

Function Documentation

◆ v210_enc_TMPL()

static void v210_enc_TMPL ( AVCodecContext avctx,
uint8_t *  dst,
const AVFrame pic 
)
static

Definition at line 35 of file v210_template.c.

b
#define b
Definition: input.c:40
val
static double val(void *priv, double ch)
Definition: aeval.c:76
CLIP
#define CLIP(v, depth)
Definition: v210_template.c:25
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
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