Commit 716222db authored by Michael Niedermayer's avatar Michael Niedermayer

tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)

Originally committed as revision 8608 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1a2a5b3e
......@@ -63,7 +63,7 @@ version <next>
- Delphine Software .cin demuxer/audio and video decoder
- Tiertex .seq demuxer/video decoder
- MTV demuxer
- TIFF picture decoder
- TIFF picture encoder and decoder
- GIF picture decoder
- Intel Music decoder
- Musepack decoder
......
......@@ -922,7 +922,7 @@ following image formats are supported:
@item animated GIF @tab X @tab X @tab Only uncompressed GIFs are generated.
@item PNG @tab X @tab X @tab 2 bit and 4 bit/pixel not supported yet.
@item Targa @tab @tab X @tab Targa (.TGA) image format.
@item TIFF @tab @tab X @tab Only 24 bit/pixel images are supported.
@item TIFF @tab X @tab X @tab YUV, JPEG and some extension is not supported yet.
@item SGI @tab X @tab X @tab SGI RGB image format
@end multitable
......
......@@ -144,6 +144,7 @@ OBJS-$(CONFIG_TARGA_ENCODER) += targaenc.o rle.o
OBJS-$(CONFIG_THEORA_DECODER) += vp3.o xiph.o
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o
OBJS-$(CONFIG_TRUEMOTION1_DECODER) += truemotion1.o
OBJS-$(CONFIG_TRUEMOTION2_DECODER) += truemotion2.o
OBJS-$(CONFIG_TRUESPEECH_DECODER) += truespeech.o
......
......@@ -132,7 +132,7 @@ void avcodec_register_all(void)
REGISTER_DECODER(THEORA, theora);
REGISTER_DECODER(THP, thp);
REGISTER_DECODER(TIERTEXSEQVIDEO, tiertexseqvideo);
REGISTER_DECODER(TIFF, tiff);
REGISTER_ENCDEC (TIFF, tiff);
REGISTER_DECODER(TRUEMOTION1, truemotion1);
REGISTER_DECODER(TRUEMOTION2, truemotion2);
REGISTER_DECODER(TSCC, tscc);
......
......@@ -2222,6 +2222,7 @@ extern AVCodec sonic_encoder;
extern AVCodec sonic_ls_encoder;
extern AVCodec svq1_encoder;
extern AVCodec targa_encoder;
extern AVCodec tiff_encoder;
extern AVCodec vcr1_encoder;
extern AVCodec vorbis_encoder;
extern AVCodec wmav1_encoder;
......
......@@ -24,49 +24,8 @@
#include <zlib.h>
#endif
#include "lzw.h"
#include "tiff.h"
/* abridged list of TIFF tags */
enum TiffTags{
TIFF_WIDTH = 0x100,
TIFF_HEIGHT,
TIFF_BPP,
TIFF_COMPR,
TIFF_INVERT = 0x106,
TIFF_STRIP_OFFS = 0x111,
TIFF_ROWSPERSTRIP = 0x116,
TIFF_STRIP_SIZE,
TIFF_PLANAR = 0x11C,
TIFF_XPOS = 0x11E,
TIFF_YPOS = 0x11F,
TIFF_PREDICTOR = 0x13D,
TIFF_PAL = 0x140
};
enum TiffCompr{
TIFF_RAW = 1,
TIFF_CCITT_RLE,
TIFF_G3,
TIFF_G4,
TIFF_LZW,
TIFF_JPEG,
TIFF_NEWJPEG,
TIFF_ADOBE_DEFLATE,
TIFF_PACKBITS = 0x8005,
TIFF_DEFLATE = 0x80B2
};
enum TiffTypes{
TIFF_BYTE = 1,
TIFF_STRING,
TIFF_SHORT,
TIFF_LONG,
TIFF_LONGLONG
};
/** sizes of various TIFF field types */
static const int type_sizes[6] = {
0, 1, 100, 2, 4, 8
};
typedef struct TiffContext {
AVCodecContext *avctx;
......
/*
* TIFF tables
* Copyright (c) 2006 Konstantin Shishkov
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef TIFF_H
#define TIFF_H
/* abridged list of TIFF tags */
enum TiffTags{
TIFF_SUBFILE = 0xfe,
TIFF_WIDTH = 0x100,
TIFF_HEIGHT,
TIFF_BPP,
TIFF_COMPR,
TIFF_INVERT = 0x106,
TIFF_STRIP_OFFS = 0x111,
TIFF_SAMPLES_PER_PIXEL = 0x115,
TIFF_ROWSPERSTRIP = 0x116,
TIFF_STRIP_SIZE,
TIFF_XRES = 0x11A,
TIFF_YRES = 0x11B,
TIFF_PLANAR = 0x11C,
TIFF_XPOS = 0x11E,
TIFF_YPOS = 0x11F,
TIFF_RES_UNIT = 0x128,
TIFF_SOFTWARE_NAME = 0x131,
TIFF_PREDICTOR = 0x13D,
TIFF_PAL = 0x140,
TIFF_YCBCR_COEFFICIENTS = 0x211,
TIFF_YCBCR_SUBSAMPLING = 0x212,
TIFF_YCBCR_POSITIONING = 0x213,
TIFF_REFERENCE_BW = 0x214,
};
enum TiffCompr{
TIFF_RAW = 1,
TIFF_CCITT_RLE,
TIFF_G3,
TIFF_G4,
TIFF_LZW,
TIFF_JPEG,
TIFF_NEWJPEG,
TIFF_ADOBE_DEFLATE,
TIFF_PACKBITS = 0x8005,
TIFF_DEFLATE = 0x80B2
};
enum TiffTypes{
TIFF_BYTE = 1,
TIFF_STRING,
TIFF_SHORT,
TIFF_LONG,
TIFF_RATIONAL,
};
/** sizes of various TIFF field types (string size = 100)*/
static const uint8_t type_sizes[6] = {
0, 1, 100, 2, 4, 8
};
#endif /* TIFF_H */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment