Re: [FFmpeg-devel] [PATCH] avcodec/dca: return standard error codes in avpriv_dca_parse_core_frame_header()

2017-11-01 Thread foo86
On Tue, Oct 31, 2017 at 05:27:35PM -0300, James Almer wrote: > This prevents making the DCAParseError enum part of the ABI. > > Signed-off-by: James Almer > --- > Now actually paying attention to -Wempty-body warnings. > > libavcodec/dca.c | 11 --- > libavcodec/dca.h | 12 ++--

Re: [FFmpeg-devel] [PATCH] coverage: filter /usr/include*, not entire /usr*

2017-07-31 Thread foo86
On Mon, Jul 31, 2017 at 11:06:01PM +0200, Nicolas George wrote: > Le tridi 13 thermidor, an CCXXV, foo86 a écrit : > > /usr* filters all sources when building in /usr/src, which is probably > > not intended. > > This is leaving /usr/local/include, and many less known directo

Re: [FFmpeg-devel] [PATCH 1/2] fate: add more DCA tests

2017-07-31 Thread foo86
On Mon, Jul 31, 2017 at 05:14:01PM -0400, Ronald S. Bultje wrote: > Hi, > > On Mon, Jul 31, 2017 at 4:46 PM, foo86 wrote: > > > Oops, meant to include this comment in previous email: > > > > Improves code coverage: > > old%new% > > dca

Re: [FFmpeg-devel] [PATCH 1/2] fate: add more DCA tests

2017-07-31 Thread foo86
On Mon, Jul 31, 2017 at 11:48:09PM +0200, Michael Niedermayer wrote: > On Mon, Jul 31, 2017 at 11:46:33PM +0300, foo86 wrote: > > Oops, meant to include this comment in previous email: > > > > Improves code coverage: > > old%new% > > dca_core

Re: [FFmpeg-devel] [PATCH 1/2] fate: add more DCA tests

2017-07-31 Thread foo86
On Mon, Jul 31, 2017 at 06:50:44PM -0300, James Almer wrote: > On 7/31/2017 5:33 PM, foo86 wrote: > > --- > > tests/fate/dca.mak | 36 ++ > > tests/ref/fate/dca-core-14be | 1 + > > tests/ref/fate/dca-core-14le | 1 + > > tests/ref/fate/dca-core-16b

Re: [FFmpeg-devel] [PATCH 1/2] fate: add more DCA tests

2017-07-31 Thread foo86
Oops, meant to include this comment in previous email: Improves code coverage: old%new% dca_core76.581.3 dca_exss56.565.6 dca_lbr 2.280.5 dca_parser 86.298.6 dca_xll 81.287.2 dcadec 75.083.0 dcadsp 64.083.8 Samples are here:

[FFmpeg-devel] [PATCH 2/2] fate: add Dolby E test

2017-07-31 Thread foo86
--- Samples are here: https://0x0.st/ket.xz tests/fate/audio.mak | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 40c4ca7b75..4fab472f90 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -19,6 +19,11 @@ fate-bmv-audio: CMD =

[FFmpeg-devel] [PATCH] coverage: filter /usr/include*, not entire /usr*

2017-07-31 Thread foo86
/usr* filters all sources when building in /usr/src, which is probably not intended. --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index ab83ae855d..2c67095052 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -228,7 +228,7

Re: [FFmpeg-devel] [PATCH 3/3] avformat/s337m: fix potentially undefined pointer arithmetic

2017-07-26 Thread foo86
On Mon, Jul 24, 2017 at 03:27:06PM +0300, foo86 wrote: > > Use integer position instead of pointer for loop variable. Also only > skip header fields after header has been fully validated. > --- > libavformat/s337m.c | 20 ++-- > 1 file changed, 10 insertion

[FFmpeg-devel] [PATCH] avcodec/dcaenc: fix memory leaks on init failure

2017-07-24 Thread foo86
--- libavcodec/dcaenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index 37095674f5..1740c16432 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -145,8 +145,8 @@ static int subband_bufer_alloc(DCAEncContext *c)

[FFmpeg-devel] [PATCH 1/2] avcodec/dcaadpcm: remove unreachable code

2017-07-24 Thread foo86
Arguments passed to these functions are never NULL. --- libavcodec/dcaadpcm.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libavcodec/dcaadpcm.c b/libavcodec/dcaadpcm.c index 9f615e3793..d9f53441b0 100644 --- a/libavcodec/dcaadpcm.c +++ b/libavcodec/dcaadpcm.c @@ -211,9 +211,6 @@ int f

[FFmpeg-devel] [PATCH 2/2] avcodec/dcaenc: propagate errors

