aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-06 18:27:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-06 18:27:49 +0200
commitfc7d0d82017d67a1bbc0c1664144b756dc4ba6e3 (patch)
tree3c74c86c81682dcc5244ae391eb7fa4f82574088
parent7be230b5fa580a0a70ea18a58c34e99b5f50ae10 (diff)
downloadffmpeg-fc7d0d82017d67a1bbc0c1664144b756dc4ba6e3.tar.gz
avcodec/x86/hevcdsp_init: fix SSE4 checks
Found-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/x86/hevcdsp_init.c48
1 files changed, 18 insertions, 30 deletions
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index c7e186842f..fcdb05a241 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -346,43 +346,31 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
int mm_flags = av_get_cpu_flags();
if (bit_depth == 8) {
- if (EXTERNAL_MMX(mm_flags)) {
+ if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
- if (EXTERNAL_MMXEXT(mm_flags)) {
+ EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8);
+ EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8);
+ EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8);
+ EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv, 8);
- if (EXTERNAL_SSSE3(mm_flags) && ARCH_X86_64) {
+ QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 8);
+ QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h, 8);
+ QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8);
+ QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv, 8);
- EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8);
- EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8);
- EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8);
- EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv, 8);
-
- QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 8);
- QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h, 8);
- QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8);
- QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv, 8);
-
- }
- }
}
} else if (bit_depth == 10) {
- if (EXTERNAL_MMX(mm_flags)) {
- if (EXTERNAL_MMXEXT(mm_flags) && ARCH_X86_64) {
-
- if (EXTERNAL_SSSE3(mm_flags)) {
-
- EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 10);
- EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 10);
- EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 10);
- EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv, 10);
+ if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
- QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 10);
- QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h, 10);
- QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 10);
- QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv, 10);
- }
+ EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 10);
+ EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 10);
+ EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 10);
+ EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv, 10);
- }
+ QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 10);
+ QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h, 10);
+ QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 10);
+ QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv, 10);
}
}
}