diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-10 14:05:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-10 14:06:20 +0200 |
commit | bff2afb3e978c9cdffdd03a2571e4f6ddab74731 (patch) | |
tree | 7a92225c964848221a8be28232d1f6137475eb66 /libavcodec | |
parent | e4fe4d01fc31bfdabf6f9b106c633139287a400d (diff) | |
parent | a84edbacaf5adbe6e3672851aa8b3034b95787e2 (diff) | |
download | ffmpeg-bff2afb3e978c9cdffdd03a2571e4f6ddab74731.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
x86: dsputil: Only compile motion_est code when encoders are enabled
mem: fix typo in check for __ICC
fate: mp3: drop redundant CMP setting
rtp: Depacketization of JPEG (RFC 2435)
Rename ff_put_string to avpriv_put_string
mjpeg: Rename some symbols to avpriv_* instead of ff_*
yadif: cosmetics
Conflicts:
Changelog
libavcodec/mjpegenc.c
libavcodec/x86/Makefile
libavfilter/vf_yadif.c
libavformat/version.h
libavutil/mem.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/Makefile | 1 | ||||
-rw-r--r-- | libavcodec/bitstream.c | 2 | ||||
-rw-r--r-- | libavcodec/mjpeg.c | 14 | ||||
-rw-r--r-- | libavcodec/mjpeg.h | 14 | ||||
-rw-r--r-- | libavcodec/mjpeg2jpeg_bsf.c | 12 | ||||
-rw-r--r-- | libavcodec/mjpegdec.c | 24 | ||||
-rw-r--r-- | libavcodec/mjpegenc.c | 40 | ||||
-rw-r--r-- | libavcodec/mpeg4videoenc.c | 2 | ||||
-rw-r--r-- | libavcodec/put_bits.h | 4 | ||||
-rw-r--r-- | libavcodec/x86/Makefile | 4 |
10 files changed, 59 insertions, 58 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index ae2efb6e5e..988c999ce3 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -628,6 +628,7 @@ OBJS-$(CONFIG_OGG_DEMUXER) += xiph.o flac.o flacdata.o \ OBJS-$(CONFIG_OGG_MUXER) += xiph.o flac.o flacdata.o \ vorbis_data.o OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o xiph.o +OBJS-$(CONFIG_RTPDEC) += mjpeg.o OBJS-$(CONFIG_SPDIF_DEMUXER) += aacadtsdec.o mpeg4audio.o OBJS-$(CONFIG_SPDIF_MUXER) += dca.o OBJS-$(CONFIG_WEBM_MUXER) += mpeg4audio.o mpegaudiodata.o \ diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 0d3f59792c..ce20f5685e 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -47,7 +47,7 @@ void avpriv_align_put_bits(PutBitContext *s) put_bits(s,s->bit_left & 7,0); } -void ff_put_string(PutBitContext *pb, const char *string, int terminate_string) +void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string) { while(*string){ put_bits(pb, 8, *string); diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index 6eba27da0b..a5b1a802c7 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -62,17 +62,17 @@ const unsigned char std_chrominance_quant_tbl[64] = { /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ /* IMPORTANT: these are only valid for 8-bit data precision! */ -const uint8_t ff_mjpeg_bits_dc_luminance[17] = +const uint8_t avpriv_mjpeg_bits_dc_luminance[17] = { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; -const uint8_t ff_mjpeg_val_dc[12] = +const uint8_t avpriv_mjpeg_val_dc[12] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -const uint8_t ff_mjpeg_bits_dc_chrominance[17] = +const uint8_t avpriv_mjpeg_bits_dc_chrominance[17] = { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; -const uint8_t ff_mjpeg_bits_ac_luminance[17] = +const uint8_t avpriv_mjpeg_bits_ac_luminance[17] = { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; -const uint8_t ff_mjpeg_val_ac_luminance[] = +const uint8_t avpriv_mjpeg_val_ac_luminance[] = { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, @@ -96,10 +96,10 @@ const uint8_t ff_mjpeg_val_ac_luminance[] = 0xf9, 0xfa }; -const uint8_t ff_mjpeg_bits_ac_chrominance[17] = +const uint8_t avpriv_mjpeg_bits_ac_chrominance[17] = { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; -const uint8_t ff_mjpeg_val_ac_chrominance[] = +const uint8_t avpriv_mjpeg_val_ac_chrominance[] = { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h index ba1173380c..d826278216 100644 --- a/libavcodec/mjpeg.h +++ b/libavcodec/mjpeg.h @@ -138,16 +138,16 @@ static inline void put_marker(PutBitContext *p, int code) case 7: ret= (left + top)>>1; break;\ } -extern const uint8_t ff_mjpeg_bits_dc_luminance[]; -extern const uint8_t ff_mjpeg_val_dc[]; +extern const uint8_t avpriv_mjpeg_bits_dc_luminance[]; +extern const uint8_t avpriv_mjpeg_val_dc[]; -extern const uint8_t ff_mjpeg_bits_dc_chrominance[]; +extern const uint8_t avpriv_mjpeg_bits_dc_chrominance[]; -extern const uint8_t ff_mjpeg_bits_ac_luminance[]; -extern const uint8_t ff_mjpeg_val_ac_luminance[]; +extern const uint8_t avpriv_mjpeg_bits_ac_luminance[]; +extern const uint8_t avpriv_mjpeg_val_ac_luminance[]; -extern const uint8_t ff_mjpeg_bits_ac_chrominance[]; -extern const uint8_t ff_mjpeg_val_ac_chrominance[]; +extern const uint8_t avpriv_mjpeg_bits_ac_chrominance[]; +extern 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, diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c index c0f2db973b..f3672881bc 100644 --- a/libavcodec/mjpeg2jpeg_bsf.c +++ b/libavcodec/mjpeg2jpeg_bsf.c @@ -59,15 +59,15 @@ static uint8_t *append(uint8_t *buf, const uint8_t *src, int size) static uint8_t *append_dht_segment(uint8_t *buf) { buf = append(buf, dht_segment_head, sizeof(dht_segment_head)); - buf = append(buf, ff_mjpeg_bits_dc_luminance + 1, 16); + buf = append(buf, avpriv_mjpeg_bits_dc_luminance + 1, 16); buf = append(buf, dht_segment_frag, sizeof(dht_segment_frag)); - buf = append(buf, ff_mjpeg_val_dc, 12); + buf = append(buf, avpriv_mjpeg_val_dc, 12); *(buf++) = 0x10; - buf = append(buf, ff_mjpeg_bits_ac_luminance + 1, 16); - buf = append(buf, ff_mjpeg_val_ac_luminance, 162); + buf = append(buf, avpriv_mjpeg_bits_ac_luminance + 1, 16); + buf = append(buf, avpriv_mjpeg_val_ac_luminance, 162); *(buf++) = 0x11; - buf = append(buf, ff_mjpeg_bits_ac_chrominance + 1, 16); - buf = append(buf, ff_mjpeg_val_ac_chrominance, 162); + buf = append(buf, avpriv_mjpeg_bits_ac_chrominance + 1, 16); + buf = append(buf, avpriv_mjpeg_val_ac_chrominance, 162); return buf; } diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 23a818e370..d829b1b53f 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -65,18 +65,18 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table, static void build_basic_mjpeg_vlc(MJpegDecodeContext *s) { - build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance, - ff_mjpeg_val_dc, 12, 0, 0); - build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance, - ff_mjpeg_val_dc, 12, 0, 0); - build_vlc(&s->vlcs[1][0], ff_mjpeg_bits_ac_luminance, - ff_mjpeg_val_ac_luminance, 251, 0, 1); - build_vlc(&s->vlcs[1][1], ff_mjpeg_bits_ac_chrominance, - ff_mjpeg_val_ac_chrominance, 251, 0, 1); - build_vlc(&s->vlcs[2][0], ff_mjpeg_bits_ac_luminance, - ff_mjpeg_val_ac_luminance, 251, 0, 0); - build_vlc(&s->vlcs[2][1], ff_mjpeg_bits_ac_chrominance, - ff_mjpeg_val_ac_chrominance, 251, 0, 0); + build_vlc(&s->vlcs[0][0], avpriv_mjpeg_bits_dc_luminance, + avpriv_mjpeg_val_dc, 12, 0, 0); + build_vlc(&s->vlcs[0][1], avpriv_mjpeg_bits_dc_chrominance, + avpriv_mjpeg_val_dc, 12, 0, 0); + build_vlc(&s->vlcs[1][0], avpriv_mjpeg_bits_ac_luminance, + avpriv_mjpeg_val_ac_luminance, 251, 0, 1); + build_vlc(&s->vlcs[1][1], avpriv_mjpeg_bits_ac_chrominance, + avpriv_mjpeg_val_ac_chrominance, 251, 0, 1); + build_vlc(&s->vlcs[2][0], avpriv_mjpeg_bits_ac_luminance, + avpriv_mjpeg_val_ac_luminance, 251, 0, 0); + build_vlc(&s->vlcs[2][1], avpriv_mjpeg_bits_ac_chrominance, + avpriv_mjpeg_val_ac_chrominance, 251, 0, 0); } av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 0ff2e63b4e..4c4170382f 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -60,20 +60,20 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s) /* build all the huffman tables */ ff_mjpeg_build_huffman_codes(m->huff_size_dc_luminance, m->huff_code_dc_luminance, - ff_mjpeg_bits_dc_luminance, - ff_mjpeg_val_dc); + avpriv_mjpeg_bits_dc_luminance, + avpriv_mjpeg_val_dc); ff_mjpeg_build_huffman_codes(m->huff_size_dc_chrominance, m->huff_code_dc_chrominance, - ff_mjpeg_bits_dc_chrominance, - ff_mjpeg_val_dc); + avpriv_mjpeg_bits_dc_chrominance, + avpriv_mjpeg_val_dc); ff_mjpeg_build_huffman_codes(m->huff_size_ac_luminance, m->huff_code_ac_luminance, - ff_mjpeg_bits_ac_luminance, - ff_mjpeg_val_ac_luminance); + avpriv_mjpeg_bits_ac_luminance, + avpriv_mjpeg_val_ac_luminance); ff_mjpeg_build_huffman_codes(m->huff_size_ac_chrominance, m->huff_code_ac_chrominance, - ff_mjpeg_bits_ac_chrominance, - ff_mjpeg_val_ac_chrominance); + avpriv_mjpeg_bits_ac_chrominance, + avpriv_mjpeg_val_ac_chrominance); s->mjpeg_ctx = m; return 0; @@ -146,15 +146,15 @@ static void jpeg_table_header(MpegEncContext *s) ptr = put_bits_ptr(p); put_bits(p, 16, 0); /* patched later */ size = 2; - size += put_huffman_table(s, 0, 0, ff_mjpeg_bits_dc_luminance, - ff_mjpeg_val_dc); - size += put_huffman_table(s, 0, 1, ff_mjpeg_bits_dc_chrominance, - ff_mjpeg_val_dc); - - size += put_huffman_table(s, 1, 0, ff_mjpeg_bits_ac_luminance, - ff_mjpeg_val_ac_luminance); - size += put_huffman_table(s, 1, 1, ff_mjpeg_bits_ac_chrominance, - ff_mjpeg_val_ac_chrominance); + size += put_huffman_table(s, 0, 0, avpriv_mjpeg_bits_dc_luminance, + avpriv_mjpeg_val_dc); + size += put_huffman_table(s, 0, 1, avpriv_mjpeg_bits_dc_chrominance, + avpriv_mjpeg_val_dc); + + size += put_huffman_table(s, 1, 0, avpriv_mjpeg_bits_ac_luminance, + avpriv_mjpeg_val_ac_luminance); + size += put_huffman_table(s, 1, 1, avpriv_mjpeg_bits_ac_chrominance, + avpriv_mjpeg_val_ac_chrominance); AV_WB16(ptr, size); } @@ -169,7 +169,7 @@ static void jpeg_put_comments(MpegEncContext *s) /* JFIF header */ put_marker(p, APP0); put_bits(p, 16, 16); - ff_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */ + avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */ put_bits(p, 16, 0x0102); /* v 1.02 */ put_bits(p, 8, 0); /* units type: 0 - aspect ratio */ put_bits(p, 16, s->avctx->sample_aspect_ratio.num); @@ -184,7 +184,7 @@ static void jpeg_put_comments(MpegEncContext *s) flush_put_bits(p); ptr = put_bits_ptr(p); put_bits(p, 16, 0); /* patched later */ - ff_put_string(p, LIBAVCODEC_IDENT, 1); + avpriv_put_string(p, LIBAVCODEC_IDENT, 1); size = strlen(LIBAVCODEC_IDENT)+3; AV_WB16(ptr, size); } @@ -196,7 +196,7 @@ static void jpeg_put_comments(MpegEncContext *s) flush_put_bits(p); ptr = put_bits_ptr(p); put_bits(p, 16, 0); /* patched later */ - ff_put_string(p, "CS=ITU601", 1); + avpriv_put_string(p, "CS=ITU601", 1); size = strlen("CS=ITU601")+3; AV_WB16(ptr, size); } diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 054fc1d82b..97a4cd10c7 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1035,7 +1035,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n if(!(s->flags & CODEC_FLAG_BITEXACT)){ put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0x1B2); /* user_data */ - ff_put_string(&s->pb, LIBAVCODEC_IDENT, 0); + avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0); } } diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 5ece495075..e83f72194e 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -99,7 +99,7 @@ static inline void flush_put_bits(PutBitContext *s) #ifdef BITSTREAM_WRITER_LE #define avpriv_align_put_bits align_put_bits_unsupported_here -#define ff_put_string ff_put_string_unsupported_here +#define avpriv_put_string ff_put_string_unsupported_here #define avpriv_copy_bits avpriv_copy_bits_unsupported_here #else /** @@ -112,7 +112,7 @@ void avpriv_align_put_bits(PutBitContext *s); * * @param terminate_string 0-terminates the written string if value is 1 */ -void ff_put_string(PutBitContext *pb, const char *string, int terminate_string); +void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string); /** * Copy the content of src to the bitstream. diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index 6f306d155a..39d27271ec 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -11,7 +11,6 @@ MMX-OBJS += x86/dsputil_mmx.o \ x86/fmtconvert_init.o \ x86/idct_mmx_xvid.o \ x86/idct_sse2_xvid.o \ - x86/motion_est.o \ x86/simple_idct.o \ MMX-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o @@ -19,7 +18,8 @@ MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp.o \ x86/dwt.o -MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o +MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o \ + x86/motion_est.o MMX-OBJS-$(CONFIG_FFT) += x86/fft_init.o MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o |