1
0
mirror of https://github.com/jellyfin/jellyfin-ffmpeg.git synced 2025-04-18 20:24:05 +03:00

lavc/huffyuvdsp: disable gcc vectorization

GCC vectorization with avx will break unit tests for this dsp
This commit is contained in:
gnattu 2025-04-15 14:55:36 +08:00
parent c805f8133a
commit b0c28f8997

View File

@ -36,3 +36,39 @@ Index: FFmpeg/libavcodec/x86/cabac.h
int get_cabac_inline_x86(CABACContext *c, uint8_t *const state)
{
int bit, tmp;
Index: FFmpeg/libavcodec/huffyuvdsp.c
===================================================================
--- FFmpeg.orig/libavcodec/huffyuvdsp.c
+++ FFmpeg/libavcodec/huffyuvdsp.c
@@ -16,6 +16,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+// GCC Vectorize with AVX will break huffyuv unit tests.
+#if defined(__GNUC__) && !defined(__clang__)
+ #if (__GNUC__ > 6)
+ #pragma GCC optimize ("no-tree-vectorize")
+ #endif
+#endif
+
#include <stdint.h>
#include "config.h"
Index: FFmpeg/libavcodec/huffyuvenc.c
===================================================================
--- FFmpeg.orig/libavcodec/huffyuvenc.c
+++ FFmpeg/libavcodec/huffyuvenc.c
@@ -28,6 +28,13 @@
* huffyuv encoder
*/
+ // GCC Vectorize with AVX will break huffyuv unit tests.
+#if defined(__GNUC__) && !defined(__clang__)
+ #if (__GNUC__ > 6)
+ #pragma GCC optimize ("no-tree-vectorize")
+ #endif
+#endif
+
#include "config_components.h"
#include "avcodec.h"