Commit 4922a5b0 authored by Aurelien Jacobs's avatar Aurelien Jacobs

split mjpeg.c into an encoder and a decoder file

Originally committed as revision 9048 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 88bcb6c2
......@@ -99,13 +99,13 @@ OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o
OBJS-$(CONFIG_KMVC_DECODER) += kmvc.o
OBJS-$(CONFIG_LJPEG_ENCODER) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_LJPEG_ENCODER) += mjpegenc.o mjpeg.o mpegvideo.o
OBJS-$(CONFIG_LOCO_DECODER) += loco.o
OBJS-$(CONFIG_MACE3_DECODER) += mace.o
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
OBJS-$(CONFIG_MJPEG_DECODER) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpeg.o jpeglsdec.o mpegvideo.o jpegls.o
OBJS-$(CONFIG_MJPEGB_DECODER) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o mpegvideo.o
OBJS-$(CONFIG_MJPEGB_DECODER) += mjpegdec.o mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_MMVIDEO_DECODER) += mmvideo.o
OBJS-$(CONFIG_MP2_ENCODER) += mpegaudio.o
OBJS-$(CONFIG_MPC7_DECODER) += mpc.o
......@@ -153,14 +153,14 @@ OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
OBJS-$(CONFIG_SONIC_LS_DECODER) += sonic.o
OBJS-$(CONFIG_SP5X_DECODER) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_SP5X_DECODER) += mjpegdec.o mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_SVQ1_DECODER) += svq1.o
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1.o
OBJS-$(CONFIG_SVQ3_DECODER) += h264.o
OBJS-$(CONFIG_TARGA_DECODER) += targa.o
OBJS-$(CONFIG_TARGA_ENCODER) += targaenc.o rle.o
OBJS-$(CONFIG_THEORA_DECODER) += vp3.o xiph.o vp3dsp.o
OBJS-$(CONFIG_THP_DECODER) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o
......@@ -310,7 +310,7 @@ OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += bitstream_filter.o
OBJS-$(CONFIG_NOISE_BSF) += bitstream_filter.o
OBJS-$(CONFIG_MP3_HEADER_COMPRESS_BSF) += bitstream_filter.o
OBJS-$(CONFIG_MP3_HEADER_DECOMPRESS_BSF) += bitstream_filter.o
OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpegdec.o mjpeg.o jpeglsdec.o jpegls.o
OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF) += mpeg12.o
OBJS-$(HAVE_PTHREADS) += pthread.o
......
This diff is collapsed.
......@@ -192,4 +192,31 @@ typedef struct MJpegDecodeContext {
int cur_scan; /* current scan, used by JPEG-LS */
} MJpegDecodeContext;
#define PREDICT(ret, topleft, top, left, predictor)\
switch(predictor){\
case 1: ret= left; break;\
case 2: ret= top; break;\
case 3: ret= topleft; break;\
case 4: ret= left + top - topleft; break;\
case 5: ret= left + ((top - topleft)>>1); break;\
case 6: ret= top + ((left - topleft)>>1); break;\
default:\
case 7: ret= (left + top)>>1; break;\
}
extern const uint8_t bits_dc_luminance[];
extern const uint8_t val_dc_luminance[];
extern const uint8_t bits_dc_chrominance[];
extern const uint8_t val_dc_chrominance[];
extern const uint8_t bits_ac_luminance[];
extern const uint8_t val_ac_luminance[];
extern const uint8_t bits_ac_chrominance[];
extern const uint8_t val_ac_chrominance[];
void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
const uint8_t *bits_table, const uint8_t *val_table);
#endif /* MJPEG_H */
This diff is collapsed.
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