diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-22 11:56:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-22 12:08:52 +0200 |
commit | 4095fa903830f8395a26d6ee38c77ad6333a4f5e (patch) | |
tree | 828ada22309e543a181997b63c6ffca6868731ac /libavcodec/x86/dsputilenc_mmx.c | |
parent | 657eac048eb267d781de83849fe7616d29320832 (diff) | |
parent | bb32fded3623a20ff8999c2924315841c08c985c (diff) | |
download | ffmpeg-4095fa903830f8395a26d6ee38c77ad6333a4f5e.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
dnxhddec: optimise dnxhd_decode_dct_block()
rtp: remove disabled code
eac3enc: use different numbers of blocks per frame to allow higher bitrates
dnxhd: add regression test for 10-bit
dnxhd: 10-bit support
dsputil: update per-arch init funcs for non-h264 high bit depth
dsputil: template get_pixels() for different bit depths
dsputil: create 16/32-bit dctcoef versions of some functions
jfdctint: add 10-bit version
mov: add clcp type track as Subtitle stream.
mpeg4: add Mpeg4 Profiles names.
mpeg4: decode Level Profile for MPEG4 Part 2.
ffprobe: display bitstream level.
imgconvert: remove unused glue and xglue macros
Conflicts:
libavcodec/dsputil_template.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/dsputilenc_mmx.c')
-rw-r--r-- | libavcodec/x86/dsputilenc_mmx.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index bd31205a6b..f13c1219da 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -1098,10 +1098,12 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); + int bit_depth = avctx->bits_per_raw_sample; if (mm_flags & AV_CPU_FLAG_MMX) { const int dct_algo = avctx->dct_algo; - if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){ + if (avctx->bits_per_raw_sample <= 8 && + (dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX)) { if(mm_flags & AV_CPU_FLAG_SSE2){ c->fdct = ff_fdct_sse2; }else if(mm_flags & AV_CPU_FLAG_MMX2){ @@ -1111,7 +1113,8 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) } } - c->get_pixels = get_pixels_mmx; + if (bit_depth <= 8) + c->get_pixels = get_pixels_mmx; c->diff_pixels = diff_pixels_mmx; c->pix_sum = pix_sum16_mmx; @@ -1158,7 +1161,8 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) } if(mm_flags & AV_CPU_FLAG_SSE2){ - c->get_pixels = get_pixels_sse2; + if (bit_depth <= 8) + c->get_pixels = get_pixels_sse2; c->sum_abs_dctelem= sum_abs_dctelem_sse2; #if HAVE_YASM && HAVE_ALIGNED_STACK c->hadamard8_diff[0]= ff_hadamard8_diff16_sse2; |