Re: [libav-devel] [PATCH 4/5] vaapi: Allow reuse of a frames context when parameters don't change

2017-02-01 Thread wm4
On Wed, 1 Feb 2017 21:36:04 + Mark Thompson wrote: > This avoids freeing and reallocating lots of surfaces when it isn't > necessary do so (for example, when seeking in the same stream). > Since all of the hwaccel data is cleared on reinitialisation, this > adds a new

Re: [libav-devel] [PATCH 1/5] lavc: Add device context field to AVCodecContext

2017-02-01 Thread wm4
On Wed, 1 Feb 2017 21:32:21 + Mark Thompson wrote: > For use by codec implementations which can allocate frames internally. > --- > Now with explicit prohibition on the user reading either field. > > > doc/APIchanges | 3 +++ > libavcodec/avcodec.h | 23

[libav-devel] [PATCH 5/5] hwcontext_vaapi: Try to support bitrotten VDPAU wrapper

2017-02-01 Thread Mark Thompson
Adds a new driver quirk to indicate no support at all for surface attributes. Based on a patch by wm4 . --- libavutil/hwcontext_vaapi.c | 79 ++--- libavutil/hwcontext_vaapi.h | 7 2 files changed, 52 insertions(+), 34

[libav-devel] [PATCH 4/5] vaapi: Allow reuse of a frames context when parameters don't change

2017-02-01 Thread Mark Thompson
This avoids freeing and reallocating lots of surfaces when it isn't necessary do so (for example, when seeking in the same stream). Since all of the hwaccel data is cleared on reinitialisation, this adds a new hw_frames_ctx member to AVCodecInternal to store the reused frames context. Memory use

[libav-devel] [PATCH 3/5] avconv_vaapi: Use device-only setup

2017-02-01 Thread Mark Thompson
--- Now just writes the hw_device_ctx field (no unrefs). avconv_vaapi.c | 128 ++--- 1 file changed, 13 insertions(+), 115 deletions(-) diff --git a/avconv_vaapi.c b/avconv_vaapi.c index 584b8b4df..13e8a8a71 100644 --- a/avconv_vaapi.c +++

[libav-devel] [PATCH 2/5] vaapi: Implement device-only setup

2017-02-01 Thread Mark Thompson
In this case, the user only supplies a device and the frame context is allocated internally by lavc. --- Conforming to the rules in the previous patch. Since the user isn't allowed to look at the AVCodecContext fields we can continue to store the references there, which also does the right

[libav-devel] [PATCH 1/5] lavc: Add device context field to AVCodecContext

2017-02-01 Thread Mark Thompson
For use by codec implementations which can allocate frames internally. --- Now with explicit prohibition on the user reading either field. doc/APIchanges | 3 +++ libavcodec/avcodec.h | 23 ++- libavcodec/decode.c | 1 + libavcodec/utils.c | 1 +

Re: [libav-devel] [PATCH 03/12] configure: Use inline asm check helper function where appropriate

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 6:37 PM, Diego Biurrun wrote: > On Wed, Feb 01, 2017 at 01:12:47PM +0100, Vittorio Giovara wrote: >> On Wed, Feb 1, 2017 at 12:23 PM, Diego Biurrun wrote: >> > On Wed, Feb 01, 2017 at 10:51:15AM +0100, Vittorio Giovara wrote: >> >> On

Re: [libav-devel] [PATCH 03/12] configure: Use inline asm check helper function where appropriate

2017-02-01 Thread Diego Biurrun
On Wed, Feb 01, 2017 at 01:12:47PM +0100, Vittorio Giovara wrote: > On Wed, Feb 1, 2017 at 12:23 PM, Diego Biurrun wrote: > > On Wed, Feb 01, 2017 at 10:51:15AM +0100, Vittorio Giovara wrote: > >> On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > >> >

Re: [libav-devel] [PATCH 03/12] configure: Use inline asm check helper function where appropriate

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 12:23 PM, Diego Biurrun wrote: > On Wed, Feb 01, 2017 at 10:51:15AM +0100, Vittorio Giovara wrote: >> On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: >> > --- a/configure >> > +++ b/configure >> > @@ -4165,9 +4165,7 @@ EOF >> > >>

Re: [libav-devel] [PATCH 1/2] avprobe: added gsm_probe function to detect raw gsm file type

2017-02-01 Thread Luca Barbato
Something got mangled in the email. The concept of the patch below seems good, check for every block candidate once you find the magic nibble. Could you please resend the two squashed in one? Below some more comments. On 27/01/2017 20:06, Devesh Singh wrote: > From

