Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread Reimar Döffinger
On 09.03.2015, at 15:54, Hendrik Leppkes wrote: > > Of course avcodec shouldn't crash when you use it, but a patch to > disallow this combination would never be accepted by yourself and some > others that "like" this cheap (albeit wrong) method for fallback. I forgot to reply: of course I would

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread Reimar Döffinger
On 11.03.2015, at 12:34, wm4 wrote: > On Tue, 10 Mar 2015 18:02:12 +0100 > Reimar Döffinger wrote: Also the buffering issue is the other way, when you try to go from multithreading to HW decode, how do you handle that? If it works well I'd be totally in favour, but I strongly s

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread wm4
On Tue, 10 Mar 2015 18:02:12 +0100 Reimar Döffinger wrote: > On 10.03.2015, at 12:10, wm4 wrote: > > > On Mon, 09 Mar 2015 18:56:57 +0100 > > Reimar Döffinger wrote: > >>> > >>> What I do is simply restart decoding with the packet that failed the > >>> hardware decoder. Don't need to buffer a

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-10 Thread Reimar Döffinger
On 10.03.2015, at 12:10, wm4 wrote: > On Mon, 09 Mar 2015 18:56:57 +0100 > Reimar Döffinger wrote: >>> >>> What I do is simply restart decoding with the packet that failed the >>> hardware decoder. Don't need to buffer anything, you still have the >>> AVPacket in question anyway. >> >> Uh, so

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-10 Thread wm4
On Mon, 09 Mar 2015 18:56:57 +0100 Reimar Döffinger wrote: > On 9 March 2015 15:28:48 CET, Hendrik Leppkes wrote: > >On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger > > wrote: > >> On 9 March 2015 13:34:24 CET, Hendrik Leppkes > >wrote: > >>>On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker > >

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-09 Thread Rainer Hochecker
Hendrik Leppkes gmail.com> writes: > > Just making the ff_thread_finish_setup call in hevc_frame_start > conditional on !hwaccel should do what the other patches did. > My code isn't setup to use this path, so someone that does should test > it and send it. > > - Hendrik >

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 11:06 PM, Michael Niedermayer wrote: > On Mon, Mar 09, 2015 at 06:38:18AM +, Rainer Hochecker wrote: >> Reimar Döffinger gmx.de> writes: >> >> > >> > Any reason to believe this patch causes it? >> > Because I can't see how it would. >> > Maybe it's just a bug with DXVA

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-09 Thread Michael Niedermayer
On Mon, Mar 09, 2015 at 06:38:18AM +, Rainer Hochecker wrote: > Reimar Döffinger gmx.de> writes: > > > > > Any reason to believe this patch causes it? > > Because I can't see how it would. > > Maybe it's just a bug with DXVA and multithreading in the HEVC code? > > Can you provide some more

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 9 March 2015 15:28:48 CET, Hendrik Leppkes wrote: >On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger > wrote: >> On 9 March 2015 13:34:24 CET, Hendrik Leppkes >wrote: >>>On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker >>> wrote: Reimar Döffinger gmx.de> writes: > > Any reaso

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 3:28 PM, Hendrik Leppkes wrote: > On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger > wrote: >> On 9 March 2015 13:34:24 CET, Hendrik Leppkes wrote: >>>On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker >>> wrote: Reimar Döffinger gmx.de> writes: > > Any re

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger wrote: > On 9 March 2015 13:34:24 CET, Hendrik Leppkes wrote: >>On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker >> wrote: >>> Reimar Döffinger gmx.de> writes: >>> Any reason to believe this patch causes it? Because I can't see how

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 9 March 2015 13:34:24 CET, Hendrik Leppkes wrote: >On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker > wrote: >> Reimar Döffinger gmx.de> writes: >> >>> >>> Any reason to believe this patch causes it? >>> Because I can't see how it would. >>> Maybe it's just a bug with DXVA and multithreading i

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker wrote: > Reimar Döffinger gmx.de> writes: > >> >> Any reason to believe this patch causes it? >> Because I can't see how it would. >> Maybe it's just a bug with DXVA and multithreading in the HEVC code? >> Can you provide some more information like

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 09.03.2015, at 07:38, Rainer Hochecker wrote: > Reimar Döffinger gmx.de> writes: > >> >> Any reason to believe this patch causes it? >> Because I can't see how it would. >> Maybe it's just a bug with DXVA and multithreading in the HEVC code? >> Can you provide some more information like a st

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Rainer Hochecker
Reimar Döffinger gmx.de> writes: > > Any reason to believe this patch causes it? > Because I can't see how it would. > Maybe it's just a bug with DXVA and multithreading in the HEVC code? > Can you provide some more information like a stacktrace, possibly using a tool like DrMemory? I don't thi

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Reimar Döffinger
On 08.03.2015, at 22:56, Rainer Hochecker wrote: > Reimar Döffinger gmx.de> writes: > > > I have tested this with Kodi. Works with sw decoding. With DXVA it crashes, > looks like heap corruption or the like. > setting thread_safe_callbacks = 1 cures the issue but I get some green > frames at st

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Rainer Hochecker
Reimar Döffinger gmx.de> writes: I have tested this with Kodi. Works with sw decoding. With DXVA it crashes, looks like heap corruption or the like. setting thread_safe_callbacks = 1 cures the issue but I get some green frames at start of playback. __

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Reimar Döffinger
On 08.03.2015, at 19:15, Rainer Hochecker wrote: > Reimar Döffinger gmx.de> writes: > > I tried this patch with Kodi but did not get very far. > > int ff_thread_can_start_frame(AVCodecContext *avctx) > { >PerThreadContext *p = avctx->internal->thread_ctx; >if (avctx->active_thread_type&

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Rainer Hochecker
Reimar Döffinger gmx.de> writes: I tried this patch with Kodi but did not get very far. int ff_thread_can_start_frame(AVCodecContext *avctx) { PerThreadContext *p = avctx->internal->thread_ctx; if (avctx->active_thread_type&FF_THREAD_FRAME) return 0; av_assert0(!p->main_threa