diff options
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | libavcodec/Makefile | 12 | ||||
-rw-r--r-- | libavcodec/g2meet.c | 1 | ||||
-rw-r--r-- | libavcodec/jpegtables.c (renamed from libavcodec/mjpeg.c) | 2 | ||||
-rw-r--r-- | libavcodec/jpegtables.h | 43 | ||||
-rw-r--r-- | libavcodec/ljpegenc.c | 1 | ||||
-rw-r--r-- | libavcodec/mjpeg.h | 19 | ||||
-rw-r--r-- | libavcodec/mjpeg2jpeg_bsf.c | 2 | ||||
-rw-r--r-- | libavcodec/mjpegdec.c | 1 | ||||
-rw-r--r-- | libavcodec/mjpegenc.c | 1 | ||||
-rw-r--r-- | libavcodec/mjpegenc_common.c | 1 | ||||
-rw-r--r-- | libavformat/rtpdec_jpeg.c | 1 |
12 files changed, 66 insertions, 32 deletions
@@ -1590,6 +1590,7 @@ CONFIG_EXTRA=" iirfilter imdct15 intrax8 + jpegtables lgplv3 lpc me_cmp @@ -1826,7 +1827,7 @@ flv_encoder_select="h263_encoder" fourxm_decoder_select="blockdsp bswapdsp" fraps_decoder_select="bswapdsp huffman" g2m_decoder_deps="zlib" -g2m_decoder_select="blockdsp idctdsp" +g2m_decoder_select="blockdsp idctdsp jpegtables" h261_decoder_select="mpeg_er mpegvideo" h261_encoder_select="aandcttables mpegvideoenc" h263_decoder_select="error_resilience h263_parser h263dsp mpeg_er mpegvideo qpeldsp" @@ -1850,13 +1851,13 @@ jpegls_decoder_select="golomb mjpeg_decoder" jpegls_encoder_select="golomb" jv_decoder_select="blockdsp" lagarith_decoder_select="huffyuvdsp" -ljpeg_encoder_select="aandcttables idctdsp" +ljpeg_encoder_select="aandcttables idctdsp jpegtables" loco_decoder_select="golomb" mdec_decoder_select="blockdsp idctdsp mpegvideo" metasound_decoder_select="lsp mdct sinewin" mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp" -mjpeg_decoder_select="blockdsp hpeldsp idctdsp" -mjpeg_encoder_select="aandcttables mpegvideoenc" +mjpeg_decoder_select="blockdsp hpeldsp idctdsp jpegtables" +mjpeg_encoder_select="aandcttables jpegtables mpegvideoenc" mjpegb_decoder_select="mjpeg_decoder" mlp_decoder_select="mlp_parser" motionpixels_decoder_select="bswapdsp" @@ -2017,6 +2018,9 @@ mpegvideo_parser_select="mpegvideo" mpeg4video_parser_select="error_resilience h263dsp mpeg_er mpegvideo qpeldsp" vc1_parser_select="mpegvideo startcode vc1_decoder" +# bitstream_filters +mjpeg2jpeg_bsf_select="jpegtables" + # external libraries libdcadec_decoder_deps="libdcadec" libfaac_encoder_deps="libfaac" @@ -2107,7 +2111,7 @@ ogg_demuxer_select="golomb" opus_muxer_select="ogg_muxer" psp_muxer_select="mov_muxer" rtp_demuxer_select="sdp_demuxer" -rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer" +rtpdec_select="asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol" rtsp_demuxer_select="http_protocol rtpdec" rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain" sap_demuxer_select="sdp_demuxer" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index f5b23bbc58..8dd10c3fc1 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -61,6 +61,7 @@ OBJS-$(CONFIG_IDCTDSP) += idctdsp.o simple_idct.o jrevdct.o OBJS-$(CONFIG_IIRFILTER) += iirfilter.o OBJS-$(CONFIG_IMDCT15) += imdct15.o OBJS-$(CONFIG_INTRAX8) += intrax8.o intrax8dsp.o +OBJS-$(CONFIG_JPEGTABLES) += jpegtables.o OBJS-$(CONFIG_LIBXVID) += libxvid_rc.o OBJS-$(CONFIG_LPC) += lpc.o OBJS-$(CONFIG_LSP) += lsp.o @@ -206,7 +207,7 @@ OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o OBJS-$(CONFIG_FRWU_DECODER) += frwu.o -OBJS-$(CONFIG_G2M_DECODER) += g2meet.o mjpeg.o +OBJS-$(CONFIG_G2M_DECODER) += g2meet.o OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \ celp_filters.o OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o @@ -252,7 +253,7 @@ OBJS-$(CONFIG_JV_DECODER) += jvdec.o OBJS-$(CONFIG_KGV1_DECODER) += kgv1dec.o OBJS-$(CONFIG_KMVC_DECODER) += kmvc.o OBJS-$(CONFIG_LAGARITH_DECODER) += lagarith.o lagarithrac.o -OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpeg.o mjpegenc_common.o +OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc_common.o OBJS-$(CONFIG_LOCO_DECODER) += loco.o OBJS-$(CONFIG_MACE3_DECODER) += mace.o OBJS-$(CONFIG_MACE6_DECODER) += mace.o @@ -260,8 +261,8 @@ OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o OBJS-$(CONFIG_METASOUND_DECODER) += metasound.o metasound_data.o \ twinvq.o OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o -OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o -OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o mjpegenc_common.o +OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o +OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpegenc_common.o OBJS-$(CONFIG_MJPEGB_DECODER) += mjpegbdec.o OBJS-$(CONFIG_MLP_DECODER) += mlpdec.o mlpdsp.o OBJS-$(CONFIG_MMVIDEO_DECODER) += mmvideo.o @@ -602,7 +603,6 @@ OBJS-$(CONFIG_OGG_DEMUXER) += mpeg12data.o \ dirac.o OBJS-$(CONFIG_OGG_MUXER) += flac.o flacdata.o OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o -OBJS-$(CONFIG_RTPDEC) += mjpeg.o OBJS-$(CONFIG_SPDIF_DEMUXER) += aacadtsdec.o mpeg4audio.o OBJS-$(CONFIG_SPDIF_MUXER) += dca.o OBJS-$(CONFIG_TAK_DEMUXER) += tak.o @@ -703,7 +703,7 @@ OBJS-$(CONFIG_CHOMP_BSF) += chomp_bsf.o OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o OBJS-$(CONFIG_H264_MP4TOANNEXB_BSF) += h264_mp4toannexb_bsf.o OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF) += imx_dump_header_bsf.o -OBJS-$(CONFIG_MJPEG2JPEG_BSF) += mjpeg2jpeg_bsf.o mjpeg.o +OBJS-$(CONFIG_MJPEG2JPEG_BSF) += mjpeg2jpeg_bsf.o OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpega_dump_header_bsf.o OBJS-$(CONFIG_MOV2TEXTSUB_BSF) += movsub_bsf.o OBJS-$(CONFIG_NOISE_BSF) += noise_bsf.o diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 33934f1bf7..ddd7a1f086 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -34,6 +34,7 @@ #include "idctdsp.h" #include "get_bits.h" #include "internal.h" +#include "jpegtables.h" #include "mjpeg.h" enum ChunkType { diff --git a/libavcodec/mjpeg.c b/libavcodec/jpegtables.c index a35385180f..ce2bae2454 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/jpegtables.c @@ -30,7 +30,7 @@ * MJPEG encoder and decoder. */ -#include "mjpeg.h" +#include "jpegtables.h" #if 0 diff --git a/libavcodec/jpegtables.h b/libavcodec/jpegtables.h new file mode 100644 index 0000000000..1a909bef7a --- /dev/null +++ b/libavcodec/jpegtables.h @@ -0,0 +1,43 @@ +/* + * JPEG-related tables + * + * This file is part of Libav. + * + * Libav 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. + * + * Libav 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 Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEGTABLES_H +#define AVCODEC_JPEGTABLES_H + +#include <stdint.h> + +#include "libavutil/internal.h" + +extern av_export const uint8_t avpriv_mjpeg_bits_dc_luminance[]; +extern av_export const uint8_t avpriv_mjpeg_val_dc[]; + +extern av_export const uint8_t avpriv_mjpeg_bits_dc_chrominance[]; + +extern av_export const uint8_t avpriv_mjpeg_bits_ac_luminance[]; +extern av_export const uint8_t avpriv_mjpeg_val_ac_luminance[]; + +extern av_export const uint8_t avpriv_mjpeg_bits_ac_chrominance[]; +extern av_export const uint8_t avpriv_mjpeg_val_ac_chrominance[]; + +void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, + const uint8_t *bits_table, + const uint8_t *val_table); + +#endif /* AVCODEC_JPEGTABLES_H */ diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index fbb024b9a6..fc2ade6ba7 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -37,6 +37,7 @@ #include "avcodec.h" #include "idctdsp.h" #include "internal.h" +#include "jpegtables.h" #include "mjpegenc_common.h" #include "mpegvideo.h" #include "mjpeg.h" diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h index 39c9c32948..1ebe283748 100644 --- a/libavcodec/mjpeg.h +++ b/libavcodec/mjpeg.h @@ -33,10 +33,6 @@ #ifndef AVCODEC_MJPEG_H #define AVCODEC_MJPEG_H -#include "libavutil/internal.h" - -#include "avcodec.h" - /* JPEG marker codes */ enum JpegMarker { /* start of frame */ @@ -131,19 +127,4 @@ enum JpegMarker { case 7: ret= (left + top)>>1; break;\ } -extern av_export const uint8_t avpriv_mjpeg_bits_dc_luminance[]; -extern av_export const uint8_t avpriv_mjpeg_val_dc[]; - -extern av_export const uint8_t avpriv_mjpeg_bits_dc_chrominance[]; - -extern av_export const uint8_t avpriv_mjpeg_bits_ac_luminance[]; -extern av_export const uint8_t avpriv_mjpeg_val_ac_luminance[]; - -extern av_export const uint8_t avpriv_mjpeg_bits_ac_chrominance[]; -extern av_export const uint8_t avpriv_mjpeg_val_ac_chrominance[]; - -void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, - const uint8_t *bits_table, - const uint8_t *val_table); - #endif /* AVCODEC_MJPEG_H */ diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c index 59734c9bf4..d27793420e 100644 --- a/libavcodec/mjpeg2jpeg_bsf.c +++ b/libavcodec/mjpeg2jpeg_bsf.c @@ -30,7 +30,7 @@ #include "libavutil/mem.h" #include "avcodec.h" -#include "mjpeg.h" +#include "jpegtables.h" static const uint8_t jpeg_header[] = { 0xff, 0xd8, // SOI diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 12b0a4192b..3d72bbd5da 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -38,6 +38,7 @@ #include "blockdsp.h" #include "idctdsp.h" #include "internal.h" +#include "jpegtables.h" #include "mjpeg.h" #include "mjpegdec.h" #include "jpeglsdec.h" diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index a460886a62..6724310d98 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -35,6 +35,7 @@ #include "libavutil/pixdesc.h" #include "avcodec.h" +#include "jpegtables.h" #include "mjpegenc_common.h" #include "mpegvideo.h" #include "mjpeg.h" diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c index f2a829fd33..b1f2c00963 100644 --- a/libavcodec/mjpegenc_common.c +++ b/libavcodec/mjpegenc_common.c @@ -27,6 +27,7 @@ #include "avcodec.h" #include "idctdsp.h" +#include "jpegtables.h" #include "put_bits.h" #include "mjpegenc.h" #include "mjpegenc_common.h" diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c index 44121d47b8..3bee0b2317 100644 --- a/libavformat/rtpdec_jpeg.c +++ b/libavformat/rtpdec_jpeg.c @@ -24,6 +24,7 @@ #include "rtpdec.h" #include "rtpdec_formats.h" #include "libavutil/intreadwrite.h" +#include "libavcodec/jpegtables.h" #include "libavcodec/mjpeg.h" #include "libavcodec/bytestream.h" |