[ih264] per-function target attribute on clang and GCC (#328)

This commit is contained in:
emiyl 2022-10-04 14:24:14 +01:00 committed by GitHub
parent 8a0fe21589
commit 4519a59d74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 179 additions and 4 deletions

View file

@ -60,6 +60,12 @@
#include "ih264d_structs.h"
#ifdef __GNUC__
#define ATTRIBUTE_SSE42 __attribute__((target("sse4.2")))
#else
#define ATTRIBUTE_SSE42
#endif
/**
*******************************************************************************
@ -79,6 +85,7 @@
*
*******************************************************************************
*/
ATTRIBUTE_SSE42
void ih264d_init_function_ptr_sse42(dec_struct_t *ps_codec)
{
ps_codec->pf_default_weighted_pred_luma = ih264_default_weighted_pred_luma_sse42;