FFmpeg
Macros | Variables
huffyuvdec.c File Reference

huffyuv decoder More...

#include "avcodec.h"
#include "get_bits.h"
#include "huffyuv.h"
#include "huffyuvdsp.h"
#include "lossless_videodsp.h"
#include "thread.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define classic_shift_luma_table_size   42
 
#define classic_shift_chroma_table_size   59
 
#define VLC_INTERN(dst, table, gb, name, bits, max_depth)
 Subset of GET_VLC for use in hand-roller VLC code. More...
 
#define GET_VLC_DUAL(dst0, dst1, name, gb, dtable, table1, table2, bits, max_depth, OP)
 
#define OP8bits(dst0, dst1, code)   dst0 = code>>8; dst1 = code
 
#define READ_2PIX(dst0, dst1, plane1)
 
#define READ_2PIX_PLANE(dst0, dst1, plane, OP)
 
#define OP14bits(dst0, dst1, code)   dst0 = code>>8; dst1 = sign_extend(code, 8)
 
#define READ_2PIX_PLANE16(dst0, dst1, plane)
 

Variables

AVCodec ff_huffyuv_decoder
 

Detailed Description

huffyuv decoder

Macro Definition Documentation

§ GET_VLC_DUAL

#define GET_VLC_DUAL (   dst0,
  dst1,
  name,
  gb,
  dtable,
  table1,
  table2,
  bits,
  max_depth,
  OP 
)
Value:
do { \
unsigned int index = SHOW_UBITS(name, gb, bits); \
int code, n = dtable[index][1]; \
\
if (n<=0) { \
int nb_bits; \
VLC_INTERN(dst0, table1, gb, name, bits, max_depth); \
\
UPDATE_CACHE(re, gb); \
index = SHOW_UBITS(name, gb, bits); \
VLC_INTERN(dst1, table2, gb, name, bits, max_depth); \
} else { \
code = dtable[index][0]; \
OP(dst0, dst1, code); \
LAST_SKIP_BITS(name, gb, n); \
} \
} while (0)

§ READ_2PIX

#define READ_2PIX (   dst0,
  dst1,
  plane1 
)
Value:
UPDATE_CACHE(re, &s->gb); \
GET_VLC_DUAL(dst0, dst1, re, &s->gb, s->vlc[4+plane1].table, \
s->vlc[0].table, s->vlc[plane1].table, VLC_BITS, 3, OP8bits)
#define VLC_BITS
number of bits used for VLC lookup - longest Huffman code is 9
Definition: mlpdec.c:47

§ READ_2PIX_PLANE

#define READ_2PIX_PLANE (   dst0,
  dst1,
  plane,
  OP 
)
Value:
UPDATE_CACHE(re, &s->gb); \
GET_VLC_DUAL(dst0, dst1, re, &s->gb, s->vlc[4+plane].table, \
s->vlc[plane].table, s->vlc[plane].table, VLC_BITS, 3, OP)
#define VLC_BITS
number of bits used for VLC lookup - longest Huffman code is 9
Definition: mlpdec.c:47

§ READ_2PIX_PLANE16

#define READ_2PIX_PLANE16 (   dst0,
  dst1,
  plane 
)
Value:
{\
dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\
dst0 += get_bits(&s->gb, 2);\
dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\
dst1 += get_bits(&s->gb, 2);\
}
#define VLC_BITS
number of bits used for VLC lookup - longest Huffman code is 9
Definition: mlpdec.c:47

§ VLC_INTERN

#define VLC_INTERN (   dst,
  table,
  gb,
  name,
  bits,
  max_depth 
)
Value:
code = table[index][0]; \
n = table[index][1]; \
if (max_depth > 1 && n < 0) { \
LAST_SKIP_BITS(name, gb, bits); \
UPDATE_CACHE(name, gb); \
\
nb_bits = -n; \
index = SHOW_UBITS(name, gb, nb_bits) + code; \
code = table[index][0]; \
n = table[index][1]; \
if (max_depth > 2 && n < 0) { \
LAST_SKIP_BITS(name, gb, nb_bits); \
UPDATE_CACHE(name, gb); \
\
nb_bits = -n; \
index = SHOW_UBITS(name, gb, nb_bits) + code; \
code = table[index][0]; \
n = table[index][1]; \
} \
} \
dst = code; \
LAST_SKIP_BITS(name, gb, n)

Subset of GET_VLC for use in hand-roller VLC code.

Variable Documentation

§ ff_huffyuv_decoder

AVCodec ff_huffyuv_decoder
Initial value:
= {
.name = "huffyuv",
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_HUFFYUV,
.priv_data_size = sizeof(HYuvContext),
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy),
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1015
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
Definition: internal.h:225
Definition: huffyuv.h:55
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: avcodec.h:953
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959