On 30/11/2016 23:13, Wan-Teh Chang wrote:
> This patch is intended to avoid confusion when one inspects the source code.
> 
> ff_thread_report_progress() and ff_thread_await_progress() form a
> pair. ff_thread_await_progress() reads progress[field] with the
> "acquire" memory order (in the fast code path). Therefore, one expects
> to see ff_thread_report_progress() write progress[field] with the
> matching "release" memory order.
> 
> In the fast code path in  ff_thread_report_progress(), the atomic load
> of progress[field] doesn't need the "acquire" memory order because the
> calling thread is trying to make the data it just decoded visible to
> the other threads, rather than trying to read the data decoded by
> other threads.
> 
> Please let me know if you have other questions.

Assuming it is not causing noticeable slowdowns/speedups (a benchmark
would be welcome), I'm all for consistency.

Would be nice if you update the patch with this longer description though.

Anton, do you agree?

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to