diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-01 15:38:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-01 16:21:52 +0200 |
commit | f54e01c24e03a7dc340bd9449debfe7fb58987da (patch) | |
tree | 2deebee8ec6d0cf34cbe02bce336229323df4b42 /libavcodec/x86/idctdsp_init.c | |
parent | ad99837b638f1271da37dbe75d409b1350ad556e (diff) | |
parent | a786c8259dafeca9744252230b5d78f67810770c (diff) | |
download | ffmpeg-f54e01c24e03a7dc340bd9449debfe7fb58987da.tar.gz |
Merge commit 'a786c8259dafeca9744252230b5d78f67810770c'
* commit 'a786c8259dafeca9744252230b5d78f67810770c':
idct: Split off Xvid IDCT
Conflicts:
libavcodec/Makefile
libavcodec/mpeg4videodec.c
libavcodec/x86/Makefile
libavcodec/x86/idctdsp_init.c
This split is somewhat restructured leaving the xvid IDCT available
outside mpeg4 if manually selected.
The code also could not be merged unchanged as it conflicted with a
bugfix in FFmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/idctdsp_init.c')
-rw-r--r-- | libavcodec/x86/idctdsp_init.c | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/libavcodec/x86/idctdsp_init.c b/libavcodec/x86/idctdsp_init.c index 5bf5cc6ecc..6f54d80f87 100644 --- a/libavcodec/x86/idctdsp_init.c +++ b/libavcodec/x86/idctdsp_init.c @@ -22,7 +22,6 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/avcodec.h" #include "libavcodec/idctdsp.h" -#include "idct_xvid.h" #include "idctdsp.h" #include "simple_idct.h" @@ -38,8 +37,6 @@ static const uint8_t simple_mmx_permutation[64] = { 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, }; -static const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 }; - av_cold int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, enum idct_permutation_type perm_type) { @@ -50,10 +47,6 @@ av_cold int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, for (i = 0; i < 64; i++) idct_permutation[i] = simple_mmx_permutation[i]; return 1; - case FF_IDCT_PERM_SSE2: - for (i = 0; i < 64; i++) - idct_permutation[i] = (i & 0x38) | idct_sse2_row_perm[i & 7]; - return 1; } return 0; @@ -68,44 +61,20 @@ av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, c->put_pixels_clamped = ff_put_pixels_clamped_mmx; c->add_pixels_clamped = ff_add_pixels_clamped_mmx; - if (avctx->lowres == 0 && !high_bit_depth) { - switch (avctx->idct_algo) { - case FF_IDCT_AUTO: - case FF_IDCT_SIMPLEAUTO: - case FF_IDCT_SIMPLEMMX: + if (!high_bit_depth && + avctx->lowres == 0 && + (avctx->idct_algo == FF_IDCT_AUTO || + avctx->idct_algo == FF_IDCT_SIMPLEAUTO || + avctx->idct_algo == FF_IDCT_SIMPLEMMX)) { c->idct_put = ff_simple_idct_put_mmx; c->idct_add = ff_simple_idct_add_mmx; c->idct = ff_simple_idct_mmx; c->perm_type = FF_IDCT_PERM_SIMPLE; - break; - case FF_IDCT_XVIDMMX: - c->idct_put = ff_idct_xvid_mmx_put; - c->idct_add = ff_idct_xvid_mmx_add; - c->idct = ff_idct_xvid_mmx; - break; - } } } if (EXTERNAL_MMX(cpu_flags)) { c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx; } - - if (INLINE_MMXEXT(cpu_flags)) { - if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX && avctx->lowres == 0) { - c->idct_put = ff_idct_xvid_mmxext_put; - c->idct_add = ff_idct_xvid_mmxext_add; - c->idct = ff_idct_xvid_mmxext; - } - } - - if (INLINE_SSE2(cpu_flags)) { - if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX && avctx->lowres == 0) { - c->idct_put = ff_idct_xvid_sse2_put; - c->idct_add = ff_idct_xvid_sse2_add; - c->idct = ff_idct_xvid_sse2; - c->perm_type = FF_IDCT_PERM_SSE2; - } - } if (EXTERNAL_SSE2(cpu_flags)) { c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_sse2; } |