@ -22,6 +22,7 @@
* MMX optimization by Nick Kurshev < nickols_k @ mail . ru >
*/
# include "libavutil/attributes.h"
# include "libavutil/cpu.h"
# include "libavutil/x86/asm.h"
# include "libavcodec/dsputil.h"
@ -1821,7 +1822,8 @@ void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src,
c - > PFX # # _pixels_tab IDX [ 3 ] = PFX # # _pixels # # SIZE # # _xy2_ # # CPU ; \
} while ( 0 )
static void dsputil_init_mmx ( DSPContext * c , AVCodecContext * avctx , int mm_flags )
static av_cold void dsputil_init_mmx ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
const int high_bit_depth = avctx - > bits_per_raw_sample > 8 ;
@ -1867,8 +1869,8 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
}
static void dsputil_init_mmxext ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
static av_cold void dsputil_init_mmxext ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
const int bit_depth = avctx - > bits_per_raw_sample ;
const int high_bit_depth = bit_depth > 8 ;
@ -1946,8 +1948,8 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
# endif /* HAVE_MMXEXT_EXTERNAL */
}
static void dsputil_init_3dnow ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
static av_cold void dsputil_init_3dnow ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
const int high_bit_depth = avctx - > bits_per_raw_sample > 8 ;
@ -1991,7 +1993,8 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
# endif /* HAVE_YASM */
}
static void dsputil_init_sse ( DSPContext * c , AVCodecContext * avctx , int mm_flags )
static av_cold void dsputil_init_sse ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
const int high_bit_depth = avctx - > bits_per_raw_sample > 8 ;
@ -2014,8 +2017,8 @@ static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags)
# endif /* HAVE_YASM */
}
static void dsputil_init_sse2 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
static av_cold void dsputil_init_sse2 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
const int bit_depth = avctx - > bits_per_raw_sample ;
const int high_bit_depth = bit_depth > 8 ;
@ -2062,8 +2065,8 @@ static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
# endif /* HAVE_SSE2_EXTERNAL */
}
static void dsputil_init_ssse3 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
static av_cold void dsputil_init_ssse3 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
# if HAVE_SSSE3_EXTERNAL
const int high_bit_depth = avctx - > bits_per_raw_sample > 8 ;
@ -2088,15 +2091,15 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
# endif /* HAVE_SSSE3_EXTERNAL */
}
static void dsputil_init_sse4 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
static av_cold void dsputil_init_sse4 ( DSPContext * c , AVCodecContext * avctx ,
int mm_flags )
{
# if HAVE_SSE4_EXTERNAL
c - > vector_clip_int32 = ff_vector_clip_int32_sse4 ;
# endif /* HAVE_SSE4_EXTERNAL */
}
static void dsputil_init_avx ( DSPContext * c , AVCodecContext * avctx , int mm_flags )
static av_cold void dsputil_init_avx ( DSPContext * c , AVCodecContext * avctx , int mm_flags )
{
# if HAVE_AVX_EXTERNAL
const int bit_depth = avctx - > bits_per_raw_sample ;
@ -2110,7 +2113,7 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
# endif /* HAVE_AVX_EXTERNAL */
}
void ff_dsputil_init_mmx ( DSPContext * c , AVCodecContext * avctx )
av_cold void ff_dsputil_init_mmx ( DSPContext * c , AVCodecContext * avctx )
{
int mm_flags = av_get_cpu_flags ( ) ;