| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Targa (.tga) image decoder | 2  * Targa (.tga) image decoder | 
| 3  * Copyright (c) 2006 Konstantin Shishkov | 3  * Copyright (c) 2006 Konstantin Shishkov | 
| 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. | 
| 11  * | 11  * | 
| 12  * FFmpeg is distributed in the hope that it will be useful, | 12  * FFmpeg is distributed in the hope that it will be useful, | 
| 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
| 15  * Lesser General Public License for more details. | 15  * Lesser General Public License for more details. | 
| 16  * | 16  * | 
| 17  * You should have received a copy of the GNU Lesser General Public | 17  * You should have received a copy of the GNU Lesser General Public | 
| 18  * License along with FFmpeg; if not, write to the Free Software | 18  * License along with FFmpeg; if not, write to the Free Software | 
| 19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 
| 20  */ | 20  */ | 
| 21 | 21 | 
| 22 #include "libavutil/intreadwrite.h" | 22 #include "libavutil/intreadwrite.h" | 
| 23 #include "libavcore/imgutils.h" | 23 #include "libavcore/imgutils.h" | 
| 24 #include "avcodec.h" | 24 #include "avcodec.h" | 
| 25 | 25 #include "targa.h" | 
| 26 enum TargaCompr{ |  | 
| 27     TGA_NODATA = 0, // no image data |  | 
| 28     TGA_PAL    = 1, // palettized |  | 
| 29     TGA_RGB    = 2, // true-color |  | 
| 30     TGA_BW     = 3, // black & white or grayscale |  | 
| 31     TGA_RLE    = 8, // flag pointing that data is RLE-coded |  | 
| 32 }; |  | 
| 33 | 26 | 
| 34 typedef struct TargaContext { | 27 typedef struct TargaContext { | 
| 35     AVFrame picture; | 28     AVFrame picture; | 
| 36 | 29 | 
| 37     int width, height; | 30     int width, height; | 
| 38     int bpp; | 31     int bpp; | 
| 39     int color_type; | 32     int color_type; | 
| 40     int compression_type; | 33     int compression_type; | 
| 41 } TargaContext; | 34 } TargaContext; | 
| 42 | 35 | 
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 248     CODEC_ID_TARGA, | 241     CODEC_ID_TARGA, | 
| 249     sizeof(TargaContext), | 242     sizeof(TargaContext), | 
| 250     targa_init, | 243     targa_init, | 
| 251     NULL, | 244     NULL, | 
| 252     targa_end, | 245     targa_end, | 
| 253     decode_frame, | 246     decode_frame, | 
| 254     CODEC_CAP_DR1, | 247     CODEC_CAP_DR1, | 
| 255     NULL, | 248     NULL, | 
| 256     .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), | 249     .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), | 
| 257 }; | 250 }; | 
| OLD | NEW | 
|---|