| OLD | NEW |
| 1 /* | 1 /* |
| 2 * V.Flash PTX (.ptx) image decoder | 2 * V.Flash PTX (.ptx) image decoder |
| 3 * Copyright (c) 2007 Ivo van Poorten | 3 * Copyright (c) 2007 Ivo van Poorten |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 avctx->pix_fmt = PIX_FMT_RGB555; | 58 avctx->pix_fmt = PIX_FMT_RGB555; |
| 59 | 59 |
| 60 if (offset != 0x2c) | 60 if (offset != 0x2c) |
| 61 av_log(avctx, AV_LOG_WARNING, "offset != 0x2c, untested due to lack of s
ample files\n"); | 61 av_log(avctx, AV_LOG_WARNING, "offset != 0x2c, untested due to lack of s
ample files\n"); |
| 62 | 62 |
| 63 buf += offset; | 63 buf += offset; |
| 64 | 64 |
| 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); |
| 72 if (avctx->get_buffer(avctx, p) < 0) { | 72 if (avctx->get_buffer(avctx, p) < 0) { |
| 73 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 73 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 74 return -1; | 74 return -1; |
| 75 } | 75 } |
| 76 | 76 |
| 77 p->pict_type = FF_I_TYPE; | 77 p->pict_type = FF_I_TYPE; |
| 78 | 78 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 CODEC_ID_PTX, | 112 CODEC_ID_PTX, |
| 113 sizeof(PTXContext), | 113 sizeof(PTXContext), |
| 114 ptx_init, | 114 ptx_init, |
| 115 NULL, | 115 NULL, |
| 116 ptx_end, | 116 ptx_end, |
| 117 ptx_decode_frame, | 117 ptx_decode_frame, |
| 118 CODEC_CAP_DR1, | 118 CODEC_CAP_DR1, |
| 119 NULL, | 119 NULL, |
| 120 .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"), | 120 .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"), |
| 121 }; | 121 }; |
| OLD | NEW |