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

#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.

Referenced by v210_enc_TMPL().

#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)
const char const char void * val
Definition: avisynth_c.h:863
#define CLIP(v, depth)
Definition: v210_template.c:25
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:36
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
#define b
Definition: input.c:41
#define AV_WL32(p, v)
Definition: intreadwrite.h:426

Definition at line 26 of file v210_template.c.

Referenced by v210_enc_TMPL(), v210_planar_pack_10_c(), and v210_planar_pack_8_c().

Function Documentation

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

Definition at line 35 of file v210_template.c.