SSE2 version of simple in-loop filtering

~10% faster decoding

Patch by Somnath Banerjee (somnath at google dot com)

Change-Id: I200db408272b4f61cda9d9261d2d4370a698d6c4
This commit is contained in:
Pascal Massimino
2011-06-10 15:10:18 -07:00
parent 42548da9e3
commit a11009d7fc
10 changed files with 335 additions and 13 deletions

View File

@ -701,9 +701,9 @@ static int x86CPUInfo(CPUFeature feature) {
}
return 0;
}
VP8CPUInfo VP8GetCPUInfo = x86CPUInfo;
VP8CPUInfo VP8EncGetCPUInfo = x86CPUInfo;
#else
VP8CPUInfo VP8GetCPUInfo = NULL;
VP8CPUInfo VP8EncGetCPUInfo = NULL;
#endif
// Speed-critical function pointers. We have to initialize them to the default
@ -753,13 +753,13 @@ void VP8EncDspInit(void) {
VP8Copy16x16 = Copy16x16;
// If defined, use CPUInfo() to overwrite some pointers with faster versions.
if (VP8GetCPUInfo) {
if (VP8GetCPUInfo(kSSE2)) {
if (VP8EncGetCPUInfo) {
if (VP8EncGetCPUInfo(kSSE2)) {
#if defined(__SSE2__) || defined(_MSC_VER)
VP8EncDspInitSSE2();
#endif
}
if (VP8GetCPUInfo(kSSE3)) {
if (VP8EncGetCPUInfo(kSSE3)) {
// later we'll plug some SSE3 variant here
}
}

View File

@ -492,7 +492,7 @@ typedef enum {
} CPUFeature;
// returns true if the CPU supports the feature.
typedef int (*VP8CPUInfo)(CPUFeature feature);
extern VP8CPUInfo VP8GetCPUInfo;
extern VP8CPUInfo VP8EncGetCPUInfo;
void VP8EncDspInit(void); // must be called before using any of the above