FFmpeg
cllc.c
Go to the documentation of this file.
1 /*
2  * Canopus Lossless Codec decoder
3  *
4  * Copyright (c) 2012-2013 Derek Buitenhuis
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #include <inttypes.h>
24 
25 #include "libavutil/intreadwrite.h"
26 #include "bswapdsp.h"
27 #include "canopus.h"
28 #include "get_bits.h"
29 #include "avcodec.h"
30 #include "internal.h"
31 #include "thread.h"
32 
33 #define VLC_BITS 7
34 #define VLC_DEPTH 2
35 
36 
37 typedef struct CLLCContext {
40 
43 } CLLCContext;
44 
46 {
47  uint8_t symbols[256];
48  uint8_t bits[256];
49  uint16_t codes[256];
50  int num_lens, num_codes, num_codes_sum, prefix;
51  int i, j, count;
52 
53  prefix = 0;
54  count = 0;
55  num_codes_sum = 0;
56 
57  num_lens = get_bits(gb, 5);
58 
59  if (num_lens > VLC_BITS * VLC_DEPTH) {
60  av_log(ctx->avctx, AV_LOG_ERROR, "To long VLCs %d\n", num_lens);
61  return AVERROR_INVALIDDATA;
62  }
63 
64  for (i = 0; i < num_lens; i++) {
65  num_codes = get_bits(gb, 9);
66  num_codes_sum += num_codes;
67 
68  if (num_codes_sum > 256) {
70  "Too many VLCs (%d) to be read.\n", num_codes_sum);
71  return AVERROR_INVALIDDATA;
72  }
73 
74  for (j = 0; j < num_codes; j++) {
75  symbols[count] = get_bits(gb, 8);
76  bits[count] = i + 1;
77  codes[count] = prefix++;
78 
79  count++;
80  }
81  if (prefix > (65535 - 256)/2) {
82  return AVERROR_INVALIDDATA;
83  }
84 
85  prefix <<= 1;
86  }
87 
88  return ff_init_vlc_sparse(vlc, VLC_BITS, count, bits, 1, 1,
89  codes, 2, 2, symbols, 1, 1, 0);
90 }
91 
92 /*
93  * Unlike the RGB24 read/restore, which reads in a component at a time,
94  * ARGB read/restore reads in ARGB quads.
95  */
96 static int read_argb_line(CLLCContext *ctx, GetBitContext *gb, int *top_left,
97  VLC *vlc, uint8_t *outbuf)
98 {
99  uint8_t *dst;
100  int pred[4];
101  int code;
102  int i;
103 
104  OPEN_READER(bits, gb);
105 
106  dst = outbuf;
107  pred[0] = top_left[0];
108  pred[1] = top_left[1];
109  pred[2] = top_left[2];
110  pred[3] = top_left[3];
111 
112  for (i = 0; i < ctx->avctx->width; i++) {
113  /* Always get the alpha component */
114  UPDATE_CACHE(bits, gb);
115  GET_VLC(code, bits, gb, vlc[0].table, VLC_BITS, VLC_DEPTH);
116 
117  pred[0] += code;
118  dst[0] = pred[0];
119 
120  /* Skip the components if they are entirely transparent */
121  if (dst[0]) {
122  /* Red */
123  UPDATE_CACHE(bits, gb);
124  GET_VLC(code, bits, gb, vlc[1].table, VLC_BITS, VLC_DEPTH);
125 
126  pred[1] += code;
127  dst[1] = pred[1];
128 
129  /* Green */
130  UPDATE_CACHE(bits, gb);
131  GET_VLC(code, bits, gb, vlc[2].table, VLC_BITS, VLC_DEPTH);
132 
133  pred[2] += code;
134  dst[2] = pred[2];
135 
136  /* Blue */
137  UPDATE_CACHE(bits, gb);
138  GET_VLC(code, bits, gb, vlc[3].table, VLC_BITS, VLC_DEPTH);
139 
140  pred[3] += code;
141  dst[3] = pred[3];
142  } else {
143  dst[1] = 0;
144  dst[2] = 0;
145  dst[3] = 0;
146  }
147 
148  dst += 4;
149  }
150 
151  CLOSE_READER(bits, gb);
152 
153  top_left[0] = outbuf[0];
154 
155  /* Only stash components if they are not transparent */
156  if (top_left[0]) {
157  top_left[1] = outbuf[1];
158  top_left[2] = outbuf[2];
159  top_left[3] = outbuf[3];
160  }
161 
162  return 0;
163 }
164 
166  int *top_left, VLC *vlc, uint8_t *outbuf)
167 {
168  uint8_t *dst;
169  int pred, code;
170  int i;
171 
172  OPEN_READER(bits, gb);
173 
174  dst = outbuf;
175  pred = *top_left;
176 
177  /* Simultaneously read and restore the line */
178  for (i = 0; i < ctx->avctx->width; i++) {
179  UPDATE_CACHE(bits, gb);
180  GET_VLC(code, bits, gb, vlc->table, VLC_BITS, VLC_DEPTH);
181 
182  pred += code;
183  dst[0] = pred;
184  dst += 3;
185  }
186 
187  CLOSE_READER(bits, gb);
188 
189  /* Stash the first pixel */
190  *top_left = outbuf[0];
191 
192  return 0;
193 }
194 
196  int *top_left, VLC *vlc, uint8_t *outbuf,
197  int is_chroma)
198 {
199  int pred, code;
200  int i;
201 
202  OPEN_READER(bits, gb);
203 
204  pred = *top_left;
205 
206  /* Simultaneously read and restore the line */
207  for (i = 0; i < ctx->avctx->width >> is_chroma; i++) {
208  UPDATE_CACHE(bits, gb);
209  GET_VLC(code, bits, gb, vlc->table, VLC_BITS, VLC_DEPTH);
210 
211  pred += code;
212  outbuf[i] = pred;
213  }
214 
215  CLOSE_READER(bits, gb);
216 
217  /* Stash the first pixel */
218  *top_left = outbuf[0];
219 
220  return 0;
221 }
222 
224 {
225  AVCodecContext *avctx = ctx->avctx;
226  uint8_t *dst;
227  int pred[4];
228  int ret;
229  int i, j;
230  VLC vlc[4];
231 
232  pred[0] = 0;
233  pred[1] = 0x80;
234  pred[2] = 0x80;
235  pred[3] = 0x80;
236 
237  dst = pic->data[0];
238 
239  skip_bits(gb, 16);
240 
241  /* Read in code table for each plane */
242  for (i = 0; i < 4; i++) {
243  ret = read_code_table(ctx, gb, &vlc[i]);
244  if (ret < 0) {
245  for (j = 0; j < i; j++)
246  ff_free_vlc(&vlc[j]);
247 
248  av_log(ctx->avctx, AV_LOG_ERROR,
249  "Could not read code table %d.\n", i);
250  return ret;
251  }
252  }
253 
254  /* Read in and restore every line */
255  for (i = 0; i < avctx->height; i++) {
256  read_argb_line(ctx, gb, pred, vlc, dst);
257 
258  dst += pic->linesize[0];
259  }
260 
261  for (i = 0; i < 4; i++)
262  ff_free_vlc(&vlc[i]);
263 
264  return 0;
265 }
266 
268 {
269  AVCodecContext *avctx = ctx->avctx;
270  uint8_t *dst;
271  int pred[3];
272  int ret;
273  int i, j;
274  VLC vlc[3];
275 
276  pred[0] = 0x80;
277  pred[1] = 0x80;
278  pred[2] = 0x80;
279 
280  dst = pic->data[0];
281 
282  skip_bits(gb, 16);
283 
284  /* Read in code table for each plane */
285  for (i = 0; i < 3; i++) {
286  ret = read_code_table(ctx, gb, &vlc[i]);
287  if (ret < 0) {
288  for (j = 0; j < i; j++)
289  ff_free_vlc(&vlc[j]);
290 
291  av_log(ctx->avctx, AV_LOG_ERROR,
292  "Could not read code table %d.\n", i);
293  return ret;
294  }
295  }
296 
297  /* Read in and restore every line */
298  for (i = 0; i < avctx->height; i++) {
299  for (j = 0; j < 3; j++)
300  read_rgb24_component_line(ctx, gb, &pred[j], &vlc[j], &dst[j]);
301 
302  dst += pic->linesize[0];
303  }
304 
305  for (i = 0; i < 3; i++)
306  ff_free_vlc(&vlc[i]);
307 
308  return 0;
309 }
310 
312 {
313  AVCodecContext *avctx = ctx->avctx;
314  uint8_t block;
315  uint8_t *dst[3];
316  int pred[3];
317  int ret;
318  int i, j;
319  VLC vlc[2];
320 
321  pred[0] = 0x80;
322  pred[1] = 0x80;
323  pred[2] = 0x80;
324 
325  dst[0] = pic->data[0];
326  dst[1] = pic->data[1];
327  dst[2] = pic->data[2];
328 
329  skip_bits(gb, 8);
330 
331  block = get_bits(gb, 8);
332  if (block) {
333  avpriv_request_sample(ctx->avctx, "Blocked YUV");
334  return AVERROR_PATCHWELCOME;
335  }
336 
337  /* Read in code table for luma and chroma */
338  for (i = 0; i < 2; i++) {
339  ret = read_code_table(ctx, gb, &vlc[i]);
340  if (ret < 0) {
341  for (j = 0; j < i; j++)
342  ff_free_vlc(&vlc[j]);
343 
344  av_log(ctx->avctx, AV_LOG_ERROR,
345  "Could not read code table %d.\n", i);
346  return ret;
347  }
348  }
349 
350  /* Read in and restore every line */
351  for (i = 0; i < avctx->height; i++) {
352  read_yuv_component_line(ctx, gb, &pred[0], &vlc[0], dst[0], 0); /* Y */
353  read_yuv_component_line(ctx, gb, &pred[1], &vlc[1], dst[1], 1); /* U */
354  read_yuv_component_line(ctx, gb, &pred[2], &vlc[1], dst[2], 1); /* V */
355 
356  for (j = 0; j < 3; j++)
357  dst[j] += pic->linesize[j];
358  }
359 
360  for (i = 0; i < 2; i++)
361  ff_free_vlc(&vlc[i]);
362 
363  return 0;
364 }
365 
367  int *got_picture_ptr, AVPacket *avpkt)
368 {
369  CLLCContext *ctx = avctx->priv_data;
370  AVFrame *pic = data;
371  ThreadFrame frame = { .f = data };
372  uint8_t *src = avpkt->data;
373  uint32_t info_tag, info_offset;
374  int data_size;
375  GetBitContext gb;
376  int coding_type, ret;
377 
378  if (avpkt->size < 4 + 4) {
379  av_log(avctx, AV_LOG_ERROR, "Frame is too small %d.\n", avpkt->size);
380  return AVERROR_INVALIDDATA;
381  }
382 
383  info_offset = 0;
384  info_tag = AV_RL32(src);
385  if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
386  info_offset = AV_RL32(src + 4);
387  if (info_offset > UINT32_MAX - 8 || info_offset + 8 > avpkt->size) {
388  av_log(avctx, AV_LOG_ERROR,
389  "Invalid INFO header offset: 0x%08"PRIX32" is too large.\n",
390  info_offset);
391  return AVERROR_INVALIDDATA;
392  }
393  ff_canopus_parse_info_tag(avctx, src + 8, info_offset);
394 
395  info_offset += 8;
396  src += info_offset;
397  }
398 
399  data_size = (avpkt->size - info_offset) & ~1;
400 
401  /* Make sure our bswap16'd buffer is big enough */
403  &ctx->swapped_buf_size, data_size);
404  if (!ctx->swapped_buf) {
405  av_log(avctx, AV_LOG_ERROR, "Could not allocate swapped buffer.\n");
406  return AVERROR(ENOMEM);
407  }
408 
409  /* bswap16 the buffer since CLLC's bitreader works in 16-bit words */
410  ctx->bdsp.bswap16_buf((uint16_t *) ctx->swapped_buf, (uint16_t *) src,
411  data_size / 2);
412 
413  if ((ret = init_get_bits8(&gb, ctx->swapped_buf, data_size)) < 0)
414  return ret;
415 
416  /*
417  * Read in coding type. The types are as follows:
418  *
419  * 0 - YUY2
420  * 1 - BGR24 (Triples)
421  * 2 - BGR24 (Quads)
422  * 3 - BGRA
423  */
424  coding_type = (AV_RL32(src) >> 8) & 0xFF;
425  av_log(avctx, AV_LOG_DEBUG, "Frame coding type: %d\n", coding_type);
426 
427  if(get_bits_left(&gb) < avctx->height * avctx->width)
428  return AVERROR_INVALIDDATA;
429 
430  switch (coding_type) {
431  case 0:
432  avctx->pix_fmt = AV_PIX_FMT_YUV422P;
433  avctx->bits_per_raw_sample = 8;
434 
435  if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
436  return ret;
437 
438  ret = decode_yuv_frame(ctx, &gb, pic);
439  if (ret < 0)
440  return ret;
441 
442  break;
443  case 1:
444  case 2:
445  avctx->pix_fmt = AV_PIX_FMT_RGB24;
446  avctx->bits_per_raw_sample = 8;
447 
448  if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
449  return ret;
450 
451  ret = decode_rgb24_frame(ctx, &gb, pic);
452  if (ret < 0)
453  return ret;
454 
455  break;
456  case 3:
457  avctx->pix_fmt = AV_PIX_FMT_ARGB;
458  avctx->bits_per_raw_sample = 8;
459 
460  if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
461  return ret;
462 
463  ret = decode_argb_frame(ctx, &gb, pic);
464  if (ret < 0)
465  return ret;
466 
467  break;
468  default:
469  av_log(avctx, AV_LOG_ERROR, "Unknown coding type: %d.\n", coding_type);
470  return AVERROR_INVALIDDATA;
471  }
472 
473  pic->key_frame = 1;
475 
476  *got_picture_ptr = 1;
477 
478  return avpkt->size;
479 }
480 
482 {
483  CLLCContext *ctx = avctx->priv_data;
484 
485  av_freep(&ctx->swapped_buf);
486 
487  return 0;
488 }
489 
491 {
492  CLLCContext *ctx = avctx->priv_data;
493 
494  /* Initialize various context values */
495  ctx->avctx = avctx;
496  ctx->swapped_buf = NULL;
497  ctx->swapped_buf_size = 0;
498 
499  ff_bswapdsp_init(&ctx->bdsp);
500 
501  return 0;
502 }
503 
505  .name = "cllc",
506  .long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"),
507  .type = AVMEDIA_TYPE_VIDEO,
508  .id = AV_CODEC_ID_CLLC,
509  .priv_data_size = sizeof(CLLCContext),
512  .close = cllc_decode_close,
514  .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
515 };
#define NULL
Definition: coverity.c:32
static int read_rgb24_component_line(CLLCContext *ctx, GetBitContext *gb, int *top_left, VLC *vlc, uint8_t *outbuf)
Definition: cllc.c:165
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
This structure describes decoded (raw) audio or video data.
Definition: frame.h:314
void(* bswap16_buf)(uint16_t *dst, const uint16_t *src, int len)
Definition: bswapdsp.h:26
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:100
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:379
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define avpriv_request_sample(...)
int ff_canopus_parse_info_tag(AVCodecContext *avctx, const uint8_t *src, size_t size)
Definition: canopus.c:30
int ff_init_vlc_sparse(VLC *vlc_arg, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition: bitstream.c:275
int size
Definition: packet.h:364
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:741
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end w...
Definition: utils.c:72
static int cllc_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
Definition: cllc.c:366
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1762
AVCodec.
Definition: codec.h:190
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
The exact code depends on how similar the blocks are and how related they are to the block
uint8_t
#define av_cold
Definition: attributes.h:88
Multithreading support functions.
uint8_t * data
Definition: packet.h:363
bitstream reader API header.
static av_cold int cllc_decode_close(AVCodecContext *avctx)
Definition: cllc.c:481
#define av_log(a,...)
static const uint16_t table[]
Definition: prosumer.c:206
#define src
Definition: vp8dsp.c:254
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:849
static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc)
Definition: cllc.c:45
#define UPDATE_CACHE(name, gb)
Definition: get_bits.h:178
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:194
BswapDSPContext bdsp
Definition: cllc.c:39
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:215
uint8_t * swapped_buf
Definition: cllc.c:41
const char * name
Name of the codec implementation.
Definition: codec.h:197
uint8_t bits
Definition: vp3data.h:202
int swapped_buf_size
Definition: cllc.c:42
GLsizei count
Definition: opengl_enc.c:108
#define CLOSE_READER(name, gb)
Definition: get_bits.h:149
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:92
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:106
Definition: vlc.h:26
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have so the codec calls ff_thread_report set FF_CODEC_CAP_ALLOCATE_PROGRESS in AVCodec caps_internal and use ff_thread_get_buffer() to allocate frames.The frames must then be freed with ff_thread_release_buffer().Otherwise decode directly into the user-supplied frames.Call ff_thread_report_progress() after some part of the current picture has decoded.A good place to put this is where draw_horiz_band() is called-add this if it isn't called anywhere
static int decode_rgb24_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
Definition: cllc.c:267
static int decode_argb_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
Definition: cllc.c:223
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:397
AVCodecContext * avctx
Definition: cllc.c:38
int width
picture width / height.
Definition: avcodec.h:704
AVFormatContext * ctx
Definition: movenc.c:48
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
#define GET_VLC(code, name, gb, table, bits, max_depth)
If the vlc code is invalid and max_depth=1, then no bits will be removed.
Definition: get_bits.h:706
static const float pred[4]
Definition: siprdata.h:259
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Definition: error.h:62
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Definition: frame.h:345
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
Definition: get_bits.h:677
main external API structure.
Definition: avcodec.h:531
#define OPEN_READER(name, gb)
Definition: get_bits.h:138
static void skip_bits(GetBitContext *s, int n)
Definition: get_bits.h:467
static int read_yuv_component_line(CLLCContext *ctx, GetBitContext *gb, int *top_left, VLC *vlc, uint8_t *outbuf, int is_chroma)
Definition: cllc.c:195
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
#define VLC_DEPTH
Definition: cllc.c:34
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:328
static av_cold int cllc_decode_init(AVCodecContext *avctx)
Definition: cllc.c:490
common internal api header.
static int read_argb_line(CLLCContext *ctx, GetBitContext *gb, int *top_left, VLC *vlc, uint8_t *outbuf)
Definition: cllc.c:96
av_cold void ff_bswapdsp_init(BswapDSPContext *c)
Definition: bswapdsp.c:49
void * priv_data
Definition: avcodec.h:558
VLC_TYPE(* table)[2]
code, bits
Definition: vlc.h:28
int key_frame
1 -> keyframe, 0-> not
Definition: frame.h:392
#define av_freep(p)
AVCodec ff_cllc_decoder
Definition: cllc.c:504
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
#define MKTAG(a, b, c, d)
Definition: common.h:405
static int decode_yuv_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
Definition: cllc.c:311
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:91
This structure stores compressed data.
Definition: packet.h:340
void ff_free_vlc(VLC *vlc)
Definition: bitstream.c:365
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:50
int i
Definition: input.c:407
#define VLC_BITS
Definition: cllc.c:33