[FFmpeg-devel] [PATCH] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions

Shivraj Patil Shivraj.Patil at imgtec.com
Tue Aug 4 14:04:21 CEST 2015


Hi,
+++ b/libavcodec/mips/vp8dsp_init_mips.c

Is there a reason the init code lives in a different file than the implementations? It seems to me all symbols could be static if the init code lived in the same file as the implementation. This isn't a big deal, just wondering.

Shivraj:- Yes, the files can be merged, we just followed the tradition as done by other platforms.

Well, so, I have to explain this for it to make sense. On most platforms, like x86 and arm, we use raw assembly (in .asm files), where the init code (for function pointer assignment) is C, so they can't logically live in same files. On platforms where we use C-ish languages for platform-specific optimizations (e.g. intrinsics for altivec, or gcc-style inline assembly for x86), I believe the preference would be to use static functions and merge init/code in the same file.

Shivraj:- "*_init_mips.c" file will contain pointer initialization of all mips extensions, right now only one extension present that is MIPS SIMD Arch(MSA). "*_msa.c" file contain optimized code for MSA extension.
In future for other mips extension (like dsp-ase r2 etc), pointer initialization will still happen in file "*_init_mips.c" but sources will be in different file "*_dspaser2.c"

Thanks,
Shivraj



More information about the ffmpeg-devel mailing list