Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #define LIBAVCODEC_VERSION_MAJOR 52 | 33 | #define LIBAVCODEC_VERSION_MAJOR 52 |
| 34 | #define LIBAVCODEC_VERSION_MINOR 87 | 34 | #define LIBAVCODEC_VERSION_MINOR 87 |
| 35 | #define LIBAVCODEC_VERSION_MICRO 1 | 35 | #define LIBAVCODEC_VERSION_MICRO 2 |
| 36 | 36 | ||
| 37 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 37 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 38 | LIBAVCODEC_VERSION_MINOR, \ | 38 | LIBAVCODEC_VERSION_MINOR, \ |
| @@ -972,7 +972,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 971 unmodified lines | |||
| 972 | 972 | ||
| 973 | c->pic.data[0] = NULL; | 973 | c->pic.data[0] = NULL; |
| 974 | 974 | ||
| 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) { |
| 976 | return 1; | 976 | return 1; |
| 977 | } | 977 | } |
| 978 | 978 | ||
| @@ -269,7 +269,7 @@ int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, · 268 unmodified lines | |||
| 269 | if (parse_source_parameters(avctx, gb, source)) | 269 | if (parse_source_parameters(avctx, gb, source)) |
| 270 | return -1; | 270 | return -1; |
| 271 | 271 | ||
| 272 | if (av_check_image_size(source->width, source->height, 0, avctx)) | 272 | if (av_image_check_size(source->width, source->height, 0, avctx)) |
| 273 | return -1; | 273 | return -1; |
| 274 | 274 | ||
| 275 | avcodec_set_dimensions(avctx, source->width, source->height); | 275 | avcodec_set_dimensions(avctx, source->width, source->height); |
| @@ -306,7 +306,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 305 unmodified lines | |||
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | avctx->pix_fmt = PIX_FMT_YUV422P; | 308 | 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)) |
| 310 | return -1; | 310 | return -1; |
| 311 | avcodec_set_dimensions(avctx, ctx->width, ctx->height); | 311 | avcodec_set_dimensions(avctx, ctx->width, ctx->height); |
| 312 | 312 | ||
| @@ -140,7 +140,7 @@ static int decode_frame(AVCodecContext *avctx, · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | if (s->picture.data[0]) | 141 | if (s->picture.data[0]) |
| 142 | avctx->release_buffer(avctx, &s->picture); | 142 | 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)) |
| 144 | return -1; | 144 | return -1; |
| 145 | if (w != avctx->width || h != avctx->height) | 145 | if (w != avctx->width || h != avctx->height) |
| 146 | avcodec_set_dimensions(avctx, w, h); | 146 | avcodec_set_dimensions(avctx, w, h); |
| @@ -157,7 +157,7 @@ static int cmv_decode_frame(AVCodecContext *avctx, · 156 unmodified lines | |||
| 157 | return buf_size; | 157 | return buf_size; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 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)) |
| 161 | return -1; | 161 | return -1; |
| 162 | 162 | ||
| 163 | /* shuffle */ | 163 | /* shuffle */ |
| @@ -261,7 +261,7 @@ static int decode_frame(AVCodecContext *avctx, · 260 unmodified lines | |||
| 261 | buf += 16; | 261 | buf += 16; |
| 262 | 262 | ||
| 263 | if (avctx->width != s->width || avctx->height != s->height) { | 263 | 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) |
| 265 | return -1; | 265 | return -1; |
| 266 | avcodec_set_dimensions(avctx, s->width, s->height); | 266 | avcodec_set_dimensions(avctx, s->width, s->height); |
| 267 | if (t->frame.data[0]) | 267 | if (t->frame.data[0]) |
| @@ -276,7 +276,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, · 275 unmodified lines | |||
| 276 | } | 276 | } |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | if (av_check_image_size(s->width, s->height, 0, avctx)) | 279 | if (av_image_check_size(s->width, s->height, 0, avctx)) |
| 280 | return -1; | 280 | return -1; |
| 281 | 281 | ||
| 282 | /* shuffle */ | 282 | /* shuffle */ |
| @@ -83,7 +83,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 82 unmodified lines | |||
| 83 | width = height = 0; | 83 | width = height = 0; |
| 84 | break; | 84 | break; |
| 85 | } | 85 | } |
| 86 | if(av_check_image_size(width, height, 0, s->avctx)) | 86 | if(av_image_check_size(width, height, 0, s->avctx)) |
| 87 | return -1; | 87 | return -1; |
| 88 | s->width = width; | 88 | s->width = width; |
| 89 | s->height = height; | 89 | s->height = height; |
| @@ -297,7 +297,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A · 296 unmodified lines | |||
| 297 | return -1; | 297 | return -1; |
| 298 | 298 | ||
| 299 | avctx->pix_fmt = PIX_FMT_PAL8; | 299 | 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)) |
| 301 | return -1; | 301 | return -1; |
| 302 | avcodec_set_dimensions(avctx, s->screen_width, s->screen_height); | 302 | avcodec_set_dimensions(avctx, s->screen_width, s->screen_height); |
| 303 | 303 | ||
| @@ -342,7 +342,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ · 341 unmodified lines | |||
| 342 | sps->mb_width = get_ue_golomb(&s->gb) + 1; | 342 | sps->mb_width = get_ue_golomb(&s->gb) + 1; |
| 343 | sps->mb_height= get_ue_golomb(&s->gb) + 1; | 343 | sps->mb_height= get_ue_golomb(&s->gb) + 1; |
| 344 | if((unsigned)sps->mb_width >= INT_MAX/16 || (unsigned)sps->mb_height >= INT_MAX/16 || | 344 | 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)){ |
| 346 | av_log(h->s.avctx, AV_LOG_ERROR, "mb_width/height overflow\n"); | 346 | av_log(h->s.avctx, AV_LOG_ERROR, "mb_width/height overflow\n"); |
| 347 | goto fail; | 347 | goto fail; |
| 348 | } | 348 | } |
| @@ -161,7 +161,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 160 unmodified lines | |||
| 161 | return AVERROR_INVALIDDATA; | 161 | return AVERROR_INVALIDDATA; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 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))) |
| 165 | return err; | 165 | return err; |
| 166 | s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary | 166 | s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary |
| 167 | s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); | 167 | s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); |
| @@ -501,13 +501,13 @@ int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){ · 500 unmodified lines | |||
| 501 | #if LIBAVCODEC_VERSION_MAJOR < 53 | 501 | #if LIBAVCODEC_VERSION_MAJOR < 53 |
| 502 | int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width) | 502 | int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width) |
| 503 | { | 503 | { |
| 504 | return av_fill_image_linesizes(picture->linesize, pix_fmt, width); | 504 | return av_image_fill_linesizes(picture->linesize, pix_fmt, width); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, | 507 | int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, |
| 508 | int height) | 508 | int height) |
| 509 | { | 509 | { |
| 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); |
| 511 | } | 511 | } |
| 512 | #endif | 512 | #endif |
| 513 | 513 | ||
| @@ -515,13 +515,13 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, · 1 unmodified line | |||
| 515 | enum PixelFormat pix_fmt, int width, int height) | 515 | enum PixelFormat pix_fmt, int width, int height) |
| 516 | { | 516 | { |
| 517 | 517 | ||
| 518 | if(av_check_image_size(width, height, 0, NULL)) | 518 | if(av_image_check_size(width, height, 0, NULL)) |
| 519 | return -1; | 519 | return -1; |
| 520 | 520 | ||
| 521 | if (av_fill_image_linesizes(picture->linesize, pix_fmt, width)) | 521 | if (av_image_fill_linesizes(picture->linesize, pix_fmt, width)) |
| 522 | return -1; | 522 | return -1; |
| 523 | 523 | ||
| 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); |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height, | 527 | 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 | |||
| 597 | int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height) | 597 | int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height) |
| 598 | { | 598 | { |
| 599 | AVPicture dummy_pict; | 599 | AVPicture dummy_pict; |
| 600 | if(av_check_image_size(width, height, 0, NULL)) | 600 | if(av_image_check_size(width, height, 0, NULL)) |
| 601 | return -1; | 601 | return -1; |
| 602 | switch (pix_fmt) { | 602 | switch (pix_fmt) { |
| 603 | case PIX_FMT_RGB8: | 603 | case PIX_FMT_RGB8: |
| @@ -797,7 +797,7 @@ void ff_img_copy_plane(uint8_t *dst, int dst_wrap, · 193 unmodified lines | |||
| 797 | #if LIBAVCODEC_VERSION_MAJOR < 53 | 797 | #if LIBAVCODEC_VERSION_MAJOR < 53 |
| 798 | int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane) | 798 | int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane) |
| 799 | { | 799 | { |
| 800 | return av_get_image_linesize(pix_fmt, width, plane); | 800 | return av_image_get_linesize(pix_fmt, width, plane); |
| 801 | } | 801 | } |
| 802 | #endif | 802 | #endif |
| 803 | 803 | ||
| @@ -814,7 +814,7 @@ void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], · 10 unmodified lines | |||
| 814 | case FF_PIXEL_PLANAR: | 814 | case FF_PIXEL_PLANAR: |
| 815 | for(i = 0; i < pf->nb_channels; i++) { | 815 | for(i = 0; i < pf->nb_channels; i++) { |
| 816 | int h; | 816 | int h; |
| 817 | int bwidth = av_get_image_linesize(pix_fmt, width, i); | 817 | int bwidth = av_image_get_linesize(pix_fmt, width, i); |
| 818 | h = height; | 818 | h = height; |
| 819 | if (i == 1 || i == 2) { | 819 | if (i == 1 || i == 2) { |
| 820 | h= -((-height)>>desc->log2_chroma_h); | 820 | h= -((-height)>>desc->log2_chroma_h); |
| @@ -996,7 +996,7 @@ static int iv_decode_frame(AVCodecContext *avctx, · 995 unmodified lines | |||
| 996 | image_height = bytestream_get_le16(&buf_pos); | 996 | image_height = bytestream_get_le16(&buf_pos); |
| 997 | image_width = bytestream_get_le16(&buf_pos); | 997 | image_width = bytestream_get_le16(&buf_pos); |
| 998 | 998 | ||
| 999 | if(av_check_image_size(image_width, image_height, 0, avctx)) | 999 | if(av_image_check_size(image_width, image_height, 0, avctx)) |
| 1000 | return -1; | 1000 | return -1; |
| 1001 | if (image_width != avctx->width || image_height != avctx->height) { | 1001 | if (image_width != avctx->width || image_height != avctx->height) { |
| 1002 | int ret; | 1002 | int ret; |
| @@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 50 unmodified lines | |||
| 51 | h = (buf[1] + 1) * 8; | 51 | h = (buf[1] + 1) * 8; |
| 52 | buf += 2; | 52 | buf += 2; |
| 53 | 53 | ||
| 54 | if (av_check_image_size(w, h, 0, avctx)) | 54 | if (av_image_check_size(w, h, 0, avctx)) |
| 55 | return -1; | 55 | return -1; |
| 56 | 56 | ||
| 57 | if (w != avctx->width || h != avctx->height) | 57 | if (w != avctx->width || h != avctx->height) |
| @@ -106,7 +106,7 @@ static int libdirac_decode_frame(AVCodecContext *avccontext, · 105 unmodified lines | |||
| 106 | /* tell FFmpeg about sequence details */ | 106 | /* tell FFmpeg about sequence details */ |
| 107 | dirac_sourceparams_t *src_params = &p_dirac_params->p_decoder->src_params; | 107 | dirac_sourceparams_t *src_params = &p_dirac_params->p_decoder->src_params; |
| 108 | 108 | ||
| 109 | if (av_check_image_size(src_params->width, src_params->height, | 109 | if (av_image_check_size(src_params->width, src_params->height, |
| 110 | 0, avccontext) < 0) { | 110 | 0, avccontext) < 0) { |
| 111 | av_log(avccontext, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", | 111 | av_log(avccontext, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", |
| 112 | src_params->width, src_params->height); | 112 | src_params->width, src_params->height); |
| @@ -114,7 +114,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, · 113 unmodified lines | |||
| 114 | } | 114 | } |
| 115 | width = image->comps[0].w << avctx->lowres; | 115 | width = image->comps[0].w << avctx->lowres; |
| 116 | height = image->comps[0].h << avctx->lowres; | 116 | 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) { |
| 118 | av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height); | 118 | av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height); |
| 119 | goto done; | 119 | goto done; |
| 120 | } | 120 | } |
| @@ -170,7 +170,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) · 169 unmodified lines | |||
| 170 | p_schro_params->format = schro_decoder_get_video_format(decoder); | 170 | p_schro_params->format = schro_decoder_get_video_format(decoder); |
| 171 | 171 | ||
| 172 | /* Tell FFmpeg about sequence details. */ | 172 | /* 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, |
| 174 | 0, avccontext) < 0) { | 174 | 0, avccontext) < 0) { |
| 175 | av_log(avccontext, AV_LOG_ERROR, "invalid dimensions (%dx%d)\n", | 175 | av_log(avccontext, AV_LOG_ERROR, "invalid dimensions (%dx%d)\n", |
| 176 | p_schro_params->format->width, p_schro_params->format->height); | 176 | p_schro_params->format->width, p_schro_params->format->height); |
| @@ -87,7 +87,7 @@ static int vp8_decode(AVCodecContext *avctx, · 86 unmodified lines | |||
| 87 | if ((int) img->d_w != avctx->width || (int) img->d_h != avctx->height) { | 87 | if ((int) img->d_w != avctx->width || (int) img->d_h != avctx->height) { |
| 88 | av_log(avctx, AV_LOG_INFO, "dimension change! %dx%d -> %dx%d\n", | 88 | av_log(avctx, AV_LOG_INFO, "dimension change! %dx%d -> %dx%d\n", |
| 89 | avctx->width, avctx->height, img->d_w, img->d_h); | 89 | 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)) |
| 91 | return AVERROR_INVALIDDATA; | 91 | return AVERROR_INVALIDDATA; |
| 92 | avcodec_set_dimensions(avctx, img->d_w, img->d_h); | 92 | avcodec_set_dimensions(avctx, img->d_w, img->d_h); |
| 93 | } | 93 | } |
| @@ -219,7 +219,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 218 unmodified lines | |||
| 219 | height= s->height; | 219 | height= s->height; |
| 220 | 220 | ||
| 221 | av_log(s->avctx, AV_LOG_DEBUG, "sof0: picture: %dx%d\n", width, height); | 221 | 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)) |
| 223 | return -1; | 223 | return -1; |
| 224 | 224 | ||
| 225 | nb_components = get_bits(&s->gb, 8); | 225 | nb_components = get_bits(&s->gb, 8); |
| @@ -511,7 +511,7 @@ av_cold int MPV_common_init(MpegEncContext *s) · 510 unmodified lines | |||
| 511 | return -1; | 511 | return -1; |
| 512 | } | 512 | } |
| 513 | 513 | ||
| 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)) |
| 515 | return -1; | 515 | return -1; |
| 516 | 516 | ||
| 517 | dsputil_init(&s->dsp, s->avctx); | 517 | dsputil_init(&s->dsp, s->avctx); |
| @@ -112,7 +112,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit · 111 unmodified lines | |||
| 112 | if (quality >= 0) | 112 | if (quality >= 0) |
| 113 | get_quant_quality(c, quality); | 113 | get_quant_quality(c, quality); |
| 114 | if (width != c->width || height != c->height) { | 114 | 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) |
| 116 | return 0; | 116 | return 0; |
| 117 | avctx->width = c->width = width; | 117 | avctx->width = c->width = width; |
| 118 | avctx->height = c->height = height; | 118 | avctx->height = c->height = height; |
| @@ -143,7 +143,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 142 unmodified lines | |||
| 143 | if (p->data[0]) | 143 | if (p->data[0]) |
| 144 | avctx->release_buffer(avctx, p); | 144 | avctx->release_buffer(avctx, p); |
| 145 | 145 | ||
| 146 | if (av_check_image_size(w, h, 0, avctx)) | 146 | if (av_image_check_size(w, h, 0, avctx)) |
| 147 | return -1; | 147 | return -1; |
| 148 | if (w != avctx->width || h != avctx->height) | 148 | if (w != avctx->width || h != avctx->height) |
| 149 | avcodec_set_dimensions(avctx, w, h); | 149 | avcodec_set_dimensions(avctx, w, h); |
| @@ -270,7 +270,7 @@ static void parse_presentation_segment(AVCodecContext *avctx, · 269 unmodified lines | |||
| 270 | 270 | ||
| 271 | dprintf(avctx, "Video Dimensions %dx%d\n", | 271 | dprintf(avctx, "Video Dimensions %dx%d\n", |
| 272 | w, h); | 272 | w, h); |
| 273 | if (av_check_image_size(w, h, 0, avctx) >= 0) | 273 | if (av_image_check_size(w, h, 0, avctx) >= 0) |
| 274 | avcodec_set_dimensions(avctx, w, h); | 274 | avcodec_set_dimensions(avctx, w, h); |
| 275 | 275 | ||
| 276 | /* Skip 1 bytes of unknown, frame rate? */ | 276 | /* Skip 1 bytes of unknown, frame rate? */ |
| @@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx, · 135 unmodified lines | |||
| 136 | avctx->pix_fmt = PIX_FMT_PAL8; | 136 | avctx->pix_fmt = PIX_FMT_PAL8; |
| 137 | 137 | ||
| 138 | if (s->width != avctx->width && s->height != avctx->height) { | 138 | 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) |
| 140 | return -1; | 140 | return -1; |
| 141 | avcodec_set_dimensions(avctx, s->width, s->height); | 141 | avcodec_set_dimensions(avctx, s->width, s->height); |
| 142 | if (s->frame.data[0]) | 142 | if (s->frame.data[0]) |
| @@ -442,7 +442,7 @@ static int decode_frame(AVCodecContext *avctx, · 441 unmodified lines | |||
| 442 | goto fail; | 442 | goto fail; |
| 443 | s->width = bytestream_get_be32(&s->bytestream); | 443 | s->width = bytestream_get_be32(&s->bytestream); |
| 444 | s->height = bytestream_get_be32(&s->bytestream); | 444 | 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)){ |
| 446 | s->width= s->height= 0; | 446 | s->width= s->height= 0; |
| 447 | goto fail; | 447 | goto fail; |
| 448 | } | 448 | } |
| @@ -102,7 +102,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 101 unmodified lines | |||
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | /* check that all tags are present */ | 104 | /* 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)) |
| 106 | return -1; | 106 | return -1; |
| 107 | 107 | ||
| 108 | avctx->width = w; | 108 | avctx->width = w; |
| @@ -135,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 26 unmodified lines | |||
| 135 | return -1; | 135 | return -1; |
| 136 | pnm_get(s, buf1, sizeof(buf1)); | 136 | pnm_get(s, buf1, sizeof(buf1)); |
| 137 | avctx->height = atoi(buf1); | 137 | 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)) |
| 139 | return -1; | 139 | return -1; |
| 140 | if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { | 140 | if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { |
| 141 | pnm_get(s, buf1, sizeof(buf1)); | 141 | pnm_get(s, buf1, sizeof(buf1)); |
| @@ -65,7 +65,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 64 unmodified lines | |||
| 65 | if (p->data[0]) | 65 | if (p->data[0]) |
| 66 | avctx->release_buffer(avctx, p); | 66 | avctx->release_buffer(avctx, p); |
| 67 | 67 | ||
| 68 | if (av_check_image_size(w, h, 0, avctx)) | 68 | if (av_image_check_size(w, h, 0, avctx)) |
| 69 | return -1; | 69 | return -1; |
| 70 | if (w != avctx->width || h != avctx->height) | 70 | if (w != avctx->width || h != avctx->height) |
| 71 | avcodec_set_dimensions(avctx, w, h); | 71 | avcodec_set_dimensions(avctx, w, h); |
| @@ -63,7 +63,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx) · 62 unmodified lines | |||
| 63 | { | 63 | { |
| 64 | QtrleEncContext *s = avctx->priv_data; | 64 | QtrleEncContext *s = avctx->priv_data; |
| 65 | 65 | ||
| 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) { |
| 67 | return -1; | 67 | return -1; |
| 68 | } | 68 | } |
| 69 | s->avctx=avctx; | 69 | s->avctx=avctx; |
| @@ -370,7 +370,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) · 369 unmodified lines | |||
| 370 | } | 370 | } |
| 371 | if(new_w != s->width || new_h != s->height){ | 371 | if(new_w != s->width || new_h != s->height){ |
| 372 | av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h); | 372 | 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) |
| 374 | return -1; | 374 | return -1; |
| 375 | MPV_common_end(s); | 375 | MPV_common_end(s); |
| 376 | avcodec_set_dimensions(s->avctx, new_w, new_h); | 376 | avcodec_set_dimensions(s->avctx, new_w, new_h); |
| @@ -144,7 +144,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 143 unmodified lines | |||
| 144 | si->pts = get_bits(gb, 13); | 144 | si->pts = get_bits(gb, 13); |
| 145 | if(!si->type || !get_bits1(gb)) | 145 | if(!si->type || !get_bits1(gb)) |
| 146 | rv40_parse_picture_size(gb, &w, &h); | 146 | 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) |
| 148 | return -1; | 148 | return -1; |
| 149 | si->width = w; | 149 | si->width = w; |
| 150 | si->height = h; | 150 | si->height = h; |
| @@ -202,7 +202,7 @@ static int decode_frame(AVCodecContext *avctx, · 201 unmodified lines | |||
| 202 | return -1; | 202 | return -1; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | if (av_check_image_size(s->width, s->height, 0, avctx)) | 205 | if (av_image_check_size(s->width, s->height, 0, avctx)) |
| 206 | return -1; | 206 | return -1; |
| 207 | avcodec_set_dimensions(avctx, s->width, s->height); | 207 | avcodec_set_dimensions(avctx, s->width, s->height); |
| 208 | 208 | ||
| @@ -98,7 +98,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, · 97 unmodified lines | |||
| 98 | if (p->data[0]) | 98 | if (p->data[0]) |
| 99 | avctx->release_buffer(avctx, p); | 99 | avctx->release_buffer(avctx, p); |
| 100 | 100 | ||
| 101 | if (av_check_image_size(w, h, 0, avctx)) | 101 | if (av_image_check_size(w, h, 0, avctx)) |
| 102 | return -1; | 102 | return -1; |
| 103 | if (w != avctx->width || h != avctx->height) | 103 | if (w != avctx->width || h != avctx->height) |
| 104 | avcodec_set_dimensions(avctx, w, h); | 104 | avcodec_set_dimensions(avctx, w, h); |
| @@ -146,7 +146,7 @@ static int decode_frame(AVCodecContext *avctx, · 145 unmodified lines | |||
| 146 | if(s->picture.data[0]) | 146 | if(s->picture.data[0]) |
| 147 | avctx->release_buffer(avctx, &s->picture); | 147 | avctx->release_buffer(avctx, &s->picture); |
| 148 | 148 | ||
| 149 | if(av_check_image_size(w, h, 0, avctx)) | 149 | if(av_image_check_size(w, h, 0, avctx)) |
| 150 | return -1; | 150 | return -1; |
| 151 | if(w != avctx->width || h != avctx->height) | 151 | if(w != avctx->width || h != avctx->height) |
| 152 | avcodec_set_dimensions(avctx, w, h); | 152 | avcodec_set_dimensions(avctx, w, h); |
| @@ -306,7 +306,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t * · 305 unmodified lines | |||
| 306 | return -1; | 306 | return -1; |
| 307 | } | 307 | } |
| 308 | if(s->width != s->avctx->width || s->height != s->avctx->height){ | 308 | 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)) |
| 310 | return -1; | 310 | return -1; |
| 311 | avcodec_set_dimensions(s->avctx, s->width, s->height); | 311 | avcodec_set_dimensions(s->avctx, s->width, s->height); |
| 312 | } | 312 | } |
| @@ -508,7 +508,7 @@ static int decode_frame(AVCodecContext *avctx, · 195 unmodified lines | |||
| 508 | s->bpp = 1; | 508 | s->bpp = 1; |
| 509 | avctx->pix_fmt = PIX_FMT_MONOBLACK; | 509 | avctx->pix_fmt = PIX_FMT_MONOBLACK; |
| 510 | if(s->width != s->avctx->width || s->height != s->avctx->height){ | 510 | 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)) |
| 512 | return -1; | 512 | return -1; |
| 513 | avcodec_set_dimensions(s->avctx, s->width, s->height); | 513 | avcodec_set_dimensions(s->avctx, s->width, s->height); |
| 514 | } | 514 | } |
| @@ -80,7 +80,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 79 unmodified lines | |||
| 80 | if (p->data[0]) | 80 | if (p->data[0]) |
| 81 | avctx->release_buffer(avctx, p); | 81 | avctx->release_buffer(avctx, p); |
| 82 | 82 | ||
| 83 | if (av_check_image_size(w, h, 0, avctx)) | 83 | if (av_image_check_size(w, h, 0, avctx)) |
| 84 | return -1; | 84 | return -1; |
| 85 | if (w != avctx->width || h != avctx->height) | 85 | if (w != avctx->width || h != avctx->height) |
| 86 | avcodec_set_dimensions(avctx, w, h); | 86 | avcodec_set_dimensions(avctx, w, h); |
| @@ -215,7 +215,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ · 214 unmodified lines | |||
| 215 | 215 | ||
| 216 | #if LIBAVCODEC_VERSION_MAJOR < 53 | 216 | #if LIBAVCODEC_VERSION_MAJOR < 53 |
| 217 | int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){ | 217 | 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); |
| 219 | } | 219 | } |
| 220 | #endif | 220 | #endif |
| 221 | 221 | ||
| @@ -235,7 +235,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 13 unmodified lines | |||
| 235 | return -1; | 235 | return -1; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | if(av_check_image_size(w, h, 0, s)) | 238 | if(av_image_check_size(w, h, 0, s)) |
| 239 | return -1; | 239 | return -1; |
| 240 | 240 | ||
| 241 | if(s->internal_buffer==NULL){ | 241 | if(s->internal_buffer==NULL){ |
| @@ -487,7 +487,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) · 245 unmodified lines | |||
| 487 | 487 | ||
| 488 | #define SANE_NB_CHANNELS 128U | 488 | #define SANE_NB_CHANNELS 128U |
| 489 | if (((avctx->coded_width || avctx->coded_height) | 489 | 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)) |
| 491 | || avctx->channels > SANE_NB_CHANNELS) { | 491 | || avctx->channels > SANE_NB_CHANNELS) { |
| 492 | ret = AVERROR(EINVAL); | 492 | ret = AVERROR(EINVAL); |
| 493 | goto free_and_end; | 493 | goto free_and_end; |
| @@ -554,7 +554,7 @@ int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf · 60 unmodified lines | |||
| 554 | av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n"); | 554 | av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n"); |
| 555 | return -1; | 555 | return -1; |
| 556 | } | 556 | } |
| 557 | if(av_check_image_size(avctx->width, avctx->height, 0, avctx)) | 557 | if(av_image_check_size(avctx->width, avctx->height, 0, avctx)) |
| 558 | return -1; | 558 | return -1; |
| 559 | if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){ | 559 | if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){ |
| 560 | int ret = avctx->codec->encode(avctx, buf, buf_size, pict); | 560 | 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 | |||
| 604 | int ret; | 604 | int ret; |
| 605 | 605 | ||
| 606 | *got_picture_ptr= 0; | 606 | *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)) |
| 608 | return -1; | 608 | return -1; |
| 609 | if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ | 609 | if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ |
| 610 | ret = avctx->codec->decode(avctx, picture, got_picture_ptr, | 610 | ret = avctx->codec->decode(avctx, picture, got_picture_ptr, |
| @@ -1981,7 +1981,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) · 1980 unmodified lines | |||
| 1981 | visible_width = s->width = get_bits(gb, 16) << 4; | 1981 | visible_width = s->width = get_bits(gb, 16) << 4; |
| 1982 | visible_height = s->height = get_bits(gb, 16) << 4; | 1982 | visible_height = s->height = get_bits(gb, 16) << 4; |
| 1983 | 1983 | ||
| 1984 | if(av_check_image_size(s->width, s->height, 0, avctx)){ | 1984 | if(av_image_check_size(s->width, s->height, 0, avctx)){ |
| 1985 | av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height); | 1985 | av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height); |
| 1986 | s->width= s->height= 0; | 1986 | s->width= s->height= 0; |
| 1987 | return -1; | 1987 | return -1; |
| @@ -223,7 +223,7 @@ static void vp8_decode_flush(AVCodecContext *avctx) · 222 unmodified lines | |||
| 223 | 223 | ||
| 224 | static int update_dimensions(VP8Context *s, int width, int height) | 224 | static int update_dimensions(VP8Context *s, int width, int height) |
| 225 | { | 225 | { |
| 226 | if (av_check_image_size(width, height, 0, s->avctx)) | 226 | if (av_image_check_size(width, height, 0, s->avctx)) |
| 227 | return AVERROR_INVALIDDATA; | 227 | return AVERROR_INVALIDDATA; |
| 228 | 228 | ||
| 229 | vp8_decode_flush(s->avctx); | 229 | vp8_decode_flush(s->avctx); |
| @@ -148,7 +148,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx) · 147 unmodified lines | |||
| 148 | s->vqa_version = vqa_header[0]; | 148 | s->vqa_version = vqa_header[0]; |
| 149 | s->width = AV_RL16(&vqa_header[6]); | 149 | s->width = AV_RL16(&vqa_header[6]); |
| 150 | s->height = AV_RL16(&vqa_header[8]); | 150 | 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)){ |
| 152 | s->width= s->height= 0; | 152 | s->width= s->height= 0; |
| 153 | return -1; | 153 | return -1; |
| 154 | } | 154 | } |
| @@ -77,7 +77,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 76 unmodified lines | |||
| 77 | // read header | 77 | // read header |
| 78 | w = bytestream_get_le16(&buf); | 78 | w = bytestream_get_le16(&buf); |
| 79 | h = bytestream_get_le16(&buf); | 79 | 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) |
| 81 | return -1; | 81 | return -1; |
| 82 | x = bytestream_get_le16(&buf); | 82 | x = bytestream_get_le16(&buf); |
| 83 | y = bytestream_get_le16(&buf); | 83 | y = bytestream_get_le16(&buf); |
| @@ -85,7 +85,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx) · 84 unmodified lines | |||
| 85 | s->avctx = avctx; | 85 | s->avctx = avctx; |
| 86 | 86 | ||
| 87 | if (avctx->width & 1 || avctx->height & 1 || | 87 | 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) { |
| 89 | av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n"); | 89 | av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n"); |
| 90 | return -1; | 90 | return -1; |
| 91 | } | 91 | } |
| @@ -23,7 +23,7 @@ · 22 unmodified lines | |||
| 23 | 23 | ||
| 24 | #define LIBAVDEVICE_VERSION_MAJOR 52 | 24 | #define LIBAVDEVICE_VERSION_MAJOR 52 |
| 25 | #define LIBAVDEVICE_VERSION_MINOR 2 | 25 | #define LIBAVDEVICE_VERSION_MINOR 2 |
| 26 | #define LIBAVDEVICE_VERSION_MICRO 1 | 26 | #define LIBAVDEVICE_VERSION_MICRO 2 |
| 27 | 27 | ||
| 28 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ | 28 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ |
| 29 | LIBAVDEVICE_VERSION_MINOR, \ | 29 | LIBAVDEVICE_VERSION_MINOR, \ |
| @@ -117,7 +117,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 116 unmodified lines | |||
| 117 | } | 117 | } |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 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) |
| 121 | return -1; | 121 | return -1; |
| 122 | 122 | ||
| 123 | desired_palette = -1; | 123 | desired_palette = -1; |
| @@ -629,7 +629,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 628 unmodified lines | |||
| 629 | 629 | ||
| 630 | return AVERROR(EIO); | 630 | return AVERROR(EIO); |
| 631 | } | 631 | } |
| 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) |
| 633 | return AVERROR(EINVAL); | 633 | return AVERROR(EINVAL); |
| 634 | s->frame_format = desired_format; | 634 | s->frame_format = desired_format; |
| 635 | 635 | ||
| @@ -381,7 +381,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 380 unmodified lines | |||
| 381 | 381 | ||
| 382 | for (i = 0; i < 4; i++) { | 382 | for (i = 0; i < 4; i++) { |
| 383 | int planew = | 383 | 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); |
| 385 | 385 | ||
| 386 | if (!src[i]) continue; | 386 | if (!src[i]) continue; |
| 387 | 387 | ||
| @@ -26,7 +26,7 @@ · 25 unmodified lines | |||
| 26 | 26 | ||
| 27 | #define LIBAVFILTER_VERSION_MAJOR 1 | 27 | #define LIBAVFILTER_VERSION_MAJOR 1 |
| 28 | #define LIBAVFILTER_VERSION_MINOR 38 | 28 | #define LIBAVFILTER_VERSION_MINOR 38 |
| 29 | #define LIBAVFILTER_VERSION_MICRO 1 | 29 | #define LIBAVFILTER_VERSION_MICRO 2 |
| 30 | 30 | ||
| 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| 32 | LIBAVFILTER_VERSION_MINOR, \ | 32 | LIBAVFILTER_VERSION_MINOR, \ |
| @@ -54,17 +54,17 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per · 53 unmodified lines | |||
| 54 | pic->refcount = 1; | 54 | pic->refcount = 1; |
| 55 | ref->format = link->format; | 55 | ref->format = link->format; |
| 56 | pic->free = avfilter_default_free_buffer; | 56 | 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); |
| 58 | 58 | ||
| 59 | for (i = 0; i < 4; i++) | 59 | for (i = 0; i < 4; i++) |
| 60 | pic->linesize[i] = FFALIGN(pic->linesize[i], 16); | 60 | pic->linesize[i] = FFALIGN(pic->linesize[i], 16); |
| 61 | 61 | ||
| 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); |
| 63 | buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be | 63 | buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be |
| 64 | // SIMD-friendly | 64 | // SIMD-friendly |
| 65 | if (!buf) | 65 | if (!buf) |
| 66 | goto fail; | 66 | 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); |
| 68 | 68 | ||
| 69 | memcpy(ref->data, pic->data, sizeof(ref->data)); | 69 | memcpy(ref->data, pic->data, sizeof(ref->data)); |
| 70 | memcpy(ref->linesize, pic->linesize, sizeof(ref->linesize)); | 70 | memcpy(ref->linesize, pic->linesize, sizeof(ref->linesize)); |
| @@ -84,7 +84,7 @@ static int config_input(AVFilterLink *link) · 83 unmodified lines | |||
| 84 | CropContext *crop = ctx->priv; | 84 | CropContext *crop = ctx->priv; |
| 85 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[link->format]; | 85 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[link->format]; |
| 86 | 86 | ||
| 87 | av_fill_image_max_pixsteps(crop->max_step, NULL, pix_desc); | 87 | av_image_fill_max_pixsteps(crop->max_step, NULL, pix_desc); |
| 88 | crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; | 88 | crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; |
| 89 | crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; | 89 | crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; |
| 90 | 90 | ||
| @@ -70,7 +70,7 @@ static int config_props(AVFilterLink *inlink) · 69 unmodified lines | |||
| 70 | FlipContext *flip = inlink->dst->priv; | 70 | FlipContext *flip = inlink->dst->priv; |
| 71 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; | 71 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; |
| 72 | 72 | ||
| 73 | av_fill_image_max_pixsteps(flip->max_step, NULL, pix_desc); | 73 | av_image_fill_max_pixsteps(flip->max_step, NULL, pix_desc); |
| 74 | flip->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; | 74 | flip->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; |
| 75 | flip->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; | 75 | flip->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; |
| 76 | 76 | ||
| @@ -407,7 +407,7 @@ static int color_config_props(AVFilterLink *inlink) · 406 unmodified lines | |||
| 407 | 407 | ||
| 408 | color->w &= ~((1 << color->hsub) - 1); | 408 | color->w &= ~((1 << color->hsub) - 1); |
| 409 | color->h &= ~((1 << color->vsub) - 1); | 409 | 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) |
| 411 | return AVERROR(EINVAL); | 411 | return AVERROR(EINVAL); |
| 412 | 412 | ||
| 413 | memcpy(rgba_color, color->color, sizeof(rgba_color)); | 413 | memcpy(rgba_color, color->color, sizeof(rgba_color)); |