| OLD | NEW |
| 1 /* | 1 /* |
| 2 * VC3/DNxHD decoder. | 2 * VC3/DNxHD decoder. |
| 3 * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier
at smartjog dot com> | 3 * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier
at smartjog dot com> |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 return -1; | 299 return -1; |
| 300 | 300 |
| 301 if ((avctx->width || avctx->height) && | 301 if ((avctx->width || avctx->height) && |
| 302 (ctx->width != avctx->width || ctx->height != avctx->height)) { | 302 (ctx->width != avctx->width || ctx->height != avctx->height)) { |
| 303 av_log(avctx, AV_LOG_WARNING, "frame size changed: %dx%d -> %dx%d\n", | 303 av_log(avctx, AV_LOG_WARNING, "frame size changed: %dx%d -> %dx%d\n", |
| 304 avctx->width, avctx->height, ctx->width, ctx->height); | 304 avctx->width, avctx->height, ctx->width, ctx->height); |
| 305 first_field = 1; | 305 first_field = 1; |
| 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 |
| 313 if (first_field) { | 313 if (first_field) { |
| 314 if (ctx->picture.data[0]) | 314 if (ctx->picture.data[0]) |
| 315 avctx->release_buffer(avctx, &ctx->picture); | 315 avctx->release_buffer(avctx, &ctx->picture); |
| 316 if (avctx->get_buffer(avctx, &ctx->picture) < 0) { | 316 if (avctx->get_buffer(avctx, &ctx->picture) < 0) { |
| 317 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 317 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 318 return -1; | 318 return -1; |
| 319 } | 319 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 350 AVMEDIA_TYPE_VIDEO, | 350 AVMEDIA_TYPE_VIDEO, |
| 351 CODEC_ID_DNXHD, | 351 CODEC_ID_DNXHD, |
| 352 sizeof(DNXHDContext), | 352 sizeof(DNXHDContext), |
| 353 dnxhd_decode_init, | 353 dnxhd_decode_init, |
| 354 NULL, | 354 NULL, |
| 355 dnxhd_decode_close, | 355 dnxhd_decode_close, |
| 356 dnxhd_decode_frame, | 356 dnxhd_decode_frame, |
| 357 CODEC_CAP_DR1, | 357 CODEC_CAP_DR1, |
| 358 .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), | 358 .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), |
| 359 }; | 359 }; |
| OLD | NEW |