| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google, Inc. | 2 * Copyright (c) 2010, Google, Inc. |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if ((img = vpx_codec_get_frame(&ctx->decoder, &iter))) { | 80 if ((img = vpx_codec_get_frame(&ctx->decoder, &iter))) { |
| 81 if (img->fmt != VPX_IMG_FMT_I420) { | 81 if (img->fmt != VPX_IMG_FMT_I420) { |
| 82 av_log(avctx, AV_LOG_ERROR, "Unsupported output colorspace (%d)\n", | 82 av_log(avctx, AV_LOG_ERROR, "Unsupported output colorspace (%d)\n", |
| 83 img->fmt); | 83 img->fmt); |
| 84 return AVERROR_INVALIDDATA; | 84 return AVERROR_INVALIDDATA; |
| 85 } | 85 } |
| 86 | 86 |
| 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 } |
| 94 picture->data[0] = img->planes[0]; | 94 picture->data[0] = img->planes[0]; |
| 95 picture->data[1] = img->planes[1]; | 95 picture->data[1] = img->planes[1]; |
| 96 picture->data[2] = img->planes[2]; | 96 picture->data[2] = img->planes[2]; |
| 97 picture->data[3] = NULL; | 97 picture->data[3] = NULL; |
| 98 picture->linesize[0] = img->stride[0]; | 98 picture->linesize[0] = img->stride[0]; |
| 99 picture->linesize[1] = img->stride[1]; | 99 picture->linesize[1] = img->stride[1]; |
| 100 picture->linesize[2] = img->stride[2]; | 100 picture->linesize[2] = img->stride[2]; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 116 AVMEDIA_TYPE_VIDEO, | 116 AVMEDIA_TYPE_VIDEO, |
| 117 CODEC_ID_VP8, | 117 CODEC_ID_VP8, |
| 118 sizeof(VP8Context), | 118 sizeof(VP8Context), |
| 119 vp8_init, | 119 vp8_init, |
| 120 NULL, /* encode */ | 120 NULL, /* encode */ |
| 121 vp8_free, | 121 vp8_free, |
| 122 vp8_decode, | 122 vp8_decode, |
| 123 0, /* capabilities */ | 123 0, /* capabilities */ |
| 124 .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), | 124 .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), |
| 125 }; | 125 }; |
| OLD | NEW |