ffmpeg | branch: master | Lynne <d...@lynne.ee> | Fri May 23 05:11:07 2025 +0900| [977d1a24bc01ad2a9674f7bc749c6dc4adde0e13] | committer: Lynne
vulkan/ffv1: fix sync issue in cached bitstream reader/writer The issue is that there is an explicit lack of synchronization as only the very first invocation writes symbols and updates the state, which other invocations then store. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=977d1a24bc01ad2a9674f7bc749c6dc4adde0e13 --- libavcodec/vulkan/ffv1_dec.comp | 2 ++ libavcodec/vulkan/ffv1_enc.comp | 1 + 2 files changed, 3 insertions(+) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index 1d33b32c6b..a90bac321b 100644 --- a/libavcodec/vulkan/ffv1_dec.comp +++ b/libavcodec/vulkan/ffv1_dec.comp @@ -110,6 +110,8 @@ void decode_line(inout SliceContext sc, ivec2 sp, int w, #ifdef CACHED_SYMBOL_READER } + + barrier(); sb.v = state[gl_LocalInvocationID.x]; #endif } diff --git a/libavcodec/vulkan/ffv1_enc.comp b/libavcodec/vulkan/ffv1_enc.comp index 65a7df1359..78372f5b3a 100644 --- a/libavcodec/vulkan/ffv1_enc.comp +++ b/libavcodec/vulkan/ffv1_enc.comp @@ -107,6 +107,7 @@ void encode_line(inout SliceContext sc, readonly uimage2D img, uint state_off, put_symbol(sc.c, context_off, d[1]); #ifdef CACHED_SYMBOL_READER + barrier(); sb.v = state[gl_LocalInvocationID.x]; #endif } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".