summaryrefslogtreecommitdiff
path: root/libavcodec/x86
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-11 13:52:38 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-02-11 22:54:52 +0100
commit972771dcf27d4988a5d83afade989f7f9b938ee4 (patch)
treec6e92e89858303c671b6fab4edf38fec50f4cde7 /libavcodec/x86
parent0aa1d848ece6120ecaa2a43c67fc8705ec6712c5 (diff)
h264chroma: remove duplicate 9/10 bit functions.
Also use the resulting 16bpp functions for anything >8 and <=16, not just 9 and 10. This fixes 12 and 14bpp H264 support. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/h264chroma_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/x86/h264chroma_init.c b/libavcodec/x86/h264chroma_init.c
index 6fc9a436d3..b5c078f732 100644
--- a/libavcodec/x86/h264chroma_init.c
+++ b/libavcodec/x86/h264chroma_init.c
@@ -89,14 +89,14 @@ void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth)
c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmxext;
}
- if (EXTERNAL_MMXEXT(mm_flags) && bit_depth == 10) {
+ if (EXTERNAL_MMXEXT(mm_flags) && bit_depth > 8 && bit_depth <= 10) {
c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext;
c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext;
c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext;
c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmxext;
}
- if (EXTERNAL_SSE2(mm_flags) && bit_depth == 10) {
+ if (EXTERNAL_SSE2(mm_flags) && bit_depth > 8 && bit_depth <= 10) {
c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2;
c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_sse2;
}
@@ -108,7 +108,7 @@ void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth)
c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_ssse3;
}
- if (EXTERNAL_AVX(mm_flags) && bit_depth == 10) {
+ if (EXTERNAL_AVX(mm_flags) && bit_depth > 8 && bit_depth <= 10) {
// AVX implies !cache64.
// TODO: Port cache(32|64) detection from x264.
c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx;