首页 > 其他分享 >ffmpeg Coding Rules SIMD/DSP

ffmpeg Coding Rules SIMD/DSP

时间:2024-11-10 11:18:53浏览次数:1  
标签:function tests code assembly ffmpeg Rules Coding DSP checkasm

As modern compilers are unable to generate efficient SIMD or other performance-critical DSP code from plain C, handwritten assembly is used. Usually such code is isolated in a separate function. Then the standard approach is writing multiple versions of this function – a plain C one that works everywhere and may also be useful for debugging, and potentially multiple architecture-specific optimized implementations. Initialization code then chooses the best available version at runtime and loads it into a function pointer; the function in question is then always called through this pointer.

The specific syntax used for writing assembly is:

NASM on x86;
GAS on ARM and RISC-V.
A unit testing framework for assembly called checkasm lives under tests/checkasm. All new assembly should come with checkasm tests; adding tests for existing assembly that lacks them is also strongly encouraged.

https://www.octfgroup.com/

标签:function,tests,code,assembly,ffmpeg,Rules,Coding,DSP,checkasm
From: https://www.cnblogs.com/sathcal/p/18537777

相关文章

  • ffmpeg Video and Audio file format conversion
    Anysupportedfileformatandprotocolcanserveasinputtoffmpeg:Examples:YoucanuseYUVfilesasinput:ffmpeg-i/tmp/test%d.Y/tmp/out.mpgItwillusethefiles:/tmp/test0.Y,/tmp/test0.U,/tmp/test0.V,/tmp/test1.Y,/tmp/test1.U,/tmp/test1.V,etc......
  • ffmpeg General Assembly
    TheensembleofactivemembersiscalledtheGeneralAssembly(GA).TheGeneralAssemblyissovereignandlegitimateforallitsdecisionsregardingtheFFmpegproject.TheGeneralAssemblyismadeupofactivecontributors.Contributorsareconsidered&q......
  • ffmpeg Technical Committee
    TheTechnicalCommittee(TC)isheretoarbitrateandmakedecisionswhentechnicalconflictsoccurintheproject.Theywillconsiderthemeritsofallthepositions,judgethemandmakeadecision.TheTCresolvestechnicalconflictsbutisnotatechni......
  • ffmpeg Advanced options
    -map[-]input_file_id[:stream_specifier][:view_specifier][:?]|[linklabel](output)Createoneormorestreamsintheoutputfile.Thisoptionhastwoformsforspecifyingthedatasource(s):thefirstselectsoneormorestreamsfromsomeinputfile(spe......
  • ffmpeg Preset files
    Apresetfilecontainsasequenceofoption=valuepairs,oneforeachline,specifyingasequenceofoptionswhichwouldbeawkwardtospecifyonthecommandline.Linesstartingwiththehash(’#’)characterareignoredandareusedtoprovidecomments.......
  • FFmpeg Options
    Allthenumericaloptions,ifnotspecifiedotherwise,acceptastringrepresentinganumberasinput,whichmaybefollowedbyoneoftheSIunitprefixes,forexample:’K’,’M’,or’G’.If’i’isappendedtotheSIunitprefix,thecompleteprefixw......
  • FFmpeg Video Options
    -vframesnumber(output)Setthenumberofvideoframestooutput.Thisisanobsoletealiasfor-frames:v,whichyoushoulduseinstead.-r[:stream_specifier]fps(input/output,per-stream)Setframerate(Hzvalue,fractionorabbreviation).Asaninputop......
  • ffmpeg Detailed description
    ffmpeg buildsatranscodingpipelineoutofthecomponentslistedbelow.Theprogram’soperationthenconsistsofinputdatachunksflowingfromthesourcesdownthepipestowardsthesinks,whilebeingtransformedbythecomponentstheyencounteralongt......
  • ffmpeg Streamcopy
    Thesimplestpipelinein ffmpeg issingle-stream streamcopy,thatiscopyingone inputelementarystream’spacketswithoutdecoding,filtering,orencodingthem.Asanexample,consideraninputfilecalled INPUT.mkv with3elementarystreams,fromwhi......
  • ffmpeg Trancoding
    Transcoding istheprocessofdecodingastreamandthenencodingitagain.Sinceencodingtendstobecomputationallyexpensiveandinmostcasesdegradesthestreamquality(i.e.itis lossy),youshouldonlytranscodewhenyouneedtoandperformstrea......