History

Use new imgutils.h API names, fix deprecation warnings.

Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit e16f2171 parent 9b7269e51 files · +66 −66Browse files

Unified · Split

51 files
  1. libavcodec/avcodec.h +1 −1
  2. libavcodec/bink.c +1 −1
  3. libavcodec/dirac.c +1 −1
  4. libavcodec/dnxhddec.c +1 −1
  5. libavcodec/dpx.c +1 −1
  6. libavcodec/eacmv.c +1 −1
  7. libavcodec/eamad.c +1 −1
  8. libavcodec/eatgv.c +1 −1
  9. libavcodec/flvdec.c +1 −1
  10. libavcodec/gifdec.c +1 −1
  11. libavcodec/h264_ps.c +1 −1
  12. libavcodec/iff.c +1 −1
  13. libavcodec/imgconvert.c +8 −8
  14. libavcodec/indeo3.c +1 −1
  15. libavcodec/kgv1dec.c +1 −1
  16. libavcodec/libdiracdec.c +1 −1
  17. libavcodec/libopenjpeg.c +1 −1
  18. libavcodec/libschroedingerdec.c +1 −1
  19. libavcodec/libvpxdec.c +1 −1
  20. libavcodec/mjpegdec.c +1 −1
  21. libavcodec/mpegvideo.c +1 −1
  22. libavcodec/nuv.c +1 −1
  23. libavcodec/pcx.c +1 −1
  24. libavcodec/pgssubdec.c +1 −1
  25. libavcodec/pictordec.c +1 −1
  26. libavcodec/pngdec.c +1 −1
  27. libavcodec/pnm.c +2 −2
  28. libavcodec/ptx.c +1 −1
  29. libavcodec/qtrleenc.c +1 −1
  30. libavcodec/rv10.c +1 −1
  31. libavcodec/rv40.c +1 −1
  32. libavcodec/sgidec.c +1 −1
  33. libavcodec/sunrast.c +1 −1
  34. libavcodec/targa.c +1 −1
  35. libavcodec/tiff.c +2 −2
  36. libavcodec/txd.c +1 −1
  37. libavcodec/utils.c +5 −5
  38. libavcodec/vp3.c +1 −1
  39. libavcodec/vp8.c +1 −1
  40. libavcodec/vqavideo.c +1 −1
  41. libavcodec/xsubdec.c +1 −1
  42. libavcodec/yop.c +1 −1
  43. libavdevice/avdevice.h +1 −1
  44. libavdevice/v4l.c +1 −1
  45. libavdevice/v4l2.c +1 −1
  46. libavfilter/avfilter.c +1 −1
  47. libavfilter/avfilter.h +1 −1
  48. libavfilter/defaults.c +3 −3
  49. libavfilter/vf_crop.c +1 −1
  50. libavfilter/vf_hflip.c +1 −1
  51. libavfilter/vf_pad.c +1 −1
