Hi,

it seems that nobody signed to this list (especially developers) after
developers were divided in two groups
(FFmpeg and forked Libav)... I can not see archives of this mail-list while
developers' thread is worked well...

Then somewhere I found a hint to compile with "--enable-pthreads" instead of
> "w32threads".
> So I got myself the pthreads-win32 library source.
>
I tried to get multithreading decoding to work last days and was confused
that it really works only with
pthreads flag and doesn't - with w32threads! I had not found any description
of this in documentation.

Now I get it worked! I cross-compile FFmpeg too from Linux (because doing
that from MSYS is sucks)
but I didn't compile pthreads - I get it from external repository as
mingw32- and mingw-w64- tools.
Maybe we should share our DLL libraries to check that them built well...

Now if I leave "codec->thread_count" on 1 it still works (single threaded)
> but if I set it to values > 1 then in case of mp4 or xvid videos
> "avcodec_decode_video2" returns 0 and *got_picture_ptr is also 0.
>
I have no such problems. I replace the old libraries with new ones and code
works fine. But I use deprecated avcodec_decode_video() function and I setup
multithreading like this:

    int threadsCount = StThread::countLogicalProcessors();
    codecCtx->thread_count = threadsCount;
    avcodec_thread_init(codecCtx, threadsCount);
    ST_DEBUG_LOG("FFmpeg: Setup AVcodec to use " + threadsCount + "
threads");

    // open VIDEO codec
    if(avcodec_open(codecCtx, codec) < 0) {...

not sure that avcodec_thread_init() call is needed at all - I read somewhere
that it was deprecated now.

How is multithreaded decoding supposed to work? do I have to provide
> "codec->execute" or "codec->execute2"?
>
I didn't do something like this...

Is there some known bug or something?
>
All I found is a multithreading.txt file. But after experimental
multithreading branch was integrated into main repository
I suppose that some new BUGs could be found...

On which codecs should multithreaded decoding work?
>
I don't know. But for x264/h264 it works.

-----------------------------------------------
Kirill Gavrilov,
Software designer.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to