| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Renderware TeXture Dictionary (.txd) image decoder | 2 * Renderware TeXture Dictionary (.txd) image decoder |
| 3 * Copyright (c) 2007 Ivo van Poorten | 3 * Copyright (c) 2007 Ivo van Poorten |
| 4 * | 4 * |
| 5 * See also: http://wiki.multimedia.cx/index.php?title=TXD | 5 * See also: http://wiki.multimedia.cx/index.php?title=TXD |
| 6 * | 6 * |
| 7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
| 8 * | 8 * |
| 9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } else if (depth == 16 || depth == 32) | 73 } else if (depth == 16 || depth == 32) |
| 74 avctx->pix_fmt = PIX_FMT_RGB32; | 74 avctx->pix_fmt = PIX_FMT_RGB32; |
| 75 else { | 75 else { |
| 76 av_log(avctx, AV_LOG_ERROR, "depth of %i is unsupported\n", depth); | 76 av_log(avctx, AV_LOG_ERROR, "depth of %i is unsupported\n", depth); |
| 77 return -1; | 77 return -1; |
| 78 } | 78 } |
| 79 | 79 |
| 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); |
| 87 if (avctx->get_buffer(avctx, p) < 0) { | 87 if (avctx->get_buffer(avctx, p) < 0) { |
| 88 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 88 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 89 return -1; | 89 return -1; |
| 90 } | 90 } |
| 91 | 91 |
| 92 p->pict_type = FF_I_TYPE; | 92 p->pict_type = FF_I_TYPE; |
| 93 | 93 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 CODEC_ID_TXD, | 161 CODEC_ID_TXD, |
| 162 sizeof(TXDContext), | 162 sizeof(TXDContext), |
| 163 txd_init, | 163 txd_init, |
| 164 NULL, | 164 NULL, |
| 165 txd_end, | 165 txd_end, |
| 166 txd_decode_frame, | 166 txd_decode_frame, |
| 167 CODEC_CAP_DR1, | 167 CODEC_CAP_DR1, |
| 168 NULL, | 168 NULL, |
| 169 .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image
"), | 169 .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image
"), |
| 170 }; | 170 }; |
| OLD | NEW |