Re: [libav-devel] [PATCH 04/12] configure: Simplify libxcb check

2017-02-01 Thread Luca Barbato
On 24/01/2017 18:12, Diego Biurrun wrote: > --- > configure | 18 -- > 1 file changed, 4 insertions(+), 14 deletions(-) Not against it ___ libav-devel mailing list libav-devel@libav.org

Re: [libav-devel] [PATCH 03/12] configure: Use inline asm check helper function where appropriate

2017-02-01 Thread Diego Biurrun
On Wed, Feb 01, 2017 at 10:51:15AM +0100, Vittorio Giovara wrote: > On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > > --- a/configure > > +++ b/configure > > @@ -4165,9 +4165,7 @@ EOF > > > > -check_cc < > -void foo(void) { __asm__ volatile ("" ::); } > > -EOF > >

Re: [libav-devel] [PATCH 4/4] h264dec: drop pointless counting of consumed bytes

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 11:34 AM, Anton Khirnov wrote: > Quoting Vittorio Giovara (2017-02-01 10:44:11) >> On Wed, Feb 1, 2017 at 10:25 AM, Anton Khirnov wrote: >> > Video decoders always consume full packets. >> > --- >> > libavcodec/h264dec.c | 20

Re: [libav-devel] [PATCH] svq3: fix the slice size check

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 11:52 AM, Anton Khirnov wrote: > Currently it incorrectly compares bits with bytes. > > Also, move the check right before where it's relevant, so that the > correct number of remaining bits is used. > > CC: libav-sta...@libav.org > --- >

[libav-devel] [PATCH] svq3: fix the slice size check

2017-02-01 Thread Anton Khirnov
Currently it incorrectly compares bits with bytes. Also, move the check right before where it's relevant, so that the correct number of remaining bits is used. CC: libav-sta...@libav.org --- libavcodec/svq3.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

Re: [libav-devel] [PATCH 2/7] pthread_frame: merge the functionality for normal decoder init and init_thread_copy

2017-02-01 Thread Anton Khirnov
Quoting Vittorio Giovara (2017-02-01 10:47:21) > On Wed, Feb 1, 2017 at 10:15 AM, Anton Khirnov wrote: > > diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c > > index b27aa54..771520b 100644 > > --- a/libavcodec/h264dec.c > > +++ b/libavcodec/h264dec.c > > @@ -383,14

Re: [libav-devel] [PATCH 4/4] h264dec: drop pointless counting of consumed bytes

2017-02-01 Thread Anton Khirnov
Quoting Vittorio Giovara (2017-02-01 10:44:11) > On Wed, Feb 1, 2017 at 10:25 AM, Anton Khirnov wrote: > > Video decoders always consume full packets. > > --- > > libavcodec/h264dec.c | 20 +++- > > 1 file changed, 3 insertions(+), 17 deletions(-) > > Do you

Re: [libav-devel] [PATCH 11/12] configure: Simplify dlopen check

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > --- > @@ -4452,11 +4448,8 @@ check_code cc arm_neon.h "int16x8_t test = > vdupq_n_s16(0)" && enable intrinsics_ > > check_ldflags -Wl,--as-needed > > -if check_func dlopen; then > -ldl= > -elif check_func dlopen -ldl;

Re: [libav-devel] [PATCH 10/12] configure: Drop weak dependencies on external libraries for webm muxer

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > Weak dependencies on external libraries do not obviate having to > explicitly enable these libraries, so the weak dependency does not > simplify the configure command line nor have any real effect. > --- > configure | 1 -

Re: [libav-devel] [PATCH 09/12] configure: Add proper weak dependency of drawtext filter on libfontconfig

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > --- > configure | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configure b/configure > index 90bc8b2..9ff6ad0 100755 > --- a/configure > +++ b/configure > @@ -2471,6 +2471,7 @@

Re: [libav-devel] [PATCH 06/12] configure: Add require_cpp_condition() convenience function

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > Simplifies checking for conditions in external library headers and > aborting if said conditions are not met. > --- > configure | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) probably ok --

Re: [libav-devel] [PATCH 05/12] configure: Add require_header() convenience function

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > Simplifies checking for external library headers and aborting if > the external library support was requested, but is not available. > --- > configure | 15 +++ > 1 file changed, 11 insertions(+), 4

