| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg | 2 * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg |
| 3 * written, produced, and directed by Alan Smithee | 3 * written, produced, and directed by Alan Smithee |
| 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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 buf_pos = buf; | 989 buf_pos = buf; |
| 990 buf_pos += 18; /* skip OS header (16 bytes) and version number */ | 990 buf_pos += 18; /* skip OS header (16 bytes) and version number */ |
| 991 | 991 |
| 992 flags = bytestream_get_le16(&buf_pos); | 992 flags = bytestream_get_le16(&buf_pos); |
| 993 data_size = bytestream_get_le32(&buf_pos); | 993 data_size = bytestream_get_le32(&buf_pos); |
| 994 cb_offset = *buf_pos++; | 994 cb_offset = *buf_pos++; |
| 995 buf_pos += 3; /* skip reserved byte and checksum */ | 995 buf_pos += 3; /* skip reserved byte and checksum */ |
| 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; |
| 1003 avcodec_set_dimensions(avctx, image_width, image_height); | 1003 avcodec_set_dimensions(avctx, image_width, image_height); |
| 1004 s->width = avctx->width; | 1004 s->width = avctx->width; |
| 1005 s->height = avctx->height; | 1005 s->height = avctx->height; |
| 1006 ret = iv_alloc_frames(s); | 1006 ret = iv_alloc_frames(s); |
| 1007 if (ret < 0) { | 1007 if (ret < 0) { |
| 1008 s->width = s->height = 0; | 1008 s->width = s->height = 0; |
| 1009 return ret; | 1009 return ret; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 CODEC_ID_INDEO3, | 1143 CODEC_ID_INDEO3, |
| 1144 sizeof(Indeo3DecodeContext), | 1144 sizeof(Indeo3DecodeContext), |
| 1145 indeo3_decode_init, | 1145 indeo3_decode_init, |
| 1146 NULL, | 1146 NULL, |
| 1147 indeo3_decode_end, | 1147 indeo3_decode_end, |
| 1148 indeo3_decode_frame, | 1148 indeo3_decode_frame, |
| 1149 CODEC_CAP_DR1, | 1149 CODEC_CAP_DR1, |
| 1150 NULL, | 1150 NULL, |
| 1151 .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), | 1151 .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), |
| 1152 }; | 1152 }; |
| OLD | NEW |