Re: [libav-devel] [PATCH 2/3] h264: clear picture copies when unreferencing them

2012-12-17 Thread Janne Grunau
On 2012-12-17 18:27:17 -0800, Ronald S. Bultje wrote: > Hi, > > On Dec 17, 2012 1:41 PM, "Janne Grunau" wrote: > > > > Copy a neighbouring frame/field from the list as error resilience > > measure since the decoder assumes frame data pointers of known reference > > to be valid. > > > > Prevents s

Re: [libav-devel] [PATCH 13/15] h264: break after error if enough NALs were seen in decode_nal_units

2012-12-17 Thread Janne Grunau
On 2012-12-17 18:35:09 -0800, Ronald S. Bultje wrote: > Hi, > > On Dec 12, 2012 12:31 PM, "Janne Grunau" wrote: > > > > --- > > libavcodec/h264.c | 15 +++ > > 1 file changed, 7 insertions(+), 8 deletions(-) > > > > diff --git a/libavcodec/h264.c b/libavcodec/h264.c > > index 8847f1f

Re: [libav-devel] [PATCH 1/1] h264: increase dist_scale_factor for up to 32 references

2012-12-17 Thread Janne Grunau
On 2012-12-17 18:24:37 -0800, Ronald S. Bultje wrote: > Hi, > On Dec 17, 2012 1:02 PM, "Janne Grunau" wrote: > > > > Compute dist_scale_factor_field only for MBAFF since that is the only > > case in which it is used. > > The patch also increases an array size - why? to handle up to 32 references

[libav-devel] [rfc] avhash

2012-12-17 Thread Luca Barbato
Here the rough draft, I'm not sure if is worthy adding avoptions or not at this stage. In general the common set of options are seed and digest_length so I'm keeping them separated. Another open question is if it is worthy making init idempotent (so you can issue as many times you want and it wil

Re: [libav-devel] [PATCH] mkv: add support for the VP9 tag

2012-12-17 Thread Luca Barbato
On 12/16/12 2:09 AM, Luca Barbato wrote: From: Tom Finegan +AV_CODEC_ID_VP9, Ping ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 13/15] h264: break after error if enough NALs were seen in decode_nal_units

2012-12-17 Thread Ronald S. Bultje
Hi, On Dec 12, 2012 12:31 PM, "Janne Grunau" wrote: > > --- > libavcodec/h264.c | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/h264.c b/libavcodec/h264.c > index 8847f1f..35cc800 100644 > --- a/libavcodec/h264.c > +++ b/libavcodec/h264.c > @@

Re: [libav-devel] [PATCH 3/3] h264: prevent decoding of slice NALs in extradata

2012-12-17 Thread Ronald S. Bultje
Hi, On Dec 17, 2012 1:41 PM, "Janne Grunau" wrote: > > It is not posible to call get_buffer during frame-mt codec > initialization. Libavformat might pass huge amounts of data as > extradata after parsing broken files. The 'extradata' for the fuzzed > sample sample_varPAR_s5374_r001-02.avi is 2.8

Re: [libav-devel] [PATCH 2/3] h264: clear picture copies when unreferencing them

2012-12-17 Thread Ronald S. Bultje
Hi, On Dec 17, 2012 1:41 PM, "Janne Grunau" wrote: > > Copy a neighbouring frame/field from the list as error resilience > measure since the decoder assumes frame data pointers of known reference > to be valid. > > Prevents stale references in ref_list in the fuzzed sample > bipbop234.ts_s20118 c

Re: [libav-devel] [PATCH 1/1] h264: increase dist_scale_factor for up to 32 references

2012-12-17 Thread Ronald S. Bultje
Hi, On Dec 17, 2012 1:02 PM, "Janne Grunau" wrote: > > Compute dist_scale_factor_field only for MBAFF since that is the only > case in which it is used. The patch also increases an array size - why? Ronald ___ libav-devel mailing list libav-devel@libav

Re: [libav-devel] [PATCH 1/3] h264: detect and correct invalid short ref state in remove_short

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:41 PM, Janne Grunau wrote: > Fixes NULL pointer dereferene in bipbop234.ts_s20131. Typo^^^ > --- > libavcodec/h264_refs.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c > index 755f115..0b88

Re: [libav-devel] [PATCH 1/1] h264: use mbaff ref indices in fill_colmap() only for mbaff references

2012-12-17 Thread Luca Barbato
On 12/17/2012 09:59 PM, Janne Grunau wrote: > From: Michael Niedermayer > > Prevents writing beyond array bounds. > > +map[list][2 * old_ref + (rfield^field) + 16] = > cur_ref; Looks ok, not sure fi (rfield ^ field) would look better though. lu ___

Re: [libav-devel] [PATCH 6/6] avconv: pass the actually selected decoder to filter_codec_opts().

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > --- > avconv_opt.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 5/6] avconv: use new options parser.

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > --- > avconv.c | 19 +++-- > avconv.h |4 ++ > avconv_opt.c | 134 > ++ > 3 files changed, 116 insertions(+), 41 deletions(-) > Seems ok, maybe a shortcut for o->g-> could b

Re: [libav-devel] [PATCH 4/6] cmdutils: don't log an error in opt_default().

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > It results in spurious errors when using the new preparser. > --- > cmdutils.c |1 - > 1 file changed, 1 deletion(-) Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailm

Re: [libav-devel] [PATCH 3/6] cmdutils: add a commandline pre-parser.

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > It splits the commandline into a more convenient internal representation > for further parsing. > > This will allow e.g. > - processing global options first independently of their location on the > commandline, eliminating ugly hacks for processing

Re: [libav-devel] [PATCH 2/6] cmdutils: split parse_option().

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > Separate the code that searches for the option to use and the code that > actually writes it. The writing code will be reused by the new options > parser. > --- > cmdutils.c | 70 > ++-- > 1 f

Re: [libav-devel] [PATCH 1/6] cmdutils: add a macro to simplify grow_array() calls.

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:52 PM, Anton Khirnov wrote: > --- > avconv_filter.c | 21 +++-- > avconv_opt.c| 21 - > cmdutils.h |3 +++ > 3 files changed, 18 insertions(+), 27 deletions(-) > Looks ok. ___ libav

Re: [libav-devel] [PATCH 1/1] ff_h264_direct_ref_list_init: fix B slice check.

2012-12-17 Thread Luca Barbato
On 12/17/2012 10:00 PM, Janne Grunau wrote: > From: Michael Niedermayer > > Fixes null pointer dereference. > Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH 5/6] avconv: use new options parser.

2012-12-17 Thread Anton Khirnov
--- avconv.c | 19 +++-- avconv.h |4 ++ avconv_opt.c | 134 ++ 3 files changed, 116 insertions(+), 41 deletions(-) diff --git a/avconv.c b/avconv.c index 444e74d..dd998ab 100644 --- a/avconv.c +++ b/avconv.c @@ -2345,22 +

[libav-devel] [PATCH 2/6] cmdutils: split parse_option().

2012-12-17 Thread Anton Khirnov
Separate the code that searches for the option to use and the code that actually writes it. The writing code will be reused by the new options parser. --- cmdutils.c | 70 ++-- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a

[libav-devel] [PATCH 6/6] avconv: pass the actually selected decoder to filter_codec_opts().

2012-12-17 Thread Anton Khirnov
--- avconv_opt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avconv_opt.c b/avconv_opt.c index 7f9e5e7..6c70175 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -448,12 +448,12 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) ist->file_in

[libav-devel] [PATCH 3/6] cmdutils: add a commandline pre-parser.

2012-12-17 Thread Anton Khirnov
It splits the commandline into a more convenient internal representation for further parsing. This will allow e.g. - processing global options first independently of their location on the commandline, eliminating ugly hacks for processing e.g. cpuflags first - better options validation and err

[libav-devel] [PATCH 1/6] cmdutils: add a macro to simplify grow_array() calls.

2012-12-17 Thread Anton Khirnov
--- avconv_filter.c | 21 +++-- avconv_opt.c| 21 - cmdutils.h |3 +++ 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/avconv_filter.c b/avconv_filter.c index e9412ab..50e1e73 100644 --- a/avconv_filter.c +++ b/avconv_filter.c @

[libav-devel] [PATCH 4/6] cmdutils: don't log an error in opt_default().

2012-12-17 Thread Anton Khirnov
It results in spurious errors when using the new preparser. --- cmdutils.c |1 - 1 file changed, 1 deletion(-) diff --git a/cmdutils.c b/cmdutils.c index f2e0651..578ddf3 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -435,7 +435,6 @@ int opt_default(void *optctx, const char *opt, const char *a

Re: [libav-devel] [PATCH 10/15] h264-mt: make slice header decoding errors fatal after size changes

2012-12-17 Thread Janne Grunau
On 2012-12-12 21:30:11 +0100, Janne Grunau wrote: > --- > libavcodec/h264.c | 10 +- > libavcodec/h264.h | 2 ++ > 2 files changed, 11 insertions(+), 1 deletion(-) This patch and Patch 12, 13 and 14 are dropped. The 3 patches set I just sent solve the issues in a cleaner and more direct

[libav-devel] [PATCH 3/3] h264: prevent decoding of slice NALs in extradata

2012-12-17 Thread Janne Grunau
It is not posible to call get_buffer during frame-mt codec initialization. Libavformat might pass huge amounts of data as extradata after parsing broken files. The 'extradata' for the fuzzed sample sample_varPAR_s5374_r001-02.avi is 2.8M large and contains multiple slices. --- libavcodec/h264.c |

[libav-devel] [PATCH 2/3] h264: clear picture copies when unreferencing them

2012-12-17 Thread Janne Grunau
Copy a neighbouring frame/field from the list as error resilience measure since the decoder assumes frame data pointers of known reference to be valid. Prevents stale references in ref_list in the fuzzed sample bipbop234.ts_s20118 caused by not refreshing the ref lists when required due to slice d

[libav-devel] [PATCH 1/3] h264: detect and correct invalid short ref state in remove_short

2012-12-17 Thread Janne Grunau
Fixes NULL pointer dereferene in bipbop234.ts_s20131. --- libavcodec/h264_refs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 755f115..0b88587 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -372,6 +372,12 @@ st

[libav-devel] [PATCH 1/1] h264: support frame parameter changes during frame-mt

2012-12-17 Thread Janne Grunau
Fixes CVE-2012-2782. --- mostly a ping, there have been some minor changes though, most noteable is the memset of the reference frame list on reinit. Janne libavcodec/h264.c | 355 +++--- libavcodec/h264.h | 2 + 2 files changed, 230 insertions(

[libav-devel] [PATCH 1/1] h264: increase dist_scale_factor for up to 32 references

2012-12-17 Thread Janne Grunau
Compute dist_scale_factor_field only for MBAFF since that is the only case in which it is used. --- I believe this the correct fix for my original hack. libavcodec/h264.h| 2 +- libavcodec/h264_direct.c | 17 ++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --gi

[libav-devel] [PATCH 1/1] ff_h264_direct_ref_list_init: fix B slice check.

2012-12-17 Thread Janne Grunau
From: Michael Niedermayer Fixes null pointer dereference. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind --- libavcodec/h264_direct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index fc429ae..6fdb637 100644 ---

[libav-devel] [PATCH 1/1] h264: use mbaff ref indices in fill_colmap() only for mbaff references

2012-12-17 Thread Janne Grunau
From: Michael Niedermayer Prevents writing beyond array bounds. Signed-off-by: Janne Grunau --- This is a correct and better fix than my original hack. libavcodec/h264_direct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_di

Re: [libav-devel] Compilation failure with OpenCV

2012-12-17 Thread Janne Grunau
On 2012-12-17 12:06:32 -0500, mashiat.sar...@gmail.com wrote: > Hi Guys > > I have compiled and installed OpenCV (to the default location, > /usr/local/lib and /usr/local/include/opencv) and trying to compile > Libav with OpenCV. I get: > > ERROR: opencv not found pkg_config reports library fi

Re: [libav-devel] [PATCH 13/15] h264: break after error if enough NALs were seen in decode_nal_units

2012-12-17 Thread Janne Grunau
On 2012-12-16 20:21:47 +0200, aviad rozenhek wrote: > does this patch also fix the issue where "decode_slice_header error" > message appear when probing a .ts file [or ts udp stream] which does not > start with an SPS/PPS ? nope, that would need a better parser interface, although my not so nice,

Re: [libav-devel] [PATCH 1/1] mpegvideo: allocate scratch buffers after linesize is known

2012-12-17 Thread Janne Grunau
On 2012-12-13 17:58:04 +0100, Janne Grunau wrote: > Since we can't know which stride a custom get_buffer() implementation is > going to use we have to allocate this scratch buffers after the linesize > is known. It was pretty safe for 8 bit per pixel pixel formats since we > always allocated memory

[libav-devel] [PATCH] lavu/dict: add av_dict_set_string()

2012-12-17 Thread Justin Ruggles
Can be used to set multiple key/value pairs from a string. --- This is similar to av_set_options_string() but can be used for cases where av_set_string3() is not appropriate, e.g. child classes. This simplifies adding a key/value pair list in a string to an AVDictionary, which could then be passed

Re: [libav-devel] [PATCH 1/1] x86inc: remove wrong assert in X86_32 PROLOGUE macro

2012-12-17 Thread Janne Grunau
On 2012-12-16 14:46:54 -0800, Ronald S. Bultje wrote: > Hi, > > On Sun, Dec 16, 2012 at 1:49 PM, Janne Grunau wrote: > > On 2012-12-16 12:36:56 -0800, Ronald S. Bultje wrote: > >> > >> On Sun, Dec 16, 2012 at 5:52 AM, Janne Grunau > >> wrote: > >> > > >> > Nasm also fails on '%1 %+ SUFFIX' with

Re: [libav-devel] [PATCH 1/2] cosmetics: Use consistent names for multiple inclusion guards.

2012-12-17 Thread Diego Biurrun
On Sun, Dec 09, 2012 at 03:01:29PM +0100, Diego Biurrun wrote: > --- > libavcodec/gsmdec_data.h|6 +++--- > libavcodec/options_table.h |6 +++--- > libavformat/options_table.h |6 +++--- > 3 files changed, 9 insertions(+), 9 deletions(-) OKed by Vladimir on IRC. Diego __

Re: [libav-devel] FATE dependencies

2012-12-17 Thread Diego Biurrun
On Mon, Dec 17, 2012 at 04:34:26PM +0100, Janne Grunau wrote: > On 2012-12-17 15:18:52 +0100, Diego Biurrun wrote: > > On Mon, Dec 17, 2012 at 12:43:35AM +0100, Janne Grunau wrote: > > > On 2012-12-16 23:45:06 +0100, Diego Biurrun wrote: > > > > > > > > There are multiple ways to handle these more

Re: [libav-devel] [PATCH] fate: Move RALF test into lossless audio group

2012-12-17 Thread Diego Biurrun
On Mon, Dec 17, 2012 at 04:38:54PM +0100, Luca Barbato wrote: > On 12/17/12 4:21 PM, Diego Biurrun wrote: > >--- > > tests/fate/lossless-audio.mak |3 +++ > > tests/fate/real.mak |3 --- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > The change doesn't break anything,

Re: [libav-devel] [PATCH] au: Reorder code so that both muxer and demuxer are under #ifdefs

2012-12-17 Thread Luca Barbato
On 12/17/12 4:22 PM, Diego Biurrun wrote: This reduces code size when either piece has been disabled. --- libavformat/au.c | 126 +++--- 1 files changed, 63 insertions(+), 63 deletions(-) Ok. ___ l

Re: [libav-devel] [PATCH] fate: Move RALF test into lossless audio group

2012-12-17 Thread Luca Barbato
On 12/17/12 4:21 PM, Diego Biurrun wrote: --- tests/fate/lossless-audio.mak |3 +++ tests/fate/real.mak |3 --- 2 files changed, 3 insertions(+), 3 deletions(-) The change doesn't break anything, go for it if makes more sense. I'm neutral on the change. lu ___

Re: [libav-devel] FATE dependencies

2012-12-17 Thread Janne Grunau
On 2012-12-17 15:18:52 +0100, Diego Biurrun wrote: > On Mon, Dec 17, 2012 at 12:43:35AM +0100, Janne Grunau wrote: > > On 2012-12-16 23:45:06 +0100, Diego Biurrun wrote: > > > > > > There are multiple ways to handle these more general components: > > > > > > - have avconv directly depend on some

[libav-devel] [PATCH] au: Reorder code so that both muxer and demuxer are under #ifdefs

2012-12-17 Thread Diego Biurrun
This reduces code size when either piece has been disabled. --- libavformat/au.c | 126 +++--- 1 files changed, 63 insertions(+), 63 deletions(-) diff --git a/libavformat/au.c b/libavformat/au.c index f4ca094..331c423 100644 --- a/libavformat/au.c

[libav-devel] [PATCH] fate: Move RALF test into lossless audio group

2012-12-17 Thread Diego Biurrun
--- tests/fate/lossless-audio.mak |3 +++ tests/fate/real.mak |3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/lossless-audio.mak b/tests/fate/lossless-audio.mak index 4808686..0794241 100644 --- a/tests/fate/lossless-audio.mak +++ b/tests/fate/lo

Re: [libav-devel] FATE dependencies

2012-12-17 Thread Diego Biurrun
On Mon, Dec 17, 2012 at 12:43:35AM +0100, Janne Grunau wrote: > On 2012-12-16 23:45:06 +0100, Diego Biurrun wrote: > > On Fri, Oct 19, 2012 at 07:26:02PM +0200, Diego Biurrun wrote: > > > [...] > > > > I'm mostly done with FATE dependencies and have some 50 patches in > > need of cleaning locally.