Re: [libav-devel] [PATCH 03/12] configure: Use inline asm check helper function where appropriate

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > --- > configure | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/configure b/configure > index f7436c5..c543c05 100755 > --- a/configure > +++ b/configure > @@ -4165,9 +4165,7 @@ EOF > sym=$($nm

Re: [libav-devel] [PATCH 02/12] configure: Merge compiler/libc/os hacks sections

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > --- > configure | 27 +-- > 1 file changed, 13 insertions(+), 14 deletions(-) > > diff --git a/configure b/configure > index 2c8b57e..f7436c5 100755 > --- a/configure > +++ b/configure > @@ -4097,26

Re: [libav-devel] [PATCH 01/12] configure: Use cppflags check helper functions where appropriate

2017-02-01 Thread Vittorio Giovara
On Tue, Jan 24, 2017 at 6:12 PM, Diego Biurrun wrote: > --- > configure | 14 -- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/configure b/configure > index 61d1807..2c8b57e 100755 > --- a/configure > +++ b/configure > @@ -3746,18 +3746,12 @@

Re: [libav-devel] [PATCH 2/7] pthread_frame: merge the functionality for normal decoder init and init_thread_copy

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 10:15 AM, Anton Khirnov wrote: > diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c > index b27aa54..771520b 100644 > --- a/libavcodec/h264dec.c > +++ b/libavcodec/h264dec.c > @@ -383,14 +383,16 @@ static av_cold int h264_decode_init(AVCodecContext

Re: [libav-devel] [PATCH 4/4] h264dec: drop pointless counting of consumed bytes

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:25, Anton Khirnov wrote: > Video decoders always consume full packets. > --- > libavcodec/h264dec.c | 20 +++- > 1 file changed, 3 insertions(+), 17 deletions(-) > Possibly OK. ___ libav-devel mailing list

Re: [libav-devel] [PATCH 4/4] h264dec: drop pointless counting of consumed bytes

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 10:25 AM, Anton Khirnov wrote: > Video decoders always consume full packets. > --- > libavcodec/h264dec.c | 20 +++- > 1 file changed, 3 insertions(+), 17 deletions(-) Do you mean that get_consumed_bytes() was always equal to buf_size?

Re: [libav-devel] [PATCH] scale_npp: explicitly set the output frames context for passthrough mode

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:39, Anton Khirnov wrote: > This is no longer done automatically for filters marked as > hwframe-aware. > --- > libavfilter/vf_scale_npp.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c >

Re: [libav-devel] [PATCH 4/7] pthread_frame: do not copy a range of AVCodecContext fields at once

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:15, Anton Khirnov wrote: > This is extremely fragile against reordering and hides what is actually > being copied. Copy all the fields manually instead. > --- > libavcodec/pthread_frame.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Sure.

Re: [libav-devel] [PATCH 5/7] pthread_frame: do not share priv_data between multiple codec contexts

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:15, Anton Khirnov wrote: > This is fragile and dangerous, allocate separate private data for each > per-thread context. > --- > libavcodec/pthread_frame.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) > Seems fine.

[libav-devel] [PATCH] scale_npp: explicitly set the output frames context for passthrough mode

2017-02-01 Thread Anton Khirnov
This is no longer done automatically for filters marked as hwframe-aware. --- libavfilter/vf_scale_npp.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 0e636a9..be1f81f 100644 ---

Re: [libav-devel] [PATCH 7/7] decode: plug a leak on error in update_frame_pool()

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:15, Anton Khirnov wrote: > --- > libavcodec/decode.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/decode.c b/libavcodec/decode.c > index d5210d0..44cab68 100644 > --- a/libavcodec/decode.c > +++ b/libavcodec/decode.c > @@ -923,8

Re: [libav-devel] [PATCH 3/4] h264dec: replace a pointless ref+unref with move_ref

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 10:25 AM, Anton Khirnov wrote: > --- > libavcodec/h264dec.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c > index b92795d..6ce0287 100644 > --- a/libavcodec/h264dec.c > +++

Re: [libav-devel] [PATCH 1/4] h264: mark the currently active SPS as const

2017-02-01 Thread Vittorio Giovara
On Wed, Feb 1, 2017 at 10:25 AM, Anton Khirnov wrote: > It is never modified anymore. > --- > libavcodec/h264_ps.h| 3 +-- > libavcodec/h264_slice.c | 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h >

Re: [libav-devel] [PATCH 1/7] lavc: replace AVCodecInternal.allocate_progress with an internal cap

2017-02-01 Thread Luca Barbato
On 01/02/2017 10:15, Anton Khirnov wrote: > This is a constant codec property, so a capability flag is more appropriate. > --- > doc/multithreading.txt | 5 +++-- > libavcodec/h264dec.c | 5 ++--- > libavcodec/hevcdec.c | 5 ++--- > libavcodec/internal.h | 20

[libav-devel] [PATCH 3/4] h264dec: replace a pointless ref+unref with move_ref

2017-02-01 Thread Anton Khirnov
--- libavcodec/h264dec.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index b92795d..6ce0287 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -699,10 +699,7 @@ static int h264_decode_frame(AVCodecContext *avctx,

[libav-devel] [PATCH 4/4] h264dec: drop pointless counting of consumed bytes

2017-02-01 Thread Anton Khirnov
Video decoders always consume full packets. --- libavcodec/h264dec.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 6ce0287..a68a9ad 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -628,19

[libav-devel] [PATCH 2/4] h264dec: rewrite the reordering code

2017-02-01 Thread Anton Khirnov
Current code is excessively complicated and hard to read. Use the same logic as in the HEVC decoder, augmented with detection of insufficient delay. --- libavcodec/h264_picture.c | 2 +- libavcodec/h264_refs.c| 18 + libavcodec/h264_slice.c | 185

[libav-devel] [PATCH 1/4] h264: mark the currently active SPS as const

2017-02-01 Thread Anton Khirnov
It is never modified anymore. --- libavcodec/h264_ps.h| 3 +-- libavcodec/h264_slice.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h index 9a32d93..1b482f3 100644 --- a/libavcodec/h264_ps.h +++ b/libavcodec/h264_ps.h @@

[libav-devel] [PATCH 7/7] decode: plug a leak on error in update_frame_pool()

2017-02-01 Thread Anton Khirnov
--- libavcodec/decode.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index d5210d0..44cab68 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -923,8 +923,10 @@ static int update_frame_pool(AVCodecContext *avctx,

[libav-devel] [PATCH 3/7] pthread_frame: do not embed full AVFrame structs into per-thread contexts

2017-02-01 Thread Anton Khirnov
Use the AVFrame API to properly allocate and free frames for delayed release. --- libavcodec/pthread_frame.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index

[libav-devel] [PATCH 4/7] pthread_frame: do not copy a range of AVCodecContext fields at once

2017-02-01 Thread Anton Khirnov
This is extremely fragile against reordering and hides what is actually being copied. Copy all the fields manually instead. --- libavcodec/pthread_frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index

[libav-devel] [PATCH 5/7] pthread_frame: do not share priv_data between multiple codec contexts

2017-02-01 Thread Anton Khirnov
This is fragile and dangerous, allocate separate private data for each per-thread context. --- libavcodec/pthread_frame.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index d4a3406..12d5481 100644

[libav-devel] [PATCH 6/7] lavc: do not implicitly share the frame pool between threads

2017-02-01 Thread Anton Khirnov
Currently the frame pool used by the default get_buffer2() implementation is a single struct, allocated when opening the decoder. A pointer to it is simply copied to each frame thread and we assume that no thread attempts to modify it at an unexpected time. This is rather fragile and potentially

[libav-devel] [PATCH 1/7] lavc: replace AVCodecInternal.allocate_progress with an internal cap

2017-02-01 Thread Anton Khirnov
This is a constant codec property, so a capability flag is more appropriate. --- doc/multithreading.txt | 5 +++-- libavcodec/h264dec.c | 5 ++--- libavcodec/hevcdec.c | 5 ++--- libavcodec/internal.h | 20 +--- libavcodec/mimic.c | 3 +--

[libav-devel] [PATCH 2/7] pthread_frame: merge the functionality for normal decoder init and init_thread_copy

2017-02-01 Thread Anton Khirnov
The current design, where - proper init is called for the first per-thread context - first thread's private data is copied into private data for all the other threads - a "fixup" function is called for all the other threads to e.g. allocate dynamically allocated data is very fragile and hard

Re: [libav-devel] [PATCH] build: Move cli tools to a separate subdirectory

2017-02-01 Thread Luca Barbato
On 01/02/2017 01:05, Vittorio Giovara wrote: > IMO the final executable should still stay in the build directory. +1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] svq3: Convert to the new bitstream reader

2017-02-01 Thread Diego Biurrun
From: Alexandra Hájková --- Changed suspicious -AV_WL32(>gb_slice.buffer[1], header ^ s->watermark_key); +AV_WL32(>slice_buf[1], header ^ s->watermark_key); to -AV_WL32(>gb_slice.buffer[1], header ^ s->watermark_key); +