2017-07-24 Thread foo86
--- libavcodec/dcaenc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index c1d72bfd16..fea67bf37c 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -129,7 +129,7 @@ static int subband_bufer_alloc(DCAEncContex

[FFmpeg-devel] [PATCH 3/3] avformat/s337m: fix potentially undefined pointer arithmetic

2017-07-24 Thread foo86
Use integer position instead of pointer for loop variable. Also only skip header fields after header has been fully validated. --- libavformat/s337m.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/s337m.c b/libavformat/s337m.c index 1f4ba5ed

[FFmpeg-devel] [PATCH 2/3] avcodec/dolby_e: fix potentially undefined pointer arithmetic

2017-07-24 Thread foo86
Avoid undefined behavior in skip_input() by checking that enough data is available before incrementing input pointer. Check return values of parse_key() and skip_input() and exit early with error if there is not enough data. --- libavcodec/dolby_e.c | 45 --

[FFmpeg-devel] [PATCH 1/3] avcodec/dolby_e: add AV_CODEC_CAP_CHANNEL_CONF capability

2017-07-24 Thread foo86
--- libavcodec/dolby_e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c index 6f390d959f..f811db4d8e 100644 --- a/libavcodec/dolby_e.c +++ b/libavcodec/dolby_e.c @@ -701,7 +701,7 @@ AVCodec ff_dolby_e_decoder = { .decode

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/dcaadpcm: fix use of uninitialized variable

2017-07-22 Thread foo86
On Sat, Jul 22, 2017 at 07:36:04PM +0100, Rostislav Pehlivanov wrote: > On 22 July 2017 at 18:50, foo86 wrote: > > > Fixes CID 1409924. > > --- > > libavcodec/dcaadpcm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dcaadpcm: check for av_malloc() failure

2017-07-22 Thread foo86
On Sat, Jul 22, 2017 at 03:33:18PM -0300, James Almer wrote: > On 7/22/2017 2:50 PM, foo86 wrote: > > Fixes CID 1409915. > > --- > > libavcodec/dcaadpcm.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavcodec/dcaadpcm.c b/lib

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dcaadpcm: check for av_malloc() failure

2017-07-22 Thread foo86
On Sat, Jul 22, 2017 at 07:55:05PM +0200, Nicolas George wrote: > Le quartidi 4 thermidor, an CCXXV, foo86 a écrit : > > Fixes CID 1409915. > > --- > > libavcodec/dcaadpcm.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavcodec/dcaad

[FFmpeg-devel] [PATCH 1/2] avcodec/dcaadpcm: check for av_malloc() failure

2017-07-22 Thread foo86
Fixes CID 1409915. --- libavcodec/dcaadpcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dcaadpcm.c b/libavcodec/dcaadpcm.c index 8742c7ccf6..e00f81f011 100644 --- a/libavcodec/dcaadpcm.c +++ b/libavcodec/dcaadpcm.c @@ -215,6 +215,9 @@ av_cold int ff_dcaadpcm_init(DCAADPCMEnc

[FFmpeg-devel] [PATCH 2/2] avcodec/dcaadpcm: fix use of uninitialized variable

2017-07-22 Thread foo86
Fixes CID 1409924. --- libavcodec/dcaadpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dcaadpcm.c b/libavcodec/dcaadpcm.c index e00f81f011..99cbb40172 100644 --- a/libavcodec/dcaadpcm.c +++ b/libavcodec/dcaadpcm.c @@ -80,7 +80,7 @@ static int64_t find_best_filt

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself

2017-07-22 Thread foo86
On Fri, Jul 21, 2017 at 12:22:25PM -0300, James Almer wrote: > Applied. > > Send your public ssh key privately to Michael Niedermayer to get push > rights to the git repo. Key sent, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ff

Re: [FFmpeg-devel] [PATCH v2 1/2] avcodec: add Dolby E decoder

2017-07-21 Thread foo86
On Wed, Jul 19, 2017 at 01:48:47PM +0200, Moritz Barsnick wrote: > On Sat, Jul 01, 2017 at 17:03:46 +0300, foo86 wrote: > > +static av_cold void init_tables(void) > > +{ > > +int i, j; > > + > > +for (i = 1; i < 17; i++) > > +

[FFmpeg-devel] [PATCH] MAINTAINERS: add myself

2017-07-21 Thread foo86
Reimar Doeffinger cuvid.c Timo Rothenpieler + dca* foo86 dirac*Rostislav Pehlivanov dnxhd*Baptiste Coudurier + dolby_e* foo86

Re: [FFmpeg-devel] [PATCH] avcodec/dca: remove GetBitContext usage from avpriv_dca_parse_core_frame_header()

2017-07-21 Thread foo86
On Fri, Jul 21, 2017 at 01:02:41AM -0300, James Almer wrote: > Will apply soon. LGTM. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-14 Thread foo86
On Fri, Jul 14, 2017 at 05:12:25PM +0200, Hendrik Leppkes wrote: > On Fri, Jul 14, 2017 at 4:08 PM, foo86 wrote: > > On Thu, Jul 13, 2017 at 12:27:03PM +0200, Paul B Mahol wrote: > >> +static inline unsigned int get_bits(GetBitContext *s, int n) > >> { > >

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-14 Thread foo86
On Thu, Jul 13, 2017 at 12:27:03PM +0200, Paul B Mahol wrote: > +static inline unsigned int get_bits(GetBitContext *s, int n) > { > +#ifdef CACHED_BITSTREAM_READER > +register int tmp = 0; > +#ifdef BITSTREAM_READER_LE > +uint64_t left = 0; > +#endif > + > +av_assert2(n>0 && n<=32); >

[FFmpeg-devel] [PATCH 10/10] avcodec/dca: avoid using bitstream reader in a non-standard way

2017-07-10 Thread foo86
Use proper get_bits.h functions instead of directly accessing index. --- libavcodec/dca_core.c | 12 +++- libavcodec/dca_core.h | 1 + libavcodec/dca_xll.c | 2 +- libavcodec/dcadec.h | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libavcodec/dca_core.c b/li

[FFmpeg-devel] [PATCH 08/10] avcodec/dca_parser: avoid use of magic values

2017-07-10 Thread foo86
Duration computation can be simplified because number of PCM blocks is only allowed to be a multiple of 8. --- libavcodec/dca_parser.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 390f7975f9..7e99b16bf0 100644 --

[FFmpeg-devel] [PATCH 03/10] avcodec: add avpriv_dca_parse_core_frame_header()

2017-07-10 Thread foo86
There are 3 different places where DCA core frame header is parsed: decoder, parser and demuxer. Each one uses ad-hoc code. Add common core frame header parsing function that will be used in all places. --- libavcodec/dca.c | 60 libavcodec/

[FFmpeg-devel] [PATCH 06/10] avformat/dtsdec: switch to common frame header parsing function

2017-07-10 Thread foo86
This makes probing for regular DTS more strict because more header fields are checked and values not supported by decoder are now rejected. Also fixes an issue original code had with 14-bit streams: 96 bits of header were expected, however only 84 bits were converted, which was not enough to parse

[FFmpeg-devel] [PATCH 07/10] avcodec/dca_parser: export profile information

2017-07-10 Thread foo86
Permits applications to access DTS profile information without having to decode a frame. --- libavcodec/dca_parser.c | 44 +++- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 6107358773.

[FFmpeg-devel] [PATCH 01/10] avcodec/dca: move some enumeration typedefs into headers

2017-07-10 Thread foo86
These values will be used by the parser. Prefix them with DCA_ appropriately. --- libavcodec/dca_core.c | 68 +++ libavcodec/dca_core.h | 28 + libavcodec/dca_lbr.c | 9 ++- libavcodec/dca_lbr.h | 5 4 files changed,

[FFmpeg-devel] [PATCH 02/10] avcodec/dca: move bits per sample array to dca.c

2017-07-10 Thread foo86
It will be used by the parser. This change avoids unwanted parser dependency on dcadata. --- libavcodec/dca.c | 4 libavcodec/dca.h | 2 ++ libavcodec/dcadata.c | 4 libavcodec/dcadata.h | 2 -- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/dca.c b/lib

[FFmpeg-devel] [PATCH 09/10] avcodec/dca_core: probe extension headers directly

2017-07-10 Thread foo86
Avoid using bitstream reader in a non-standard way by directly accessing index. Use bit shifting/masking operations instead. --- libavcodec/dca_core.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c

[FFmpeg-devel] [PATCH 04/10] avcodec/dca_core: switch to common frame header parsing function

2017-07-10 Thread foo86
--- libavcodec/dca_core.c | 167 ++ 1 file changed, 60 insertions(+), 107 deletions(-) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index 16210b89f8..090191dfa9 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -81,114

[FFmpeg-devel] [PATCH 05/10] avcodec/dca_parser: switch to common frame header parsing function

2017-07-10 Thread foo86
--- libavcodec/dca_parser.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index e5bea3347c..6107358773 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -192,10 +192,11 @@ stati

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 08:07:49PM +0200, Hendrik Leppkes wrote: > On Sat, Jul 8, 2017 at 7:09 PM, foo86 wrote: > >> +static inline void skip_bits_long(GetBitContext *s, int n) > >> +{ > >> +#ifdef CACHED_BITSTREAM_READER > >> +skip_bits(s, n); > >

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 07:25:52PM +0200, Paul B Mahol wrote: > On 7/8/17, foo86 wrote: > > On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: > >> [...] > > > >> static inline void skip_bits(GetBitContext *s, int n) > >> { > >> +

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: > [...] > static inline void skip_bits(GetBitContext *s, int n) > { > +#ifdef CACHED_BITSTREAM_READER > +if (n <= s->bits_left) > +skip_remaining(s, n); > +else { > +n -= s->bits_left; > +skip_remaining

[FFmpeg-devel] [PATCH v2 1/2] avcodec: add Dolby E decoder

2017-07-01 Thread foo86
.name = "g729", diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c new file mode 100644 index 00..63187e9977 --- /dev/null +++ b/libavcodec/dolby_e.c @@ -0,0 +1,707 @@ +/* + * Copyright (C) 2017 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free softw

[FFmpeg-devel] [PATCH v2 2/2] avformat: add SMPTE 337M demuxer

2017-07-01 Thread foo86
); REGISTER_MUXDEMUX(SAP, sap); REGISTER_DEMUXER (SBG, sbg); diff --git a/libavformat/s337m.c b/libavformat/s337m.c new file mode 100644 index 00..1f4ba5edaf --- /dev/null +++ b/libavformat/s337m.c @@ -0,0 +1,206 @@ +/* + * Copyright (C) 2017 foo86 + * + * This file is part of

[FFmpeg-devel] [PATCH 2/3] avcodec: add Dolby E decoder

2017-06-27 Thread foo86
uot;g729", diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c new file mode 100644 index 00..ba1fe1c5d0 --- /dev/null +++ b/libavcodec/dolby_e.c @@ -0,0 +1,716 @@ +/* + * Copyright (C) 2017 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistr

[FFmpeg-devel] [PATCH 1/3] avcodec/s302m: fix AVOption flags

2017-06-27 Thread foo86
--- libavcodec/s302m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c index a68ac79f2c..4350d97f0a 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -201,7 +201,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *d

[FFmpeg-devel] [PATCH 3/3] avformat: add SMPTE 337M demuxer

2017-06-27 Thread foo86
); REGISTER_DEMUXER (SBG, sbg); diff --git a/libavformat/s337m.c b/libavformat/s337m.c new file mode 100644 index 00..3175a9fb87 --- /dev/null +++ b/libavformat/s337m.c @@ -0,0 +1,205 @@ +/* + * Copyright (C) 2017 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is

[FFmpeg-devel] [PATCH] avcodec/dca: add support for 20-bit XLL

2017-01-07 Thread foo86
Fixes ticket #6063. --- libavcodec/dca_xll.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index 1d616c298c..1320aaf28f 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -143,7 +143,7 @@ static int chs_parse_head

[FFmpeg-devel] [PATCH] avcodec/dca: set initial sample_fmt to FLTP

2016-12-24 Thread foo86
Fixes regression introduced in 39f7620d76c7a133535ed7a535f7a74fefa6e435. Not setting default sample_fmt can result in failed transcode when audio stream starts later in a file. Set initial sample_fmt to FLTP, which is the "baseline" format decoder produces. Fixes ticket #5998. --- libavcodec/dc

[FFmpeg-devel] [PATCH 1/2] avcodec/dca_parser: simplify state machine

2016-05-31 Thread foo86
--- libavcodec/dca_parser.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index d76b548..1521a5b 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -109,25 +109,25 @@ sta

[FFmpeg-devel] [PATCH 2/2] avcodec/dca_parser: skip initial padding

2016-05-31 Thread foo86
Padding before the first sync word can be very large for DTS-in-WAV streams. There is no reason to include this padding in parsed packet. --- libavcodec/dca_parser.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/libavcodec/dca_parse

Re: [FFmpeg-devel] [PATCH 09/10] avcodec/dca: support EXSS marker in avpriv_dca_convert_bitstream()

2016-05-31 Thread foo86
On Fri, May 13, 2016 at 12:48:31PM +0300, foo86 wrote: > This is now required by dcadec_decode_frame(). All remaining users of > avpriv_dca_convert_bitstream() have been updated to expect EXSS marker. > --- > libavcodec/dca.c | 1 + > 1 file changed, 1 ins

Re: [FFmpeg-devel] [PATCH 08/10] avcodec/dca: require checked bitstream reader

2016-05-31 Thread foo86
On Fri, May 13, 2016 at 12:48:30PM +0300, foo86 wrote: > Remove half-working attempt at supporting unchecked bitstream reader by > always copying input data into intermediate buffer with large amount of > padding at the end. > > Convert LBR decoder to checked bitstream

[FFmpeg-devel] [PATCH] avcodec/dca: move EXSS sampling frequency arrays to dca.c

2016-05-26 Thread foo86
Avoids unwanted parser dependency on dcadata. --- libavcodec/Makefile | 2 +- libavcodec/dca.c| 9 + libavcodec/dca.h| 3 +++ libavcodec/dca_exss.c | 1 - libavcodec/dca_parser.c | 1 - libavcodec/dcadata.c| 9 - libavcodec/dcadata.h| 3 --- 7 files ch

Re: [FFmpeg-devel] [PATCH v2 2/2] avcodec/dca_parser: set duration for core-less streams

2016-05-25 Thread foo86
On Wed, May 25, 2016 at 04:31:10PM -0300, James Almer wrote: > On 5/25/2016 3:35 PM, foo86 wrote: > > On Wed, May 25, 2016 at 11:34:13AM -0300, James Almer wrote: > >> On 5/23/2016 11:58 AM, foo86 wrote: > >>> --- > >>> Updated version of the pat

Re: [FFmpeg-devel] [PATCH v2 2/2] avcodec/dca_parser: set duration for core-less streams

2016-05-25 Thread foo86
On Wed, May 25, 2016 at 11:34:13AM -0300, James Almer wrote: > On 5/23/2016 11:58 AM, foo86 wrote: > > --- > > Updated version of the patch: don't set avctx field in DCAExssParser > > structure > > to indicate that ff_dca_exss_parse() is being called from pars

[FFmpeg-devel] [PATCH] avcodec/dca_exss: always update downmix flags

2016-05-23 Thread foo86
Fixes potential parsing failure when total number of channels indicated by EXSS asset descriptor decreases mid-stream and stale embedded downmix flags are referenced. --- libavcodec/dca_exss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/dca_exss.c b/libavco

[FFmpeg-devel] [PATCH v2 1/2] avcodec/dca_exss: prepare to be called from parser context

2016-05-23 Thread foo86
--- Updated version of the patch: don't print error or warning messages when called from parser context to avoid duplicating messages from decoder context. libavcodec/dca_exss.c | 31 --- libavcodec/dca_exss.h | 2 +- 2 files changed, 21 insertions(+), 12 deletions(-)

[FFmpeg-devel] [PATCH v2 2/2] avcodec/dca_parser: set duration for core-less streams

2016-05-23 Thread foo86
--- Updated version of the patch: don't set avctx field in DCAExssParser structure to indicate that ff_dca_exss_parse() is being called from parser context. libavcodec/dca_parser.c | 68 ++--- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH 06/10] avcodec/dca_parser: improve frame end search

2016-05-20 Thread foo86
On Fri, May 20, 2016 at 08:51:53PM -0300, James Almer wrote: > "ffmpeg -i q4G.dts -c:a copy -f framecrc -" gave me the following > before the patch > > #software: Lavf57.36.100 > #tb 0: 1/9 > #media_type 0: audio > #codec_id 0: dts > #sample_rate 0: 192000 > #channel_layout 0: 60f > 0,

Re: [FFmpeg-devel] [PATCH 06/10] avcodec/dca_parser: improve frame end search

2016-05-20 Thread foo86
On Fri, May 20, 2016 at 04:46:31PM -0300, James Almer wrote: > On 5/20/2016 2:40 PM, foo86 wrote: > > On Fri, May 13, 2016 at 12:48:28PM +0300, foo86 wrote: > >> Parse core frame size directly when searching for frame end instead of > >> using value extracted from previo

Re: [FFmpeg-devel] [PATCH 06/10] avcodec/dca_parser: improve frame end search

2016-05-20 Thread foo86
On Fri, May 13, 2016 at 12:48:28PM +0300, foo86 wrote: > Parse core frame size directly when searching for frame end instead of > using value extracted from previous frame. > > Account for unused bits when calculating sync word distance for 14-bit > streams to avoid alias

Re: [FFmpeg-devel] [PATCH 01/10] avcodec/dca: remove Rice code length limit

2016-05-20 Thread foo86
On Fri, May 20, 2016 at 03:13:22PM +0200, Christophe Gisquet wrote: > > This is for valid bitstreams. There is no indication of limit on maximum > > Rice code length in the XLL spec, hence existing constant is not > > strictly "valid" (but it always worked in practice with existing > > encoders). R

Re: [FFmpeg-devel] [PATCH 01/10] avcodec/dca: remove Rice code length limit

2016-05-20 Thread foo86
On Fri, May 20, 2016 at 02:35:53PM +0200, Christophe Gisquet wrote: > 2016-05-13 11:48 GMT+02:00 foo86 : > > -unsigned int v = get_unary(gb, 1, 128); > > +unsigned int v = get_unary(gb, 1, get_bits_left(gb)); > > Not that the patch is not ok, but I have a few uned

Re: [FFmpeg-devel] [PATCH 01/10] avcodec/dca: remove Rice code length limit

2016-05-20 Thread foo86
Ping. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH 04/10] avcodec/dca: don't set initial sample_fmt

2016-05-14 Thread foo86
On Fri, May 13, 2016 at 12:00:24PM +0200, Hendrik Leppkes wrote: > On Fri, May 13, 2016 at 11:48 AM, foo86 wrote: > > Valid sample_fmt will be set by dcadec_decode_frame() based on stream > > type. > > --- > > libavcodec/dcadec.c | 3 --- > > 1 file changed, 3

[FFmpeg-devel] [PATCH 06/10] avcodec/dca_parser: improve frame end search

2016-05-13 Thread foo86
Parse core frame size directly when searching for frame end instead of using value extracted from previous frame. Account for unused bits when calculating sync word distance for 14-bit streams to avoid alias sync detection. Parse EXSS frame size and skip over EXSS frame to avoid alias sync detect

[FFmpeg-devel] [PATCH 05/10] avcodec/dca: use LUT for LBR frequency ranges

2016-05-13 Thread foo86
Values for unsupported frequencies > 48000 Hz are still included (parser will make use of them). Also convert sampling frequencies array to unsigned. --- libavcodec/dca_lbr.c | 15 +-- libavcodec/dcadata.c | 6 +- libavcodec/dcadata.h | 3 ++- 3 files changed, 12 insertions(+),

[FFmpeg-devel] [PATCH 08/10] avcodec/dca: require checked bitstream reader

2016-05-13 Thread foo86
Remove half-working attempt at supporting unchecked bitstream reader by always copying input data into intermediate buffer with large amount of padding at the end. Convert LBR decoder to checked bitstream reader. Convert dcadec_decode_frame() to parse input data directly if possible. --- libavcod

[FFmpeg-devel] [PATCH 09/10] avcodec/dca: support EXSS marker in avpriv_dca_convert_bitstream()

2016-05-13 Thread foo86
This is now required by dcadec_decode_frame(). All remaining users of avpriv_dca_convert_bitstream() have been updated to expect EXSS marker. --- libavcodec/dca.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 714509b..147d4cc 100644 --- a/libavcodec/

[FFmpeg-devel] [PATCH 10/10] avcodec/dca: remove useless debug message

2016-05-13 Thread foo86
Most DTS-in-WAV streams trigger this, making debug output hard to read. --- libavcodec/dca_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index f6c22ca..46825ed 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core

[FFmpeg-devel] [PATCH 07/10] avcodec/dca_parser: set duration for core-less streams

2016-05-13 Thread foo86
This requires parsing EXSS in dca_parse(). Adapt ff_dca_exss_parse() signature and disable header CRC check when avctx->priv_data is NULL. --- libavcodec/dca_exss.c | 2 +- libavcodec/dca_exss.h | 2 +- libavcodec/dca_parser.c | 70 ++--- libavcode

[FFmpeg-devel] [PATCH 04/10] avcodec/dca: don't set initial sample_fmt

2016-05-13 Thread foo86
Valid sample_fmt will be set by dcadec_decode_frame() based on stream type. --- libavcodec/dcadec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index e3a4b0d..565242d 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -374,9 +374,6 @@

[FFmpeg-devel] [PATCH 02/10] avcodec/dca: simplify 'residual ok' flag tracking

2016-05-13 Thread foo86
Move this from separate structure field to a packet flag. Behavior should be equivalent, except that residual flag is now properly cleared when packet has no core frame at all. Also print a message when forcing recovery mode due to invalid residual to make debugging easier. --- libavcodec/dcadec

[FFmpeg-devel] [PATCH 03/10] avcodec/dca: print error message when no frame is found in packet

2016-05-13 Thread foo86
--- libavcodec/dcadec.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index dac86eb..e3a4b0d 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -179,8 +179,10 @@ static int dcadec_decode_frame(AVCodecContext *avctx, v

[FFmpeg-devel] [PATCH 01/10] avcodec/dca: remove Rice code length limit

2016-05-13 Thread foo86
Limit the maximum length of unary part of Rice code by the number of available bits instead of using an arbitrary constant that happens to be just large enough to work. --- libavcodec/dca_xll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dc

Re: [FFmpeg-devel] [PATCH v2 0/3] DTS Express (LBR) decoder

2016-05-09 Thread foo86
er streams:0kB global headers:0kB muxing > overhead: unknown Attached patch fixes timestamps for core-less DTS for me. commit 49f02f6422e84cf381eb100b510680ecf46f7a76 Author: foo86 Date: Mon May 9 20:08:21 2016 +0300 avcodec/dca_parser: set duration for core-less streams diff --git a/libavcodec/

[FFmpeg-devel] [PATCH v3 2/2] avformat/dtsdec: detect core-less streams

2016-05-03 Thread foo86
--- Updated detection algorithm. libavformat/dtsdec.c | 47 --- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c index ef28391..702a417 100644 --- a/libavformat/dtsdec.c +++ b/libavformat/dtsdec

[FFmpeg-devel] [PATCH v2 1/2] avcodec/dca: convert to AVCRC

2016-05-02 Thread foo86
--- libavcodec/dca_core.c | 25 ++--- libavcodec/dca_exss.c | 3 +-- libavcodec/dca_xll.c | 9 +++-- libavcodec/dcadec.c | 29 ++--- libavcodec/dcadec.h | 19 +-- 5 files changed, 33 insertions(+), 52 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v2 2/2] avformat/dtsdec: detect core-less streams

2016-05-02 Thread foo86
--- libavformat/dtsdec.c | 45 ++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c index ef28391..69574ba 100644 --- a/libavformat/dtsdec.c +++ b/libavformat/dtsdec.c @@ -19,6 +19,8 @@ * Foundati

[FFmpeg-devel] [PATCH 3/3] avformat/dtsdec: detect core-less streams

2016-05-02 Thread foo86
--- libavformat/dtsdec.c | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c index ef28391..b54b6ef 100644 --- a/libavformat/dtsdec.c +++ b/libavformat/dtsdec.c @@ -32,23 +32,48 @@ static int dt

[FFmpeg-devel] [PATCH 2/3] avcodec/dca: inline ff_dca_check_crc()

2016-05-02 Thread foo86
--- libavcodec/dca_core.c | 25 ++--- libavcodec/dca_exss.c | 3 +-- libavcodec/dca_xll.c | 9 +++-- libavcodec/dcadec.c | 9 - libavcodec/dcadec.h | 12 ++-- 5 files changed, 24 insertions(+), 34 deletions(-) diff --git a/libavcodec/dca_core.c b/li

[FFmpeg-devel] [PATCH 1/3] avcodec: add avpriv_dca_compute_crc()

2016-05-02 Thread foo86
--- libavcodec/dca.c | 18 ++ libavcodec/dca.h | 5 + libavcodec/dcadec.c | 20 +--- libavcodec/version.h | 2 +- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 714509b..be89d0d 100644 --- a/

[FFmpeg-devel] [PATCH] avcodec/dca: fix sync word search error condition

2016-05-02 Thread foo86
This didn't actually check if sync word was found and always errored out with "-err_detect explode" option enabled. --- libavcodec/dca_core.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index fc4fdf4..58c78f7 100

Re: [FFmpeg-devel] [PATCH v2 1/3] avcodec/dca: move huffman data into separate object file

2016-05-02 Thread foo86
On Sun, May 01, 2016 at 08:18:45PM -0300, James Almer wrote: > On 5/1/2016 12:41 PM, foo86 wrote: > > --- > > libavcodec/Makefile |2 +- > > libavcodec/dca_core.c | 70 +--- > > libavcodec/dca_core.h |2 +- > > libavcodec/dcadata.c |9 -

Re: [FFmpeg-devel] [PATCH v2 0/3] DTS Express (LBR) decoder

2016-05-02 Thread foo86
On Mon, May 02, 2016 at 10:35:29AM +0200, Hendrik Leppkes wrote: > On Sun, May 1, 2016 at 11:43 PM, Hendrik Leppkes wrote: > > On Sun, May 1, 2016 at 8:30 PM, James Almer wrote: > >> With the samples you shared and with a random lbr-in-wav mono sample i > >> found > >> in the wild i get the foll

[FFmpeg-devel] [PATCH v2 2/3] avcodec/dca: move channel counter utility into dca.h

2016-05-01 Thread foo86
Also add actual speaker pair definitions. --- libavcodec/dca.h | 28 libavcodec/dca_exss.c | 9 ++--- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/libavcodec/dca.h b/libavcodec/dca.h index ccb02af..a1ac763 100644 --- a/libavcodec/dca.h +++

[FFmpeg-devel] [PATCH v2 1/3] avcodec/dca: move huffman data into separate object file

2016-05-01 Thread foo86
--- libavcodec/Makefile |2 +- libavcodec/dca_core.c | 70 +--- libavcodec/dca_core.h |2 +- libavcodec/dcadata.c |9 - libavcodec/dcadata.h |2 - libavcodec/dcadec.c |4 +- libavcodec/dcahuff.c | 1099 + libavcodec/dcahu

[FFmpeg-devel] [PATCH v2 0/3] DTS Express (LBR) decoder

2016-05-01 Thread foo86
(...) - moved first stage of LBR filterbank to dcadsp - changed several inline constants to float from double - reduced number of grid 2 subbands allocated in structure (3 vs 6) Sample files that can be added to FATE: https://0x0.st/NsN.zip foo86 (3): avcodec/dca: move huffman data into separate

[FFmpeg-devel] [PATCH 0/5] DTS Express (LBR) decoder

2016-04-27 Thread foo86
track decodes around 1.8k times faster that realtime here. foo86 (5): avcodec/dcaenc: reuse shared quant levels table avcodec/dcaenc: move channel reordering tables to dcaenc.h avcodec/dca: move huffman data into separate object file avcodec/dca: move channel counter utility into dca.h av

[FFmpeg-devel] [PATCH 5/5] avcodec/dca: add DTS Express (LBR) decoder

2016-04-27 Thread foo86
000..686d37b --- /dev/null +++ b/libavcodec/dca_lbr.c @@ -0,0 +1,1858 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by

[FFmpeg-devel] [PATCH 4/5] avcodec/dca: move channel counter utility into dca.h

2016-04-27 Thread foo86
Also add actual speaker pair definitions. --- libavcodec/dca.h | 28 libavcodec/dca_exss.c | 9 ++--- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/libavcodec/dca.h b/libavcodec/dca.h index ccb02af..1b90d40 100644 --- a/libavcodec/dca.h +++

[FFmpeg-devel] [PATCH 3/5] avcodec/dca: move huffman data into separate object file

2016-04-27 Thread foo86
--- libavcodec/Makefile |2 +- libavcodec/dca_core.c | 70 +--- libavcodec/dca_core.h |2 +- libavcodec/dcadata.c |9 - libavcodec/dcadata.h |2 - libavcodec/dcadec.c |4 +- libavcodec/dcahuff.c | 1098 + libavcodec/dcahu

[FFmpeg-devel] [PATCH 2/5] avcodec/dcaenc: move channel reordering tables to dcaenc.h

2016-04-27 Thread foo86
DCA core decoder no longer uses fixed tables for channel reordering. Move them into private encoder header (and drop ff_dca_ prefix). --- libavcodec/dcadata.c | 42 -- libavcodec/dcadata.h | 5 - libavcodec/dcaenc.c | 6 +++--- libavcodec/dcaenc.h |

[FFmpeg-devel] [PATCH 1/5] avcodec/dcaenc: reuse shared quant levels table

2016-04-27 Thread foo86
--- libavcodec/dcaenc.c | 8 libavcodec/dcaenc.h | 7 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index ab40e37..d562a27 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -683,7 +683,7 @@ static int calc_one

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/dca: make reading past end of buffer safe

2016-03-03 Thread foo86
On Thu, Mar 03, 2016 at 12:56:42AM +0100, Hendrik Leppkes wrote: > On Thu, Mar 3, 2016 at 12:37 AM, Ronald S. Bultje wrote: > > Completely random comment, but isn't it easier to just enable the safe > > bitstream reader? > > > > This is actually enabled by default, so it probably should never hav

[FFmpeg-devel] [PATCH 4/4] avcodec/dca: improve band data parsing robustness

2016-03-03 Thread foo86
Limit the maximum length of unary part of Rice code by the number of available bits instead of using an arbitrary constant that happens to be just large enough to work. This effectively limits amount of data that can be overread per segment by maximum length of binary code per sample multiplied by

[FFmpeg-devel] [PATCH 1/4] avcodec/dca: clear X96 channels if nothing was decoded

2016-03-02 Thread foo86
The first X96 channel set can have more channels than core, causing X96 decoding to be skipped. Clear the number of decoded X96 channels to zero in this rudimentary case. --- libavcodec/dca_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c ind

[FFmpeg-devel] [PATCH 4/4] avcodec/dca: make reading past end of buffer safe

2016-03-02 Thread foo86
Limit the maximum length of unary part of Rice code by the number of available bits instead of using an arbitrary constant that happens to be just large enough to work. This effectively limits amount of data that can be overread per segment by maximum length of binary code per sample multiplied by

[FFmpeg-devel] [PATCH 2/4] avcodec/dca: fix av_cold placement in declarations

2016-03-02 Thread foo86
--- libavcodec/dca_xll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index cd1af81..ffe8ef3 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -602,7 +602,7 @@ static int chs_parse_band_data(DCAXllDecoder *s, DCA

[FFmpeg-devel] [PATCH 3/4] avcodec/dca: simplify condition

2016-03-02 Thread foo86
--- libavcodec/dca_xll.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index ffe8ef3..5e6cf35 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -460,19 +460,14 @@ static int chs_parse_band_data(DCAXl

[FFmpeg-devel] [PATCH 0/4] DCA decoder fixes

2016-03-02 Thread foo86
This fixes some potential issues I've identified within new DCA decoder. It is probably a good idea to backport these patches into 3.0 release branch. foo86 (4): avcodec/dca: clear X96 channels if nothing was decoded avcodec/dca: fix av_cold placement in declarations avcodec/dca: sim

[FFmpeg-devel] [PATCH v2 00/16] Replace native DCA decoder with libdcadec based one

2016-01-21 Thread foo86
uses butterflies_fixed() for sumdiff decoding * avpriv_request_sample() is now used for reporting missing features * Core decoder now stays in fixed point mode during intermittent XLL decoding errors * X96 extension is no longer parsed (and left unused) when decoding XLL * Minor code refactoring

  1   2   >