FFmpeg
cri.c
Go to the documentation of this file.
1 /*
2  * CRI image decoder
3  *
4  * Copyright (c) 2020 Paul B Mahol
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 /**
24  * @file
25  * Cintel RAW image decoder
26  */
27 
28 #define BITSTREAM_READER_LE
29 
30 #include "libavutil/intfloat.h"
31 #include "libavutil/display.h"
32 #include "avcodec.h"
33 #include "bytestream.h"
34 #include "get_bits.h"
35 #include "internal.h"
36 #include "thread.h"
37 
38 typedef struct CRIContext {
39  AVCodecContext *jpeg_avctx; // wrapper context for MJPEG
40  AVFrame *jpgframe; // decoded JPEG tile
41 
44  const uint8_t *data;
45  unsigned data_size;
46  uint64_t tile_size[4];
47 } CRIContext;
48 
50 {
51  CRIContext *s = avctx->priv_data;
52  const AVCodec *codec;
53  int ret;
54 
55  s->jpgframe = av_frame_alloc();
56  if (!s->jpgframe)
57  return AVERROR(ENOMEM);
58 
60  if (!codec)
61  return AVERROR_BUG;
63  if (!s->jpeg_avctx)
64  return AVERROR(ENOMEM);
65  s->jpeg_avctx->flags = avctx->flags;
66  s->jpeg_avctx->flags2 = avctx->flags2;
67  s->jpeg_avctx->dct_algo = avctx->dct_algo;
68  s->jpeg_avctx->idct_algo = avctx->idct_algo;
69  ret = avcodec_open2(s->jpeg_avctx, codec, NULL);
70  if (ret < 0)
71  return ret;
72 
73  return 0;
74 }
75 
76 static void unpack_10bit(GetByteContext *gb, uint16_t *dst, int shift,
77  int w, int h, ptrdiff_t stride)
78 {
79  int count = w * h;
80  int pos = 0;
81 
82  while (count > 0) {
83  uint32_t a0, a1, a2, a3;
84  if (bytestream2_get_bytes_left(gb) < 4)
85  break;
86  a0 = bytestream2_get_le32(gb);
87  a1 = bytestream2_get_le32(gb);
88  a2 = bytestream2_get_le32(gb);
89  a3 = bytestream2_get_le32(gb);
90  dst[pos] = (((a0 >> 1) & 0xE00) | (a0 & 0x1FF)) << shift;
91  pos++;
92  if (pos >= w) {
93  if (count == 1)
94  break;
95  dst += stride;
96  pos = 0;
97  }
98  dst[pos] = (((a0 >> 13) & 0x3F) | ((a0 >> 14) & 0xFC0)) << shift;
99  pos++;
100  if (pos >= w) {
101  if (count == 2)
102  break;
103  dst += stride;
104  pos = 0;
105  }
106  dst[pos] = (((a0 >> 26) & 7) | ((a1 & 0x1FF) << 3)) << shift;
107  pos++;
108  if (pos >= w) {
109  if (count == 3)
110  break;
111  dst += stride;
112  pos = 0;
113  }
114  dst[pos] = (((a1 >> 10) & 0x1FF) | ((a1 >> 11) & 0xE00)) << shift;
115  pos++;
116  if (pos >= w) {
117  if (count == 4)
118  break;
119  dst += stride;
120  pos = 0;
121  }
122  dst[pos] = (((a1 >> 23) & 0x3F) | ((a2 & 0x3F) << 6)) << shift;
123  pos++;
124  if (pos >= w) {
125  if (count == 5)
126  break;
127  dst += stride;
128  pos = 0;
129  }
130  dst[pos] = (((a2 >> 7) & 0xFF8) | ((a2 >> 6) & 7)) << shift;
131  pos++;
132  if (pos >= w) {
133  if (count == 6)
134  break;
135  dst += stride;
136  pos = 0;
137  }
138  dst[pos] = (((a3 & 7) << 9) | ((a2 >> 20) & 0x1FF)) << shift;
139  pos++;
140  if (pos >= w) {
141  if (count == 7)
142  break;
143  dst += stride;
144  pos = 0;
145  }
146  dst[pos] = (((a3 >> 4) & 0xFC0) | ((a3 >> 3) & 0x3F)) << shift;
147  pos++;
148  if (pos >= w) {
149  if (count == 8)
150  break;
151  dst += stride;
152  pos = 0;
153  }
154  dst[pos] = (((a3 >> 16) & 7) | ((a3 >> 17) & 0xFF8)) << shift;
155  pos++;
156  if (pos >= w) {
157  if (count == 9)
158  break;
159  dst += stride;
160  pos = 0;
161  }
162 
163  count -= 9;
164  }
165 }
166 
167 static int cri_decode_frame(AVCodecContext *avctx, void *data,
168  int *got_frame, AVPacket *avpkt)
169 {
170  CRIContext *s = avctx->priv_data;
171  GetByteContext *gb = &s->gb;
172  ThreadFrame frame = { .f = data };
173  int ret, bps, hflip = 0, vflip = 0;
174  AVFrameSideData *rotation;
175  int compressed = 0;
176  AVFrame *p = data;
177 
178  s->data = NULL;
179  s->data_size = 0;
180 
181  bytestream2_init(gb, avpkt->data, avpkt->size);
182 
183  while (bytestream2_get_bytes_left(gb) > 8) {
184  char codec_name[1024];
185  uint32_t key, length;
186  float framerate;
187  int width, height;
188 
189  key = bytestream2_get_le32(gb);
190  length = bytestream2_get_le32(gb);
191 
192  switch (key) {
193  case 1:
194  if (length != 4)
195  return AVERROR_INVALIDDATA;
196 
197  if (bytestream2_get_le32(gb) != MKTAG('D', 'V', 'C', 'C'))
198  return AVERROR_INVALIDDATA;
199  break;
200  case 100:
201  if (length < 16)
202  return AVERROR_INVALIDDATA;
203  width = bytestream2_get_le32(gb);
204  height = bytestream2_get_le32(gb);
205  s->color_model = bytestream2_get_le32(gb);
206  if (bytestream2_get_le32(gb) != 1)
207  return AVERROR_INVALIDDATA;
208  ret = ff_set_dimensions(avctx, width, height);
209  if (ret < 0)
210  return ret;
211  length -= 16;
212  goto skip;
213  case 101:
214  if (length != 4)
215  return AVERROR_INVALIDDATA;
216 
217  if (bytestream2_get_le32(gb) != 0)
218  return AVERROR_INVALIDDATA;
219  break;
220  case 102:
221  bytestream2_get_buffer(gb, codec_name, FFMIN(length, sizeof(codec_name) - 1));
222  length -= FFMIN(length, sizeof(codec_name) - 1);
223  if (strncmp(codec_name, "cintel_craw", FFMIN(length, sizeof(codec_name) - 1)))
224  return AVERROR_INVALIDDATA;
225  compressed = 1;
226  goto skip;
227  case 103:
228  if (bytestream2_get_bytes_left(gb) < length)
229  return AVERROR_INVALIDDATA;
230  s->data = gb->buffer;
231  s->data_size = length;
232  goto skip;
233  case 105:
234  hflip = bytestream2_get_byte(gb) != 0;
235  length--;
236  goto skip;
237  case 106:
238  vflip = bytestream2_get_byte(gb) != 0;
239  length--;
240  goto skip;
241  case 107:
242  if (length != 4)
243  return AVERROR_INVALIDDATA;
244  framerate = av_int2float(bytestream2_get_le32(gb));
245  avctx->framerate.num = framerate * 1000;
246  avctx->framerate.den = 1000;
247  break;
248  case 119:
249  if (length != 32)
250  return AVERROR_INVALIDDATA;
251 
252  for (int i = 0; i < 4; i++)
253  s->tile_size[i] = bytestream2_get_le64(gb);
254  break;
255  default:
256  av_log(avctx, AV_LOG_DEBUG, "skipping unknown key %u of length %u\n", key, length);
257 skip:
258  bytestream2_skip(gb, length);
259  }
260  }
261 
262  switch (s->color_model) {
263  case 76:
264  case 88:
266  break;
267  case 77:
268  case 89:
270  break;
271  case 78:
272  case 90:
274  break;
275  case 45:
276  case 79:
277  case 91:
279  break;
280  }
281 
282  switch (s->color_model) {
283  case 45:
284  bps = 10;
285  break;
286  case 76:
287  case 77:
288  case 78:
289  case 79:
290  bps = 12;
291  break;
292  case 88:
293  case 89:
294  case 90:
295  case 91:
296  bps = 16;
297  break;
298  default:
299  return AVERROR_INVALIDDATA;
300  }
301 
302  if (compressed) {
303  for (int i = 0; i < 4; i++) {
304  if (s->tile_size[i] >= s->data_size)
305  return AVERROR_INVALIDDATA;
306  }
307 
308  if (s->tile_size[0] + s->tile_size[1] + s->tile_size[2] + s->tile_size[3] !=
309  s->data_size)
310  return AVERROR_INVALIDDATA;
311  }
312 
313  if (!s->data || !s->data_size)
314  return AVERROR_INVALIDDATA;
315 
316  if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
317  return ret;
318 
319  avctx->bits_per_raw_sample = bps;
320 
321  if (!compressed && s->color_model == 45) {
322  uint16_t *dst = (uint16_t *)p->data[0];
323  GetByteContext gb;
324 
325  bytestream2_init(&gb, s->data, s->data_size);
326  unpack_10bit(&gb, dst, 4, avctx->width, avctx->height, p->linesize[0] / 2);
327  } else if (!compressed) {
328  GetBitContext gbit;
329  const int shift = 16 - bps;
330 
331  ret = init_get_bits8(&gbit, s->data, s->data_size);
332  if (ret < 0)
333  return ret;
334 
335  for (int y = 0; y < avctx->height; y++) {
336  uint16_t *dst = (uint16_t *)(p->data[0] + y * p->linesize[0]);
337 
338  if (get_bits_left(&gbit) < avctx->width * bps)
339  break;
340 
341  for (int x = 0; x < avctx->width; x++)
342  dst[x] = get_bits(&gbit, bps) << shift;
343  }
344  } else {
345  unsigned offset = 0;
346 
347  for (int tile = 0; tile < 4; tile++) {
348  AVPacket jpkt;
349 
350  av_init_packet(&jpkt);
351  jpkt.data = (uint8_t *)s->data + offset;
352  jpkt.size = s->tile_size[tile];
353 
354  ret = avcodec_send_packet(s->jpeg_avctx, &jpkt);
355  if (ret < 0) {
356  av_log(avctx, AV_LOG_ERROR, "Error submitting a packet for decoding\n");
357  return ret;
358  }
359 
361  if (ret < 0 || s->jpgframe->format != AV_PIX_FMT_GRAY16 ||
362  s->jpeg_avctx->width * 2 != avctx->width ||
363  s->jpeg_avctx->height * 2 != avctx->height) {
364  if (ret < 0) {
365  av_log(avctx, AV_LOG_ERROR,
366  "JPEG decoding error (%d).\n", ret);
367  } else {
368  av_log(avctx, AV_LOG_ERROR,
369  "JPEG invalid format.\n");
370  ret = AVERROR_INVALIDDATA;
371  }
372 
373  /* Normally skip, if error explode */
374  if (avctx->err_recognition & AV_EF_EXPLODE)
375  return ret;
376  else
377  return 0;
378  }
379 
380  for (int y = 0; y < s->jpeg_avctx->height; y++) {
381  const int hw = s->jpgframe->width / 2;
382  uint16_t *dst = (uint16_t *)(p->data[0] + (y * 2) * p->linesize[0] + tile * hw * 2);
383  const uint16_t *src = (const uint16_t *)(s->jpgframe->data[0] + y * s->jpgframe->linesize[0]);
384 
385  memcpy(dst, src, hw * 2);
386  src += hw;
387  dst += p->linesize[0] / 2;
388  memcpy(dst, src, hw * 2);
389  }
390 
392  offset += s->tile_size[tile];
393  }
394  }
395 
396  if (hflip || vflip) {
398  sizeof(int32_t) * 9);
399  if (rotation) {
400  av_display_rotation_set((int32_t *)rotation->data, 0.f);
401  av_display_matrix_flip((int32_t *)rotation->data, hflip, vflip);
402  }
403  }
404 
406  p->key_frame = 1;
407 
408  *got_frame = 1;
409 
410  return 0;
411 }
412 
414 {
415  CRIContext *s = avctx->priv_data;
416 
417  av_frame_free(&s->jpgframe);
419 
420  return 0;
421 }
422 
424  .name = "cri",
425  .type = AVMEDIA_TYPE_VIDEO,
426  .id = AV_CODEC_ID_CRI,
427  .priv_data_size = sizeof(CRIContext),
430  .close = cri_decode_close,
433  .long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
434 };
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:49
#define NULL
Definition: coverity.c:32
AVRational framerate
Definition: avcodec.h:2062
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
const uint8_t * data
Definition: cri.c:44
static int shift(int a, int b)
Definition: sonic.c:82
This structure describes decoded (raw) audio or video data.
Definition: frame.h:314
int dct_algo
DCT algorithm, see FF_DCT_* below.
Definition: avcodec.h:1701
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
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
Definition: utils.c:105
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
Definition: intfloat.h:40
#define a0
Definition: regdef.h:46
int num
Numerator.
Definition: rational.h:59
int size
Definition: packet.h:364
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:741
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
Definition: bytestream.h:137
#define a1
Definition: regdef.h:47
const char * key
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1742
GetByteContext gb
Definition: cri.c:42
AVCodec.
Definition: codec.h:190
int framerate
Definition: h264_levels.c:65
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip)
Flip the input matrix horizontally and/or vertically.
Definition: display.c:65
void av_display_rotation_set(int32_t matrix[9], double angle)
Initialize a transformation matrix describing a pure counterclockwise rotation by the specified angle...
Definition: display.c:50
static void unpack_10bit(GetByteContext *gb, uint16_t *dst, int shift, int w, int h, ptrdiff_t stride)
Definition: cri.c:76
#define a3
Definition: regdef.h:49
#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:41
uint8_t
#define av_cold
Definition: attributes.h:88
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition: frame.c:190
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Multithreading support functions.
AVFrame * jpgframe
Definition: cri.c:40
Structure to hold side data for an AVFrame.
Definition: frame.h:220
#define height
uint8_t * data
Definition: packet.h:363
const uint8_t * buffer
Definition: bytestream.h:34
bitstream reader API header.
#define AV_PIX_FMT_BAYER_GRBG16
Definition: pixfmt.h:426
#define av_log(a,...)
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
Definition: bytestream.h:158
uint64_t tile_size[4]
Definition: cri.c:46
#define src
Definition: vp8dsp.c:255
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:849
int width
Definition: frame.h:372
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:194
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
Definition: bytestream.h:168
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:203
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
Display matrix.
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Return decoded output data from a decoder.
Definition: decode.c:643
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
Definition: bytestream.h:267
unsigned int pos
Definition: spdifenc.c:412
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:215
int color_model
Definition: cri.c:43
int flags
AV_CODEC_FLAG_*.
Definition: avcodec.h:611
GLsizei GLsizei * length
Definition: opengl_enc.c:114
const char * name
Name of the codec implementation.
Definition: codec.h:197
GLsizei count
Definition: opengl_enc.c:108
AVCodec ff_cri_decoder
Definition: cri.c:423
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:106
unsigned data_size
Definition: cri.c:45
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
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:397
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:1640
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:383
#define FFMIN(a, b)
Definition: common.h:105
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:172
#define width
int width
picture width / height.
Definition: avcodec.h:704
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
Definition: avcodec.h:1714
uint8_t w
Definition: llviddspenc.c:39
int32_t
#define a2
Definition: regdef.h: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 s(width, name)
Definition: cbs_vp9.c:257
#define AV_EF_EXPLODE
abort decoding on minor error detection
Definition: avcodec.h:1651
#define AV_PIX_FMT_BAYER_BGGR16
Definition: pixfmt.h:423
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
Definition: frame.h:387
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
Definition: decode.c:580
#define AV_PIX_FMT_BAYER_GBRG16
Definition: pixfmt.h:425
Libavcodec external API header.
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: frame.h:84
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer...
Definition: options.c:187
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
uint8_t * data
Definition: frame.h:222
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Definition: error.h:50
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.
Definition: frame.c:726
static av_cold int cri_decode_close(AVCodecContext *avctx)
Definition: cri.c:413
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: utils.c:544
AVCodecContext * jpeg_avctx
Definition: cri.c:39
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: allcodecs.c:945
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
Definition: frame.c:553
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:328
#define AV_PIX_FMT_BAYER_RGGB16
Definition: pixfmt.h:424
GLint GLenum GLboolean GLsizei stride
Definition: opengl_enc.c:104
common internal api header.
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
Definition: avpacket.c:35
int den
Denominator.
Definition: rational.h:60
unsigned bps
Definition: movenc.c:1598
void * priv_data
Definition: avcodec.h:558
Definition: cri.c:38
int key_frame
1 -> keyframe, 0-> not
Definition: frame.h:392
int flags2
AV_CODEC_FLAG2_*.
Definition: avcodec.h:618
static av_cold int cri_decode_init(AVCodecContext *avctx)
Definition: cri.c:49
static int cri_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: cri.c:167
#define stride
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:478
This structure stores compressed data.
Definition: packet.h:340
#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