MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / postProcess

Function postProcess

libpostproc/postprocess.c:649–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647// minor note: the HAVE_xyz is messed up after that line so do not use it.
648
649static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
650 const QP_STORE_T QPs[], int QPStride, int isColor, pp_mode *vm, pp_context *vc)
651{
652 PPContext *c= (PPContext *)vc;
653 PPMode *ppMode= (PPMode *)vm;
654 c->ppMode= *ppMode; //FIXME
655
656 // Using ifs here as they are faster than function pointers although the
657 // difference would not be measurable here but it is much better because
658 // someone might exchange the CPU whithout restarting MPlayer ;)
659#if CONFIG_RUNTIME_CPUDETECT
660#if ARCH_X86
661 // ordered per speed fastest first
662 if(c->cpuCaps & PP_CPU_CAPS_MMX2)
663 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
664 else if(c->cpuCaps & PP_CPU_CAPS_3DNOW)
665 postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
666 else if(c->cpuCaps & PP_CPU_CAPS_MMX)
667 postProcess_MMX(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
668 else
669 postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
670#else
671#if HAVE_ALTIVEC
672 if(c->cpuCaps & PP_CPU_CAPS_ALTIVEC)
673 postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
674 else
675#endif
676 postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
677#endif
678#else //CONFIG_RUNTIME_CPUDETECT
679#if HAVE_MMX2
680 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
681#elif HAVE_AMD3DNOW
682 postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
683#elif HAVE_MMX
684 postProcess_MMX(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
685#elif HAVE_ALTIVEC
686 postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
687#else
688 postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
689#endif
690#endif //!CONFIG_RUNTIME_CPUDETECT
691}
692
693//static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
694// QP_STORE_T QPs[], int QPStride, int isColor, struct PPMode *ppMode);

Callers 1

pp_postprocessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected