Re: [libav-devel] [PATCH 3/3] mpc8: check output buffer size before decoding
On Fri, Sep 30, 2011 at 06:48:42PM -0400, Justin Ruggles wrote: > --- > libavcodec/mpc8.c | 10 -- > 1 files changed, 8 insertions(+), 2 deletions(-) LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] mpc7: return error if packet is too small.
On Fri, Sep 30, 2011 at 06:48:41PM -0400, Justin Ruggles wrote: > --- > libavcodec/mpc7.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c > index 02c83fc..6f79c7b 100644 > --- a/libavcodec/mpc7.c > +++ b/libavcodec/mpc7.c > @@ -203,6 +203,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, > memset(bands, 0, sizeof(bands)); > if(buf_size <= 4){ > av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", > buf_size); > +return AVERROR(EINVAL); > } > > out_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4; > -- also looks OK ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] mpc7: check output buffer size before decoding
On Fri, Sep 30, 2011 at 06:48:40PM -0400, Justin Ruggles wrote: > --- > libavcodec/mpc7.c | 10 -- > 1 files changed, 8 insertions(+), 2 deletions(-) looks OK ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 5/5] nellymoserdec: allocate float_buf only when decoding to int16
--- libavcodec/nellymoserdec.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index d7d1aba..2d59abf 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -47,7 +47,7 @@ typedef struct NellyMoserDecodeContext { AVCodecContext* avctx; -DECLARE_ALIGNED(32, float, float_buf)[NELLY_SAMPLES]; +float *float_buf; float state[NELLY_BUF_LEN]; AVLFG random_state; GetBitContext gb; @@ -145,6 +145,11 @@ static av_cold int decode_init(AVCodecContext * avctx) { s->scale_bias = 1.0/(1*8); avctx->sample_fmt = AV_SAMPLE_FMT_S16; ff_fmt_convert_init(&s->fmt_conv, avctx); +s->float_buf = av_mallocz(NELLY_SAMPLES * sizeof(*s->float_buf)); +if (!s->float_buf) { +av_log(avctx, AV_LOG_ERROR, "error allocating float buffer\n"); +return AVERROR(ENOMEM); +} } /* Generate overlap window */ @@ -208,6 +213,7 @@ static int decode_tag(AVCodecContext * avctx, static av_cold int decode_end(AVCodecContext * avctx) { NellyMoserDecodeContext *s = avctx->priv_data; +av_freep(&s->float_buf); ff_mdct_end(&s->imdct_ctx); return 0; } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 4/5] nellymoserdec: use NELLY_BUF_LEN instead of 128
--- libavcodec/nellymoserdec.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index bd3ab99..d7d1aba 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -48,7 +48,7 @@ typedef struct NellyMoserDecodeContext { AVCodecContext* avctx; DECLARE_ALIGNED(32, float, float_buf)[NELLY_SAMPLES]; -float state[128]; +float state[NELLY_BUF_LEN]; AVLFG random_state; GetBitContext gb; float scale_bias; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/5] nellymoserdec: use NELLY_BLOCK_LEN instead of 64 when appropriate.
--- libavcodec/nellymoserdec.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index a6748bf..bd3ab99 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -170,13 +170,13 @@ static int decode_tag(AVCodecContext * avctx, return buf_size; } -if (buf_size % 64) { +if (buf_size % NELLY_BLOCK_LEN) { av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size); *data_size = 0; return buf_size; } block_size = NELLY_SAMPLES * av_get_bytes_per_sample(avctx->sample_fmt); -blocks = FFMIN(buf_size / 64, *data_size / block_size); +blocks = FFMIN(buf_size / NELLY_BLOCK_LEN, *data_size / block_size); if (blocks <= 0) { av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n"); return AVERROR(EINVAL); -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/5] nellymoserdec: allow user to request SAMPLE_FMT_FLT for output samples.
--- libavcodec/nellymoserdec.c | 29 ++--- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 2856479..a6748bf 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -137,15 +137,20 @@ static av_cold int decode_init(AVCodecContext * avctx) { ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); dsputil_init(&s->dsp, avctx); -ff_fmt_convert_init(&s->fmt_conv, avctx); -s->scale_bias = 1.0/(1*8); +if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) { +s->scale_bias = 1.0/(32768*8); +avctx->sample_fmt = AV_SAMPLE_FMT_FLT; +} else { +s->scale_bias = 1.0/(1*8); +avctx->sample_fmt = AV_SAMPLE_FMT_S16; +ff_fmt_convert_init(&s->fmt_conv, avctx); +} /* Generate overlap window */ if (!ff_sine_128[127]) ff_init_ff_sine_windows(7); -avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->channel_layout = AV_CH_LAYOUT_MONO; return 0; } @@ -157,8 +162,8 @@ static int decode_tag(AVCodecContext * avctx, int buf_size = avpkt->size; NellyMoserDecodeContext *s = avctx->priv_data; int blocks, i, block_size; -int16_t* samples; -samples = (int16_t*)data; +int16_t *samples_s16 = data; +float *samples_flt = data; if (buf_size < avctx->block_align) { *data_size = 0; @@ -185,8 +190,15 @@ static int decode_tag(AVCodecContext * avctx, */ for (i=0 ; ifloat_buf); -s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); +if (avctx->sample_fmt == SAMPLE_FMT_FLT) { +nelly_decode_block(s, buf, samples_flt); +samples_flt += NELLY_SAMPLES; +} else { +nelly_decode_block(s, buf, s->float_buf); +s->fmt_conv.float_to_int16(samples_s16, s->float_buf, NELLY_SAMPLES); +samples_s16 += NELLY_SAMPLES; +} +buf += NELLY_BLOCK_LEN; } *data_size = blocks * block_size; @@ -209,5 +221,8 @@ AVCodec ff_nellymoser_decoder = { .close = decode_end, .decode = decode_tag, .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), +.sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, }; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/5] nellymoser: check output buffer size before decoding
--- libavcodec/nellymoserdec.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index a153dc0..2856479 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -156,19 +156,26 @@ static int decode_tag(AVCodecContext * avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; NellyMoserDecodeContext *s = avctx->priv_data; -int blocks, i; +int blocks, i, block_size; int16_t* samples; -*data_size = 0; samples = (int16_t*)data; -if (buf_size < avctx->block_align) +if (buf_size < avctx->block_align) { +*data_size = 0; return buf_size; +} if (buf_size % 64) { av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size); +*data_size = 0; return buf_size; } -blocks = buf_size / 64; +block_size = NELLY_SAMPLES * av_get_bytes_per_sample(avctx->sample_fmt); +blocks = FFMIN(buf_size / 64, *data_size / block_size); +if (blocks <= 0) { +av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n"); +return AVERROR(EINVAL); +} /* Normal numbers of blocks for sample rates: * 8000 Hz - 1 * 11025 Hz - 2 @@ -180,8 +187,8 @@ static int decode_tag(AVCodecContext * avctx, for (i=0 ; ifloat_buf); s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); -*data_size += NELLY_SAMPLES*sizeof(int16_t); } +*data_size = blocks * block_size; return buf_size; } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 0/5] nellymoser patches
Justin Ruggles (5): nellymoser: check output buffer size before decoding nellymoserdec: allow user to request SAMPLE_FMT_FLT for output samples. nellymoserdec: use NELLY_BLOCK_LEN instead of 64 when appropriate. nellymoserdec: use NELLY_BUF_LEN instead of 128 nellymoserdec: allocate float_buf only when decoding to int16 libavcodec/nellymoserdec.c | 58 --- 1 files changed, 43 insertions(+), 15 deletions(-) ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/3] mpc8: check output buffer size before decoding
--- libavcodec/mpc8.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 0e3947b..a126fc8 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -241,10 +241,16 @@ static int mpc8_decode_frame(AVCodecContext * avctx, GetBitContext gb2, *gb = &gb2; int i, j, k, ch, cnt, res, t; Band *bands = c->bands; -int off; +int off, out_size; int maxband, keyframe; int last[2]; +out_size = MPC_FRAME_SIZE * 2 * avctx->channels; +if (*data_size < out_size) { +av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n"); +return AVERROR(EINVAL); +} + keyframe = c->cur_frame == 0; if(keyframe){ @@ -400,7 +406,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, c->last_bits_used = get_bits_count(gb); if(c->cur_frame >= c->frames) c->cur_frame = 0; -*data_size = MPC_FRAME_SIZE * 2 * avctx->channels; +*data_size = out_size; return c->cur_frame ? c->last_bits_used >> 3 : buf_size; } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/3] mpc7: return error if packet is too small.
--- libavcodec/mpc7.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 02c83fc..6f79c7b 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -203,6 +203,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, memset(bands, 0, sizeof(bands)); if(buf_size <= 4){ av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size); +return AVERROR(EINVAL); } out_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/3] mpc7: check output buffer size before decoding
--- libavcodec/mpc7.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index a98cb0e..02c83fc 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -197,7 +197,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, int i, ch; int mb = -1; Band *bands = c->bands; -int off; +int off, out_size; int bits_used, bits_avail; memset(bands, 0, sizeof(bands)); @@ -205,6 +205,12 @@ static int mpc7_decode_frame(AVCodecContext * avctx, av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size); } +out_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4; +if (*data_size < out_size) { +av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n"); +return AVERROR(EINVAL); +} + bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE); c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2); init_get_bits(&gb, bits, (buf_size - 4)* 8); @@ -277,7 +283,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, *data_size = 0; return buf_size; } -*data_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4; +*data_size = out_size; return buf_size; } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Announce Libav 0.7.2
On 9/30/11 8:41 PM, Reinhard Tartler wrote: I might have gotten it wrong in the release tarball, but please let's the cApitaliZation Right on the website. I'd suggest all bullet point to start with a big letter. Uh, please tell me what to capitalize since I'm afraid I could miss stuff or mess up ^^; lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 10/15] dpcm: check to make sure channels is 1 or 2.
On 09/30/2011 02:03 PM, Luca Barbato wrote: > On 9/22/11 8:42 PM, Justin Ruggles wrote: >> --- > > Ok. this format can't support at all more than 2 channels? They might, I don't know. But the code certainly doesn't. -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 11/15] dpcm: replace short with int16_t
On Thu, 22 Sep 2011 14:42:33 -0400, Justin Ruggles wrote: > --- > libavcodec/dpcm.c |7 +++ > 1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c > index 539d4c0..d2a291b 100644 > --- a/libavcodec/dpcm.c > +++ b/libavcodec/dpcm.c > @@ -43,7 +43,7 @@ > > typedef struct DPCMContext { > int channels; > -short roq_square_array[256]; > +int16_t roq_square_array[256]; > int sample[2]; ///< previous sample (for SOL_DPCM) > const int *sol_table;//for SOL_DPCM > } DPCMContext; > @@ -115,7 +115,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) > { > DPCMContext *s = avctx->priv_data; > int i; > -short square; > > if (avctx->channels < 1 || avctx->channels > 2) { > av_log(avctx, AV_LOG_INFO, "invalid number of channels\n"); > @@ -130,7 +129,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) > case CODEC_ID_ROQ_DPCM: > /* initialize square table */ > for (i = 0; i < 128; i++) { > -square = i * i; > +int16_t square = i * i; > s->roq_square_array[i ] = square; > s->roq_square_array[i + 128] = -square; > } > @@ -179,7 +178,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void > *data, int *data_size, > int predictor[2]; > int ch = 0; > int st = s->channels - 1; > -short *output_samples = data; > +int16_t *output_samples = data; > > if (!buf_size) > return 0; > -- > 1.7.1 > Should be ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavf: Avoid using av_malloc(0) in av_dump_format
On Fri, 30 Sep 2011, Anton Khirnov wrote: On Fri, 30 Sep 2011 20:33:18 +0300, Martin Storsjö wrote: On OS X, av_malloc(0) returns pointers that cause crashes when freed. --- libavformat/utils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index d0ad358..0ba6fc3 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -,7 +,7 @@ void av_dump_format(AVFormatContext *ic, int is_output) { int i; -uint8_t *printed = av_mallocz(ic->nb_streams); +uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL; if (ic->nb_streams && !printed) return; -- 1.7.3.1 Looks ok. Applied. // Martin___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: fix references to obsolete presets directories for avconv/ffmpeg
On Thu, 29 Sep 2011 22:00:29 +0200, Diego Biurrun wrote: > --- > cmdutils.h |2 +- > doc/ffmpeg.texi |4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/cmdutils.h b/cmdutils.h > index a20b779..1c17433 100644 > --- a/cmdutils.h > +++ b/cmdutils.h > @@ -334,7 +334,7 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, > int64_t pts, int64_t dts); > * > * If is_path is non-zero, look for the file in the path preset_name. > * Otherwise search for a file named arg.ffpreset in the directories > - * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined > + * $AVCONV_DATADIR (if set), $HOME/.avconv, and in the datadir defined > * at configuration time, in that order. If no such file is found and > * codec_name is defined, then search for a file named > * codec_name-preset_name.ffpreset in the above-mentioned directories. > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > index 2457d65..22989c0 100644 > --- a/doc/ffmpeg.texi > +++ b/doc/ffmpeg.texi > @@ -806,8 +806,8 @@ preset options identifies the preset file to use > according to the > following rules: > > First ffmpeg searches for a file named @var{arg}.ffpreset in the > -directories @file{$FFMPEG_DATADIR} (if set), and @file{$HOME/.ffmpeg}, and in > -the datadir defined at configuration time (usually > @file{PREFIX/share/ffmpeg}) > +directories @file{$AVCONV_DATADIR} (if set), and @file{$HOME/.avconv}, and in > +the datadir defined at configuration time (usually > @file{PREFIX/share/avconv}) > in that order. For example, if the argument is @code{libx264-max}, it will > search for the file @file{libx264-max.ffpreset}. > > -- > 1.7.3.4 > Ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Announce Libav 0.7.2
On Fr, Sep 30, 2011 at 19:31:32 (CEST), Luca Barbato wrote: > --- > src/download | 24 > src/index| 39 +++ > 2 files changed, 51 insertions(+), 12 deletions(-) > > diff --git a/src/download b/src/download > index 2d3c63f..5d6d712 100644 > --- a/src/download > +++ b/src/download > @@ -158,25 +158,25 @@ selected changes from the development branch, which > therefore receives much more > and much faster bug fixes such as additional features and security patches. > > > -Libav 0.7.1 "The Big Bump" > +Libav 0.7.2 "The Big Bump" > > > -0.7.1 was released on 2011-07-21. It is the latest point release from the > 0.7 branch, > +0.7.2 was released on 2011-09-30. It is the latest point release from the > 0.7 branch, > which was cut on on 2011-06-20. Please use our new Bugzilla for filing bugs: > https://bugzilla.libav.org";>https://bugzilla.libav.org/ > > > > -Download XZ tarball > -MD5 > -SHA1 > -PGP signature > -Download gzip tarball > -MD5 > -SHA1 > -PGP signature > -Changelog > -Release Notes > +Download XZ tarball > +MD5 > +SHA1 > +PGP signature > +Download gzip tarball > +MD5 > +SHA1 > +PGP signature > +Changelog > +Release Notes > > > > diff --git a/src/index b/src/index > index da789d1..46007a0 100644 > --- a/src/index > +++ b/src/index > @@ -33,6 +33,45 @@ with the latest developments by subscribing to both the > > News > > +Sept 30 2011 > + > + > +We have just released Libav 0.7.2, > +the latest release from the 0.7 branch. > +This is a security focused release that addresses the following issues: > + > + > + check buffer and input values in various parts of the code: > + > + H.264, VC-1, cavs (OCERT-2011-002, CVE-2011-3362) > + APE, Indeo 2, XAN, wavpack, ffv1, Smacker > + RV10, RV30/RV40 > + FLV, Ogg, MXF, MOV, Matroska (CVE-2011-3504) > + cpu detection > + > + remove memory leaks in vf_scale, eval > + Remove some suspicious illegal memcpy()s from LTP in AAC > + fix Continuity Counter error detection in mpegts > + fix crashes in ppc32 PIC builds > + (as reported in http://bugs.debian.org/639948";>Debian) > + fix cast related random failures in ppc64 > + fix context pointer in av_open_input_stream when avformat_open_input > fails > + I might have gotten it wrong in the release tarball, but please let's the cApitaliZation Right on the website. I'd suggest all bullet point to start with a big letter. > + > +Additional bugfixes and improvements in the build system, h264 and > vp3/theora decoder, > +ARM support and audio codecs are present. A detailed list of changes can be > seen in > +the git log: > + href="http://git.libav.org/?p=libav.git;a=shortlog;h=refs/heads/release/0.7";> > +http://git.libav.org/?p=libav.git;a=shortlog;h=refs/heads/release/0.7 > + > + > + > +Distributors and system integrators are encouraged to update and share > +their patches against our release branches. > + > + > + > September 27 2011 Rest reads great to me, thanks for writing it up! Cheers, Reinhard -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Split up yuv2yuvX functions.
/me blames gmail 0001-Split-up-yuv2yuvX-functions.patch Description: Binary data ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 12/15] dpcm: use sol_table_16 directly instead of through the DPCMContext.
On 9/22/11 8:42 PM, Justin Ruggles wrote: --- libavcodec/dpcm.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Ok ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 10/15] dpcm: check to make sure channels is 1 or 2.
On 9/22/11 8:42 PM, Justin Ruggles wrote: --- Ok. this format can't support at all more than 2 channels? ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 07/15] dpcm: remove unnecessary variable by using bytestream functions.
On 9/22/11 8:42 PM, Justin Ruggles wrote: Uses 'buf' directly instead of a separate iterator variable 'in'. --- Ok ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Split up yuv2yuvX functions.
Hi, On Fri, Sep 30, 2011 at 7:09 PM, Kieran Kunhya wrote: > Patch updated That's a bold statement to make without attachment. :-). Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 04/15] dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2.
On 9/30/11 4:33 PM, Justin Ruggles wrote: On 09/24/2011 11:09 AM, Justin Ruggles wrote: On 09/24/2011 01:51 AM, Luca Barbato wrote: On 9/22/11 8:42 PM, Justin Ruggles wrote: Sorry to ask, but could you explain why the change in the commit message? How about: dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2. Uses the native sample format for the codec instead of left-shifting all samples by 8. ping. Sorry, fine for me. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc: add video/audio/encoding flags to global_quality option
On 9/30/11 5:28 PM, Anton Khirnov wrote: --- libavcodec/options.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] libvpxenc: use libvpx's own defaults for some parameters
On 9/30/11 5:30 PM, Anton Khirnov wrote: From: Luca Barbato Specifically, qmin/qmax, gop_size and keyint_min. Fixes bug 47. --- Thanks for the additional polish =) lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] vpxenc: add private options
On 9/30/11 5:30 PM, Anton Khirnov wrote: From: Luca Barbato Make libvpx support close to the libx264 one. Thanks to Jan Gerber for the support. Signed-off-by: Anton Khirnov --- Thank you for the additional polish ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavf: Avoid using av_malloc(0) in av_dump_format
On Fri, 30 Sep 2011 20:33:18 +0300, Martin Storsjö wrote: > On OS X, av_malloc(0) returns pointers that cause crashes when > freed. > --- > libavformat/utils.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index d0ad358..0ba6fc3 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -,7 +,7 @@ void av_dump_format(AVFormatContext *ic, > int is_output) > { > int i; > -uint8_t *printed = av_mallocz(ic->nb_streams); > +uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL; > if (ic->nb_streams && !printed) > return; > > -- > 1.7.3.1 > Looks ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Synchronize various 4CCs and codec tags from FFmpeg.
2011/9/30 Måns Rullgård : > Diego Biurrun writes: > >> --- >> libavcodec/avcodec.h | 3 +++ >> libavcodec/raw.c | 4 +++- >> libavformat/isom.c | 5 + >> libavformat/riff.c | 10 ++ >> 4 files changed, 21 insertions(+), 1 deletions(-) >> >> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h >> index 4d61f44..f985d35 100644 >> --- a/libavcodec/avcodec.h >> +++ b/libavcodec/avcodec.h >> @@ -210,6 +210,9 @@ enum CodecID { >> CODEC_ID_DFA, >> CODEC_ID_WMV3IMAGE, >> CODEC_ID_VC1IMAGE, >> + CODEC_ID_G2M, > > What is G2M? > Citrix GoToMeeting versions 2, 3, and 4. http://wiki.multimedia.cx/index.php?title=G2M2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] lavf: Avoid using av_malloc(0) in av_dump_format
On OS X, av_malloc(0) returns pointers that cause crashes when freed. --- libavformat/utils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index d0ad358..0ba6fc3 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -,7 +,7 @@ void av_dump_format(AVFormatContext *ic, int is_output) { int i; -uint8_t *printed = av_mallocz(ic->nb_streams); +uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL; if (ic->nb_streams && !printed) return; -- 1.7.3.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Synchronize various 4CCs and codec tags from FFmpeg.
Diego Biurrun writes: > --- > libavcodec/avcodec.h |3 +++ > libavcodec/raw.c |4 +++- > libavformat/isom.c |5 + > libavformat/riff.c | 10 ++ > 4 files changed, 21 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 4d61f44..f985d35 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -210,6 +210,9 @@ enum CodecID { > CODEC_ID_DFA, > CODEC_ID_WMV3IMAGE, > CODEC_ID_VC1IMAGE, > +CODEC_ID_G2M, What is G2M? -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Announce Libav 0.7.2
--- src/download | 24 src/index| 39 +++ 2 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/download b/src/download index 2d3c63f..5d6d712 100644 --- a/src/download +++ b/src/download @@ -158,25 +158,25 @@ selected changes from the development branch, which therefore receives much more and much faster bug fixes such as additional features and security patches. -Libav 0.7.1 "The Big Bump" +Libav 0.7.2 "The Big Bump" -0.7.1 was released on 2011-07-21. It is the latest point release from the 0.7 branch, +0.7.2 was released on 2011-09-30. It is the latest point release from the 0.7 branch, which was cut on on 2011-06-20. Please use our new Bugzilla for filing bugs: https://bugzilla.libav.org";>https://bugzilla.libav.org/ -Download XZ tarball -MD5 -SHA1 -PGP signature -Download gzip tarball -MD5 -SHA1 -PGP signature -Changelog -Release Notes +Download XZ tarball +MD5 +SHA1 +PGP signature +Download gzip tarball +MD5 +SHA1 +PGP signature +Changelog +Release Notes diff --git a/src/index b/src/index index da789d1..46007a0 100644 --- a/src/index +++ b/src/index @@ -33,6 +33,45 @@ with the latest developments by subscribing to both the News +Sept 30 2011 + + +We have just released Libav 0.7.2, +the latest release from the 0.7 branch. +This is a security focused release that addresses the following issues: + + + check buffer and input values in various parts of the code: + + H.264, VC-1, cavs (OCERT-2011-002, CVE-2011-3362) + APE, Indeo 2, XAN, wavpack, ffv1, Smacker + RV10, RV30/RV40 + FLV, Ogg, MXF, MOV, Matroska (CVE-2011-3504) + cpu detection + + remove memory leaks in vf_scale, eval + Remove some suspicious illegal memcpy()s from LTP in AAC + fix Continuity Counter error detection in mpegts + fix crashes in ppc32 PIC builds + (as reported in http://bugs.debian.org/639948";>Debian) + fix cast related random failures in ppc64 + fix context pointer in av_open_input_stream when avformat_open_input fails + + + +Additional bugfixes and improvements in the build system, h264 and vp3/theora decoder, +ARM support and audio codecs are present. A detailed list of changes can be seen in +the git log: +http://git.libav.org/?p=libav.git;a=shortlog;h=refs/heads/release/0.7";> +http://git.libav.org/?p=libav.git;a=shortlog;h=refs/heads/release/0.7 + + + +Distributors and system integrators are encouraged to update and share +their patches against our release branches. + + + September 27 2011 -- 1.7.6.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Split up yuv2yuvX functions.
Patch updated ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Synchronize various 4CCs and codec tags from FFmpeg.
On Fr, Sep 30, 2011 at 18:32:00 (CEST), Ronald S. Bultje wrote: > Hi, > > On Fri, Sep 30, 2011 at 6:29 PM, Diego Biurrun wrote: >> @@ -210,6 +210,9 @@ enum CodecID { >> CODEC_ID_DFA, >> CODEC_ID_WMV3IMAGE, >> CODEC_ID_VC1IMAGE, >> + CODEC_ID_G2M, > > No, these are various codecs and we don't want to remix crap files. > >> + > > Cosmetics. > >> + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '2') }, >> + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '3') }, >> + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '4') }, > > See above. > > Rest is probably OK. Does the g729 decoder work? Diego removed it some time ago for being non-functional. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Synchronize various 4CCs and codec tags from FFmpeg.
Hi, On Fri, Sep 30, 2011 at 6:29 PM, Diego Biurrun wrote: > @@ -210,6 +210,9 @@ enum CodecID { > CODEC_ID_DFA, > CODEC_ID_WMV3IMAGE, > CODEC_ID_VC1IMAGE, > + CODEC_ID_G2M, No, these are various codecs and we don't want to remix crap files. > + Cosmetics. > + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '2') }, > + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '3') }, > + { CODEC_ID_G2M, MKTAG('G', '2', 'M', '4') }, See above. Rest is probably OK. Does the g729 decoder work? Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Synchronize various 4CCs and codec tags from FFmpeg.
--- libavcodec/avcodec.h |3 +++ libavcodec/raw.c |4 +++- libavformat/isom.c |5 + libavformat/riff.c | 10 ++ 4 files changed, 21 insertions(+), 1 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 4d61f44..f985d35 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -210,6 +210,9 @@ enum CodecID { CODEC_ID_DFA, CODEC_ID_WMV3IMAGE, CODEC_ID_VC1IMAGE, +CODEC_ID_G2M, +CODEC_ID_G729, + /* various PCM "codecs" */ CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/raw.c b/libavcodec/raw.c index aa1ea30..cdd2175 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -36,6 +36,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { PIX_FMT_YUV411P, MKTAG('Y', '4', '1', 'B') }, { PIX_FMT_YUV422P, MKTAG('Y', '4', '2', 'B') }, { PIX_FMT_YUV422P, MKTAG('P', '4', '2', '2') }, +{ PIX_FMT_YUV422P, MKTAG('Y', 'V', '1', '6') }, /* yuvjXXX formats are deprecated hacks specific to libav*, they are identical to yuvXXX */ { PIX_FMT_YUVJ420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ @@ -44,7 +45,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { PIX_FMT_YUVJ422P, MKTAG('Y', '4', '2', 'B') }, { PIX_FMT_YUVJ422P, MKTAG('P', '4', '2', '2') }, { PIX_FMT_GRAY8,MKTAG('Y', '8', '0', '0') }, -{ PIX_FMT_GRAY8,MKTAG(' ', ' ', 'Y', '8') }, +{ PIX_FMT_GRAY8,MKTAG('Y', '8', ' ', ' ') }, { PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */ { PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') }, @@ -135,6 +136,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { /* special */ { PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ +{ PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ { PIX_FMT_NONE, 0 }, }; diff --git a/libavformat/isom.c b/libavformat/isom.c index 896730c..d7c0af1 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -204,6 +204,8 @@ const AVCodecTag codec_movvideo_tags[] = { { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') }, { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */ +{ CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */ +{ CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */ { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */ { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') }, { CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */ @@ -259,6 +261,7 @@ const AVCodecTag codec_movaudio_tags[] = { { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */ { CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') }, +{ CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */ { CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') }, /* Apple Lossless */ { CODEC_ID_QCELP, MKTAG('Q','c','l','p') }, @@ -271,6 +274,8 @@ const AVCodecTag codec_movaudio_tags[] = { { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') }, { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') }, +{ CODEC_ID_SPEEX, MKTAG('s','p','e','x') }, /* Flash Media Server */ + { CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') }, { CODEC_ID_NONE, 0 }, diff --git a/libavformat/riff.c b/libavformat/riff.c index 4b81eb3..2847443 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -87,6 +87,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_MPEG4,MKTAG('G', 'E', 'O', 'V') }, { CODEC_ID_MPEG4,MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */ { CODEC_ID_MPEG4,MKTAG('X', 'V', 'I', 'X') }, +{ CODEC_ID_MPEG4,MKTAG('D', 'r', 'e', 'X') }, { CODEC_ID_MSMPEG4V3,MKTAG('M', 'P', '4', '3') }, { CODEC_ID_MSMPEG4V3,MKTAG('D', 'I', 'V', '3') }, { CODEC_ID_MSMPEG4V3,MKTAG('M', 'P', 'G', '3') }, @@ -173,10 +174,13 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, { CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') }, +{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') }, +{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') }, { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') }, +{ CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') }, { CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') }, { CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */ @@ -254,6 +258,8 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') }, { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, { COD
[libav-devel] [PATCH 2/2] libvpxenc: use libvpx's own defaults for some parameters
From: Luca Barbato Specifically, qmin/qmax, gop_size and keyint_min. Fixes bug 47. --- libavcodec/libvpxenc.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 1ff997e..524c53d 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -249,9 +249,10 @@ static av_cold int vp8_init(AVCodecContext *avctx) enccfg.rc_end_usage = VPX_CBR; enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000, AV_ROUND_NEAR_INF); - -enccfg.rc_min_quantizer = avctx->qmin; -enccfg.rc_max_quantizer = avctx->qmax; +if (avctx->qmin > 0) +enccfg.rc_min_quantizer = avctx->qmin; +if (avctx->qmax > 0) +enccfg.rc_max_quantizer = avctx->qmax; enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold; //0-100 (0 => CBR, 100 => VBR) @@ -271,9 +272,10 @@ static av_cold int vp8_init(AVCodecContext *avctx) enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6; //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO -if (avctx->keyint_min == avctx->gop_size) +if (avctx->keyint_min >= 0 && avctx->keyint_min == avctx->gop_size) enccfg.kf_min_dist = avctx->keyint_min; -enccfg.kf_max_dist = avctx->gop_size; +if (avctx->gop_size >= 0) +enccfg.kf_max_dist = avctx->gop_size; if (enccfg.g_pass == VPX_RC_FIRST_PASS) enccfg.g_lag_in_frames = 0; @@ -552,6 +554,14 @@ static const AVClass class = { .version= LIBAVUTIL_VERSION_INT, }; +static const AVCodecDefault defaults[] = { +{ "qmin", "-1" }, +{ "qmax", "-1" }, +{ "g","-1" }, +{ "keyint_min", "-1" }, +{ NULL }, +}; + AVCodec ff_libvpx_encoder = { .name = "libvpx", .type = AVMEDIA_TYPE_VIDEO, @@ -564,4 +574,5 @@ AVCodec ff_libvpx_encoder = { .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), .priv_class = &class, +.defaults = defaults, }; -- 1.7.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] vpxenc: add private options
From: Luca Barbato Make libvpx support close to the libx264 one. Thanks to Jan Gerber for the support. Signed-off-by: Anton Khirnov --- libavcodec/libvpxenc.c | 63 +-- 1 files changed, 60 insertions(+), 3 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 8da5974..1ff997e 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -29,8 +29,10 @@ #include #include "avcodec.h" +#include "internal.h" #include "libavutil/base64.h" #include "libavutil/mathematics.h" +#include "libavutil/opt.h" /** * Portion of struct vpx_codec_cx_pkt from vpx_encoder.h. @@ -48,11 +50,19 @@ struct FrameListData { }; typedef struct VP8EncoderContext { +AVClass *class; struct vpx_codec_ctx encoder; struct vpx_image rawimg; struct vpx_fixed_buf twopass_stats; unsigned long deadline; //i.e., RT/GOOD/BEST struct FrameListData *coded_frame_list; +int cpu_used; +int auto_alt_ref; +int arnr_max_frames; +int arnr_strength; +int arnr_type; +int lag_in_frames; +int error_resilient; } VP8Context; /** String mappings for enum vp8e_enc_control_id */ @@ -205,7 +215,6 @@ static av_cold int vp8_init(AVCodecContext *avctx) { VP8Context *ctx = avctx->priv_data; const struct vpx_codec_iface *iface = &vpx_codec_vp8_cx_algo; -int cpuused = 3; struct vpx_codec_enc_cfg enccfg; int res; @@ -225,6 +234,9 @@ static av_cold int vp8_init(AVCodecContext *avctx) enccfg.g_timebase.den = avctx->time_base.den; enccfg.g_threads = avctx->thread_count; +if (ctx->lag_in_frames >= 0) +enccfg.g_lag_in_frames = ctx->lag_in_frames; + if (avctx->flags & CODEC_FLAG_PASS1) enccfg.g_pass = VPX_RC_FIRST_PASS; else if (avctx->flags & CODEC_FLAG_PASS2) @@ -292,13 +304,14 @@ static av_cold int vp8_init(AVCodecContext *avctx) enccfg.rc_twopass_stats_in = ctx->twopass_stats; } -ctx->deadline = VPX_DL_GOOD_QUALITY; /* 0-3: For non-zero values the encoder increasingly optimizes for reduced complexity playback on low powered devices at the expense of encode quality. */ if (avctx->profile != FF_PROFILE_UNKNOWN) enccfg.g_profile = avctx->profile; +enccfg.g_error_resilient = ctx->error_resilient; + dump_enc_cfg(avctx, &enccfg); /* Construct Encoder Context */ res = vpx_codec_enc_init(&ctx->encoder, iface, &enccfg, 0); @@ -309,7 +322,16 @@ static av_cold int vp8_init(AVCodecContext *avctx) //codec control failures are currently treated only as warnings av_log(avctx, AV_LOG_DEBUG, "vpx_codec_control\n"); -codecctl_int(avctx, VP8E_SET_CPUUSED, cpuused); +if (ctx->cpu_used != INT_MIN) +codecctl_int(avctx, VP8E_SET_CPUUSED, ctx->cpu_used); +if (ctx->auto_alt_ref >= 0) +codecctl_int(avctx, VP8E_SET_ENABLEAUTOALTREF, ctx->auto_alt_ref); +if (ctx->arnr_max_frames >= 0) +codecctl_int(avctx, VP8E_SET_ARNR_MAXFRAMES, ctx->arnr_max_frames); +if (ctx->arnr_strength >= 0) +codecctl_int(avctx, VP8E_SET_ARNR_STRENGTH,ctx->arnr_strength); +if (ctx->arnr_type >= 0) +codecctl_int(avctx, VP8E_SET_ARNR_TYPE,ctx->arnr_type); codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction); codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices)); codecctl_int(avctx, VP8E_SET_STATIC_THRESHOLD, avctx->mb_threshold); @@ -496,6 +518,40 @@ static int vp8_encode(AVCodecContext *avctx, uint8_t *buf, int buf_size, return coded_size; } +#define OFFSET(x) offsetof(VP8Context, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { +{ "cpu-used","Quality/Speed ratio modifier", OFFSET(cpu_used),FF_OPT_TYPE_INT, {INT_MIN}, INT_MIN, INT_MAX, VE}, +{ "auto-alt-ref","Enable use of alternate reference " + "frames (2-pass only)", OFFSET(auto_alt_ref),FF_OPT_TYPE_INT, {-1}, -1, 1, VE}, +{ "lag-in-frames", "Number of frames to look ahead for " + "alternate reference frame selection", OFFSET(lag_in_frames), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, +{ "arnr-maxframes", "altref noise reduction max frame count", OFFSET(arnr_max_frames), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, +{ "arnr-strength", "altref noise reduction filter strength", OFFSET(arnr_strength), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, +{ "arnr-type", "altref noise reduction filter type", OFFSET(arnr_type), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE, "arnr_type"}, +{ "backward",NULL, 0, FF_OPT_TYPE_CONST, {1}, 0, 0, VE, "arnr_type" }, +{ "forward", NULL, 0, FF_OPT_TYPE_CONST, {2}, 0, 0, VE, "arnr_type" }, +{ "centere
[libav-devel] [PATCH] lavc: add video/audio/encoding flags to global_quality option
--- libavcodec/options.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index ef711bf..0bcdf2a 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -320,7 +320,7 @@ static const AVOption options[]={ {"pbias", "inter quant bias", OFFSET(inter_quant_bias), FF_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E}, {"color_table_id", NULL, OFFSET(color_table_id), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, {"internal_buffer_count", NULL, OFFSET(internal_buffer_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"global_quality", NULL, OFFSET(global_quality), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"global_quality", NULL, OFFSET(global_quality), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, {"coder", NULL, OFFSET(coder_type), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"}, {"vlc", "variable length coder / huffman coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"}, {"ac", "arithmetic coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"}, -- 1.7.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 12/15] dpcm: use sol_table_16 directly instead of through the DPCMContext.
On 09/22/2011 02:42 PM, Justin Ruggles wrote: > --- > libavcodec/dpcm.c |5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c > index d2a291b..b38c6aa 100644 > --- a/libavcodec/dpcm.c > +++ b/libavcodec/dpcm.c > @@ -146,7 +146,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) > s->sample[0] = s->sample[1] = 0x80; > break; > case 3: > -s->sol_table = sol_table_16; > break; > default: > av_log(avctx, AV_LOG_ERROR, "Unknown SOL subcodec\n"); > @@ -297,8 +296,8 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void > *data, int *data_size, > } else { > while (buf < buf_end) { > uint8_t n = *buf++; > -if (n & 0x80) s->sample[ch] -= s->sol_table[n & 0x7F]; > -else s->sample[ch] += s->sol_table[n & 0x7F]; > +if (n & 0x80) s->sample[ch] -= sol_table_16[n & 0x7F]; > +else s->sample[ch] += sol_table_16[n & 0x7F]; > s->sample[ch] = av_clip_int16(s->sample[ch]); > *output_samples++ = s->sample[ch]; > /* toggle channel */ ping. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 11/15] dpcm: replace short with int16_t
On 09/22/2011 02:42 PM, Justin Ruggles wrote: > --- > libavcodec/dpcm.c |7 +++ > 1 files changed, 3 insertions(+), 4 deletions(-) ping. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 10/15] dpcm: check to make sure channels is 1 or 2.
On 09/22/2011 02:42 PM, Justin Ruggles wrote: > --- > libavcodec/dpcm.c |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c > index c1cd501..539d4c0 100644 > --- a/libavcodec/dpcm.c > +++ b/libavcodec/dpcm.c > @@ -117,6 +117,11 @@ static av_cold int dpcm_decode_init(AVCodecContext > *avctx) > int i; > short square; > > +if (avctx->channels < 1 || avctx->channels > 2) { > +av_log(avctx, AV_LOG_INFO, "invalid number of channels\n"); > +return AVERROR(EINVAL); > +} > + > s->channels = avctx->channels; > s->sample[0] = s->sample[1] = 0; > ping. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 07/15] dpcm: remove unnecessary variable by using bytestream functions.
On 09/22/2011 02:42 PM, Justin Ruggles wrote: > Uses 'buf' directly instead of a separate iterator variable 'in'. > --- > libavcodec/dpcm.c | 66 ++-- > 1 files changed, 28 insertions(+), 38 deletions(-) ping. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 04/15] dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2.
On 09/24/2011 11:09 AM, Justin Ruggles wrote: > On 09/24/2011 01:51 AM, Luca Barbato wrote: > >> On 9/22/11 8:42 PM, Justin Ruggles wrote: >> >> Sorry to ask, but could you explain why the change in the commit message? > > > How about: > > dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2. > > Uses the native sample format for the codec instead of left-shifting all > samples by 8. ping. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions
Hi, On Fri, Sep 30, 2011 at 2:57 PM, Kieran Kunhya wrote: > Patch updated Thanks, LGTM. I'll do the simd. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions
Patch updated 0001-Split-out-yuv2yuv1-luma-and-chroma-in-order-to-make-.patch Description: Binary data ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On 9/30/11 2:11 PM, Tomas Härdin wrote: On Fri, 2011-09-30 at 13:44 +0200, Luca Barbato wrote: On 9/30/11 10:59 AM, Benjamin Larsson wrote: At work we added an "int interlacing;" field to AVCodecContext. It's only set by a few decoders though (no demuxer sets it), and doesn't provide field order information. To support field order, "interlacing" could have the value of 0/1/2 (progressive, TFF, BFF) or a separate field could be used (like AVFrame does). Do those sound like decent ideas? Splendid idea :) Ok, Tomas would you like to send a patch about that? I'll be out of town laptop-less this weekend, about an hour from now. You can either wait until monday or maybe Benjamin feels like poking at this? No rush at all from my side =) lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] XOP/FMA4 CPU detection support
On Tue, Sep 27, 2011 at 01:57:32PM +0200, Diego Biurrun wrote: > On Tue, Sep 27, 2011 at 11:13:06AM +0200, Reinhard Tartler wrote: > > On Di, Sep 27, 2011 at 00:52:26 (CEST), Diego Biurrun wrote: > > > > > On Mon, Sep 26, 2011 at 03:30:51PM -0700, Jason Garrett-Glaser wrote: > > >> On Mon, Sep 26, 2011 at 3:27 PM, Diego Biurrun wrote: > > >> > On Mon, Sep 26, 2011 at 03:10:24PM -0700, Jason Garrett-Glaser wrote: > > >> >> > > >> >> --- a/libavutil/avutil.h > > >> >> +++ b/libavutil/avutil.h > > >> >> @@ -40,7 +40,7 @@ > > >> >> > > >> >> #define LIBAVUTIL_VERSION_MAJOR 51 > > >> >> -#define LIBAVUTIL_VERSION_MINOR 10 > > >> >> +#define LIBAVUTIL_VERSION_MINOR 11 > > >> >> #define LIBAVUTIL_VERSION_MICRO 2 > > >> > > > >> > Reset micro if you bump minor. > > >> > > >> Done and done and pushed. > > > > > > Please mark patches as committed in patchwork if you change them before > > > pushing, patchwork does not pick up changed patches on its own. > > > > This should be fixed in patchwork then. I've talked to the author at > > LPC, and it seems they are considering heuristics to mark patches as > > 'related' automatically. I imagine if implemented right, this would save > > us a lot of work! > > Until then we will have to keep doing it ourselves and come on, it's not > *that* much work ... I'm looking at patchwork now and quite clearly few people if anybody try to keep it updated. This is a shame since it is of little use if cluttered with tons of superseded and applied patches. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On Fri, 2011-09-30 at 13:44 +0200, Luca Barbato wrote: > On 9/30/11 10:59 AM, Benjamin Larsson wrote: > > > >> > >> At work we added an "int interlacing;" field to AVCodecContext. It's > >> only set by a few decoders though (no demuxer sets it), and doesn't > >> provide field order information. > >> To support field order, "interlacing" could have the value of 0/1/2 > >> (progressive, TFF, BFF) or a separate field could be used (like AVFrame > >> does). Do those sound like decent ideas? > >> > > > > Splendid idea :) > > Ok, Tomas would you like to send a patch about that? I'll be out of town laptop-less this weekend, about an hour from now. You can either wait until monday or maybe Benjamin feels like poking at this? /Tomas ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] rtpenc.c: add a payload type private option
On Fri, 30 Sep 2011, Luca Barbato wrote: On 9/26/11 5:56 PM, Rafaël Carré wrote: From: Rafaël Carré Specifying the payload type is useful when the type number has already been negotiated before creating the stream, for example in SIP protocol. --- libavformat/rtp.c| 11 ++- libavformat/rtp.h|6 -- libavformat/rtpenc.c |4 +++- libavformat/sdp.c|2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libavformat/rtp.c b/libavformat/rtp.c index 35edb50..7b6639d 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "avformat.h" #include "rtp.h" @@ -89,9 +90,17 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) return -1; } -int ff_rtp_get_payload_type(AVCodecContext *codec) +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) { int i, payload_type; +AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; + +/* Was the payload type already specified for the RTP muxer ? */ +if (ofmt&& ofmt->priv_class) +payload_type = av_get_int(fmt->priv_data, "payload_type", NULL); + +if (payload_type>= 0) +return payload_type; what happens if ofmt->priv_class == NULL? and I'm not sure about using fmt->priv_data... These are applied already. If priv_class is null, you won't find any private options, and the normal rules apply. The point in using priv_data is that we're using private avoptions, and this is the opaque way of reading AVOptions from outside. That is, we don't care what kind of AVFormatContext this is, but _if_ it happens to be an AVFormatContext that happens to have private options, and _if_ those private options happen to include an option "payload_type", that option is read and used. If not, the normal rules apply. // Martin___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] rtpenc.c: add a payload type private option
On 9/26/11 5:56 PM, Rafaël Carré wrote: From: Rafaël Carré Specifying the payload type is useful when the type number has already been negotiated before creating the stream, for example in SIP protocol. --- libavformat/rtp.c| 11 ++- libavformat/rtp.h|6 -- libavformat/rtpenc.c |4 +++- libavformat/sdp.c|2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libavformat/rtp.c b/libavformat/rtp.c index 35edb50..7b6639d 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "avformat.h" #include "rtp.h" @@ -89,9 +90,17 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) return -1; } -int ff_rtp_get_payload_type(AVCodecContext *codec) +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) { int i, payload_type; +AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; + +/* Was the payload type already specified for the RTP muxer ? */ +if (ofmt&& ofmt->priv_class) +payload_type = av_get_int(fmt->priv_data, "payload_type", NULL); + +if (payload_type>= 0) +return payload_type; what happens if ofmt->priv_class == NULL? and I'm not sure about using fmt->priv_data... 2 and 3 might be squashed together. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] rtp.h: Correct ff_rtp_get_payload_type() documentation
On 9/26/11 5:56 PM, Rafaël Carré wrote: From: Rafaël Carré Since [0c378ea1f], it can't fail anymore Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On 9/30/11 10:59 AM, Benjamin Larsson wrote: At work we added an "int interlacing;" field to AVCodecContext. It's only set by a few decoders though (no demuxer sets it), and doesn't provide field order information. To support field order, "interlacing" could have the value of 0/1/2 (progressive, TFF, BFF) or a separate field could be used (like AVFrame does). Do those sound like decent ideas? Splendid idea :) Ok, Tomas would you like to send a patch about that? lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] dxva2_h264: pass the correct 8x8 scaling lists
On 9/25/11 12:26 PM, Janne Grunau wrote: From: Carl Eugen Hoyos Copy the Inter 8x8 scaling list as second 8x8 matrix into DXVA2's quantization matrix data structure instead of a potentially unset Intra chroma scaling matrix. Fix dxva2 decoding for some H264 samples. I assume it works, could you just please use i instead of j? it would feel more consistent. Signed-off-by: Janne Grunau --- libavcodec/dxva2_h264.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 090bce6..5d9fa15 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -162,17 +162,19 @@ static void fill_scaling_lists(struct dxva_context *ctx, const H264Context *h, D for (j = 0; j< 16; j++) qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j]; -for (i = 0; i< 2; i++) -for (j = 0; j< 64; j++) -qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][j]; +for (j = 0; j< 64; j++) { +qm->bScalingLists8x8[0][j] = h->pps.scaling_matrix8[0][j]; +qm->bScalingLists8x8[1][j] = h->pps.scaling_matrix8[3][j]; +} } else { for (i = 0; i< 6; i++) for (j = 0; j< 16; j++) qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]]; -for (i = 0; i< 2; i++) -for (j = 0; j< 64; j++) -qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][ff_zigzag_direct[j]]; +for (j = 0; j< 64; j++) { +qm->bScalingLists8x8[0][j] = h->pps.scaling_matrix8[0][ff_zigzag_direct[j]]; +qm->bScalingLists8x8[1][j] = h->pps.scaling_matrix8[3][ff_zigzag_direct[j]]; +} } } ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] dpcm: factor out the stereo flag calculation
On 9/26/11 9:45 PM, Justin Ruggles wrote: --- libavcodec/dpcm.c | 29 +++-- 1 files changed, 15 insertions(+), 14 deletions(-) Ok I guess. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 15/15] dpcm: return error if packet is too small
On 9/22/11 8:42 PM, Justin Ruggles wrote: --- libavcodec/dpcm.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) Ok ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] prores: add FATE tests
--- I have remuxed the test samples to only contain one frame and no audio stream, so this should be good to go once the changes propagate through the FATE suite. I could wait with pushing this until the decoder is fixed and the values are more meaningful, but I'm not sure this is really more convenient than updating the values along with the decoder fixes. tests/Makefile |1 + tests/fate/prores.mak | 15 +++ tests/ref/fate/prores-422 |2 ++ tests/ref/fate/prores-422_hq|2 ++ tests/ref/fate/prores-422_lt|2 ++ tests/ref/fate/prores-422_proxy |2 ++ tests/ref/fate/prores-alpha |2 ++ 7 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 tests/fate/prores.mak create mode 100644 tests/ref/fate/prores-422 create mode 100644 tests/ref/fate/prores-422_hq create mode 100644 tests/ref/fate/prores-422_lt create mode 100644 tests/ref/fate/prores-422_proxy create mode 100644 tests/ref/fate/prores-alpha diff --git a/tests/Makefile b/tests/Makefile index c0afffd..1ec9dc3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -31,6 +31,7 @@ include $(SRC_PATH)/tests/fate/fft.mak include $(SRC_PATH)/tests/fate/h264.mak include $(SRC_PATH)/tests/fate/libavutil.mak include $(SRC_PATH)/tests/fate/mp3.mak +include $(SRC_PATH)/tests/fate/prores.mak include $(SRC_PATH)/tests/fate/vorbis.mak include $(SRC_PATH)/tests/fate/vp8.mak diff --git a/tests/fate/prores.mak b/tests/fate/prores.mak new file mode 100644 index 000..7be756d --- /dev/null +++ b/tests/fate/prores.mak @@ -0,0 +1,15 @@ +FATE_PRORES = fate-prores-422 \ + fate-prores-422_hq\ + fate-prores-422_lt\ + fate-prores-422_proxy \ + fate-prores-alpha \ + +FATE_TESTS += $(FATE_PRORES) +fate-prores: $(FATE_PRORES) + +fate-prores-422: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov +fate-prores-422_hq:CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov +fate-prores-422_lt:CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov +fate-prores-422_proxy: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov +fate-prores-alpha: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov + diff --git a/tests/ref/fate/prores-422 b/tests/ref/fate/prores-422 new file mode 100644 index 000..ac6ff3c --- /dev/null +++ b/tests/ref/fate/prores-422 @@ -0,0 +1,2 @@ +0, 0, 8294400, 0xba2871d6 +0, 3003, 8294400, 0xba2871d6 diff --git a/tests/ref/fate/prores-422_hq b/tests/ref/fate/prores-422_hq new file mode 100644 index 000..8172050 --- /dev/null +++ b/tests/ref/fate/prores-422_hq @@ -0,0 +1,2 @@ +0, 0, 8294400, 0xf4b179c8 +0, 3003, 8294400, 0xf4b179c8 diff --git a/tests/ref/fate/prores-422_lt b/tests/ref/fate/prores-422_lt new file mode 100644 index 000..9d30b25 --- /dev/null +++ b/tests/ref/fate/prores-422_lt @@ -0,0 +1,2 @@ +0, 0, 8294400, 0xf02986c0 +0, 3003, 8294400, 0xf02986c0 diff --git a/tests/ref/fate/prores-422_proxy b/tests/ref/fate/prores-422_proxy new file mode 100644 index 000..221ee4d --- /dev/null +++ b/tests/ref/fate/prores-422_proxy @@ -0,0 +1,2 @@ +0, 0, 8294400, 0x93c39fa4 +0, 3003, 8294400, 0x93c39fa4 diff --git a/tests/ref/fate/prores-alpha b/tests/ref/fate/prores-alpha new file mode 100644 index 000..2943de7 --- /dev/null +++ b/tests/ref/fate/prores-alpha @@ -0,0 +1,2 @@ +0, 0, 8294400, 0x752150d3 +0, 3003, 8294400, 0xcca6a779 -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Added ability to enable workaround for dxva2 decoding using older ATI cards
On Fri, Sep 30, 2011 at 11:20:18AM +0200, Janne Grunau wrote: > On Sun, Sep 25, 2011 at 12:26:45PM +0200, Janne Grunau wrote: > > From: Joakim Plate > > > > The workaround need to be enabled per pci id which can not > > be detected inside ffmpeg. So this adds a flag that enabled > > the alternate behavior. > > --- > > libavcodec/dxva2.h |2 ++ > > libavcodec/dxva2_h264.c | 31 ++- > > 2 files changed, 24 insertions(+), 9 deletions(-) > > ping EWRONGPATCH, ping was intended for the Patch 2/2 Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Added ability to enable workaround for dxva2 decoding using older ATI cards
On Mon, Sep 26, 2011 at 11:01:34AM +0200, Diego Biurrun wrote: > On Sun, Sep 25, 2011 at 12:26:45PM +0200, Janne Grunau wrote: > > From: Joakim Plate > > > > The workaround need to be enabled per pci id which can not > > be detected inside ffmpeg. So this adds a flag that enabled > > the alternate behavior. > > The log message needs some fixes: > > dxva: Add ability to enable workaround for older ATI cards. > > The workaround needs to be enabled per PCI ID which cannot be detected > inside > libavcodec. So add a flag to manually enable the alternate behavior. pushed with changed log message Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Added ability to enable workaround for dxva2 decoding using older ATI cards
On Sun, Sep 25, 2011 at 12:26:45PM +0200, Janne Grunau wrote: > From: Joakim Plate > > The workaround need to be enabled per pci id which can not > be detected inside ffmpeg. So this adds a flag that enabled > the alternate behavior. > --- > libavcodec/dxva2.h |2 ++ > libavcodec/dxva2_h264.c | 31 ++- > 2 files changed, 24 insertions(+), 9 deletions(-) ping Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
> > At work we added an "int interlacing;" field to AVCodecContext. It's > only set by a few decoders though (no demuxer sets it), and doesn't > provide field order information. > To support field order, "interlacing" could have the value of 0/1/2 > (progressive, TFF, BFF) or a separate field could be used (like AVFrame > does). Do those sound like decent ideas? > Splendid idea :) MvH Benjamin Larsson ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On Fri, 2011-09-30 at 01:15 -0700, Alex Converse wrote: > On Fri, Sep 30, 2011 at 12:19 AM, Tomas Härdin > wrote: > > On Thu, 2011-09-29 at 13:44 -0700, Alex Converse wrote: > >> This should result in more idiomatic output that is less confusing to > >> marginal implementations. > >> --- > >> libavformat/movenc.c | 16 ++-- > >> 1 files changed, 14 insertions(+), 2 deletions(-) > >> > >> diff --git a/libavformat/movenc.c b/libavformat/movenc.c > >> index b79bbe8..066dae0 100644 > >> --- a/libavformat/movenc.c > >> +++ b/libavformat/movenc.c > >> @@ -381,6 +381,18 @@ static int mov_write_glbl_tag(AVIOContext *pb, > >> MOVTrack *track) > >> return 8+track->vosLen; > >> } > >> > >> +static int mov_write_extradata(AVIOContext *pb, MOVTrack *track) > >> +{ > >> +if (track->vosLen >= 8 && > >> +AV_RB32(track->vosData+4) == MKBETAG('f','i','e','l')) { > > > > Check codec_id == CODEC_ID_MJPEG instead? See commit e571305 to mov.c in > > FFmpeg ("mov: Only touch extradata in mov_read_extradata() if codec_id > > is what we expect"). > > I haven't gotten around to rebasing and posting that here yet since I'm > > still bouncing ideas for mov/mxfdec off Baptiste. > > > > The more I think about the more the logical conclusion seems to be > that 'fiel' data shouldn't be treated as extradata at all but instead > should be decoded into the avcodec context. At work we added an "int interlacing;" field to AVCodecContext. It's only set by a few decoders though (no demuxer sets it), and doesn't provide field order information. To support field order, "interlacing" could have the value of 0/1/2 (progressive, TFF, BFF) or a separate field could be used (like AVFrame does). Do those sound like decent ideas? > It really doesn't make > sense to dump a raw fiel atom into another container when remuxing > mjpeg (or prores), not to mention it conflicts with AVC Intra and > other interlaced formats that also have extradata. There's also the fact that FCP requires the fiel atom in a variety of cases, including AVC-Intra and XDCAM. /Tomas ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On Fri, Sep 30, 2011 at 12:19 AM, Tomas Härdin wrote: > On Thu, 2011-09-29 at 13:44 -0700, Alex Converse wrote: >> This should result in more idiomatic output that is less confusing to >> marginal implementations. >> --- >> libavformat/movenc.c | 16 ++-- >> 1 files changed, 14 insertions(+), 2 deletions(-) >> >> diff --git a/libavformat/movenc.c b/libavformat/movenc.c >> index b79bbe8..066dae0 100644 >> --- a/libavformat/movenc.c >> +++ b/libavformat/movenc.c >> @@ -381,6 +381,18 @@ static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack >> *track) >> return 8+track->vosLen; >> } >> >> +static int mov_write_extradata(AVIOContext *pb, MOVTrack *track) >> +{ >> + if (track->vosLen >= 8 && >> + AV_RB32(track->vosData+4) == MKBETAG('f','i','e','l')) { > > Check codec_id == CODEC_ID_MJPEG instead? See commit e571305 to mov.c in > FFmpeg ("mov: Only touch extradata in mov_read_extradata() if codec_id > is what we expect"). > I haven't gotten around to rebasing and posting that here yet since I'm > still bouncing ideas for mov/mxfdec off Baptiste. > The more I think about the more the logical conclusion seems to be that 'fiel' data shouldn't be treated as extradata at all but instead should be decoded into the avcodec context. It really doesn't make sense to dump a raw fiel atom into another container when remuxing mjpeg (or prores), not to mention it conflicts with AVC Intra and other interlaced formats that also have extradata. --Alex ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] movenc: Don't wrap whole extradata atoms in glbl.
On Thu, 2011-09-29 at 13:44 -0700, Alex Converse wrote: > This should result in more idiomatic output that is less confusing to > marginal implementations. > --- > libavformat/movenc.c | 16 ++-- > 1 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index b79bbe8..066dae0 100644 > --- a/libavformat/movenc.c > +++ b/libavformat/movenc.c > @@ -381,6 +381,18 @@ static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack > *track) > return 8+track->vosLen; > } > > +static int mov_write_extradata(AVIOContext *pb, MOVTrack *track) > +{ > +if (track->vosLen >= 8 && > +AV_RB32(track->vosData+4) == MKBETAG('f','i','e','l')) { Check codec_id == CODEC_ID_MJPEG instead? See commit e571305 to mov.c in FFmpeg ("mov: Only touch extradata in mov_read_extradata() if codec_id is what we expect"). I haven't gotten around to rebasing and posting that here yet since I'm still bouncing ideas for mov/mxfdec off Baptiste. /Tomas ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH v2] dca: NEON optimised high freq VQ decoding
On Fri, Sep 30, 2011 at 08:22:05AM +0200, Luca Barbato wrote: > On 9/29/11 11:21 PM, Mans Rullgard wrote: > >Signed-off-by: Mans Rullgard > >--- > >Slightly improved the neon function using a fixed-point to float > >conversion instruction instead of letting gcc mess up the /16. > > > >Fixed indentation Diego complained about by using a temp variable > >to shorten the line. This is also more readable. > >--- > > Looks fine to me. to me too ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel