Revision 0fd0ef79

View differences:

libavcodec/avcodec.h
30 30
#include "libavutil/avutil.h"
31 31

  
32 32
#define LIBAVCODEC_VERSION_MAJOR 52
33
#define LIBAVCODEC_VERSION_MINOR 79
34
#define LIBAVCODEC_VERSION_MICRO  1
33
#define LIBAVCODEC_VERSION_MINOR 80
34
#define LIBAVCODEC_VERSION_MICRO  0
35 35

  
36 36
#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
37 37
                                               LIBAVCODEC_VERSION_MINOR, \
......
2713 2713
    const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
2714 2714
    const enum SampleFormat *sample_fmts;   ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
2715 2715
    const int64_t *channel_layouts;         ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
2716
    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder
2716 2717
} AVCodec;
2717 2718

  
2718 2719
/**
libavcodec/bmp.c
345 345
    bmp_decode_end,
346 346
    bmp_decode_frame,
347 347
    CODEC_CAP_DR1,
348
    .max_lowres = 5,
348 349
    .long_name = NULL_IF_CONFIG_SMALL("BMP image"),
349 350
};
libavcodec/cdgraphics.c
377 377
    cdg_decode_end,
378 378
    cdg_decode_frame,
379 379
    CODEC_CAP_DR1,
380
    .max_lowres = 5,
380 381
    .long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"),
381 382
};
libavcodec/dv.c
1304 1304
    dvvideo_decode_frame,
1305 1305
    CODEC_CAP_DR1,
1306 1306
    NULL,
1307
    .max_lowres = 3,
1307 1308
    .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
1308 1309
};
1309 1310
#endif
libavcodec/flvdec.c
127 127
    ff_h263_decode_end,
128 128
    ff_h263_decode_frame,
129 129
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
130
    .max_lowres= 3,
130 131
    .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"),
131 132
    .pix_fmts= ff_pixfmt_list_420,
132 133
};
libavcodec/h261dec.c
651 651
    h261_decode_end,
652 652
    h261_decode_frame,
653 653
    CODEC_CAP_DR1,
654
    .max_lowres = 3,
654 655
    .long_name = NULL_IF_CONFIG_SMALL("H.261"),
655 656
};
libavcodec/h263dec.c
738 738
    ff_h263_decode_frame,
739 739
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
740 740
    .flush= ff_mpeg_flush,
741
    .max_lowres= 3,
741 742
    .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
742 743
    .pix_fmts= ff_hwaccel_pixfmt_list_420,
743 744
};
libavcodec/kgv1dec.c
172 172
    NULL,
173 173
    decode_end,
174 174
    decode_frame,
175
    .max_lowres = 1,
175 176
    .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
176 177
};
libavcodec/libopenjpeg.c
193 193
    libopenjpeg_decode_close,
194 194
    libopenjpeg_decode_frame,
195 195
    CODEC_CAP_DR1,
196
    .max_lowres = 5,
196 197
    .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG based JPEG 2000 decoder"),
197 198
} ;
libavcodec/mjpegbdec.c
156 156
    mjpegb_decode_frame,
157 157
    CODEC_CAP_DR1,
158 158
    NULL,
159
    .max_lowres = 3,
159 160
    .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
160 161
};
libavcodec/mjpegdec.c
1542 1542
    ff_mjpeg_decode_frame,
1543 1543
    CODEC_CAP_DR1,
1544 1544
    NULL,
1545
    .max_lowres = 8,
1545 1546
    .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
1546 1547
};
1547 1548

  
......
1556 1557
    ff_mjpeg_decode_frame,
1557 1558
    CODEC_CAP_DR1,
1558 1559
    NULL,
1560
    .max_lowres = 3,
1559 1561
    .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
1560 1562
};
libavcodec/mpeg12.c
2511 2511
    mpeg_decode_frame,
2512 2512
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
2513 2513
    .flush= flush,
2514
    .max_lowres= 3,
2514 2515
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2515 2516
};
2516 2517

  
......
2525 2526
    mpeg_decode_frame,
2526 2527
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
2527 2528
    .flush= flush,
2529
    .max_lowres= 3,
2528 2530
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"),
2529 2531
};
2530 2532

  
......
2540 2542
    mpeg_decode_frame,
2541 2543
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
2542 2544
    .flush= flush,
2545
    .max_lowres= 3,
2543 2546
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2544 2547
};
2545 2548

  
libavcodec/mpeg4videodec.c
2245 2245
    ff_h263_decode_frame,
2246 2246
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
2247 2247
    .flush= ff_mpeg_flush,
2248
    .max_lowres= 3,
2248 2249
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
2249 2250
    .pix_fmts= ff_hwaccel_pixfmt_list_420,
2250 2251
};
libavcodec/msmpeg4.c
1929 1929
    ff_h263_decode_end,
1930 1930
    ff_h263_decode_frame,
1931 1931
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1932
    .max_lowres= 3,
1932 1933
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
1933 1934
    .pix_fmts= ff_pixfmt_list_420,
1934 1935
};
......
1943 1944
    ff_h263_decode_end,
1944 1945
    ff_h263_decode_frame,
1945 1946
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1947
    .max_lowres= 3,
1946 1948
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
1947 1949
    .pix_fmts= ff_pixfmt_list_420,
1948 1950
};
......
1957 1959
    ff_h263_decode_end,
1958 1960
    ff_h263_decode_frame,
1959 1961
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1962
    .max_lowres= 3,
1960 1963
    .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
1961 1964
    .pix_fmts= ff_pixfmt_list_420,
1962 1965
};
......
1971 1974
    ff_h263_decode_end,
1972 1975
    ff_h263_decode_frame,
1973 1976
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1977
    .max_lowres= 3,
1974 1978
    .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
1975 1979
    .pix_fmts= ff_pixfmt_list_420,
1976 1980
};
libavcodec/pngdec.c
667 667
    decode_frame,
668 668
    CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
669 669
    NULL,
670
    .max_lowres = 5,
670 671
    .long_name = NULL_IF_CONFIG_SMALL("PNG image"),
671 672
};
libavcodec/pnmdec.c
199 199
    pnm_decode_frame,
200 200
    CODEC_CAP_DR1,
201 201
    .pix_fmts  = (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE},
202
    .max_lowres = 5,
202 203
    .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
203 204
};
204 205
#endif
......
215 216
    pnm_decode_frame,
216 217
    CODEC_CAP_DR1,
217 218
    .pix_fmts  = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
219
    .max_lowres = 5,
218 220
    .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
219 221
};
220 222
#endif
......
231 233
    pnm_decode_frame,
232 234
    CODEC_CAP_DR1,
233 235
    .pix_fmts  = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE},
236
    .max_lowres = 5,
234 237
    .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
235 238
};
236 239
#endif
......
247 250
    pnm_decode_frame,
248 251
    CODEC_CAP_DR1,
249 252
    .pix_fmts  = (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE},
253
    .max_lowres = 5,
250 254
    .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
251 255
};
252 256
#endif
......
263 267
    pnm_decode_frame,
264 268
    CODEC_CAP_DR1,
265 269
    .pix_fmts  = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE},
270
    .max_lowres = 5,
266 271
    .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
267 272
};
268 273
#endif
libavcodec/rv10.c
716 716
    rv10_decode_end,
717 717
    rv10_decode_frame,
718 718
    CODEC_CAP_DR1,
719
    .max_lowres = 3,
719 720
    .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
720 721
    .pix_fmts= ff_pixfmt_list_420,
721 722
};
......
731 732
    rv10_decode_frame,
732 733
    CODEC_CAP_DR1 | CODEC_CAP_DELAY,
733 734
    .flush= ff_mpeg_flush,
735
    .max_lowres = 3,
734 736
    .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
735 737
    .pix_fmts= ff_pixfmt_list_420,
736 738
};
libavcodec/sp5xdec.c
204 204
    sp5x_decode_frame,
205 205
    CODEC_CAP_DR1,
206 206
    NULL,
207
    .max_lowres = 5,
207 208
    .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
208 209
};
209 210

  
libavcodec/utils.c
506 506
    }
507 507
    avctx->frame_number = 0;
508 508
    if(avctx->codec->init){
509
        if(avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
510
           avctx->codec->max_lowres < avctx->lowres){
511
            av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
512
                   avctx->codec->max_lowres);
513
            goto free_and_end;
514
        }
515

  
509 516
        ret = avctx->codec->init(avctx);
510 517
        if (ret < 0) {
511 518
            goto free_and_end;
libavcodec/wmv2dec.c
494 494
    wmv2_decode_end,
495 495
    ff_h263_decode_frame,
496 496
    CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
497
    .max_lowres = 3,
497 498
    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
498 499
    .pix_fmts= ff_pixfmt_list_420,
499 500
};

Also available in: Unified diff