Go to the documentation of this file.
39 { 0x1FD, 9 }, { 0xFD, 8 }, { 0x7D, 7 }, { 0x3D, 6 }, { 0x1D, 5 }, { 0x0D, 4 }, { 0x005, 3 },
41 { 0x004, 3 }, { 0x0C, 4 }, { 0x1C, 5 }, { 0x3C, 6 }, { 0x7C, 7 }, { 0xFC, 8 }, { 0x1FC, 9 }, { 0xFF, 8 }
44 #define CODE_VLC_BITS 9
55 return base_value + ((v - 7
U) <<
w->shift);
59 void *
data,
int *got_frame,
64 int buf_size = avpkt->
size;
66 unsigned char *
Y,*
U,*
V;
68 int prev_y = 0, prev_u = 0, prev_v = 0;
71 if (buf_size < 8 + avctx->
height * (avctx->
width/2)/8) {
89 for (
i = 8;
i < buf_size;
i++)
101 "Unknown WNV1 frame header value %i",
107 "Unknown WNV1 frame header value %i",
116 for (j = 0; j < avctx->
height; j++) {
117 for (
i = 0;
i < avctx->
width / 2;
i++) {
static av_cold int init(AVCodecContext *avctx)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
This structure describes decoded (raw) audio or video data.
#define init_vlc(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, flags)
const uint8_t ff_reverse[256]
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 int wnv1_get_code(WNV1Context *w, int base_value)
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)
#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.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static const uint16_t code_tab[16][2]
#define INIT_VLC_USE_NEW_STATIC
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() 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)
#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.
#define AV_INPUT_BUFFER_PADDING_SIZE
main external API structure.
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define avpriv_request_sample(...)
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
VLC_TYPE(* table)[2]
code, bits