History

rgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes

Michael Niedermayer committed 12 years ago

Commit 91c98181 parent 7597e6e1 file · +27 −0Browse files

Unified · Split

libswscale/x86/rgb2rgb_template.c+27−0
@@ -1943,6 +1943,30 @@ static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, ui · 1942 unmodified lines
1943}1943}
1944#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */1944#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */
1945 1945
1946#if !COMPILE_TEMPLATE_AMD3DNOW && (ARCH_X86_32 || COMPILE_TEMPLATE_SSE2) && COMPILE_TEMPLATE_MMXEXT == COMPILE_TEMPLATE_SSE2 && HAVE_YASM
1947void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
1948 const uint8_t *src, const uint8_t *unused, int w,
1949 uint32_t *unused2);
1950static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2,
1951 int width, int height, int srcStride,
1952 int dst1Stride, int dst2Stride)
1953{
1954 int h;
1955
1956 for (h = 0; h < height; h++) {
1957 RENAME(ff_nv12ToUV)(dst1, dst2, src, NULL, width, NULL);
1958 src += srcStride;
1959 dst1 += dst1Stride;
1960 dst2 += dst2Stride;
1961 }
1962 __asm__(
1963 EMMS" \n\t"
1964 SFENCE" \n\t"
1965 ::: "memory"
1966 );
1967}
1968#endif /* !COMPILE_TEMPLATE_AMD3DNOW */
1969
1946#if !COMPILE_TEMPLATE_SSE21970#if !COMPILE_TEMPLATE_SSE2
1947#if !COMPILE_TEMPLATE_AMD3DNOW1971#if !COMPILE_TEMPLATE_AMD3DNOW
1948static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,1972static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
@@ -2512,4 +2536,7 @@ static av_cold void RENAME(rgb2rgb_init)(void) · 563 unmodified lines
2512#if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX2536#if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX
2513 interleaveBytes = RENAME(interleaveBytes);2537 interleaveBytes = RENAME(interleaveBytes);
2514#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */2538#endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */
2539#if !COMPILE_TEMPLATE_AMD3DNOW && (ARCH_X86_32 || COMPILE_TEMPLATE_SSE2) && COMPILE_TEMPLATE_MMXEXT == COMPILE_TEMPLATE_SSE2 && HAVE_YASM
2540 deinterleaveBytes = RENAME(deinterleaveBytes);
2541#endif
2515}2542}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t