diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 13:45:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 13:52:03 +0100 |
commit | cd37963684d8ee9819af15ccebe09d84839101dd (patch) | |
tree | 33c99132f79f095301b4e453c40f0b77005f5b1d | |
parent | 60e957476e338a200501e0bdad40b7bf0076b268 (diff) | |
parent | 381dc1a5ec0925b281c573457c413ae643567086 (diff) | |
download | ffmpeg-cd37963684d8ee9819af15ccebe09d84839101dd.tar.gz |
Merge commit '381dc1a5ec0925b281c573457c413ae643567086'
* commit '381dc1a5ec0925b281c573457c413ae643567086':
fate: ac3: Place E-AC-3 tests and AC-3 tests in different groups
fate: Add shorthands for acodec PCM and ADPCM tests
avconv: Drop unused function argument from do_video_stats()
cmdutils: Conditionally compile libswscale-related bits
aacenc: Drop some unused function arguments
rtsp: Avoid a cast when calling strtol
nut: support textual data
nutenc: verbosely report unsupported negative pts
Conflicts:
cmdutils.c
ffmpeg.c
libavformat/nut.c
libavformat/nutenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | cmdutils.c | 3 | ||||
-rw-r--r-- | doc/nut.texi | 6 | ||||
-rw-r--r-- | ffmpeg.c | 7 | ||||
-rw-r--r-- | libavcodec/aacenc.c | 9 | ||||
-rw-r--r-- | libavformat/nut.c | 7 | ||||
-rw-r--r-- | libavformat/nut.h | 1 | ||||
-rw-r--r-- | libavformat/nutdec.c | 1 | ||||
-rw-r--r-- | libavformat/nutenc.c | 4 | ||||
-rw-r--r-- | libavformat/rtsp.c | 4 | ||||
-rw-r--r-- | tests/fate/ac3.mak | 21 | ||||
-rw-r--r-- | tests/fate/acodec.mak | 8 |
11 files changed, 47 insertions, 24 deletions
diff --git a/cmdutils.c b/cmdutils.c index 98fc5f162f..f696700142 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -440,7 +440,8 @@ int opt_default(void *optctx, const char *opt, const char *arg) int consumed = 0; char opt_stripped[128]; const char *p; - const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc, *swr_class; + const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); + const AVClass *sc, *swr_class; if (!(p = strchr(opt, ':'))) p = opt + strlen(opt); diff --git a/doc/nut.texi b/doc/nut.texi index d697e2ed79..0026a121b5 100644 --- a/doc/nut.texi +++ b/doc/nut.texi @@ -70,6 +70,12 @@ PFD[32] would for example be signed 32 bit little-endian IEEE float @item DVBS @tab DVB subtitles @end multitable +@section Raw Data + +@multitable @columnfractions .4 .4 +@item UTF8 @tab Raw UTF-8 +@end multitable + @section Codecs @multitable @columnfractions .4 .4 @@ -109,7 +109,7 @@ const int program_birth_year = 2000; static FILE *vstats_file; -static void do_video_stats(AVFormatContext *os, OutputStream *ost, int frame_size); +static void do_video_stats(OutputStream *ost, int frame_size); static int64_t getutime(void); static int run_as_daemon = 0; @@ -921,7 +921,7 @@ static void do_video_out(AVFormatContext *s, } if (vstats_filename && frame_size) - do_video_stats(output_files[ost->file_index]->ctx, ost, frame_size); + do_video_stats(ost, frame_size); } static double psnr(double d) @@ -929,8 +929,7 @@ static double psnr(double d) return -10.0 * log(d) / log(10.0); } -static void do_video_stats(AVFormatContext *os, OutputStream *ost, - int frame_size) +static void do_video_stats(OutputStream *ost, int frame_size) { AVCodecContext *enc; int frame_number; diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 0a5aacf3dd..fe5b84dc7f 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -302,7 +302,7 @@ static void encode_ms_info(PutBitContext *pb, ChannelElement *cpe) /** * Produce integer coefficients from scalefactors provided by the model. */ -static void adjust_frame_information(AACEncContext *apc, ChannelElement *cpe, int chans) +static void adjust_frame_information(ChannelElement *cpe, int chans) { int i, w, w2, g, ch; int start, maxsfb, cmaxsfb; @@ -459,8 +459,7 @@ static int encode_individual_channel(AVCodecContext *avctx, AACEncContext *s, /** * Write some auxiliary information about the created AAC file. */ -static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s, - const char *name) +static void put_bitstream_info(AACEncContext *s, const char *name) { int i, namelen, padbits; @@ -582,7 +581,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, init_put_bits(&s->pb, avpkt->data, avpkt->size); if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT)) - put_bitstream_info(avctx, s, LIBAVCODEC_IDENT); + put_bitstream_info(s, LIBAVCODEC_IDENT); start_ch = 0; memset(chan_el_counter, 0, sizeof(chan_el_counter)); for (i = 0; i < s->chan_map[0]; i++) { @@ -624,7 +623,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, s->coder->search_for_ms(s, cpe, s->lambda); } } - adjust_frame_information(s, cpe, chans); + adjust_frame_information(cpe, chans); if (chans == 2) { put_bits(&s->pb, 1, cpe->common_window); if (cpe->common_window) { diff --git a/libavformat/nut.c b/libavformat/nut.c index 51e4d38394..eaf32e73c5 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -34,6 +34,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = { { AV_CODEC_ID_NONE , 0 } }; +const AVCodecTag ff_nut_data_tags[] = { + { AV_CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') }, + { AV_CODEC_ID_NONE , 0 } +}; + const AVCodecTag ff_nut_video_tags[] = { { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, @@ -140,7 +145,7 @@ const AVCodecTag ff_nut_audio_tags[] = { const AVCodecTag * const ff_nut_codec_tags[] = { ff_nut_video_tags, ff_nut_subtitle_tags, - ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_audio_tags, 0 + ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_audio_tags, ff_nut_data_tags, 0 }; void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ diff --git a/libavformat/nut.h b/libavformat/nut.h index 673f12f4b2..deb3c901e3 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -110,6 +110,7 @@ typedef struct NUTContext { extern const AVCodecTag ff_nut_subtitle_tags[]; extern const AVCodecTag ff_nut_video_tags[]; extern const AVCodecTag ff_nut_audio_tags[]; +extern const AVCodecTag ff_nut_data_tags[]; extern const AVCodecTag * const ff_nut_codec_tags[]; diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 1ba79ebcbf..9954583fc2 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -382,6 +382,7 @@ static int decode_stream_header(NUTContext *nut) break; case 3: st->codec->codec_type = AVMEDIA_TYPE_DATA; + st->codec->codec_id = ff_codec_get_id(ff_nut_data_tags, tmp); break; default: av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 08c049ab34..72e28b8d26 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -812,7 +812,9 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) int ret; if (pkt->pts < 0) { - av_log(s, AV_LOG_ERROR, "Invalid negative packet pts %"PRId64" in input\n", pkt->pts); + av_log(s, AV_LOG_ERROR, + "Negative pts not supported stream %d, pts %"PRId64"\n", + pkt->stream_index, pkt->pts); return AVERROR(EINVAL); } diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ec9634f9d2..201938c0a5 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -766,8 +766,10 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) th->lower_transport = RTSP_LOWER_TRANSPORT_UDP_MULTICAST; } else if (!strcmp(parameter, "ttl")) { if (*p == '=') { + char *end; p++; - th->ttl = strtol(p, (char **)&p, 10); + th->ttl = strtol(p, &end, 10); + p = end; } } else if (!strcmp(parameter, "destination")) { if (*p == '=') { diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak index b19b94558b..d15c7cd5be 100644 --- a/tests/fate/ac3.mak +++ b/tests/fate/ac3.mak @@ -26,23 +26,23 @@ FATE_AC3 += fate-ac3-5.1-downmix-stereo fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channels 2 -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 fate-ac3-5.1-downmix-stereo: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_stereo.pcm -FATE_AC3 += fate-eac3-1 +FATE_EAC3 += fate-eac3-1 fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3 fate-eac3-1: REF = $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.pcm -FATE_AC3 += fate-eac3-2 +FATE_EAC3 += fate-eac3-2 fate-eac3-2: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.eac3 fate-eac3-2: REF = $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.pcm -FATE_AC3 += fate-eac3-3 +FATE_EAC3 += fate-eac3-3 fate-eac3-3: CMD = pcm -i $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.eac3 fate-eac3-3: REF = $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.pcm -FATE_AC3 += fate-eac3-4 +FATE_EAC3 += fate-eac3-4 fate-eac3-4: CMD = pcm -i $(SAMPLES)/eac3/serenity_english_5.1_1536_small.eac3 fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm -$(FATE_AC3): CMP = oneoff +$(FATE_AC3) $(FATE_EAC3): CMP = oneoff FATE_AC3_ENCODE += fate-ac3-encode fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k @@ -51,7 +51,7 @@ fate-ac3-encode: CMP_TARGET = 399.62 fate-ac3-encode: SIZE_TOLERANCE = 488 fate-ac3-encode: FUZZ = 4 -FATE_AC3_ENCODE += fate-eac3-encode +FATE_EAC3_ENCODE += fate-eac3-encode fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k fate-eac3-encode: CMP_SHIFT = -1024 fate-eac3-encode: CMP_TARGET = 514.02 @@ -61,12 +61,15 @@ fate-eac3-encode: FUZZ = 3 fate-ac3-encode fate-eac3-encode: CMP = stddev fate-ac3-encode fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -FATE_AC3_ENCODE += fate-ac3-fixed-encode +FATE_AC3_FIXED_ENCODE += fate-ac3-fixed-encode fate-ac3-fixed-encode: tests/data/asynth-44100-2.wav fate-ac3-fixed-encode: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -ab 128k -f ac3 -flags +bitexact fate-ac3-fixed-encode: CMP = oneline fate-ac3-fixed-encode: REF = a1d1fc116463b771abf5aef7ed37d7b1 -FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) -fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) +FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE) +FATE_SAMPLES_AVCONV += $(FATE_EAC3) $(FATE_EAC3_ENCODE) + +fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE) +fate-ac3: $(FATE_EAC3) $(FATE_EAC3_ENCODE) diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak index af4f469e04..f1c9f37045 100644 --- a/tests/fate/acodec.mak +++ b/tests/fate/acodec.mak @@ -18,7 +18,9 @@ FATE_ACODEC_PCM-$(call ENCDEC, PCM_F32LE, WAV) += f32le FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64BE, AU) += f64be FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64LE, WAV) += f64le -FATE_ACODEC += $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%) +FATE_ACODEC_PCM := $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%) +FATE_ACODEC += $(FATE_ACODEC_PCM) +fate-acodec-pcm: $(FATE_ACODEC_PCM) fate-acodec-pcm-%: FMT = wav fate-acodec-pcm-%: CODEC = pcm_$(@:fate-acodec-pcm-%=%) @@ -34,7 +36,9 @@ FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_MS, WAV) += ms FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_SWF, FLV) += swf FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_YAMAHA, WAV) += yamaha -FATE_ACODEC += $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%) +FATE_ACODEC_ADPCM := $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%) +FATE_ACODEC += $(FATE_ACODEC_ADPCM) +fate-acodec-adpcm: $(FATE_ACODEC_ADPCM) fate-acodec-adpcm-%: CODEC = adpcm_$(@:fate-acodec-adpcm-%=%) |