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

Merge pull request #557 from jellyfin/disable-vectorize-huffyuvdsp

lavc/huffyuvdsp: disable gcc vectorization
This commit is contained in:
Nyanmisaka 2025-04-15 07:28:24 +00:00 committed by GitHub
commit e6364b1dff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"