X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2Fmultithreading.txt;h=4f645dc14792e6b9d9ec6cf993ac51b07acf258f;hb=2fd8add1ba340d5bde608d2b8843af9a2487589d;hp=83849deacca3f378241a6cfa42b5def373368234;hpb=14fe81b3a88dfe4dbac12e8715f9a3f05b5ef1bf;p=ffmpeg diff --git a/doc/multithreading.txt b/doc/multithreading.txt index 83849deacca..4f645dc1479 100644 --- a/doc/multithreading.txt +++ b/doc/multithreading.txt @@ -51,16 +51,14 @@ the decode process starts. Call ff_thread_finish_setup() afterwards. If some code can't be moved, have update_thread_context() run it in the next thread. -If the codec allocates writable tables in its init(), add an init_thread_copy() -which re-allocates them for other threads. - Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. If there are inter-frame dependencies, so the codec calls -ff_thread_report/await_progress(), set AVCodecInternal.allocate_progress. The +ff_thread_report/await_progress(), set FF_CODEC_CAP_ALLOCATE_PROGRESS in +AVCodec.caps_internal and use ff_thread_get_buffer() to allocate frames. The frames must then be freed with ff_thread_release_buffer(). -Otherwise leave it at zero and decode directly into the user-supplied frames. +Otherwise decode directly into the user-supplied frames. Call ff_thread_report_progress() after some part of the current picture has decoded. A good place to put this is where draw_horiz_band() is called - add this if it isn't