Go to the source code of this file.
#define READ_PIXELS |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| |
Value: *
b++ = (
val >> 10) & 0x3FF; \
*
c++ = (
val >> 20) & 0x3FF; \
} while (0)
const char const char void * val
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
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 at line 32 of file v210dec.c.
Referenced by decode_frame(), and 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 |
Initial value:= {
.class_name = "V210 Decoder",
}
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
static const AVOption v210dec_options[]
Definition at line 170 of file v210dec.c.
Initial value:= {
.name = "v210",
}
static av_cold int init(AVCodecContext *avctx)
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static av_cold int decode_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVClass v210dec_class
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition at line 177 of file v210dec.c.