|
|
@@ -2431,6 +2431,18 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, |
|
|
#if HAVE_INLINE_ASM |
|
|
#if HAVE_INLINE_ASM |
|
|
c->prefetch = prefetch_mmxext; |
|
|
c->prefetch = prefetch_mmxext; |
|
|
|
|
|
|
|
|
|
|
|
SET_QPEL_FUNCS(avg_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
|
|
|
|
|
|
SET_QPEL_FUNCS(put_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
|
|
|
if (!high_bit_depth) { |
|
|
if (!high_bit_depth) { |
|
|
c->put_pixels_tab[0][1] = put_pixels16_x2_mmxext; |
|
|
c->put_pixels_tab[0][1] = put_pixels16_x2_mmxext; |
|
|
c->put_pixels_tab[0][2] = put_pixels16_y2_mmxext; |
|
|
c->put_pixels_tab[0][2] = put_pixels16_y2_mmxext; |
|
|
@@ -2468,13 +2480,6 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, |
|
|
|
|
|
|
|
|
#if HAVE_MMXEXT_EXTERNAL |
|
|
#if HAVE_MMXEXT_EXTERNAL |
|
|
if (CONFIG_H264QPEL) { |
|
|
if (CONFIG_H264QPEL) { |
|
|
SET_QPEL_FUNCS(put_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
|
|
|
|
|
|
if (!high_bit_depth) { |
|
|
if (!high_bit_depth) { |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); |
|
|
@@ -2492,11 +2497,6 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); |
|
|
SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); |
|
|
SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); |
|
|
SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmxext, ); |
|
|
|
|
|
SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmxext, ); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!high_bit_depth && CONFIG_H264CHROMA) { |
|
|
if (!high_bit_depth && CONFIG_H264CHROMA) { |
|
|
@@ -2626,10 +2626,19 @@ static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags) |
|
|
static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, |
|
|
static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, |
|
|
int mm_flags) |
|
|
int mm_flags) |
|
|
{ |
|
|
{ |
|
|
#if HAVE_SSE2_EXTERNAL |
|
|
|
|
|
const int bit_depth = avctx->bits_per_raw_sample; |
|
|
const int bit_depth = avctx->bits_per_raw_sample; |
|
|
const int high_bit_depth = bit_depth > 8; |
|
|
const int high_bit_depth = bit_depth > 8; |
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_SSE2_INLINE |
|
|
|
|
|
if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) { |
|
|
|
|
|
c->idct_put = ff_idct_xvid_sse2_put; |
|
|
|
|
|
c->idct_add = ff_idct_xvid_sse2_add; |
|
|
|
|
|
c->idct = ff_idct_xvid_sse2; |
|
|
|
|
|
c->idct_permutation_type = FF_SSE2_IDCT_PERM; |
|
|
|
|
|
} |
|
|
|
|
|
#endif /* HAVE_SSE2_INLINE */ |
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_SSE2_EXTERNAL |
|
|
if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { |
|
|
if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { |
|
|
// these functions are slower than mmx on AMD, but faster on Intel |
|
|
// these functions are slower than mmx on AMD, but faster on Intel |
|
|
if (!high_bit_depth) { |
|
|
if (!high_bit_depth) { |
|
|
|