Go to the documentation of this file.
29 #define BITSTREAM_READER_LE
35 { 7, 1 }, { 8, 3 }, { 6, 3 }, { 9, 4 }, { 5, 4 }, { 10, 5 }, { 4, 5 },
36 { 11, 6 }, { 3, 6 }, { 12, 7 }, { 2, 7 }, { 13, 8 }, { 1, 8 }, { 14, 9 },
40 #define CODE_VLC_BITS 9
51 return base_value + v * (1 <<
shift);
55 void *
data,
int *got_frame,
58 const uint8_t *buf = avpkt->
data;
59 int buf_size = avpkt->
size;
62 unsigned char *
Y,*
U,*
V;
64 int prev_y = 0, prev_u = 0, prev_v = 0;
66 if (buf_size < 8 + avctx->
height * (avctx->
width/2)/8) {
81 shift = 8 - (buf[2] >> 4);
84 "Unknown WNV1 frame header value %i",
90 "Unknown WNV1 frame header value %i",
99 for (j = 0; j < avctx->
height; j++) {
100 for (
i = 0;
i < avctx->
width / 2;
i++) {
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
#define INIT_VLC_OUTPUT_LE
This structure describes decoded (raw) audio or video data.
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int key_frame
1 -> keyframe, 0-> not
static av_cold int decode_init(AVCodecContext *avctx)
static int ff_thread_once(char *control, void(*routine)(void))
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define INIT_VLC_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, symbols, symbols_wrap, symbols_size, offset, flags, static_size)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static const uint8_t code_tab[16][2]
static av_cold void wnv1_init_static(void)
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int wnv1_get_code(GetBitContext *gb, int shift, int base_value)
main external API structure.
static int shift(int a, int b)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define avpriv_request_sample(...)
const AVCodec ff_wnv1_decoder
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
VLC_TYPE(* table)[2]
code, bits