From def5dc1260e99cf7f6e99747013307a152bed801 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 8 Nov 2011 15:01:47 +0100 Subject: [PATCH 01/16] doc: document preferred Doxygen syntax and make patcheck detect it --- doc/developer.texi | 5 +++++ tools/patcheck | 1 + 2 files changed, 6 insertions(+) diff --git a/doc/developer.texi b/doc/developer.texi index a63bea746c..c9cf7bde98 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -105,6 +105,11 @@ Use the JavaDoc/Doxygen format (see examples below) so that code documentation can be generated automatically. All nontrivial functions should have a comment above them explaining what the function does, even if it is just one sentence. All structures and their member variables should be documented, too. + +Avoid Qt-style and similar Doxygen syntax with @code{!} in it, i.e. replace +@code{//!} with @code{///} and similar. Also @@ syntax should be employed +for markup commands, i.e. use @code{@@param} and not @code{\param}. + @example /** * @@file diff --git a/tools/patcheck b/tools/patcheck index 19faf47b1d..285496d6e6 100755 --- a/tools/patcheck +++ b/tools/patcheck @@ -55,6 +55,7 @@ hiegrep 'INIT_VLC_USE_STATIC' 'forbidden ancient vlc type' $* hiegrep '=[-+\*\&] ' 'looks like compound assignment' $* hiegrep2 '/\*\* *[a-zA-Z0-9].*' '\*/' 'Inconsistently formatted doxygen comment' $* hiegrep '; */\*\*[^<]' 'Misformatted doxygen comment' $* +hiegrep '//!|/\*!' 'inconsistent doxygen syntax' $* hiegrep2 '(int|unsigned|static|void)[a-zA-Z0-9 _]*(init|end)[a-zA-Z0-9 _]*\(.*[^;]$' '(av_cold|:\+[^a-zA-Z_])' 'These functions may need av_cold, please review the whole patch for similar functions needing av_cold' $* From 6d23d19729b2108459d6182b1a0afd0283aea1c6 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Fri, 2 Dec 2011 17:00:11 -0800 Subject: [PATCH 02/16] mov: Allow empty stts atom. Fixes regressions caused by 30c3d976 --- libavformat/mov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9f45441a71..e2bb4d650d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1500,7 +1500,9 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); - if (!entries || entries >= UINT_MAX / sizeof(*sc->stts_data)) + if (!entries) + return 0; + if (entries >= UINT_MAX / sizeof(*sc->stts_data)) return AVERROR(EINVAL); sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data)); From d1241ff3b289b49607910258e3e99a050a6df65a Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 21 Nov 2011 17:41:49 -0500 Subject: [PATCH 03/16] avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3() --- avconv.c | 55 ++++++++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/avconv.c b/avconv.c index 8842b24599..371a1183de 100644 --- a/avconv.c +++ b/avconv.c @@ -137,8 +137,6 @@ static uint8_t *audio_buf; static uint8_t *audio_out; static unsigned int allocated_audio_out_size, allocated_audio_buf_size; -static void *samples; - #define DEFAULT_PASS_LOGFILENAME_PREFIX "av2pass" typedef struct InputStream { @@ -541,7 +539,6 @@ void exit_program(int ret) av_free(audio_buf); av_free(audio_out); allocated_audio_buf_size= allocated_audio_out_size= 0; - av_free(samples); #if CONFIG_AVFILTER avfilter_uninit(); @@ -737,14 +734,11 @@ static void generate_silence(uint8_t* buf, enum AVSampleFormat sample_fmt, size_ memset(buf, fill_char, size); } -static void do_audio_out(AVFormatContext *s, - OutputStream *ost, - InputStream *ist, - unsigned char *buf, int size) +static void do_audio_out(AVFormatContext *s, OutputStream *ost, + InputStream *ist, AVFrame *decoded_frame) { uint8_t *buftmp; int64_t audio_out_size, audio_buf_size; - int64_t allocated_for_size= size; int size_out, frame_bytes, ret, resample_changed; AVCodecContext *enc= ost->st->codec; @@ -752,6 +746,9 @@ static void do_audio_out(AVFormatContext *s, int osize = av_get_bytes_per_sample(enc->sample_fmt); int isize = av_get_bytes_per_sample(dec->sample_fmt); const int coded_bps = av_get_bits_per_sample(enc->codec->id); + uint8_t *buf = decoded_frame->data[0]; + int size = decoded_frame->nb_samples * dec->channels * isize; + int64_t allocated_for_size = size; need_realloc: audio_buf_size= (allocated_for_size + isize*dec->channels - 1) / (isize*dec->channels); @@ -1620,39 +1617,40 @@ static void rate_emu_sleep(InputStream *ist) static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) { - static unsigned int samples_size = 0; + AVFrame *decoded_frame; + AVCodecContext *avctx = ist->st->codec; int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt); - uint8_t *decoded_data_buf = NULL; - int decoded_data_size = 0; int i, ret; - if (pkt && samples_size < FFMAX(pkt->size * bps, AVCODEC_MAX_AUDIO_FRAME_SIZE)) { - av_free(samples); - samples_size = FFMAX(pkt->size * bps, AVCODEC_MAX_AUDIO_FRAME_SIZE); - samples = av_malloc(samples_size); - } - decoded_data_size = samples_size; + if (!(decoded_frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); - ret = avcodec_decode_audio3(ist->st->codec, samples, &decoded_data_size, - pkt); - if (ret < 0) + ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt); + if (ret < 0) { + av_freep(&decoded_frame); return ret; - *got_output = decoded_data_size > 0; + } - /* Some bug in mpeg audio decoder gives */ - /* decoded_data_size < 0, it seems they are overflows */ if (!*got_output) { /* no audio frame */ return ret; } - decoded_data_buf = (uint8_t *)samples; - ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) / - (ist->st->codec->sample_rate * ist->st->codec->channels); + /* if the decoder provides a pts, use it instead of the last packet pts. + the decoder could be delaying output by a packet or more. */ + if (decoded_frame->pts != AV_NOPTS_VALUE) + ist->next_pts = decoded_frame->pts; + + /* increment next_pts to use for the case where the input stream does not + have timestamps or there are multiple frames in the packet */ + ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / + avctx->sample_rate; // preprocess audio (volume) if (audio_volume != 256) { - switch (ist->st->codec->sample_fmt) { + int decoded_data_size = decoded_frame->nb_samples * avctx->channels * bps; + void *samples = decoded_frame->data[0]; + switch (avctx->sample_fmt) { case AV_SAMPLE_FMT_U8: { uint8_t *volp = samples; @@ -1713,8 +1711,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) if (!check_output_constraints(ist, ost) || !ost->encoding_needed) continue; - do_audio_out(output_files[ost->file_index].ctx, ost, ist, - decoded_data_buf, decoded_data_size); + do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); } return ret; } From f08e54e83d2fa77ceea2347ae7f920173f0afc04 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 2 Nov 2011 14:35:36 -0400 Subject: [PATCH 04/16] avformat: use avcodec_decode_audio4() in avformat_find_stream_info() --- libavformat/utils.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 10e79eb4da..ea075e7286 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2124,10 +2124,10 @@ static int has_decode_delay_been_guessed(AVStream *st) static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options) { - int16_t *samples; AVCodec *codec; - int got_picture, data_size, ret=0; + int got_picture, ret = 0; AVFrame picture; + AVPacket pkt = *avpkt; if(!st->codec->codec){ codec = avcodec_find_decoder(st->codec->codec_id); @@ -2138,28 +2138,29 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **option return ret; } - if(!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st) || - (!st->codec_info_nb_frames && st->codec->codec->capabilities & CODEC_CAP_CHANNEL_CONF)) { + while (pkt.size > 0 && ret >= 0 && + (!has_codec_parameters(st->codec) || + !has_decode_delay_been_guessed(st) || + (!st->codec_info_nb_frames && st->codec->codec->capabilities & CODEC_CAP_CHANNEL_CONF))) { + got_picture = 0; + avcodec_get_frame_defaults(&picture); switch(st->codec->codec_type) { case AVMEDIA_TYPE_VIDEO: - avcodec_get_frame_defaults(&picture); ret = avcodec_decode_video2(st->codec, &picture, - &got_picture, avpkt); - if (got_picture) - st->info->nb_decoded_frames++; + &got_picture, &pkt); break; case AVMEDIA_TYPE_AUDIO: - data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); - samples = av_malloc(data_size); - if (!samples) - goto fail; - ret = avcodec_decode_audio3(st->codec, samples, - &data_size, avpkt); - av_free(samples); + ret = avcodec_decode_audio4(st->codec, &picture, &got_picture, &pkt); break; default: break; } + if (ret >= 0) { + if (got_picture) + st->info->nb_decoded_frames++; + pkt.data += ret; + pkt.size -= ret; + } } fail: return ret; From e2a2c49fcd1ae2a6556281d7acaf3b47aeac0fd3 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 11 Oct 2011 15:49:39 -0400 Subject: [PATCH 05/16] avplay: use a separate buffer for playing silence --- avplay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/avplay.c b/avplay.c index 556c463aec..e2ce2cc17b 100644 --- a/avplay.c +++ b/avplay.c @@ -157,6 +157,7 @@ typedef struct VideoState { compensation */ DECLARE_ALIGNED(16,uint8_t,audio_buf1)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]; DECLARE_ALIGNED(16,uint8_t,audio_buf2)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]; + uint8_t silence_buf[SDL_AUDIO_BUFFER_SIZE]; uint8_t *audio_buf; unsigned int audio_buf_size; /* in bytes */ int audio_buf_index; /* in bytes */ @@ -2129,9 +2130,8 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) audio_size = audio_decode_frame(is, &pts); if (audio_size < 0) { /* if error, just output silence */ - is->audio_buf = is->audio_buf1; - is->audio_buf_size = 1024; - memset(is->audio_buf, 0, is->audio_buf_size); + is->audio_buf = is->silence_buf; + is->audio_buf_size = sizeof(is->silence_buf); } else { if (is->show_audio) update_sample_display(is, (int16_t *)is->audio_buf, audio_size); From f199f38573c4c02753f03ba8db04481038fa6f2e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 12 Oct 2011 13:27:41 -0400 Subject: [PATCH 06/16] avplay: use avcodec_decode_audio4() --- avplay.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/avplay.c b/avplay.c index e2ce2cc17b..69cd6179f9 100644 --- a/avplay.c +++ b/avplay.c @@ -153,18 +153,16 @@ typedef struct VideoState { AVStream *audio_st; PacketQueue audioq; int audio_hw_buf_size; - /* samples output by the codec. we reserve more space for avsync - compensation */ - DECLARE_ALIGNED(16,uint8_t,audio_buf1)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]; - DECLARE_ALIGNED(16,uint8_t,audio_buf2)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]; uint8_t silence_buf[SDL_AUDIO_BUFFER_SIZE]; uint8_t *audio_buf; + uint8_t *audio_buf1; unsigned int audio_buf_size; /* in bytes */ int audio_buf_index; /* in bytes */ AVPacket audio_pkt_temp; AVPacket audio_pkt; enum AVSampleFormat audio_src_fmt; AVAudioConvert *reformat_ctx; + AVFrame *frame; int show_audio; /* if true, display audio samples */ int16_t sample_array[SAMPLE_ARRAY_SIZE]; @@ -2010,7 +2008,7 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) AVPacket *pkt_temp = &is->audio_pkt_temp; AVPacket *pkt = &is->audio_pkt; AVCodecContext *dec= is->audio_st->codec; - int n, len1, data_size; + int n, len1, data_size, got_frame; double pts; int new_packet = 0; int flush_complete = 0; @@ -2018,13 +2016,16 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) for(;;) { /* NOTE: the audio packet can contain several frames */ while (pkt_temp->size > 0 || (!pkt_temp->data && new_packet)) { + if (!is->frame) { + if (!(is->frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); + } else + avcodec_get_frame_defaults(is->frame); + if (flush_complete) break; new_packet = 0; - data_size = sizeof(is->audio_buf1); - len1 = avcodec_decode_audio3(dec, - (int16_t *)is->audio_buf1, &data_size, - pkt_temp); + len1 = avcodec_decode_audio4(dec, is->frame, &got_frame, pkt_temp); if (len1 < 0) { /* if error, we skip the frame */ pkt_temp->size = 0; @@ -2034,12 +2035,15 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) pkt_temp->data += len1; pkt_temp->size -= len1; - if (data_size <= 0) { + if (!got_frame) { /* stop sending empty packets if the decoder is finished */ if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY) flush_complete = 1; continue; } + data_size = av_samples_get_buffer_size(NULL, dec->channels, + is->frame->nb_samples, + dec->sample_fmt, 1); if (dec->sample_fmt != is->audio_src_fmt) { if (is->reformat_ctx) @@ -2056,21 +2060,26 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) } if (is->reformat_ctx) { - const void *ibuf[6]= {is->audio_buf1}; - void *obuf[6]= {is->audio_buf2}; + const void *ibuf[6]= { is->frame->data[0] }; + void *obuf[6]; int istride[6]= {av_get_bytes_per_sample(dec->sample_fmt)}; int ostride[6]= {2}; int len= data_size/istride[0]; + obuf[0] = av_realloc(is->audio_buf1, FFALIGN(len * ostride[0], 32)); + if (!obuf[0]) { + return AVERROR(ENOMEM); + } + is->audio_buf1 = obuf[0]; if (av_audio_convert(is->reformat_ctx, obuf, ostride, ibuf, istride, len)<0) { printf("av_audio_convert() failed\n"); break; } - is->audio_buf= is->audio_buf2; + is->audio_buf = is->audio_buf1; /* FIXME: existing code assume that data_size equals framesize*channels*2 remove this legacy cruft */ data_size= len*2; }else{ - is->audio_buf= is->audio_buf1; + is->audio_buf = is->frame->data[0]; } /* if no pts, then compute it */ @@ -2106,8 +2115,7 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) if (pkt->data == flush_pkt.data) avcodec_flush_buffers(dec); - pkt_temp->data = pkt->data; - pkt_temp->size = pkt->size; + *pkt_temp = *pkt; /* if update the audio clock with the pts */ if (pkt->pts != AV_NOPTS_VALUE) { @@ -2275,6 +2283,9 @@ static void stream_component_close(VideoState *is, int stream_index) if (is->reformat_ctx) av_audio_convert_free(is->reformat_ctx); is->reformat_ctx = NULL; + av_freep(&is->audio_buf1); + is->audio_buf = NULL; + av_freep(&is->frame); if (is->rdft) { av_rdft_end(is->rdft); From 0bafe04917e0629335eac559ded9f27db096d833 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 11 Nov 2011 15:44:41 -0500 Subject: [PATCH 07/16] api-example: update to use avcodec_decode_audio4() --- libavcodec/api-example.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c index ec71b0d031..970a90eaba 100644 --- a/libavcodec/api-example.c +++ b/libavcodec/api-example.c @@ -38,6 +38,7 @@ #include "libavcodec/avcodec.h" #include "libavutil/mathematics.h" +#include "libavutil/samplefmt.h" #define INBUF_SIZE 4096 #define AUDIO_INBUF_SIZE 20480 @@ -118,11 +119,11 @@ static void audio_decode_example(const char *outfilename, const char *filename) { AVCodec *codec; AVCodecContext *c= NULL; - int out_size, len; + int len; FILE *f, *outfile; - uint8_t *outbuf; uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; AVPacket avpkt; + AVFrame *decoded_frame = NULL; av_init_packet(&avpkt); @@ -143,8 +144,6 @@ static void audio_decode_example(const char *outfilename, const char *filename) exit(1); } - outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); - f = fopen(filename, "rb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); @@ -161,15 +160,27 @@ static void audio_decode_example(const char *outfilename, const char *filename) avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f); while (avpkt.size > 0) { - out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; - len = avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt); + int got_frame = 0; + + if (!decoded_frame) { + if (!(decoded_frame = avcodec_alloc_frame())) { + fprintf(stderr, "out of memory\n"); + exit(1); + } + } else + avcodec_get_frame_defaults(decoded_frame); + + len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt); if (len < 0) { fprintf(stderr, "Error while decoding\n"); exit(1); } - if (out_size > 0) { + if (got_frame) { /* if a frame has been decoded, output it */ - fwrite(outbuf, 1, out_size, outfile); + int data_size = av_samples_get_buffer_size(NULL, c->channels, + decoded_frame->nb_samples, + c->sample_fmt, 1); + fwrite(decoded_frame->data[0], 1, data_size, outfile); } avpkt.size -= len; avpkt.data += len; @@ -189,10 +200,10 @@ static void audio_decode_example(const char *outfilename, const char *filename) fclose(outfile); fclose(f); - free(outbuf); avcodec_close(c); av_free(c); + av_free(decoded_frame); } /* From 6fcbb0f553b8e45993e2746d3763adc2faec0781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 3 Dec 2011 19:54:20 +0200 Subject: [PATCH 08/16] g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids using bits_per_coded_sample for this information. bits_per_coded_sample should be 4 for this codec normally, since two samples are encoded into one 8 bit codeword. In principle, this might be info that needs to be passed from a demuxer, and in that case, a private AVOption isn't the best choice, but no such samples are available at the moment, so that use case is purely theoretical at the moment. Signed-off-by: Martin Storsjö --- libavcodec/g722.h | 2 ++ libavcodec/g722dec.c | 32 +++++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/libavcodec/g722.h b/libavcodec/g722.h index 69e7a86e25..eb3b9b872e 100644 --- a/libavcodec/g722.h +++ b/libavcodec/g722.h @@ -31,7 +31,9 @@ #define PREV_SAMPLES_BUF_SIZE 1024 typedef struct { + const AVClass *class; AVFrame frame; + int bits_per_codeword; int16_t prev_samples[PREV_SAMPLES_BUF_SIZE]; ///< memory of past decoded samples int prev_samples_pos; ///< the number of values in prev_samples diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 652a1aa4ae..50a224ba10 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -37,6 +37,21 @@ #include "avcodec.h" #include "get_bits.h" #include "g722.h" +#include "libavutil/opt.h" + +#define OFFSET(x) offsetof(G722Context, x) +#define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM +static const AVOption options[] = { + { "bits_per_codeword", "Bits per G722 codeword", OFFSET(bits_per_codeword), AV_OPT_TYPE_FLAGS, { 8 }, 6, 8, AD }, + { NULL } +}; + +static const AVClass g722_decoder_class = { + .class_name = "g722 decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; static av_cold int g722_decode_init(AVCodecContext * avctx) { @@ -48,20 +63,6 @@ static av_cold int g722_decode_init(AVCodecContext * avctx) } avctx->sample_fmt = AV_SAMPLE_FMT_S16; - switch (avctx->bits_per_coded_sample) { - case 8: - case 7: - case 6: - break; - default: - av_log(avctx, AV_LOG_WARNING, "Unsupported bits_per_coded_sample [%d], " - "assuming 8\n", - avctx->bits_per_coded_sample); - case 0: - avctx->bits_per_coded_sample = 8; - break; - } - c->band[0].scale_factor = 8; c->band[1].scale_factor = 2; c->prev_samples_pos = 22; @@ -89,7 +90,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, G722Context *c = avctx->priv_data; int16_t *out_buf; int j, ret; - const int skip = 8 - avctx->bits_per_coded_sample; + const int skip = 8 - c->bits_per_codeword; const int16_t *quantizer_table = low_inv_quants[skip]; GetBitContext gb; @@ -149,4 +150,5 @@ AVCodec ff_adpcm_g722_decoder = { .decode = g722_decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), + .priv_class = &g722_decoder_class, }; From f32fd31858116fbecaffe9559e0a4ad2725f6018 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 2 Dec 2011 01:08:35 +0200 Subject: [PATCH 09/16] g722: Change bits per sample to 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earlier, bits per sample was defined as 8, since bits_per_coded_sample was used to indicate whether to ignore the lower bits of the codeword, having values 6, 7 or 8. g722 encodes 2 samples into one byte codeword, therefore the bits per sample is 4. By changing this, the generated timestamps for streams encoded with g722 become correct. This makes timestamp generation for g722 data correct (both when encoding and when demuxing from raw g722 files). Signed-off-by: Martin Storsjö --- libavcodec/g722enc.c | 4 ++-- libavcodec/utils.c | 2 +- libavcodec/version.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index bdc30d5d07..f8db49aba8 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -139,7 +139,7 @@ static int g722_encode_trellis(AVCodecContext *avctx, nodes[i][0]->state = c->band[i]; } - for (i = 0; i < buf_size >> 1; i++) { + for (i = 0; i < buf_size; i++) { int xlow, xhigh; struct TrellisNode *next[2]; int heap_pos[2] = {0, 0}; @@ -285,7 +285,7 @@ static int g722_encode_frame(AVCodecContext *avctx, if (avctx->trellis) return g722_encode_trellis(avctx, dst, buf_size, data); - for (i = 0; i < buf_size >> 1; i++) { + for (i = 0; i < buf_size; i++) { int xlow, xhigh, ihigh, ilow; filter_samples(c, &samples[2*i], &xlow, &xhigh); ihigh = encode_high(&c->band[1], xhigh); diff --git a/libavcodec/utils.c b/libavcodec/utils.c index c84439972c..04909cf959 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1342,8 +1342,8 @@ int av_get_bits_per_sample(enum CodecID codec_id){ case CODEC_ID_ADPCM_SWF: case CODEC_ID_ADPCM_MS: case CODEC_ID_ADPCM_YAMAHA: - return 4; case CODEC_ID_ADPCM_G722: + return 4; case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_MULAW: case CODEC_ID_PCM_S8: diff --git a/libavcodec/version.h b/libavcodec/version.h index 6faf793ea1..3918b139da 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -21,7 +21,7 @@ #define AVCODEC_VERSION_H #define LIBAVCODEC_VERSION_MAJOR 53 -#define LIBAVCODEC_VERSION_MINOR 25 +#define LIBAVCODEC_VERSION_MINOR 26 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ From 714cd7e758ef8c579a3f98b364d8b3d746ee289b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 4 Dec 2011 00:58:31 +0200 Subject: [PATCH 10/16] g722: Add a regression test for muxing/demuxing in wav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- tests/codec-regression.sh | 5 +++++ tests/ref/acodec/g722 | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/acodec/g722 diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index 5133345dc0..0e6151b449 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -291,6 +291,11 @@ do_audio_encoding ac3.rm "-vn -acodec ac3_fixed" #$tiny_psnr $pcm_dst $pcm_ref 2 1024 fi +if [ -n "$do_g722" ] ; then +do_audio_encoding g722.wav "-b 64k -ac 1 -ar 16000 -acodec g722" +do_audio_decoding +fi + if [ -n "$do_g726" ] ; then do_audio_encoding g726.wav "-b 32k -ac 1 -ar 8000 -acodec g726" do_audio_decoding diff --git a/tests/ref/acodec/g722 b/tests/ref/acodec/g722 new file mode 100644 index 0000000000..a1fc72a3bb --- /dev/null +++ b/tests/ref/acodec/g722 @@ -0,0 +1,4 @@ +b380355e0360b4e50ee78f33fd60a0f5 *./tests/data/acodec/g722.wav +47991 ./tests/data/acodec/g722.wav +82fdd5bb059336e0550de7ba5947c5bb *./tests/data/g722.acodec.out.wav +stddev: 8860.44 PSNR: 17.38 MAXDIFF:33814 bytes: 191732/ 1058400 From c68fafe0d2bdf3d4943a3602c52b0a7c83be8171 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 30 Oct 2011 18:27:33 +0100 Subject: [PATCH 11/16] doxygen: eliminate Qt-style doxygen syntax --- libavcodec/amrnbdec.c | 2 +- libavcodec/ivi_common.h | 2 +- libavcodec/mlpdec.c | 54 +++++++++++++++++++-------------------- libavcodec/qcelpdata.h | 16 ++++++------ libavcodec/rtjpeg.c | 2 +- libavformat/avformat.h | 2 +- libavformat/nuv.c | 2 +- libavutil/lzo.c | 6 ++--- libavutil/lzo.h | 8 +++--- libpostproc/postprocess.c | 4 +-- 10 files changed, 49 insertions(+), 49 deletions(-) diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c index b594af760a..926014f83c 100644 --- a/libavcodec/amrnbdec.c +++ b/libavcodec/amrnbdec.c @@ -653,7 +653,7 @@ static void decode_gains(AMRContext *p, const AMRNBSubframe *amr_subframe, static void apply_ir_filter(float *out, const AMRFixed *in, const float *filter) { - float filter1[AMR_SUBFRAME_SIZE], //!< filters at pitch lag*1 and *2 + float filter1[AMR_SUBFRAME_SIZE], ///< filters at pitch lag*1 and *2 filter2[AMR_SUBFRAME_SIZE]; int lag = in->pitch_lag; float fac = in->pitch_fac; diff --git a/libavcodec/ivi_common.h b/libavcodec/ivi_common.h index fd3d82515a..dcda13a8f4 100644 --- a/libavcodec/ivi_common.h +++ b/libavcodec/ivi_common.h @@ -51,7 +51,7 @@ typedef struct { /// or "7" for custom one VLC *tab; /// pointer to the table associated with tab_sel - //! the following are used only when tab_sel == 7 + /// the following are used only when tab_sel == 7 IVIHuffDesc cust_desc; /// custom Huffman codebook descriptor VLC cust_tab; /// vlc table for custom codebook } IVIHuffTab; diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 4dc2d9f3eb..357e28728d 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -45,35 +45,35 @@ static const char* sample_message = "a sample of this file."; typedef struct SubStream { - //! Set if a valid restart header has been read. Otherwise the substream cannot be decoded. + /// Set if a valid restart header has been read. Otherwise the substream cannot be decoded. uint8_t restart_seen; //@{ /** restart header data */ - //! The type of noise to be used in the rematrix stage. + /// The type of noise to be used in the rematrix stage. uint16_t noise_type; - //! The index of the first channel coded in this substream. + /// The index of the first channel coded in this substream. uint8_t min_channel; - //! The index of the last channel coded in this substream. + /// The index of the last channel coded in this substream. uint8_t max_channel; - //! The number of channels input into the rematrix stage. + /// The number of channels input into the rematrix stage. uint8_t max_matrix_channel; - //! For each channel output by the matrix, the output channel to map it to + /// For each channel output by the matrix, the output channel to map it to uint8_t ch_assign[MAX_CHANNELS]; - //! Channel coding parameters for channels in the substream + /// Channel coding parameters for channels in the substream ChannelParams channel_params[MAX_CHANNELS]; - //! The left shift applied to random noise in 0x31ea substreams. + /// The left shift applied to random noise in 0x31ea substreams. uint8_t noise_shift; - //! The current seed value for the pseudorandom noise generator(s). + /// The current seed value for the pseudorandom noise generator(s). uint32_t noisegen_seed; - //! Set if the substream contains extra info to check the size of VLC blocks. + /// Set if the substream contains extra info to check the size of VLC blocks. uint8_t data_check_present; - //! Bitmask of which parameter sets are conveyed in a decoding parameter block. + /// Bitmask of which parameter sets are conveyed in a decoding parameter block. uint8_t param_presence_flags; #define PARAM_BLOCKSIZE (1 << 7) #define PARAM_MATRIX (1 << 6) @@ -88,32 +88,32 @@ typedef struct SubStream { //@{ /** matrix data */ - //! Number of matrices to be applied. + /// Number of matrices to be applied. uint8_t num_primitive_matrices; - //! matrix output channel + /// matrix output channel uint8_t matrix_out_ch[MAX_MATRICES]; - //! Whether the LSBs of the matrix output are encoded in the bitstream. + /// Whether the LSBs of the matrix output are encoded in the bitstream. uint8_t lsb_bypass[MAX_MATRICES]; - //! Matrix coefficients, stored as 2.14 fixed point. + /// Matrix coefficients, stored as 2.14 fixed point. int32_t matrix_coeff[MAX_MATRICES][MAX_CHANNELS]; - //! Left shift to apply to noise values in 0x31eb substreams. + /// Left shift to apply to noise values in 0x31eb substreams. uint8_t matrix_noise_shift[MAX_MATRICES]; //@} - //! Left shift to apply to Huffman-decoded residuals. + /// Left shift to apply to Huffman-decoded residuals. uint8_t quant_step_size[MAX_CHANNELS]; - //! number of PCM samples in current audio block + /// number of PCM samples in current audio block uint16_t blocksize; - //! Number of PCM samples decoded so far in this frame. + /// Number of PCM samples decoded so far in this frame. uint16_t blockpos; - //! Left shift to apply to decoded PCM values to get final 24-bit output. + /// Left shift to apply to decoded PCM values to get final 24-bit output. int8_t output_shift[MAX_CHANNELS]; - //! Running XOR of all output samples. + /// Running XOR of all output samples. int32_t lossless_check_data; } SubStream; @@ -122,21 +122,21 @@ typedef struct MLPDecodeContext { AVCodecContext *avctx; AVFrame frame; - //! Current access unit being read has a major sync. + /// Current access unit being read has a major sync. int is_major_sync_unit; - //! Set if a valid major sync block has been read. Otherwise no decoding is possible. + /// Set if a valid major sync block has been read. Otherwise no decoding is possible. uint8_t params_valid; - //! Number of substreams contained within this stream. + /// Number of substreams contained within this stream. uint8_t num_substreams; - //! Index of the last substream to decode - further substreams are skipped. + /// Index of the last substream to decode - further substreams are skipped. uint8_t max_decoded_substream; - //! number of PCM samples contained in each frame + /// number of PCM samples contained in each frame int access_unit_size; - //! next power of two above the number of samples in each frame + /// next power of two above the number of samples in each frame int access_unit_size_pow2; SubStream substream[MAX_SUBSTREAMS]; diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h index 5822299348..4c6cf15e3e 100644 --- a/libavcodec/qcelpdata.h +++ b/libavcodec/qcelpdata.h @@ -40,16 +40,16 @@ typedef struct { /// @name QCELP excitation codebook parameters /// @{ - uint8_t cbsign[16]; ///!< sign of the codebook gain for each codebook subframe - uint8_t cbgain[16]; ///!< unsigned codebook gain for each codebook subframe - uint8_t cindex[16]; ///!< codebook index for each codebook subframe + uint8_t cbsign[16]; ///< sign of the codebook gain for each codebook subframe + uint8_t cbgain[16]; ///< unsigned codebook gain for each codebook subframe + uint8_t cindex[16]; ///< codebook index for each codebook subframe /// @} /// @name QCELP pitch prediction parameters /// @{ - uint8_t plag[4]; ///!< pitch lag for each pitch subframe - uint8_t pfrac[4]; ///!< fractional pitch lag for each pitch subframe - uint8_t pgain[4]; ///!< pitch gain for each pitch subframe + uint8_t plag[4]; ///< pitch lag for each pitch subframe + uint8_t pfrac[4]; ///< fractional pitch lag for each pitch subframe + uint8_t pgain[4]; ///< pitch gain for each pitch subframe /// @} /** @@ -266,7 +266,7 @@ static const QCELPBitmap qcelp_rate_octave_bitmap[] = { * the QCELPContext */ static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = { - NULL, ///!< for SILENCE rate + NULL, ///< for SILENCE rate qcelp_rate_octave_bitmap, qcelp_rate_quarter_bitmap, qcelp_rate_half_bitmap, @@ -274,7 +274,7 @@ static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = { }; static const uint16_t qcelp_unpacking_bitmaps_lengths[5] = { - 0, ///!< for SILENCE rate + 0, ///< for SILENCE rate FF_ARRAY_ELEMS(qcelp_rate_octave_bitmap), FF_ARRAY_ELEMS(qcelp_rate_quarter_bitmap), FF_ARRAY_ELEMS(qcelp_rate_half_bitmap), diff --git a/libavcodec/rtjpeg.c b/libavcodec/rtjpeg.c index 35ab090cb2..2c5ef0a8dd 100644 --- a/libavcodec/rtjpeg.c +++ b/libavcodec/rtjpeg.c @@ -27,7 +27,7 @@ i = scan[coeff--]; \ block[i] = (c) * quant[i]; -//! aligns the bitstream to the give power of two +/// aligns the bitstream to the given power of two #define ALIGN(a) \ n = (-get_bits_count(gb)) & (a - 1); \ if (n) {skip_bits(gb, n);} diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 367ba1e75b..5e00da12b2 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -293,7 +293,7 @@ typedef struct AVFormatParameters { #endif } AVFormatParameters; -//! Demuxer will use avio_open, no opened file should be provided by the caller. +/// Demuxer will use avio_open, no opened file should be provided by the caller. #define AVFMT_NOFILE 0x0001 #define AVFMT_NEEDNUMBER 0x0002 /**< Needs '%d' in filename. */ #define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */ diff --git a/libavformat/nuv.c b/libavformat/nuv.c index eede7580ac..ddca4fecff 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -47,7 +47,7 @@ static int nuv_probe(AVProbeData *p) { return 0; } -//! little macro to sanitize packet size +/// little macro to sanitize packet size #define PKTSIZE(s) (s & 0xffffff) /** diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 743d596656..26cda12112 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -21,14 +21,14 @@ #include "avutil.h" #include "common.h" -//! Avoid e.g. MPlayers fast_memcpy, it slows things down here. +/// Avoid e.g. MPlayers fast_memcpy, it slows things down here. #undef memcpy #include #include "lzo.h" -//! Define if we may write up to 12 bytes beyond the output buffer. +/// Define if we may write up to 12 bytes beyond the output buffer. #define OUTBUF_PADDED 1 -//! Define if we may read up to 8 bytes beyond the input buffer. +/// Define if we may read up to 8 bytes beyond the input buffer. #define INBUF_PADDED 1 typedef struct LZOContext { const uint8_t *in, *in_end; diff --git a/libavutil/lzo.h b/libavutil/lzo.h index b4c71c0933..d2c3466239 100644 --- a/libavutil/lzo.h +++ b/libavutil/lzo.h @@ -33,13 +33,13 @@ /** @name Error flags returned by av_lzo1x_decode * \{ */ -//! end of the input buffer reached before decoding finished +/// end of the input buffer reached before decoding finished #define AV_LZO_INPUT_DEPLETED 1 -//! decoded data did not fit into output buffer +/// decoded data did not fit into output buffer #define AV_LZO_OUTPUT_FULL 2 -//! a reference to previously decoded data was wrong +/// a reference to previously decoded data was wrong #define AV_LZO_INVALID_BACKPTR 4 -//! a non-specific error in the compressed bitstream +/// a non-specific error in the compressed bitstream #define AV_LZO_ERROR 8 /** \} */ diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index fb51d942e5..f87721711c 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -644,7 +644,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] #endif postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #endif -#else //CONFIG_RUNTIME_CPUDETECT +#else /* CONFIG_RUNTIME_CPUDETECT */ #if HAVE_MMX2 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #elif HAVE_AMD3DNOW @@ -656,7 +656,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] #else postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #endif -#endif //!CONFIG_RUNTIME_CPUDETECT +#endif /* !CONFIG_RUNTIME_CPUDETECT */ } //static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, From e873c03ac7cec62474fe8405391080abb78f4a02 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 30 Oct 2011 19:10:50 +0100 Subject: [PATCH 12/16] misc Doxygen markup improvements --- cmdutils.h | 2 +- libavcodec/cinepak.c | 7 ++++--- libavcodec/eamad.c | 4 ++-- libavcodec/lsp.c | 2 +- libavdevice/pulse.c | 1 - libavdevice/x11grab.c | 5 +++-- libavformat/matroskadec.c | 8 ++++---- libavformat/oggdec.c | 5 ++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cmdutils.h b/cmdutils.h index 55a06dd096..fc438c7977 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -190,7 +190,7 @@ void parse_loglevel(int argc, char **argv, const OptionDef *options); * * @param s Corresponding format context. * @param st Stream from s to be checked. - * @param spec A stream specifier of the [v|a|s|d]:[] form. + * @param spec A stream specifier of the [v|a|s|d]:[\] form. * * @return 1 if the stream matches, 0 if it doesn't, <0 on error */ diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 9cf38edb8e..08ab05f8bb 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -22,10 +22,11 @@ /** * @file * Cinepak video decoder - * by Ewald Snel - * For more information on the Cinepak algorithm, visit: + * @author Ewald Snel + * + * @see For more information on the Cinepak algorithm, visit: * http://www.csse.monash.edu.au/~timf/ - * For more information on the quirky data inside Sega FILM/CPK files, visit: + * @see For more information on the quirky data inside Sega FILM/CPK files, visit: * http://wiki.multimedia.cx/index.php?title=Sega_FILM */ diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 772fb28440..c5aa6ace79 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -22,9 +22,9 @@ /** * @file * Electronic Arts Madcow Video Decoder - * by Peter Ross + * @author Peter Ross * - * Technical details here: + * @see technical details at * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD */ diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c index 834346bc25..2adc9cfa39 100644 --- a/libavcodec/lsp.c +++ b/libavcodec/lsp.c @@ -75,7 +75,7 @@ void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order) /** * @brief decodes polynomial coefficients from LSP - * @param f [out] decoded polynomial coefficients (-0x20000000 <= (3.22) <= 0x1fffffff) + * @param[out] f decoded polynomial coefficients (-0x20000000 <= (3.22) <= 0x1fffffff) * @param lsp LSP coefficients (-0x8000 <= (0.15) <= 0x7fff) */ static void lsp2poly(int* f, const int16_t* lsp, int lp_half_order) diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c index 7f7c6dc2ff..bffe3914b8 100644 --- a/libavdevice/pulse.c +++ b/libavdevice/pulse.c @@ -23,7 +23,6 @@ * @file * PulseAudio input using the simple API. * @author Luca Barbato - * */ #include diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index 5673e5e611..9d12b2f731 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -31,8 +31,9 @@ /** * @file - * X11 frame device demuxer by Clemens Fruhwirth - * and Edouard Gomez . + * X11 frame device demuxer + * @author Clemens Fruhwirth + * @author Edouard Gomez */ #include "config.h" diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 6fdad8b9fc..b61c819ce3 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -22,10 +22,10 @@ /** * @file * Matroska file demuxer - * by Ronald Bultje - * with a little help from Moritz Bunkus - * totally reworked by Aurelien Jacobs - * Specs available on the Matroska project page: http://www.matroska.org/. + * @author Ronald Bultje + * @author with a little help from Moritz Bunkus + * @author totally reworked by Aurelien Jacobs + * @see specs available on the Matroska project page: http://www.matroska.org/ */ #include diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index c22f2bed60..36e2c452da 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -2,10 +2,9 @@ * Ogg bitstream support * Luca Barbato * Based on tcvp implementation - * */ -/** +/* Copyright (C) 2005 Michael Ahlberg, Måns Rullgård Permission is hereby granted, free of charge, to any person @@ -27,7 +26,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -**/ + */ #include From b41995d20e15ca963c72d4f715ac46c5b15bfe80 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 26 Nov 2011 13:10:17 -0800 Subject: [PATCH 13/16] h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg). --- tests/fate/h264.mak | 128 ++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak index d0f1a62d60..c519f74a8f 100644 --- a/tests/fate/h264.mak +++ b/tests/fate/h264.mak @@ -183,7 +183,7 @@ fate-h264-conformance-aud_mw_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-confo fate-h264-conformance-ba1_ft_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA1_FT_C.264 fate-h264-conformance-ba1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA1_Sony_D.jsv fate-h264-conformance-ba2_sony_f: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA2_Sony_F.jsv -fate-h264-conformance-ba3_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/BA3_SVA_C.264 +fate-h264-conformance-ba3_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA3_SVA_C.264 fate-h264-conformance-ba_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA_MW_D.264 fate-h264-conformance-bamq1_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BAMQ1_JVC_C.264 fate-h264-conformance-bamq2_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BAMQ2_JVC_C.264 @@ -193,80 +193,80 @@ fate-h264-conformance-caba1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-c fate-h264-conformance-caba1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA1_SVA_B.264 fate-h264-conformance-caba2_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA2_Sony_E.jsv fate-h264-conformance-caba2_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA2_SVA_B.264 -fate-h264-conformance-caba3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABA3_Sony_C.jsv -fate-h264-conformance-caba3_sva_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABA3_SVA_B.264 +fate-h264-conformance-caba3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_Sony_C.jsv +fate-h264-conformance-caba3_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_SVA_B.264 fate-h264-conformance-caba3_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_TOSHIBA_E.264 -fate-h264-conformance-cabac_mot_fld0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_fld0_full.26l -fate-h264-conformance-cabac_mot_frm0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_frm0_full.26l -fate-h264-conformance-cabac_mot_mbaff0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_mbaff0_full.26l -fate-h264-conformance-cabac_mot_picaff0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_picaff0_full.26l -fate-h264-conformance-cabaci3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABACI3_Sony_B.jsv -fate-h264-conformance-cabast3_sony_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABAST3_Sony_E.jsv -fate-h264-conformance-cabastbr3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABASTBR3_Sony_B.jsv -fate-h264-conformance-cabref3_sand_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABREF3_Sand_D.264 -fate-h264-conformance-cacqp3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CACQP3_Sony_D.jsv -fate-h264-conformance-cafi1_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAFI1_SVA_C.264 +fate-h264-conformance-cabac_mot_fld0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_fld0_full.26l +fate-h264-conformance-cabac_mot_frm0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_frm0_full.26l +fate-h264-conformance-cabac_mot_mbaff0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_mbaff0_full.26l +fate-h264-conformance-cabac_mot_picaff0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_picaff0_full.26l +fate-h264-conformance-cabaci3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABACI3_Sony_B.jsv +fate-h264-conformance-cabast3_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABAST3_Sony_E.jsv +fate-h264-conformance-cabastbr3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABASTBR3_Sony_B.jsv +fate-h264-conformance-cabref3_sand_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABREF3_Sand_D.264 +fate-h264-conformance-cacqp3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CACQP3_Sony_D.jsv +fate-h264-conformance-cafi1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAFI1_SVA_C.264 fate-h264-conformance-cama1_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA1_Sony_C.jsv -fate-h264-conformance-cama1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMA1_TOSHIBA_B.264 -fate-h264-conformance-cama1_vtc_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cama1_vtc_c.avc +fate-h264-conformance-cama1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA1_TOSHIBA_B.264 +fate-h264-conformance-cama1_vtc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama1_vtc_c.avc fate-h264-conformance-cama2_vtc_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama2_vtc_b.avc -fate-h264-conformance-cama3_sand_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMA3_Sand_E.264 -fate-h264-conformance-cama3_vtc_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cama3_vtc_b.avc -fate-h264-conformance-camaci3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMACI3_Sony_C.jsv -fate-h264-conformance-camanl1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL1_TOSHIBA_B.264 -fate-h264-conformance-camanl2_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL2_TOSHIBA_B.264 -fate-h264-conformance-camanl3_sand_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL3_Sand_E.264 -fate-h264-conformance-camasl3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMASL3_Sony_B.jsv -fate-h264-conformance-camp_mot_mbaff_l30: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L30.26l -fate-h264-conformance-camp_mot_mbaff_l31: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L31.26l +fate-h264-conformance-cama3_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA3_Sand_E.264 +fate-h264-conformance-cama3_vtc_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama3_vtc_b.avc +fate-h264-conformance-camaci3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMACI3_Sony_C.jsv +fate-h264-conformance-camanl1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL1_TOSHIBA_B.264 +fate-h264-conformance-camanl2_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL2_TOSHIBA_B.264 +fate-h264-conformance-camanl3_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL3_Sand_E.264 +fate-h264-conformance-camasl3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMASL3_Sony_B.jsv +fate-h264-conformance-camp_mot_mbaff_l30: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L30.26l +fate-h264-conformance-camp_mot_mbaff_l31: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L31.26l fate-h264-conformance-canl1_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_Sony_E.jsv fate-h264-conformance-canl1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_SVA_B.264 fate-h264-conformance-canl1_toshiba_g: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_TOSHIBA_G.264 fate-h264-conformance-canl2_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL2_Sony_E.jsv fate-h264-conformance-canl2_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL2_SVA_B.264 -fate-h264-conformance-canl3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CANL3_Sony_C.jsv +fate-h264-conformance-canl3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL3_Sony_C.jsv fate-h264-conformance-canl3_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL3_SVA_B.264 fate-h264-conformance-canl4_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL4_SVA_B.264 fate-h264-conformance-canlma2_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANLMA2_Sony_C.jsv fate-h264-conformance-canlma3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANLMA3_Sony_C.jsv -fate-h264-conformance-capa1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPA1_TOSHIBA_B.264 -fate-h264-conformance-capama3_sand_f: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPAMA3_Sand_F.264 +fate-h264-conformance-capa1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPA1_TOSHIBA_B.264 +fate-h264-conformance-capama3_sand_f: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPAMA3_Sand_F.264 fate-h264-conformance-capcm1_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPCM1_Sand_E.264 fate-h264-conformance-capcmnl1_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPCMNL1_Sand_E.264 -fate-h264-conformance-capm3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPM3_Sony_D.jsv +fate-h264-conformance-capm3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPM3_Sony_D.jsv fate-h264-conformance-caqp1_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAQP1_Sony_B.jsv -fate-h264-conformance-cavlc_mot_fld0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_fld0_full_B.26l -fate-h264-conformance-cavlc_mot_frm0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_frm0_full_B.26l -fate-h264-conformance-cavlc_mot_mbaff0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_mbaff0_full_B.26l -fate-h264-conformance-cavlc_mot_picaff0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_picaff0_full_B.26l +fate-h264-conformance-cavlc_mot_fld0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_fld0_full_B.26l +fate-h264-conformance-cavlc_mot_frm0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_frm0_full_B.26l +fate-h264-conformance-cavlc_mot_mbaff0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_mbaff0_full_B.26l +fate-h264-conformance-cavlc_mot_picaff0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_picaff0_full_B.26l fate-h264-conformance-cawp1_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAWP1_TOSHIBA_E.264 -fate-h264-conformance-cawp5_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAWP5_TOSHIBA_E.264 +fate-h264-conformance-cawp5_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAWP5_TOSHIBA_E.264 fate-h264-conformance-ci1_ft_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CI1_FT_B.264 fate-h264-conformance-ci_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CI_MW_D.264 -fate-h264-conformance-cvbs3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVBS3_Sony_C.jsv +fate-h264-conformance-cvbs3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVBS3_Sony_C.jsv fate-h264-conformance-cvcanlma2_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVCANLMA2_Sony_C.jsv -fate-h264-conformance-cvfi1_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI1_Sony_D.jsv -fate-h264-conformance-cvfi1_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI1_SVA_C.264 -fate-h264-conformance-cvfi2_sony_h: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI2_Sony_H.jsv -fate-h264-conformance-cvfi2_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI2_SVA_C.264 +fate-h264-conformance-cvfi1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI1_Sony_D.jsv +fate-h264-conformance-cvfi1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI1_SVA_C.264 +fate-h264-conformance-cvfi2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI2_Sony_H.jsv +fate-h264-conformance-cvfi2_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI2_SVA_C.264 fate-h264-conformance-cvma1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMA1_Sony_D.jsv -fate-h264-conformance-cvma1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMA1_TOSHIBA_B.264 -fate-h264-conformance-cvmanl1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMANL1_TOSHIBA_B.264 -fate-h264-conformance-cvmanl2_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMANL2_TOSHIBA_B.264 -fate-h264-conformance-cvmapaqp3_sony_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAPAQP3_Sony_E.jsv -fate-h264-conformance-cvmaqp2_sony_g: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAQP2_Sony_G.jsv -fate-h264-conformance-cvmaqp3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAQP3_Sony_D.jsv -fate-h264-conformance-cvmp_mot_fld_l30_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FLD_L30_B.26l -fate-h264-conformance-cvmp_mot_frm_l31_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FRM_L31_B.26l +fate-h264-conformance-cvma1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMA1_TOSHIBA_B.264 +fate-h264-conformance-cvmanl1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMANL1_TOSHIBA_B.264 +fate-h264-conformance-cvmanl2_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMANL2_TOSHIBA_B.264 +fate-h264-conformance-cvmapaqp3_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAPAQP3_Sony_E.jsv +fate-h264-conformance-cvmaqp2_sony_g: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAQP2_Sony_G.jsv +fate-h264-conformance-cvmaqp3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAQP3_Sony_D.jsv +fate-h264-conformance-cvmp_mot_fld_l30_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FLD_L30_B.26l +fate-h264-conformance-cvmp_mot_frm_l31_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FRM_L31_B.26l fate-h264-conformance-cvnlfi1_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVNLFI1_Sony_C.jsv -fate-h264-conformance-cvnlfi2_sony_h: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVNLFI2_Sony_H.jsv -fate-h264-conformance-cvpa1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVPA1_TOSHIBA_B.264 +fate-h264-conformance-cvnlfi2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVNLFI2_Sony_H.jsv +fate-h264-conformance-cvpa1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPA1_TOSHIBA_B.264 fate-h264-conformance-cvpcmnl1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPCMNL1_SVA_C.264 fate-h264-conformance-cvpcmnl2_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPCMNL2_SVA_C.264 fate-h264-conformance-cvwp1_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP1_TOSHIBA_E.264 -fate-h264-conformance-cvwp2_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP2_TOSHIBA_E.264 -fate-h264-conformance-cvwp3_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP3_TOSHIBA_E.264 -fate-h264-conformance-cvwp5_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP5_TOSHIBA_E.264 +fate-h264-conformance-cvwp2_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP2_TOSHIBA_E.264 +fate-h264-conformance-cvwp3_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP3_TOSHIBA_E.264 +fate-h264-conformance-cvwp5_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP5_TOSHIBA_E.264 fate-h264-conformance-fi1_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FI1_Sony_E.jsv fate-h264-conformance-frext-alphaconformanceg: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/test8b43.264 fate-h264-conformance-frext-bcrm_freh10: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/freh10.264 -vsync 0 @@ -315,23 +315,23 @@ fate-h264-conformance-frext-pph10i4_panasonic_a: CMD = framecrc -vsync 0 -i $(SA fate-h264-conformance-frext-pph10i5_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I5_Panasonic_A.264 -pix_fmt yuv420p10le fate-h264-conformance-frext-pph10i6_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I6_Panasonic_A.264 -pix_fmt yuv420p10le fate-h264-conformance-frext-pph10i7_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I7_Panasonic_A.264 -pix_fmt yuv420p10le -fate-h264-conformance-hcbp2_hhi_a: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/HCBP2_HHI_A.264 -fate-h264-conformance-hcmp1_hhi_a: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/HCMP1_HHI_A.264 +fate-h264-conformance-hcbp2_hhi_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/HCBP2_HHI_A.264 +fate-h264-conformance-hcmp1_hhi_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/HCMP1_HHI_A.264 fate-h264-conformance-ls_sva_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/LS_SVA_D.264 fate-h264-conformance-midr_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MIDR_MW_D.264 fate-h264-conformance-mps_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MPS_MW_A.264 fate-h264-conformance-mr1_bt_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR1_BT_A.h264 fate-h264-conformance-mr1_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR1_MW_A.264 fate-h264-conformance-mr2_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR2_MW_A.264 -fate-h264-conformance-mr2_tandberg_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR2_TANDBERG_E.264 -fate-h264-conformance-mr3_tandberg_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR3_TANDBERG_B.264 +fate-h264-conformance-mr2_tandberg_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR2_TANDBERG_E.264 +fate-h264-conformance-mr3_tandberg_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR3_TANDBERG_B.264 fate-h264-conformance-mr4_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR4_TANDBERG_C.264 fate-h264-conformance-mr5_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR5_TANDBERG_C.264 -fate-h264-conformance-mr6_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR6_BT_B.h264 -fate-h264-conformance-mr7_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR7_BT_B.h264 -fate-h264-conformance-mr8_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR8_BT_B.h264 -fate-h264-conformance-mr9_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR9_BT_B.h264 -fate-h264-conformance-mv1_brcm_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/src19td.IBP.264 +fate-h264-conformance-mr6_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR6_BT_B.h264 +fate-h264-conformance-mr7_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR7_BT_B.h264 +fate-h264-conformance-mr8_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR8_BT_B.h264 +fate-h264-conformance-mr9_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR9_BT_B.h264 +fate-h264-conformance-mv1_brcm_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/src19td.IBP.264 fate-h264-conformance-nl1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL1_Sony_D.jsv fate-h264-conformance-nl2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL2_Sony_H.jsv fate-h264-conformance-nl3_sva_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL3_SVA_E.264 @@ -341,9 +341,9 @@ fate-h264-conformance-nrf_mw_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-confo fate-h264-conformance-sharp_mp_field_1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_1_B.jvt fate-h264-conformance-sharp_mp_field_2_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_2_B.jvt fate-h264-conformance-sharp_mp_field_3_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_3_B.jvt -fate-h264-conformance-sharp_mp_paff_1r2: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_1r2.jvt -fate-h264-conformance-sharp_mp_paff_2r: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_2.jvt -fate-h264-conformance-sl1_sva_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/SL1_SVA_B.264 +fate-h264-conformance-sharp_mp_paff_1r2: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_1r2.jvt +fate-h264-conformance-sharp_mp_paff_2r: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_2.jvt +fate-h264-conformance-sl1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SL1_SVA_B.264 fate-h264-conformance-sva_ba1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_BA1_B.264 fate-h264-conformance-sva_ba2_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_BA2_D.264 fate-h264-conformance-sva_base_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_Base_B.264 @@ -354,4 +354,4 @@ fate-h264-conformance-sva_nl2_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conf fate-h264-interlace-crop: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vframes 3 fate-h264-lossless: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/lossless.h264 -fate-h264-extreme-plane-pred: CMD = framemd5 -strict 1 -vsync 0 -i $(SAMPLES)/h264/extreme-plane-pred.h264 +fate-h264-extreme-plane-pred: CMD = framemd5 -vsync 0 -i $(SAMPLES)/h264/extreme-plane-pred.h264 From 110d2af28e186d5ed120942f8b3d51acda59e341 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 5 Dec 2011 10:36:54 -0500 Subject: [PATCH 14/16] avconv: fix memleaks due to not freeing the AVFrame for audio --- avconv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/avconv.c b/avconv.c index 371a1183de..787ca9c219 100644 --- a/avconv.c +++ b/avconv.c @@ -1633,6 +1633,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) if (!*got_output) { /* no audio frame */ + av_freep(&decoded_frame); return ret; } @@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) av_log(NULL, AV_LOG_FATAL, "Audio volume adjustment on sample format %s is not supported.\n", av_get_sample_fmt_name(ist->st->codec->sample_fmt)); + av_freep(&decoded_frame); exit_program(1); } } @@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) continue; do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); } + + av_freep(&decoded_frame); return ret; } From 9179f27c6431e36cf0ebd320fb2733f56969bb44 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 5 Dec 2011 11:49:38 -0500 Subject: [PATCH 15/16] avconv: only allocate 1 AVFrame per input stream This avoids allocating/freeing an AVFrame for each packet decode. It also simplifies error handling in transcode_audio() and transcode_video(). --- avconv.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/avconv.c b/avconv.c index 787ca9c219..54aa89b117 100644 --- a/avconv.c +++ b/avconv.c @@ -145,6 +145,8 @@ typedef struct InputStream { int discard; /* true if stream data should be discarded */ int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */ AVCodec *dec; + AVFrame *decoded_frame; + AVFrame *filtered_frame; int64_t start; /* time when read started */ int64_t next_pts; /* synthetic pts for cases where pkt.pts @@ -523,8 +525,11 @@ void exit_program(int ret) for(i=0;ist->codec->sample_fmt); int i, ret; - if (!(decoded_frame = avcodec_alloc_frame())) + if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) return AVERROR(ENOMEM); + else + avcodec_get_frame_defaults(ist->decoded_frame); + decoded_frame = ist->decoded_frame; ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt); if (ret < 0) { - av_freep(&decoded_frame); return ret; } if (!*got_output) { /* no audio frame */ - av_freep(&decoded_frame); return ret; } @@ -1701,7 +1707,6 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) av_log(NULL, AV_LOG_FATAL, "Audio volume adjustment on sample format %s is not supported.\n", av_get_sample_fmt_name(ist->st->codec->sample_fmt)); - av_freep(&decoded_frame); exit_program(1); } } @@ -1716,7 +1721,6 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); } - av_freep(&decoded_frame); return ret; } @@ -1730,8 +1734,11 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int int frame_available = 1; #endif - if (!(decoded_frame = avcodec_alloc_frame())) + if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) return AVERROR(ENOMEM); + else + avcodec_get_frame_defaults(ist->decoded_frame); + decoded_frame = ist->decoded_frame; pkt->pts = *pkt_pts; pkt->dts = ist->pts; *pkt_pts = AV_NOPTS_VALUE; @@ -1739,12 +1746,11 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ret = avcodec_decode_video2(ist->st->codec, decoded_frame, got_output, pkt); if (ret < 0) - goto fail; + return ret; quality = same_quant ? decoded_frame->quality : 0; if (!*got_output) { /* no picture yet */ - av_freep(&decoded_frame); return ret; } ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts, @@ -1778,10 +1784,12 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int else sar = ist->st->codec->sample_aspect_ratio; av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, ist->pts, sar); - if (!(filtered_frame = avcodec_alloc_frame())) { - ret = AVERROR(ENOMEM); - goto fail; - } + if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) { + av_free(buffer_to_free); + return AVERROR(ENOMEM); + } else + avcodec_get_frame_defaults(ist->filtered_frame); + filtered_frame = ist->filtered_frame; frame_available = avfilter_poll_frame(ost->output_video_filter->inputs[0]); } while (frame_available) { @@ -1805,13 +1813,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int if (ost->picref) avfilter_unref_buffer(ost->picref); } - av_freep(&filtered_frame); #endif } -fail: av_free(buffer_to_free); - av_freep(&decoded_frame); return ret; } From 52401b82bd2ed30d4c4353cb084bf4ee679d0c22 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sun, 4 Dec 2011 16:38:05 -0800 Subject: [PATCH 16/16] mov: Don't av_malloc(0). malloc() is allowed to return NULL when zero is the argument. This causes us to think malloc has failed and return AVERROR(ENOMEM). In addition OS X malloc() returns an unfreeable non-NULL pointer for size zero when alignment is greater than 16. --- libavformat/mov.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index e2bb4d650d..a0b0794592 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -915,6 +915,8 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) entries = avio_rb32(pb); + if (!entries) + return 0; if (entries >= UINT_MAX/sizeof(int64_t)) return -1; @@ -1336,6 +1338,8 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries); + if (!entries) + return 0; if (entries >= UINT_MAX / sizeof(*sc->stsc_data)) return -1; sc->stsc_data = av_malloc(entries * sizeof(*sc->stsc_data)); @@ -1451,6 +1455,8 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) return -1; } + if (!entries) + return 0; if (entries >= UINT_MAX / sizeof(int) || entries >= (UINT_MAX - 4) / field_size) return -1; sc->sample_sizes = av_malloc(entries * sizeof(int)); @@ -1550,6 +1556,8 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); + if (!entries) + return 0; if (entries >= UINT_MAX / sizeof(*sc->ctts_data)) return -1; sc->ctts_data = av_malloc(entries * sizeof(*sc->ctts_data)); @@ -1609,6 +1617,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st) current_dts -= sc->dts_shift; + if (!sc->sample_count) + return; if (sc->sample_count >= UINT_MAX / sizeof(*st->index_entries)) return; st->index_entries = av_malloc(sc->sample_count*sizeof(*st->index_entries));