FFmpeg
pnmdec.c
Go to the documentation of this file.
1 /*
2  * PNM image format
3  * Copyright (c) 2002, 2003 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "config_components.h"
23 
24 #include "avcodec.h"
25 #include "codec_internal.h"
26 #include "internal.h"
27 #include "put_bits.h"
28 #include "pnm.h"
29 
30 static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
31 {
32  if (maxval <= 255) {
33  memcpy(dst, src, n);
34  } else {
35  int i;
36  for (i=0; i<n/2; i++) {
37  ((uint16_t *)dst)[i] = AV_RB16(src+2*i);
38  }
39  }
40 }
41 
42 static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p,
43  int *got_frame, AVPacket *avpkt)
44 {
45  const uint8_t *buf = avpkt->data;
46  int buf_size = avpkt->size;
47  PNMContext * const s = avctx->priv_data;
48  int i, j, k, n, linesize, h, upgrade = 0, is_mono = 0;
49  unsigned char *ptr;
50  int components, sample_len, ret;
51  float scale;
52 
53  s->bytestream_start =
54  s->bytestream = (uint8_t *)buf;
55  s->bytestream_end = (uint8_t *)buf + buf_size;
56 
57  if ((ret = ff_pnm_decode_header(avctx, s)) < 0)
58  return ret;
59 
60  if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
61  return ret;
63  p->key_frame = 1;
64  avctx->bits_per_raw_sample = av_log2(s->maxval) + 1;
65 
66  switch (avctx->pix_fmt) {
67  default:
68  return AVERROR(EINVAL);
69  case AV_PIX_FMT_RGBA64:
70  n = avctx->width * 8;
71  components=4;
72  sample_len=16;
73  if (s->maxval < 65535)
74  upgrade = 2;
75  goto do_read;
76  case AV_PIX_FMT_RGB48:
77  n = avctx->width * 6;
78  components=3;
79  sample_len=16;
80  if (s->maxval < 65535)
81  upgrade = 2;
82  goto do_read;
83  case AV_PIX_FMT_RGBA:
84  n = avctx->width * 4;
85  components=4;
86  sample_len=8;
87  goto do_read;
88  case AV_PIX_FMT_RGB24:
89  n = avctx->width * 3;
90  components=3;
91  sample_len=8;
92  if (s->maxval < 255)
93  upgrade = 1;
94  goto do_read;
95  case AV_PIX_FMT_GRAY8:
96  n = avctx->width;
97  components=1;
98  sample_len=8;
99  if (s->maxval < 255)
100  upgrade = 1;
101  goto do_read;
102  case AV_PIX_FMT_GRAY8A:
103  n = avctx->width * 2;
104  components=2;
105  sample_len=8;
106  goto do_read;
107  case AV_PIX_FMT_GRAY16:
108  n = avctx->width * 2;
109  components=1;
110  sample_len=16;
111  if (s->maxval < 65535)
112  upgrade = 2;
113  goto do_read;
114  case AV_PIX_FMT_YA16:
115  n = avctx->width * 4;
116  components=2;
117  sample_len=16;
118  if (s->maxval < 65535)
119  upgrade = 2;
120  goto do_read;
123  n = (avctx->width + 7) >> 3;
124  components=1;
125  sample_len=1;
126  is_mono = 1;
127  do_read:
128  ptr = p->data[0];
129  linesize = p->linesize[0];
130  if (n * avctx->height > s->bytestream_end - s->bytestream)
131  return AVERROR_INVALIDDATA;
132  if(s->type < 4 || (is_mono && s->type==7)){
133  for (i=0; i<avctx->height; i++) {
134  PutBitContext pb;
135  init_put_bits(&pb, ptr, linesize);
136  for(j=0; j<avctx->width * components; j++){
137  unsigned int c=0;
138  unsigned v=0;
139  if(s->type < 4)
140  while(s->bytestream < s->bytestream_end && (*s->bytestream < '0' || *s->bytestream > '9' ))
141  s->bytestream++;
142  if(s->bytestream >= s->bytestream_end)
143  return AVERROR_INVALIDDATA;
144  if (is_mono) {
145  /* read a single digit */
146  v = (*s->bytestream++)&1;
147  } else {
148  /* read a sequence of digits */
149  for (k = 0; k < 6 && c <= 9; k += 1) {
150  v = 10*v + c;
151  c = (*s->bytestream++) - '0';
152  }
153  if (v > s->maxval) {
154  av_log(avctx, AV_LOG_ERROR, "value %d larger than maxval %d\n", v, s->maxval);
155  return AVERROR_INVALIDDATA;
156  }
157  }
158  if (sample_len == 16) {
159  ((uint16_t*)ptr)[j] = (((1<<sample_len)-1)*v + (s->maxval>>1))/s->maxval;
160  } else
161  put_bits(&pb, sample_len, (((1<<sample_len)-1)*v + (s->maxval>>1))/s->maxval);
162  }
163  if (sample_len != 16)
164  flush_put_bits(&pb);
165  ptr+= linesize;
166  }
167  }else{
168  for (i = 0; i < avctx->height; i++) {
169  if (!upgrade)
170  samplecpy(ptr, s->bytestream, n, s->maxval);
171  else if (upgrade == 1) {
172  unsigned int j, f = (255 * 128 + s->maxval / 2) / s->maxval;
173  for (j = 0; j < n; j++)
174  ptr[j] = (s->bytestream[j] * f + 64) >> 7;
175  } else if (upgrade == 2) {
176  unsigned int j, v, f = (65535 * 32768 + s->maxval / 2) / s->maxval;
177  for (j = 0; j < n / 2; j++) {
178  v = AV_RB16(s->bytestream + 2*j);
179  ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
180  }
181  }
182  s->bytestream += n;
183  ptr += linesize;
184  }
185  }
186  break;
187  case AV_PIX_FMT_YUV420P:
188  case AV_PIX_FMT_YUV420P9:
190  {
191  unsigned char *ptr1, *ptr2;
192 
193  n = avctx->width;
194  ptr = p->data[0];
195  linesize = p->linesize[0];
196  if (s->maxval >= 256)
197  n *= 2;
198  if (n * avctx->height * 3 / 2 > s->bytestream_end - s->bytestream)
199  return AVERROR_INVALIDDATA;
200  for (i = 0; i < avctx->height; i++) {
201  samplecpy(ptr, s->bytestream, n, s->maxval);
202  s->bytestream += n;
203  ptr += linesize;
204  }
205  ptr1 = p->data[1];
206  ptr2 = p->data[2];
207  n >>= 1;
208  h = avctx->height >> 1;
209  for (i = 0; i < h; i++) {
210  samplecpy(ptr1, s->bytestream, n, s->maxval);
211  s->bytestream += n;
212  samplecpy(ptr2, s->bytestream, n, s->maxval);
213  s->bytestream += n;
214  ptr1 += p->linesize[1];
215  ptr2 += p->linesize[2];
216  }
217  }
218  break;
220  {
221  uint16_t *ptr1, *ptr2;
222  const int f = (65535 * 32768 + s->maxval / 2) / s->maxval;
223  unsigned int j, v;
224 
225  n = avctx->width * 2;
226  ptr = p->data[0];
227  linesize = p->linesize[0];
228  if (n * avctx->height * 3 / 2 > s->bytestream_end - s->bytestream)
229  return AVERROR_INVALIDDATA;
230  for (i = 0; i < avctx->height; i++) {
231  for (j = 0; j < n / 2; j++) {
232  v = AV_RB16(s->bytestream + 2*j);
233  ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
234  }
235  s->bytestream += n;
236  ptr += linesize;
237  }
238  ptr1 = (uint16_t*)p->data[1];
239  ptr2 = (uint16_t*)p->data[2];
240  n >>= 1;
241  h = avctx->height >> 1;
242  for (i = 0; i < h; i++) {
243  for (j = 0; j < n / 2; j++) {
244  v = AV_RB16(s->bytestream + 2*j);
245  ptr1[j] = (v * f + 16384) >> 15;
246  }
247  s->bytestream += n;
248 
249  for (j = 0; j < n / 2; j++) {
250  v = AV_RB16(s->bytestream + 2*j);
251  ptr2[j] = (v * f + 16384) >> 15;
252  }
253  s->bytestream += n;
254 
255  ptr1 += p->linesize[1] / 2;
256  ptr2 += p->linesize[2] / 2;
257  }
258  }
259  break;
260  case AV_PIX_FMT_GBRPF32:
261  if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream)
262  return AVERROR_INVALIDDATA;
263  scale = 1.f / s->scale;
264  if (s->endian) {
265  float *r, *g, *b;
266 
267  r = (float *)p->data[2];
268  g = (float *)p->data[0];
269  b = (float *)p->data[1];
270  for (int i = 0; i < avctx->height; i++) {
271  for (int j = 0; j < avctx->width; j++) {
272  r[j] = av_int2float(AV_RL32(s->bytestream+0)) * scale;
273  g[j] = av_int2float(AV_RL32(s->bytestream+4)) * scale;
274  b[j] = av_int2float(AV_RL32(s->bytestream+8)) * scale;
275  s->bytestream += 12;
276  }
277 
278  r += p->linesize[2] / 4;
279  g += p->linesize[0] / 4;
280  b += p->linesize[1] / 4;
281  }
282  } else {
283  float *r, *g, *b;
284 
285  r = (float *)p->data[2];
286  g = (float *)p->data[0];
287  b = (float *)p->data[1];
288  for (int i = 0; i < avctx->height; i++) {
289  for (int j = 0; j < avctx->width; j++) {
290  r[j] = av_int2float(AV_RB32(s->bytestream+0)) * scale;
291  g[j] = av_int2float(AV_RB32(s->bytestream+4)) * scale;
292  b[j] = av_int2float(AV_RB32(s->bytestream+8)) * scale;
293  s->bytestream += 12;
294  }
295 
296  r += p->linesize[2] / 4;
297  g += p->linesize[0] / 4;
298  b += p->linesize[1] / 4;
299  }
300  }
301  break;
302  case AV_PIX_FMT_GRAYF32:
303  if (avctx->width * avctx->height * 4 > s->bytestream_end - s->bytestream)
304  return AVERROR_INVALIDDATA;
305  scale = 1.f / s->scale;
306  if (s->endian) {
307  float *g = (float *)p->data[0];
308  for (int i = 0; i < avctx->height; i++) {
309  for (int j = 0; j < avctx->width; j++) {
310  g[j] = av_int2float(AV_RL32(s->bytestream)) * scale;
311  s->bytestream += 4;
312  }
313  g += p->linesize[0] / 4;
314  }
315  } else {
316  float *g = (float *)p->data[0];
317  for (int i = 0; i < avctx->height; i++) {
318  for (int j = 0; j < avctx->width; j++) {
319  g[j] = av_int2float(AV_RB32(s->bytestream)) * scale;
320  s->bytestream += 4;
321  }
322  g += p->linesize[0] / 4;
323  }
324  }
325  break;
326  }
327  *got_frame = 1;
328 
329  return s->bytestream - s->bytestream_start;
330 }
331 
332 
333 #if CONFIG_PGM_DECODER
334 const FFCodec ff_pgm_decoder = {
335  .p.name = "pgm",
336  .p.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
337  .p.type = AVMEDIA_TYPE_VIDEO,
338  .p.id = AV_CODEC_ID_PGM,
339  .p.capabilities = AV_CODEC_CAP_DR1,
340  .priv_data_size = sizeof(PNMContext),
342 };
343 #endif
344 
345 #if CONFIG_PGMYUV_DECODER
346 const FFCodec ff_pgmyuv_decoder = {
347  .p.name = "pgmyuv",
348  .p.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
349  .p.type = AVMEDIA_TYPE_VIDEO,
350  .p.id = AV_CODEC_ID_PGMYUV,
351  .p.capabilities = AV_CODEC_CAP_DR1,
352  .priv_data_size = sizeof(PNMContext),
354 };
355 #endif
356 
357 #if CONFIG_PPM_DECODER
358 const FFCodec ff_ppm_decoder = {
359  .p.name = "ppm",
360  .p.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
361  .p.type = AVMEDIA_TYPE_VIDEO,
362  .p.id = AV_CODEC_ID_PPM,
363  .p.capabilities = AV_CODEC_CAP_DR1,
364  .priv_data_size = sizeof(PNMContext),
366 };
367 #endif
368 
369 #if CONFIG_PBM_DECODER
370 const FFCodec ff_pbm_decoder = {
371  .p.name = "pbm",
372  .p.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
373  .p.type = AVMEDIA_TYPE_VIDEO,
374  .p.id = AV_CODEC_ID_PBM,
375  .p.capabilities = AV_CODEC_CAP_DR1,
376  .priv_data_size = sizeof(PNMContext),
378 };
379 #endif
380 
381 #if CONFIG_PAM_DECODER
382 const FFCodec ff_pam_decoder = {
383  .p.name = "pam",
384  .p.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
385  .p.type = AVMEDIA_TYPE_VIDEO,
386  .p.id = AV_CODEC_ID_PAM,
387  .p.capabilities = AV_CODEC_CAP_DR1,
388  .priv_data_size = sizeof(PNMContext),
390 };
391 #endif
392 
393 #if CONFIG_PFM_DECODER
394 const FFCodec ff_pfm_decoder = {
395  .p.name = "pfm",
396  .p.long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
397  .p.type = AVMEDIA_TYPE_VIDEO,
398  .p.id = AV_CODEC_ID_PFM,
399  .p.capabilities = AV_CODEC_CAP_DR1,
400  .priv_data_size = sizeof(PNMContext),
402 };
403 #endif
ff_pgm_decoder
const FFCodec ff_pgm_decoder
r
const char * r
Definition: vf_curves.c:116
AVERROR
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
AV_CODEC_ID_PBM
@ AV_CODEC_ID_PBM
Definition: codec_id.h:113
init_put_bits
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
Definition: put_bits.h:62
AV_CODEC_ID_PFM
@ AV_CODEC_ID_PFM
Definition: codec_id.h:302
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:325
put_bits
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
Definition: j2kenc.c:221
internal.h
AVPacket::data
uint8_t * data
Definition: packet.h:374
AV_CODEC_ID_PPM
@ AV_CODEC_ID_PPM
Definition: codec_id.h:112
b
#define b
Definition: input.c:34
AV_CODEC_ID_PGM
@ AV_CODEC_ID_PGM
Definition: codec_id.h:114
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:75
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:406
FFCodec
Definition: codec_internal.h:112
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:346
ff_pam_decoder
const FFCodec ff_pam_decoder
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:116
av_int2float
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
Definition: intfloat.h:40
ff_pgmyuv_decoder
const FFCodec ff_pgmyuv_decoder
AVFrame::key_frame
int key_frame
1 -> keyframe, 0-> not
Definition: frame.h:417
scale
static av_always_inline float scale(float x, float s)
Definition: vf_v360.c:1388
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:390
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
s
#define s(width, name)
Definition: cbs_vp9.c:256
g
const char * g
Definition: vf_curves.c:117
AVCodecContext::bits_per_raw_sample
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1448
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:403
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:417
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
AV_PIX_FMT_GRAYF32
#define AV_PIX_FMT_GRAYF32
Definition: pixfmt.h:438
PutBitContext
Definition: put_bits.h:50
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
if
if(ret)
Definition: filter_design.txt:179
AV_PIX_FMT_GRAY8A
@ AV_PIX_FMT_GRAY8A
alias for AV_PIX_FMT_YA8
Definition: pixfmt.h:136
AV_PIX_FMT_RGBA64
#define AV_PIX_FMT_RGBA64
Definition: pixfmt.h:396
AV_PIX_FMT_MONOBLACK
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:76
AV_CODEC_ID_PGMYUV
@ AV_CODEC_ID_PGMYUV
Definition: codec_id.h:115
AV_PICTURE_TYPE_I
@ AV_PICTURE_TYPE_I
Intra.
Definition: avutil.h:274
pnm_decode_frame
static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
Definition: pnmdec.c:42
samplecpy
static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
Definition: pnmdec.c:30
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
pnm.h
AV_CODEC_ID_PAM
@ AV_CODEC_ID_PAM
Definition: codec_id.h:116
f
f
Definition: af_crystalizer.c:122
AVFrame::pict_type
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:422
ff_get_buffer
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1403
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AVPacket::size
int size
Definition: packet.h:375
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:116
codec_internal.h
ff_ppm_decoder
const FFCodec ff_ppm_decoder
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
AV_PIX_FMT_GBRPF32
#define AV_PIX_FMT_GBRPF32
Definition: pixfmt.h:435
AV_PIX_FMT_RGB48
#define AV_PIX_FMT_RGB48
Definition: pixfmt.h:392
AV_RB32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:96
PNMContext
Definition: pnm.h:27
AV_PIX_FMT_YA16
#define AV_PIX_FMT_YA16
Definition: pixfmt.h:391
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:203
AVCodecContext::height
int height
Definition: avcodec.h:562
AVCodecContext::pix_fmt
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:599
avcodec.h
ret
ret
Definition: filter_design.txt:187
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
AVCodecContext
main external API structure.
Definition: avcodec.h:389
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
ff_pnm_decode_header
int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext *const s)
Definition: pnm.c:65
flush_put_bits
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
Definition: put_bits.h:143
ff_pbm_decoder
const FFCodec ff_pbm_decoder
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:416
AVPacket
This structure stores compressed data.
Definition: packet.h:351
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:562
AVFrame::linesize
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Definition: frame.h:370
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
h
h
Definition: vp9dsp_template.c:2038
ff_pfm_decoder
const FFCodec ff_pfm_decoder
put_bits.h
av_log2
int av_log2(unsigned v)
Definition: intmath.c:26
AV_RB16
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
Definition: bytestream.h:98