libavcodec/avcodec.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232
3333 #define LIBAVCODEC_VERSION_MAJOR 52
3434 #define LIBAVCODEC_VERSION_MINOR 87
35−#define LIBAVCODEC_VERSION_MICRO 1
35+#define LIBAVCODEC_VERSION_MICRO 2
3636
3737 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3838 LIBAVCODEC_VERSION_MINOR, \
libavcodec/bink.c+1−1
@@ -972,7 +972,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 971 unmodified lines
972972
973973 c->pic.data[0] = NULL;
974974
975− if (av_check_image_size(avctx->width, avctx->height, 0, avctx) < 0) {
975+ if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
976976 return 1;
977977 }
978978
libavcodec/dirac.c+1−1
@@ -269,7 +269,7 @@ int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, · 268 unmodified lines
269269 if (parse_source_parameters(avctx, gb, source))
270270 return -1;
271271
272− if (av_check_image_size(source->width, source->height, 0, avctx))
272+ if (av_image_check_size(source->width, source->height, 0, avctx))
273273 return -1;
274274
275275 avcodec_set_dimensions(avctx, source->width, source->height);
libavcodec/dnxhddec.c+1−1
@@ -306,7 +306,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 305 unmodified lines
306306 }
307307
308308 avctx->pix_fmt = PIX_FMT_YUV422P;
309− if (av_check_image_size(ctx->width, ctx->height, 0, avctx))
309+ if (av_image_check_size(ctx->width, ctx->height, 0, avctx))
310310 return -1;
311311 avcodec_set_dimensions(avctx, ctx->width, ctx->height);
312312
libavcodec/dpx.c+1−1
@@ -140,7 +140,7 @@ static int decode_frame(AVCodecContext *avctx, · 139 unmodified lines
140140
141141 if (s->picture.data[0])
142142 avctx->release_buffer(avctx, &s->picture);
143− if (av_check_image_size(w, h, 0, avctx))
143+ if (av_image_check_size(w, h, 0, avctx))
144144 return -1;
145145 if (w != avctx->width || h != avctx->height)
146146 avcodec_set_dimensions(avctx, w, h);
libavcodec/eacmv.c+1−1
@@ -157,7 +157,7 @@ static int cmv_decode_frame(AVCodecContext *avctx, · 156 unmodified lines
157157 return buf_size;
158158 }
159159
160− if (av_check_image_size(s->width, s->height, 0, s->avctx))
160+ if (av_image_check_size(s->width, s->height, 0, s->avctx))
161161 return -1;
162162
163163 /* shuffle */
libavcodec/eamad.c+1−1
@@ -261,7 +261,7 @@ static int decode_frame(AVCodecContext *avctx, · 260 unmodified lines
261261 buf += 16;
262262
263263 if (avctx->width != s->width || avctx->height != s->height) {
264− if (av_check_image_size(s->width, s->height, 0, avctx) < 0)
264+ if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
265265 return -1;
266266 avcodec_set_dimensions(avctx, s->width, s->height);
267267 if (t->frame.data[0])
libavcodec/eatgv.c+1−1
@@ -276,7 +276,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, · 275 unmodified lines
276276 }
277277 }
278278
279− if (av_check_image_size(s->width, s->height, 0, avctx))
279+ if (av_image_check_size(s->width, s->height, 0, avctx))
280280 return -1;
281281
282282 /* shuffle */
libavcodec/flvdec.c+1−1
@@ -83,7 +83,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 82 unmodified lines
8383 width = height = 0;
8484 break;
8585 }
86− if(av_check_image_size(width, height, 0, s->avctx))
86+ if(av_image_check_size(width, height, 0, s->avctx))
8787 return -1;
8888 s->width = width;
8989 s->height = height;
libavcodec/gifdec.c+1−1
@@ -297,7 +297,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A · 296 unmodified lines
297297 return -1;
298298
299299 avctx->pix_fmt = PIX_FMT_PAL8;
300− if (av_check_image_size(s->screen_width, s->screen_height, 0, avctx))
300+ if (av_image_check_size(s->screen_width, s->screen_height, 0, avctx))
301301 return -1;
302302 avcodec_set_dimensions(avctx, s->screen_width, s->screen_height);
303303
libavcodec/h264_ps.c+1−1
@@ -342,7 +342,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ · 341 unmodified lines
342342 sps->mb_width = get_ue_golomb(&s->gb) + 1;
343343 sps->mb_height= get_ue_golomb(&s->gb) + 1;
344344 if((unsigned)sps->mb_width >= INT_MAX/16 || (unsigned)sps->mb_height >= INT_MAX/16 ||
345− av_check_image_size(16*sps->mb_width, 16*sps->mb_height, 0, h->s.avctx)){
345+ av_image_check_size(16*sps->mb_width, 16*sps->mb_height, 0, h->s.avctx)){
346346 av_log(h->s.avctx, AV_LOG_ERROR, "mb_width/height overflow\n");
347347 goto fail;
348348 }
libavcodec/iff.c+1−1
@@ -161,7 +161,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 160 unmodified lines
161161 return AVERROR_INVALIDDATA;
162162 }
163163
164− if ((err = av_check_image_size(avctx->width, avctx->height, 0, avctx)))
164+ if ((err = av_image_check_size(avctx->width, avctx->height, 0, avctx)))
165165 return err;
166166 s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary
167167 s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE);
libavcodec/imgconvert.c+8−8
@@ -501,13 +501,13 @@ int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){ · 500 unmodified lines
501501 #if LIBAVCODEC_VERSION_MAJOR < 53
502502 int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width)
503503 {
504− return av_fill_image_linesizes(picture->linesize, pix_fmt, width);
504+ return av_image_fill_linesizes(picture->linesize, pix_fmt, width);
505505 }
506506
507507 int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt,
508508 int height)
509509 {
510− return av_fill_image_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
510+ return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
511511 }
512512 #endif
513513
@@ -515,13 +515,13 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, · 1 unmodified line
515515 enum PixelFormat pix_fmt, int width, int height)
516516 {
517517
518− if(av_check_image_size(width, height, 0, NULL))
518+ if(av_image_check_size(width, height, 0, NULL))
519519 return -1;
520520
521− if (av_fill_image_linesizes(picture->linesize, pix_fmt, width))
521+ if (av_image_fill_linesizes(picture->linesize, pix_fmt, width))
522522 return -1;
523523
524− return av_fill_image_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
524+ return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
525525 }
526526
527527 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
@@ -597,7 +597,7 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, · 69 unmodified lines
597597 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height)
598598 {
599599 AVPicture dummy_pict;
600− if(av_check_image_size(width, height, 0, NULL))
600+ if(av_image_check_size(width, height, 0, NULL))
601601 return -1;
602602 switch (pix_fmt) {
603603 case PIX_FMT_RGB8:
@@ -797,7 +797,7 @@ void ff_img_copy_plane(uint8_t *dst, int dst_wrap, · 193 unmodified lines
797797 #if LIBAVCODEC_VERSION_MAJOR < 53
798798 int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane)
799799 {
800− return av_get_image_linesize(pix_fmt, width, plane);
800+ return av_image_get_linesize(pix_fmt, width, plane);
801801 }
802802 #endif
803803
@@ -814,7 +814,7 @@ void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], · 10 unmodified lines
814814 case FF_PIXEL_PLANAR:
815815 for(i = 0; i < pf->nb_channels; i++) {
816816 int h;
817− int bwidth = av_get_image_linesize(pix_fmt, width, i);
817+ int bwidth = av_image_get_linesize(pix_fmt, width, i);
818818 h = height;
819819 if (i == 1 || i == 2) {
820820 h= -((-height)>>desc->log2_chroma_h);
libavcodec/indeo3.c+1−1
@@ -996,7 +996,7 @@ static int iv_decode_frame(AVCodecContext *avctx, · 995 unmodified lines
996996 image_height = bytestream_get_le16(&buf_pos);
997997 image_width = bytestream_get_le16(&buf_pos);
998998
999− if(av_check_image_size(image_width, image_height, 0, avctx))
999+ if(av_image_check_size(image_width, image_height, 0, avctx))
10001000 return -1;
10011001 if (image_width != avctx->width || image_height != avctx->height) {
10021002 int ret;
libavcodec/kgv1dec.c+1−1
@@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 50 unmodified lines
5151 h = (buf[1] + 1) * 8;
5252 buf += 2;
5353
54− if (av_check_image_size(w, h, 0, avctx))
54+ if (av_image_check_size(w, h, 0, avctx))
5555 return -1;
5656
5757 if (w != avctx->width || h != avctx->height)
libavcodec/libdiracdec.c+1−1
@@ -106,7 +106,7 @@ static int libdirac_decode_frame(AVCodecContext *avccontext, · 105 unmodified lines
106106 /* tell FFmpeg about sequence details */
107107 dirac_sourceparams_t *src_params = &p_dirac_params->p_decoder->src_params;
108108
109− if (av_check_image_size(src_params->width, src_params->height,
109+ if (av_image_check_size(src_params->width, src_params->height,
110110 0, avccontext) < 0) {
111111 av_log(avccontext, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n",
112112 src_params->width, src_params->height);
libavcodec/libopenjpeg.c+1−1
@@ -114,7 +114,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, · 113 unmodified lines
114114 }
115115 width = image->comps[0].w << avctx->lowres;
116116 height = image->comps[0].h << avctx->lowres;
117− if(av_check_image_size(width, height, 0, avctx) < 0) {
117+ if(av_image_check_size(width, height, 0, avctx) < 0) {
118118 av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height);
119119 goto done;
120120 }
libavcodec/libschroedingerdec.c+1−1
@@ -170,7 +170,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) · 169 unmodified lines
170170 p_schro_params->format = schro_decoder_get_video_format(decoder);
171171
172172 /* Tell FFmpeg about sequence details. */
173− if (av_check_image_size(p_schro_params->format->width, p_schro_params->format->height,
173+ if (av_image_check_size(p_schro_params->format->width, p_schro_params->format->height,
174174 0, avccontext) < 0) {
175175 av_log(avccontext, AV_LOG_ERROR, "invalid dimensions (%dx%d)\n",
176176 p_schro_params->format->width, p_schro_params->format->height);
libavcodec/libvpxdec.c+1−1
@@ -87,7 +87,7 @@ static int vp8_decode(AVCodecContext *avctx, · 86 unmodified lines
8787 if ((int) img->d_w != avctx->width || (int) img->d_h != avctx->height) {
8888 av_log(avctx, AV_LOG_INFO, "dimension change! %dx%d -> %dx%d\n",
8989 avctx->width, avctx->height, img->d_w, img->d_h);
90− if (av_check_image_size(img->d_w, img->d_h, 0, avctx))
90+ if (av_image_check_size(img->d_w, img->d_h, 0, avctx))
9191 return AVERROR_INVALIDDATA;
9292 avcodec_set_dimensions(avctx, img->d_w, img->d_h);
9393 }
libavcodec/mjpegdec.c+1−1
@@ -219,7 +219,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 218 unmodified lines
219219 height= s->height;
220220
221221 av_log(s->avctx, AV_LOG_DEBUG, "sof0: picture: %dx%d\n", width, height);
222− if(av_check_image_size(width, height, 0, s->avctx))
222+ if(av_image_check_size(width, height, 0, s->avctx))
223223 return -1;
224224
225225 nb_components = get_bits(&s->gb, 8);
libavcodec/mpegvideo.c+1−1
@@ -511,7 +511,7 @@ av_cold int MPV_common_init(MpegEncContext *s) · 510 unmodified lines
511511 return -1;
512512 }
513513
514− if((s->width || s->height) && av_check_image_size(s->width, s->height, 0, s->avctx))
514+ if((s->width || s->height) && av_image_check_size(s->width, s->height, 0, s->avctx))
515515 return -1;
516516
517517 dsputil_init(&s->dsp, s->avctx);
libavcodec/nuv.c+1−1
@@ -112,7 +112,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit · 111 unmodified lines
112112 if (quality >= 0)
113113 get_quant_quality(c, quality);
114114 if (width != c->width || height != c->height) {
115− if (av_check_image_size(height, width, 0, avctx) < 0)
115+ if (av_image_check_size(height, width, 0, avctx) < 0)
116116 return 0;
117117 avctx->width = c->width = width;
118118 avctx->height = c->height = height;
libavcodec/pcx.c+1−1
@@ -143,7 +143,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 142 unmodified lines
143143 if (p->data[0])
144144 avctx->release_buffer(avctx, p);
145145
146− if (av_check_image_size(w, h, 0, avctx))
146+ if (av_image_check_size(w, h, 0, avctx))
147147 return -1;
148148 if (w != avctx->width || h != avctx->height)
149149 avcodec_set_dimensions(avctx, w, h);
libavcodec/pgssubdec.c+1−1
@@ -270,7 +270,7 @@ static void parse_presentation_segment(AVCodecContext *avctx, · 269 unmodified lines
270270
271271 dprintf(avctx, "Video Dimensions %dx%d\n",
272272 w, h);
273− if (av_check_image_size(w, h, 0, avctx) >= 0)
273+ if (av_image_check_size(w, h, 0, avctx) >= 0)
274274 avcodec_set_dimensions(avctx, w, h);
275275
276276 /* Skip 1 bytes of unknown, frame rate? */
libavcodec/pictordec.c+1−1
@@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx, · 135 unmodified lines
136136 avctx->pix_fmt = PIX_FMT_PAL8;
137137
138138 if (s->width != avctx->width && s->height != avctx->height) {
139− if (av_check_image_size(s->width, s->height, 0, avctx) < 0)
139+ if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
140140 return -1;
141141 avcodec_set_dimensions(avctx, s->width, s->height);
142142 if (s->frame.data[0])
libavcodec/pngdec.c+1−1
@@ -442,7 +442,7 @@ static int decode_frame(AVCodecContext *avctx, · 441 unmodified lines
442442 goto fail;
443443 s->width = bytestream_get_be32(&s->bytestream);
444444 s->height = bytestream_get_be32(&s->bytestream);
445− if(av_check_image_size(s->width, s->height, 0, avctx)){
445+ if(av_image_check_size(s->width, s->height, 0, avctx)){
446446 s->width= s->height= 0;
447447 goto fail;
448448 }
libavcodec/pnm.c+2−2
@@ -102,7 +102,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 101 unmodified lines
102102 }
103103 }
104104 /* check that all tags are present */
105− if (w <= 0 || h <= 0 || maxval <= 0 || depth <= 0 || tuple_type[0] == '\0' || av_check_image_size(w, h, 0, avctx))
105+ if (w <= 0 || h <= 0 || maxval <= 0 || depth <= 0 || tuple_type[0] == '\0' || av_image_check_size(w, h, 0, avctx))
106106 return -1;
107107
108108 avctx->width = w;
@@ -135,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 26 unmodified lines
135135 return -1;
136136 pnm_get(s, buf1, sizeof(buf1));
137137 avctx->height = atoi(buf1);
138− if(av_check_image_size(avctx->width, avctx->height, 0, avctx))
138+ if(av_image_check_size(avctx->width, avctx->height, 0, avctx))
139139 return -1;
140140 if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
141141 pnm_get(s, buf1, sizeof(buf1));
libavcodec/ptx.c+1−1
@@ -65,7 +65,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 64 unmodified lines
6565 if (p->data[0])
6666 avctx->release_buffer(avctx, p);
6767
68− if (av_check_image_size(w, h, 0, avctx))
68+ if (av_image_check_size(w, h, 0, avctx))
6969 return -1;
7070 if (w != avctx->width || h != avctx->height)
7171 avcodec_set_dimensions(avctx, w, h);
libavcodec/qtrleenc.c+1−1
@@ -63,7 +63,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx) · 62 unmodified lines
6363 {
6464 QtrleEncContext *s = avctx->priv_data;
6565
66− if (av_check_image_size(avctx->width, avctx->height, 0, avctx) < 0) {
66+ if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
6767 return -1;
6868 }
6969 s->avctx=avctx;
libavcodec/rv10.c+1−1
@@ -370,7 +370,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) · 369 unmodified lines
370370 }
371371 if(new_w != s->width || new_h != s->height){
372372 av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h);
373− if (av_check_image_size(new_w, new_h, 0, s->avctx) < 0)
373+ if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0)
374374 return -1;
375375 MPV_common_end(s);
376376 avcodec_set_dimensions(s->avctx, new_w, new_h);
libavcodec/rv40.c+1−1
@@ -144,7 +144,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 143 unmodified lines
144144 si->pts = get_bits(gb, 13);
145145 if(!si->type || !get_bits1(gb))
146146 rv40_parse_picture_size(gb, &w, &h);
147− if(av_check_image_size(w, h, 0, r->s.avctx) < 0)
147+ if(av_image_check_size(w, h, 0, r->s.avctx) < 0)
148148 return -1;
149149 si->width = w;
150150 si->height = h;
libavcodec/sgidec.c+1−1
@@ -202,7 +202,7 @@ static int decode_frame(AVCodecContext *avctx, · 201 unmodified lines
202202 return -1;
203203 }
204204
205− if (av_check_image_size(s->width, s->height, 0, avctx))
205+ if (av_image_check_size(s->width, s->height, 0, avctx))
206206 return -1;
207207 avcodec_set_dimensions(avctx, s->width, s->height);
208208
libavcodec/sunrast.c+1−1
@@ -98,7 +98,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, · 97 unmodified lines
9898 if (p->data[0])
9999 avctx->release_buffer(avctx, p);
100100
101− if (av_check_image_size(w, h, 0, avctx))
101+ if (av_image_check_size(w, h, 0, avctx))
102102 return -1;
103103 if (w != avctx->width || h != avctx->height)
104104 avcodec_set_dimensions(avctx, w, h);
libavcodec/targa.c+1−1
@@ -146,7 +146,7 @@ static int decode_frame(AVCodecContext *avctx, · 145 unmodified lines
146146 if(s->picture.data[0])
147147 avctx->release_buffer(avctx, &s->picture);
148148
149− if(av_check_image_size(w, h, 0, avctx))
149+ if(av_image_check_size(w, h, 0, avctx))
150150 return -1;
151151 if(w != avctx->width || h != avctx->height)
152152 avcodec_set_dimensions(avctx, w, h);
libavcodec/tiff.c+2−2
@@ -306,7 +306,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t * · 305 unmodified lines
306306 return -1;
307307 }
308308 if(s->width != s->avctx->width || s->height != s->avctx->height){
309− if(av_check_image_size(s->width, s->height, 0, s->avctx))
309+ if(av_image_check_size(s->width, s->height, 0, s->avctx))
310310 return -1;
311311 avcodec_set_dimensions(s->avctx, s->width, s->height);
312312 }
@@ -508,7 +508,7 @@ static int decode_frame(AVCodecContext *avctx, · 195 unmodified lines
508508 s->bpp = 1;
509509 avctx->pix_fmt = PIX_FMT_MONOBLACK;
510510 if(s->width != s->avctx->width || s->height != s->avctx->height){
511− if(av_check_image_size(s->width, s->height, 0, s->avctx))
511+ if(av_image_check_size(s->width, s->height, 0, s->avctx))
512512 return -1;
513513 avcodec_set_dimensions(s->avctx, s->width, s->height);
514514 }
libavcodec/txd.c+1−1
@@ -80,7 +80,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 79 unmodified lines
8080 if (p->data[0])
8181 avctx->release_buffer(avctx, p);
8282
83− if (av_check_image_size(w, h, 0, avctx))
83+ if (av_image_check_size(w, h, 0, avctx))
8484 return -1;
8585 if (w != avctx->width || h != avctx->height)
8686 avcodec_set_dimensions(avctx, w, h);
libavcodec/utils.c+5−5
@@ -215,7 +215,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ · 214 unmodified lines
215215
216216 #if LIBAVCODEC_VERSION_MAJOR < 53
217217 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
218− return av_check_image_size(w, h, 0, av_log_ctx);
218+ return av_image_check_size(w, h, 0, av_log_ctx);
219219 }
220220 #endif
221221
@@ -235,7 +235,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 13 unmodified lines
235235 return -1;
236236 }
237237
238− if(av_check_image_size(w, h, 0, s))
238+ if(av_image_check_size(w, h, 0, s))
239239 return -1;
240240
241241 if(s->internal_buffer==NULL){
@@ -487,7 +487,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) · 245 unmodified lines
487487
488488 #define SANE_NB_CHANNELS 128U
489489 if (((avctx->coded_width || avctx->coded_height)
490− && av_check_image_size(avctx->coded_width, avctx->coded_height, 0, avctx))
490+ && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
491491 || avctx->channels > SANE_NB_CHANNELS) {
492492 ret = AVERROR(EINVAL);
493493 goto free_and_end;
@@ -554,7 +554,7 @@ int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf · 60 unmodified lines
554554 av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n");
555555 return -1;
556556 }
557− if(av_check_image_size(avctx->width, avctx->height, 0, avctx))
557+ if(av_image_check_size(avctx->width, avctx->height, 0, avctx))
558558 return -1;
559559 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){
560560 int ret = avctx->codec->encode(avctx, buf, buf_size, pict);
@@ -604,7 +604,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi · 43 unmodified lines
604604 int ret;
605605
606606 *got_picture_ptr= 0;
607− if((avctx->coded_width||avctx->coded_height) && av_check_image_size(avctx->coded_width, avctx->coded_height, 0, avctx))
607+ if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
608608 return -1;
609609 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
610610 ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
libavcodec/vp3.c+1−1
@@ -1981,7 +1981,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) · 1980 unmodified lines
19811981 visible_width = s->width = get_bits(gb, 16) << 4;
19821982 visible_height = s->height = get_bits(gb, 16) << 4;
19831983
1984− if(av_check_image_size(s->width, s->height, 0, avctx)){
1984+ if(av_image_check_size(s->width, s->height, 0, avctx)){
19851985 av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height);
19861986 s->width= s->height= 0;
19871987 return -1;
libavcodec/vp8.c+1−1
@@ -223,7 +223,7 @@ static void vp8_decode_flush(AVCodecContext *avctx) · 222 unmodified lines
223223
224224 static int update_dimensions(VP8Context *s, int width, int height)
225225 {
226− if (av_check_image_size(width, height, 0, s->avctx))
226+ if (av_image_check_size(width, height, 0, s->avctx))
227227 return AVERROR_INVALIDDATA;
228228
229229 vp8_decode_flush(s->avctx);
libavcodec/vqavideo.c+1−1
@@ -148,7 +148,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx) · 147 unmodified lines
148148 s->vqa_version = vqa_header[0];
149149 s->width = AV_RL16(&vqa_header[6]);
150150 s->height = AV_RL16(&vqa_header[8]);
151− if(av_check_image_size(s->width, s->height, 0, avctx)){
151+ if(av_image_check_size(s->width, s->height, 0, avctx)){
152152 s->width= s->height= 0;
153153 return -1;
154154 }
libavcodec/xsubdec.c+1−1
@@ -77,7 +77,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 76 unmodified lines
7777 // read header
7878 w = bytestream_get_le16(&buf);
7979 h = bytestream_get_le16(&buf);
80− if (av_check_image_size(w, h, 0, avctx) < 0)
80+ if (av_image_check_size(w, h, 0, avctx) < 0)
8181 return -1;
8282 x = bytestream_get_le16(&buf);
8383 y = bytestream_get_le16(&buf);
libavcodec/yop.c+1−1
@@ -85,7 +85,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx) · 84 unmodified lines
8585 s->avctx = avctx;
8686
8787 if (avctx->width & 1 || avctx->height & 1 ||
88− av_check_image_size(avctx->width, avctx->height, 0, avctx) < 0) {
88+ av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
8989 av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
9090 return -1;
9191 }
libavdevice/avdevice.h+1−1
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323
2424 #define LIBAVDEVICE_VERSION_MAJOR 52
2525 #define LIBAVDEVICE_VERSION_MINOR 2
26−#define LIBAVDEVICE_VERSION_MICRO 1
26+#define LIBAVDEVICE_VERSION_MICRO 2
2727
2828 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
2929 LIBAVDEVICE_VERSION_MINOR, \
libavdevice/v4l.c+1−1
@@ -117,7 +117,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 116 unmodified lines
117117 }
118118 }
119119
120− if(av_check_image_size(s->video_win.width, s->video_win.height, 0, s1) < 0)
120+ if(av_image_check_size(s->video_win.width, s->video_win.height, 0, s1) < 0)
121121 return -1;
122122
123123 desired_palette = -1;
libavdevice/v4l2.c+1−1
@@ -629,7 +629,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 628 unmodified lines
629629
630630 return AVERROR(EIO);
631631 }
632− if (av_check_image_size(s->width, s->height, 0, s1) < 0)
632+ if (av_image_check_size(s->width, s->height, 0, s1) < 0)
633633 return AVERROR(EINVAL);
634634 s->frame_format = desired_format;
635635
libavfilter/avfilter.c+1−1
@@ -381,7 +381,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 380 unmodified lines
381381
382382 for (i = 0; i < 4; i++) {
383383 int planew =
384− av_get_image_linesize(link->format, link->cur_buf->video->w, i);
384+ av_image_get_linesize(link->format, link->cur_buf->video->w, i);
385385
386386 if (!src[i]) continue;
387387
libavfilter/avfilter.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626
2727 #define LIBAVFILTER_VERSION_MAJOR 1
2828 #define LIBAVFILTER_VERSION_MINOR 38
29−#define LIBAVFILTER_VERSION_MICRO 1
29+#define LIBAVFILTER_VERSION_MICRO 2
3030
3131 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3232 LIBAVFILTER_VERSION_MINOR, \
libavfilter/defaults.c+3−3
@@ -54,17 +54,17 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per · 53 unmodified lines
5454 pic->refcount = 1;
5555 ref->format = link->format;
5656 pic->free = avfilter_default_free_buffer;
57− av_fill_image_linesizes(pic->linesize, ref->format, ref->video->w);
57+ av_image_fill_linesizes(pic->linesize, ref->format, ref->video->w);
5858
5959 for (i = 0; i < 4; i++)
6060 pic->linesize[i] = FFALIGN(pic->linesize[i], 16);
6161
62− tempsize = av_fill_image_pointers(pic->data, ref->format, ref->video->h, NULL, pic->linesize);
62+ tempsize = av_image_fill_pointers(pic->data, ref->format, ref->video->h, NULL, pic->linesize);
6363 buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be
6464 // SIMD-friendly
6565 if (!buf)
6666 goto fail;
67− av_fill_image_pointers(pic->data, ref->format, ref->video->h, buf, pic->linesize);
67+ av_image_fill_pointers(pic->data, ref->format, ref->video->h, buf, pic->linesize);
6868
6969 memcpy(ref->data, pic->data, sizeof(ref->data));
7070 memcpy(ref->linesize, pic->linesize, sizeof(ref->linesize));
libavfilter/vf_crop.c+1−1
@@ -84,7 +84,7 @@ static int config_input(AVFilterLink *link) · 83 unmodified lines
8484 CropContext *crop = ctx->priv;
8585 const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[link->format];
8686
87− av_fill_image_max_pixsteps(crop->max_step, NULL, pix_desc);
87+ av_image_fill_max_pixsteps(crop->max_step, NULL, pix_desc);
8888 crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w;
8989 crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
9090
libavfilter/vf_hflip.c+1−1
@@ -70,7 +70,7 @@ static int config_props(AVFilterLink *inlink) · 69 unmodified lines
7070 FlipContext *flip = inlink->dst->priv;
7171 const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
7272
73− av_fill_image_max_pixsteps(flip->max_step, NULL, pix_desc);
73+ av_image_fill_max_pixsteps(flip->max_step, NULL, pix_desc);
7474 flip->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w;
7575 flip->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h;
7676
libavfilter/vf_pad.c+1−1
@@ -407,7 +407,7 @@ static int color_config_props(AVFilterLink *inlink) · 406 unmodified lines
407407
408408 color->w &= ~((1 << color->hsub) - 1);
409409 color->h &= ~((1 << color->vsub) - 1);
410− if (av_check_image_size(color->w, color->h, 0, ctx) < 0)
410+ if (av_image_check_size(color->w, color->h, 0, ctx) < 0)
411411 return AVERROR(EINVAL);
412412
413413 memcpy(rgba_color, color->color, sizeof(rgba_color));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t