├── .github └── workflows │ └── build.yaml ├── .gitignore ├── .reviewboardrc ├── .travis.yml ├── CODING_STYLE ├── CONTRIBUTORS ├── LICENSE ├── Makefile ├── README.md ├── RELEASES ├── SECURITY.md ├── autotest ├── codec_comparision │ └── run_MultiCodecComparision.sh ├── performanceTest │ ├── .gitignore │ ├── android │ │ └── run_AutoTest_android.sh │ ├── ios │ │ ├── fruitstrap │ │ ├── iFileTransfer │ │ ├── run_AutoTest_ios.sh │ │ └── uiascript.js │ ├── parsePerfData.sh │ └── run_perfTest.sh └── unitTest │ ├── .gitignore │ ├── android │ └── run_AutoTest_android.sh │ ├── ios │ └── run_AutoTest_ios.sh │ ├── run_ParseUTxml.sh │ └── run_unitTest.sh ├── build.gradle ├── build ├── AutoBuildForWindows.bat ├── Dockerfile ├── arch.mk ├── astyle.cfg ├── gtest-targets.mk ├── loongarch-simd-check.sh ├── mips-simd-check.sh ├── mktargets.py ├── mktargets.sh ├── msvc-app.mk ├── msvc-common.mk ├── ndk-version-check.sh ├── platform-android-r18b.mk ├── platform-android.mk ├── platform-bsd.mk ├── platform-cygwin_nt.mk ├── platform-darwin.mk ├── platform-gnu-chain.mk ├── platform-gnu.mk ├── platform-ios.mk ├── platform-linux.mk ├── platform-mingw_nt.mk ├── platform-msvc-app.mk ├── platform-msvc-wp.mk ├── platform-msvc.mk └── x86-common.mk ├── code-coverage.sh ├── codec ├── api │ ├── meson.build │ └── wels │ │ ├── codec_api.h │ │ ├── codec_app_def.h │ │ ├── codec_def.h │ │ ├── codec_ver.h │ │ └── meson.build ├── build │ ├── android │ │ ├── .gitignore │ │ ├── dec │ │ │ ├── .gitignore │ │ │ ├── AndroidManifest.xml │ │ │ ├── build.gradle │ │ │ ├── jni │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── myjni.cpp │ │ │ │ └── welsdecdemo.mk │ │ │ ├── res │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── com │ │ │ │ └── wels │ │ │ │ └── dec │ │ │ │ └── WelsDecTest.java │ │ └── enc │ │ │ ├── .gitignore │ │ │ ├── AndroidManifest.xml │ │ │ ├── build.gradle │ │ │ ├── jni │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── myjni.cpp │ │ │ └── welsencdemo.mk │ │ │ ├── res │ │ │ ├── layout │ │ │ │ └── main.xml │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ └── com │ │ │ └── wels │ │ │ └── enc │ │ │ └── WelsEncTest.java │ ├── generate_codec_ver.sh │ ├── iOS │ │ ├── .gitignore │ │ ├── common │ │ │ └── common.xcodeproj │ │ │ │ └── project.pbxproj │ │ ├── dec │ │ │ ├── demo │ │ │ │ ├── demo.xcodeproj │ │ │ │ │ └── project.pbxproj │ │ │ │ └── demo │ │ │ │ │ ├── DEMOAppDelegate.h │ │ │ │ │ ├── DEMOAppDelegate.m │ │ │ │ │ ├── DEMOViewController.h │ │ │ │ │ ├── DEMOViewController.m │ │ │ │ │ ├── DEMOViewControllerShowResource.h │ │ │ │ │ ├── DEMOViewControllerShowResource.m │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ ├── Default.png │ │ │ │ │ ├── Default@2x.png │ │ │ │ │ ├── demo-Info.plist │ │ │ │ │ ├── en.lproj │ │ │ │ │ ├── InfoPlist.strings │ │ │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ │ │ └── MainStoryboard_iPhone.storyboard │ │ │ │ │ └── main.m │ │ │ └── welsdec │ │ │ │ └── welsdec.xcodeproj │ │ │ │ └── project.pbxproj │ │ ├── enc │ │ │ ├── encDemo │ │ │ │ ├── encDemo.xcodeproj │ │ │ │ │ └── project.pbxproj │ │ │ │ └── encDemo │ │ │ │ │ ├── AppDelegate.h │ │ │ │ │ ├── AppDelegate.m │ │ │ │ │ ├── Base.lproj │ │ │ │ │ ├── Main_iPad.storyboard │ │ │ │ │ └── Main_iPhone.storyboard │ │ │ │ │ ├── Images.xcassets │ │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── LaunchImage.launchimage │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ViewController.h │ │ │ │ │ ├── ViewController.m │ │ │ │ │ ├── en.lproj │ │ │ │ │ └── InfoPlist.strings │ │ │ │ │ ├── encDemo-Info.plist │ │ │ │ │ └── main.m │ │ │ └── welsenc │ │ │ │ └── welsenc.xcodeproj │ │ │ │ └── project.pbxproj │ │ ├── openh264 │ │ │ └── openh264.xcodeproj │ │ │ │ └── project.pbxproj │ │ └── processing │ │ │ └── processing.xcodeproj │ │ │ └── project.pbxproj │ ├── win32 │ │ ├── .gitignore │ │ ├── dec │ │ │ ├── WelsDecCore.vcproj │ │ │ ├── WelsDecPlus.vcproj │ │ │ ├── WelsDecoder.sln │ │ │ └── decConsole.vcproj │ │ └── enc │ │ │ ├── WelsEncCore.vcproj │ │ │ ├── WelsEncPlus.vcproj │ │ │ ├── WelsEncoder.sln │ │ │ └── encConsole.vcproj │ └── windowsphone │ │ ├── .gitignore │ │ └── all │ │ ├── CodecApp.sln │ │ ├── CodecApp │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── AlignmentGrid.png │ │ │ ├── ApplicationIcon.png │ │ │ ├── BadgeLogo.png │ │ │ ├── Logo.png │ │ │ ├── SplashScreen.png │ │ │ ├── SquareTile150x150.png │ │ │ ├── SquareTile71x71.png │ │ │ ├── StoreLogo.png │ │ │ ├── Tiles │ │ │ │ ├── FlipCycleTileLarge.png │ │ │ │ ├── FlipCycleTileMedium.png │ │ │ │ ├── FlipCycleTileSmall.png │ │ │ │ ├── IconicTileMediumLarge.png │ │ │ │ └── IconicTileSmall.png │ │ │ └── WideLogo.png │ │ ├── CodecApp.csproj │ │ ├── LocalizedStrings.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ ├── AppManifest.xml │ │ │ ├── AssemblyInfo.cs │ │ │ └── WMAppManifest.xml │ │ ├── Resources │ │ │ ├── AppResources.Designer.cs │ │ │ └── AppResources.resx │ │ ├── layer2.cfg │ │ └── welsenc.cfg │ │ ├── CodecRTComponent.cpp │ │ ├── CodecRTComponent.h │ │ ├── CodecRTComponent.vcxproj │ │ └── CodecRTComponent.vcxproj.filters ├── common │ ├── arm │ │ ├── arm_arch_common_macro.S │ │ ├── copy_mb_neon.S │ │ ├── deblocking_neon.S │ │ ├── expand_picture_neon.S │ │ ├── intra_pred_common_neon.S │ │ └── mc_neon.S │ ├── arm64 │ │ ├── arm_aarch64_common.h │ │ ├── arm_arch64_common_macro.S │ │ ├── copy_mb_aarch64_neon.S │ │ ├── deblocking_aarch64_neon.S │ │ ├── expand_picture_aarch64_neon.S │ │ ├── intra_pred_common_aarch64_neon.S │ │ └── mc_aarch64_neon.S │ ├── generate_version.sh │ ├── inc │ │ ├── .gitignore │ │ ├── WelsList.h │ │ ├── WelsLock.h │ │ ├── WelsTask.h │ │ ├── WelsTaskThread.h │ │ ├── WelsThread.h │ │ ├── WelsThreadLib.h │ │ ├── WelsThreadPool.h │ │ ├── asmdefs_mmi.h │ │ ├── copy_mb.h │ │ ├── cpu.h │ │ ├── cpu_core.h │ │ ├── crt_util_safe_x.h │ │ ├── deblocking_common.h │ │ ├── expand_pic.h │ │ ├── golomb_common.h │ │ ├── intra_pred_common.h │ │ ├── loongson_intrinsics.h │ │ ├── ls_defines.h │ │ ├── macros.h │ │ ├── mc.h │ │ ├── measure_time.h │ │ ├── memory_align.h │ │ ├── msa_macros.h │ │ ├── sad_common.h │ │ ├── typedefs.h │ │ ├── utils.h │ │ ├── version.h │ │ ├── version_gen.h.template │ │ ├── welsCodecTrace.h │ │ ├── wels_common_defs.h │ │ └── wels_const_common.h │ ├── loongarch │ │ ├── copy_mb_lsx.c │ │ ├── deblock_lsx.c │ │ ├── intra_pred_com_lasx.c │ │ ├── intra_pred_com_lsx.c │ │ ├── mc_chroma_lsx.c │ │ ├── mc_horver_lsx.c │ │ └── satd_sad_lasx.c │ ├── meson.build │ ├── mips │ │ ├── copy_mb_mmi.c │ │ ├── copy_mb_msa.c │ │ ├── deblock_mmi.c │ │ ├── deblock_msa.c │ │ ├── expand_picture_mmi.c │ │ ├── intra_pred_com_mmi.c │ │ └── satd_sad_mmi.c │ ├── src │ │ ├── WelsTaskThread.cpp │ │ ├── WelsThread.cpp │ │ ├── WelsThreadLib.cpp │ │ ├── WelsThreadPool.cpp │ │ ├── common_tables.cpp │ │ ├── copy_mb.cpp │ │ ├── cpu.cpp │ │ ├── crt_util_safe_x.cpp │ │ ├── deblocking_common.cpp │ │ ├── expand_pic.cpp │ │ ├── intra_pred_common.cpp │ │ ├── mc.cpp │ │ ├── memory_align.cpp │ │ ├── sad_common.cpp │ │ ├── utils.cpp │ │ └── welsCodecTrace.cpp │ ├── targets.mk │ └── x86 │ │ ├── asm_inc.asm │ │ ├── cpuid.asm │ │ ├── dct.asm │ │ ├── deblock.asm │ │ ├── expand_picture.asm │ │ ├── intra_pred_com.asm │ │ ├── mb_copy.asm │ │ ├── mc_chroma.asm │ │ ├── mc_luma.asm │ │ ├── satd_sad.asm │ │ └── vaa.asm ├── console │ ├── common │ │ ├── inc │ │ │ └── read_config.h │ │ ├── meson.build │ │ ├── src │ │ │ └── read_config.cpp │ │ └── targets.mk │ ├── dec │ │ ├── inc │ │ │ └── d3d9_utils.h │ │ ├── meson.build │ │ ├── src │ │ │ ├── d3d9_utils.cpp │ │ │ └── h264dec.cpp │ │ └── targets.mk │ ├── enc │ │ ├── meson.build │ │ ├── src │ │ │ └── welsenc.cpp │ │ └── targets.mk │ └── meson.build ├── decoder │ ├── core │ │ ├── arm │ │ │ ├── block_add_neon.S │ │ │ └── intra_pred_neon.S │ │ ├── arm64 │ │ │ ├── block_add_aarch64_neon.S │ │ │ └── intra_pred_aarch64_neon.S │ │ ├── inc │ │ │ ├── au_parser.h │ │ │ ├── bit_stream.h │ │ │ ├── cabac_decoder.h │ │ │ ├── deblocking.h │ │ │ ├── dec_frame.h │ │ │ ├── dec_golomb.h │ │ │ ├── decode_mb_aux.h │ │ │ ├── decode_slice.h │ │ │ ├── decoder.h │ │ │ ├── decoder_context.h │ │ │ ├── decoder_core.h │ │ │ ├── error_code.h │ │ │ ├── error_concealment.h │ │ │ ├── fmo.h │ │ │ ├── get_intra_predictor.h │ │ │ ├── manage_dec_ref.h │ │ │ ├── mb_cache.h │ │ │ ├── memmgr_nal_unit.h │ │ │ ├── mv_pred.h │ │ │ ├── nal_prefix.h │ │ │ ├── nalu.h │ │ │ ├── parameter_sets.h │ │ │ ├── parse_mb_syn_cabac.h │ │ │ ├── parse_mb_syn_cavlc.h │ │ │ ├── pic_queue.h │ │ │ ├── picture.h │ │ │ ├── rec_mb.h │ │ │ ├── slice.h │ │ │ ├── vlc_decoder.h │ │ │ ├── wels_common_basis.h │ │ │ ├── wels_const.h │ │ │ └── wels_decoder_thread.h │ │ ├── loongarch │ │ │ └── mb_aux_lsx.c │ │ ├── mips │ │ │ └── dct_mmi.c │ │ ├── src │ │ │ ├── au_parser.cpp │ │ │ ├── bit_stream.cpp │ │ │ ├── cabac_decoder.cpp │ │ │ ├── deblocking.cpp │ │ │ ├── decode_mb_aux.cpp │ │ │ ├── decode_slice.cpp │ │ │ ├── decoder.cpp │ │ │ ├── decoder_core.cpp │ │ │ ├── decoder_data_tables.cpp │ │ │ ├── error_concealment.cpp │ │ │ ├── fmo.cpp │ │ │ ├── get_intra_predictor.cpp │ │ │ ├── manage_dec_ref.cpp │ │ │ ├── memmgr_nal_unit.cpp │ │ │ ├── mv_pred.cpp │ │ │ ├── parse_mb_syn_cabac.cpp │ │ │ ├── parse_mb_syn_cavlc.cpp │ │ │ ├── pic_queue.cpp │ │ │ ├── rec_mb.cpp │ │ │ └── wels_decoder_thread.cpp │ │ └── x86 │ │ │ ├── dct.asm │ │ │ └── intra_pred.asm │ ├── meson.build │ ├── plus │ │ ├── inc │ │ │ └── welsDecoderExt.h │ │ └── src │ │ │ ├── welsDecoderExt.cpp │ │ │ └── wels_dec_export.def │ └── targets.mk ├── encoder │ ├── core │ │ ├── arm │ │ │ ├── intra_pred_neon.S │ │ │ ├── intra_pred_sad_3_opt_neon.S │ │ │ ├── memory_neon.S │ │ │ ├── pixel_neon.S │ │ │ ├── reconstruct_neon.S │ │ │ └── svc_motion_estimation.S │ │ ├── arm64 │ │ │ ├── intra_pred_aarch64_neon.S │ │ │ ├── intra_pred_sad_3_opt_aarch64_neon.S │ │ │ ├── memory_aarch64_neon.S │ │ │ ├── pixel_aarch64_neon.S │ │ │ ├── reconstruct_aarch64_neon.S │ │ │ └── svc_motion_estimation_aarch64_neon.S │ │ ├── inc │ │ │ ├── as264_common.h │ │ │ ├── au_set.h │ │ │ ├── deblocking.h │ │ │ ├── decode_mb_aux.h │ │ │ ├── dq_map.h │ │ │ ├── encode_mb_aux.h │ │ │ ├── encoder.h │ │ │ ├── encoder_context.h │ │ │ ├── extern.h │ │ │ ├── get_intra_predictor.h │ │ │ ├── mb_cache.h │ │ │ ├── md.h │ │ │ ├── mt_defs.h │ │ │ ├── mv_pred.h │ │ │ ├── nal_encap.h │ │ │ ├── param_svc.h │ │ │ ├── parameter_sets.h │ │ │ ├── paraset_strategy.h │ │ │ ├── picture.h │ │ │ ├── picture_handle.h │ │ │ ├── rc.h │ │ │ ├── ref_list_mgr_svc.h │ │ │ ├── sample.h │ │ │ ├── set_mb_syn_cabac.h │ │ │ ├── set_mb_syn_cavlc.h │ │ │ ├── slice.h │ │ │ ├── slice_multi_threading.h │ │ │ ├── stat.h │ │ │ ├── svc_base_layer_md.h │ │ │ ├── svc_enc_frame.h │ │ │ ├── svc_enc_golomb.h │ │ │ ├── svc_enc_macroblock.h │ │ │ ├── svc_enc_slice_segment.h │ │ │ ├── svc_encode_mb.h │ │ │ ├── svc_encode_slice.h │ │ │ ├── svc_mode_decision.h │ │ │ ├── svc_motion_estimate.h │ │ │ ├── svc_set_mb_syn.h │ │ │ ├── svc_set_mb_syn_cavlc.h │ │ │ ├── vlc_encoder.h │ │ │ ├── wels_common_basis.h │ │ │ ├── wels_const.h │ │ │ ├── wels_func_ptr_def.h │ │ │ ├── wels_preprocess.h │ │ │ ├── wels_task_base.h │ │ │ ├── wels_task_encoder.h │ │ │ ├── wels_task_management.h │ │ │ └── wels_transpose_matrix.h │ │ ├── loongarch │ │ │ ├── dct_lasx.c │ │ │ ├── get_intra_predictor_lsx.c │ │ │ ├── quant_lsx.c │ │ │ ├── sample_lasx.c │ │ │ └── svc_motion_estimate_lsx.c │ │ ├── mips │ │ │ ├── dct_mmi.c │ │ │ ├── quant_mmi.c │ │ │ └── score_mmi.c │ │ ├── src │ │ │ ├── au_set.cpp │ │ │ ├── deblocking.cpp │ │ │ ├── decode_mb_aux.cpp │ │ │ ├── encode_mb_aux.cpp │ │ │ ├── encoder.cpp │ │ │ ├── encoder_data_tables.cpp │ │ │ ├── encoder_ext.cpp │ │ │ ├── get_intra_predictor.cpp │ │ │ ├── md.cpp │ │ │ ├── mv_pred.cpp │ │ │ ├── nal_encap.cpp │ │ │ ├── paraset_strategy.cpp │ │ │ ├── picture_handle.cpp │ │ │ ├── ratectl.cpp │ │ │ ├── ref_list_mgr_svc.cpp │ │ │ ├── sample.cpp │ │ │ ├── set_mb_syn_cabac.cpp │ │ │ ├── set_mb_syn_cavlc.cpp │ │ │ ├── slice_multi_threading.cpp │ │ │ ├── svc_base_layer_md.cpp │ │ │ ├── svc_enc_slice_segment.cpp │ │ │ ├── svc_encode_mb.cpp │ │ │ ├── svc_encode_slice.cpp │ │ │ ├── svc_mode_decision.cpp │ │ │ ├── svc_motion_estimate.cpp │ │ │ ├── svc_set_mb_syn_cabac.cpp │ │ │ ├── svc_set_mb_syn_cavlc.cpp │ │ │ ├── wels_preprocess.cpp │ │ │ ├── wels_task_base.cpp │ │ │ ├── wels_task_encoder.cpp │ │ │ └── wels_task_management.cpp │ │ └── x86 │ │ │ ├── coeff.asm │ │ │ ├── dct.asm │ │ │ ├── intra_pred.asm │ │ │ ├── matrix_transpose.asm │ │ │ ├── memzero.asm │ │ │ ├── quant.asm │ │ │ ├── sample_sc.asm │ │ │ └── score.asm │ ├── meson.build │ ├── plus │ │ ├── inc │ │ │ └── welsEncoderExt.h │ │ └── src │ │ │ ├── DllEntry.cpp │ │ │ ├── welsEncoderExt.cpp │ │ │ └── wels_enc_export.def │ └── targets.mk ├── meson.build └── processing │ ├── build │ └── win32 │ │ ├── .gitignore │ │ └── WelsVP.vcproj │ ├── interface │ └── IWelsVP.h │ ├── meson.build │ ├── src │ ├── adaptivequantization │ │ ├── AdaptiveQuantization.cpp │ │ └── AdaptiveQuantization.h │ ├── arm │ │ ├── adaptive_quantization.S │ │ ├── down_sample_neon.S │ │ ├── pixel_sad_neon.S │ │ └── vaa_calc_neon.S │ ├── arm64 │ │ ├── adaptive_quantization_aarch64_neon.S │ │ ├── down_sample_aarch64_neon.S │ │ ├── pixel_sad_aarch64_neon.S │ │ └── vaa_calc_aarch64_neon.S │ ├── backgrounddetection │ │ ├── BackgroundDetection.cpp │ │ └── BackgroundDetection.h │ ├── common │ │ ├── WelsFrameWork.cpp │ │ ├── WelsFrameWork.h │ │ ├── WelsFrameWorkEx.cpp │ │ ├── WelsVP.def │ │ ├── WelsVP.rc │ │ ├── common.h │ │ ├── memory.cpp │ │ ├── memory.h │ │ ├── resource.h │ │ ├── typedef.h │ │ └── util.h │ ├── complexityanalysis │ │ ├── ComplexityAnalysis.cpp │ │ └── ComplexityAnalysis.h │ ├── denoise │ │ ├── denoise.cpp │ │ ├── denoise.h │ │ └── denoise_filter.cpp │ ├── downsample │ │ ├── downsample.cpp │ │ ├── downsample.h │ │ └── downsamplefuncs.cpp │ ├── imagerotate │ │ ├── imagerotate.cpp │ │ ├── imagerotate.h │ │ └── imagerotatefuncs.cpp │ ├── loongarch │ │ ├── vaa_lasx.c │ │ └── vaa_lsx.c │ ├── mips │ │ └── vaa_mmi.c │ ├── scenechangedetection │ │ ├── SceneChangeDetection.cpp │ │ └── SceneChangeDetection.h │ ├── scrolldetection │ │ ├── ScrollDetection.cpp │ │ ├── ScrollDetection.h │ │ ├── ScrollDetectionFuncs.cpp │ │ └── ScrollDetectionFuncs.h │ ├── vaacalc │ │ ├── vaacalcfuncs.cpp │ │ ├── vaacalculation.cpp │ │ └── vaacalculation.h │ └── x86 │ │ ├── denoisefilter.asm │ │ ├── downsample_bilinear.asm │ │ └── vaa.asm │ └── targets.mk ├── docs ├── doxygen │ ├── Doxyfile │ ├── Home.rest │ ├── ISVCDecoder.rest │ ├── ISVCEncoder.rest │ ├── UsageExampleForDecoder.rest │ └── UsageExampleForEncoder.rest └── doxygen2rst.py ├── gmpopenh264.info ├── gradlew ├── meson.build ├── meson_options.txt ├── module ├── RefCounted.h ├── gmp-openh264.cpp ├── targets.mk ├── task_utils.h ├── task_utils.py └── task_utils_generated.h ├── openh264.def ├── openh264.pc.in ├── openh264.rc ├── openh264.rc.template ├── res ├── Adobe_PDF_sample_a_1024x768_50Frms.264 ├── BA1_FT_C.264 ├── BA1_Sony_D.jsv ├── BAMQ1_JVC_C.264 ├── BAMQ2_JVC_C.264 ├── BANM_MW_D.264 ├── BASQP1_Sony_C.jsv ├── BA_MW_D.264 ├── BA_MW_D_IDR_LOST.264 ├── BA_MW_D_P_LOST.264 ├── CI1_FT_B.264 ├── CI_MW_D.264 ├── CVFC1_Sony_C.jsv ├── CVPCMNL1_SVA_C.264 ├── CiscoVT2people_160x96_6fps.yuv ├── CiscoVT2people_320x192_12fps.yuv ├── Cisco_Absolute_Power_1280x720_30fps.yuv ├── Cisco_Adobe_PDF_sample_a_1024x768_CAVLC_Bframe_9.264 ├── Cisco_Men_whisper_640x320_CABAC_Bframe_9.264 ├── Cisco_Men_whisper_640x320_CAVLC_Bframe_9.264 ├── Error_I_P.264 ├── LS_SVA_D.264 ├── MIDR_MW_D.264 ├── MPS_MW_A.264 ├── MR1_BT_A.h264 ├── MR1_MW_A.264 ├── MR2_MW_A.264 ├── MR2_TANDBERG_E.264 ├── NL1_Sony_D.jsv ├── NLMQ1_JVC_C.264 ├── NLMQ2_JVC_C.264 ├── NRF_MW_E.264 ├── QCIF_2P_I_allIPCM.264 ├── SVA_BA1_B.264 ├── SVA_BA2_D.264 ├── SVA_Base_B.264 ├── SVA_CL1_E.264 ├── SVA_FM1_E.264 ├── SVA_NL1_B.264 ├── SVA_NL2_E.264 ├── SarVui.264 ├── Static.264 ├── Static_152_100.yuv ├── VID_1280x544_cabac_temporal_direct.264 ├── VID_1280x544_cavlc_temporal_direct.264 ├── VID_1280x720_cabac_temporal_direct.264 ├── VID_1280x720_cavlc_temporal_direct.264 ├── VID_1920x1080_cabac_temporal_direct.264 ├── VID_1920x1080_cavlc_temporal_direct.264 ├── Zhling_1280x720.264 ├── jm_1080p_allslice.264 ├── sps_subsetsps_bothVUI.264 ├── test_cif_I_CABAC_PCM.264 ├── test_cif_I_CABAC_slice.264 ├── test_cif_P_CABAC_slice.264 ├── test_qcif_cabac.264 ├── test_scalinglist_jm.264 ├── test_vd_1d.264 └── test_vd_rc.264 ├── run_Test.sh ├── settings.gradle ├── subprojects ├── .gitignore └── gtest.wrap ├── test ├── BaseDecoderTest.h ├── BaseEncoderTest.h ├── BaseThreadDecoderTest.h ├── api │ ├── BaseDecoderTest.cpp │ ├── BaseEncoderTest.cpp │ ├── BaseThreadDecoderTest.cpp │ ├── DataGenerator.cpp │ ├── c_interface_test.c │ ├── cpp_interface_test.cpp │ ├── decode_api_test.cpp │ ├── decode_encode_test.cpp │ ├── decoder_ec_test.cpp │ ├── decoder_test.cpp │ ├── encode_decode_api_test.cpp │ ├── encode_decode_api_test.h │ ├── encode_decode_api_test.template │ ├── encode_options_test.cpp │ ├── encoder_test.cpp │ ├── ltr_test.cpp │ ├── meson.build │ ├── sha1.c │ ├── simple_test.cpp │ ├── targets.mk │ └── thread_decoder_test.cpp ├── build │ ├── android │ │ ├── .gitignore │ │ ├── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── jni │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── codec_unittest.cpp │ │ ├── res │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ ├── values-v11 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ └── src │ │ │ └── com │ │ │ └── cisco │ │ │ └── codec │ │ │ └── unittest │ │ │ └── MainActivity.java │ ├── ios │ │ └── codec_unittest │ │ │ ├── .gitignore │ │ │ ├── codec_unittest.xcodeproj │ │ │ └── project.pbxproj │ │ │ └── codec_unittest │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ └── Contents.json │ │ │ ├── ViewController.h │ │ │ ├── ViewController.m │ │ │ ├── codec_unittest-Info.plist │ │ │ ├── codec_unittest-Prefix.pch │ │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ │ └── main.m │ ├── win32 │ │ ├── .gitignore │ │ └── codec_ut │ │ │ ├── Codec_UT.sln │ │ │ ├── codec_unittest.vcproj │ │ │ └── preprocessing_lib.vcproj │ └── windowsphone │ │ ├── .gitignore │ │ └── codec_ut │ │ ├── CodecUTApp │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── AlignmentGrid.png │ │ │ ├── ApplicationIcon.png │ │ │ ├── BadgeLogo.png │ │ │ ├── Logo.png │ │ │ ├── SplashScreen.png │ │ │ ├── SquareTile150x150.png │ │ │ ├── SquareTile71x71.png │ │ │ ├── StoreLogo.png │ │ │ ├── Tiles │ │ │ │ ├── FlipCycleTileLarge.png │ │ │ │ ├── FlipCycleTileMedium.png │ │ │ │ ├── FlipCycleTileSmall.png │ │ │ │ ├── IconicTileMediumLarge.png │ │ │ │ └── IconicTileSmall.png │ │ │ └── WideLogo.png │ │ ├── CodecUTApp.csproj │ │ ├── LocalizedStrings.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ ├── AppManifest.xml │ │ │ ├── AssemblyInfo.cs │ │ │ └── WMAppManifest.xml │ │ └── Resources │ │ │ ├── AppResources.Designer.cs │ │ │ └── AppResources.resx │ │ ├── Codec_UT.sln │ │ ├── Codec_UT_RTComponent.cpp │ │ ├── Codec_UT_RTComponent.h │ │ ├── Codec_UT_RTComponent.vcxproj │ │ └── Codec_UT_RTComponent.vcxproj.filters ├── common │ ├── CWelsListTest.cpp │ ├── ExpandPicture.cpp │ ├── WelsTaskListTest.cpp │ ├── WelsThreadPoolTest.cpp │ ├── WelsThreadPoolTest.h │ ├── meson.build │ └── targets.mk ├── decoder │ ├── DecUT_Deblock.cpp │ ├── DecUT_DeblockCommon.cpp │ ├── DecUT_DecExt.cpp │ ├── DecUT_ErrorConcealment.cpp │ ├── DecUT_IdctResAddPred.cpp │ ├── DecUT_IntraPrediction.cpp │ ├── DecUT_ParseSyntax.cpp │ ├── DecUT_PredMv.cpp │ ├── meson.build │ └── targets.mk ├── encoder │ ├── EncUT_Cavlc.cpp │ ├── EncUT_DecodeMbAux.cpp │ ├── EncUT_EncoderExt.cpp │ ├── EncUT_EncoderMb.cpp │ ├── EncUT_EncoderMbAux.cpp │ ├── EncUT_EncoderTaskManagement.cpp │ ├── EncUT_ExpGolomb.cpp │ ├── EncUT_GetIntraPredictor.cpp │ ├── EncUT_InterfaceTest.cpp │ ├── EncUT_MBCopy.cpp │ ├── EncUT_MemoryAlloc.cpp │ ├── EncUT_MemoryZero.cpp │ ├── EncUT_MotionCompensation.cpp │ ├── EncUT_MotionEstimate.cpp │ ├── EncUT_ParameterSetStrategy.cpp │ ├── EncUT_Reconstruct.cpp │ ├── EncUT_SVC_me.cpp │ ├── EncUT_Sample.cpp │ ├── EncUT_SliceBufferReallocate.cpp │ ├── EncUT_SliceBufferReallocate.h │ ├── meson.build │ └── targets.mk ├── encoder_binary_comparison │ ├── .gitignore │ ├── AboutTest │ ├── SHA1Table │ │ ├── Adobe_PDF_sample_a_1024x768_50Frms.264_AllCases_SHA1_Table.csv │ │ ├── BA_MW_D.264_AllCases_SHA1_Table.csv │ │ └── Zhling_1280x720.264_AllCases_SHA1_Table.csv │ ├── Scripts │ │ ├── run_BinarySHA1Comparison.sh │ │ ├── run_BitStreamToYUV.sh │ │ ├── run_ParseYUVInfo.sh │ │ └── run_SafeDelete.sh │ ├── run_Main.sh │ ├── run_OneBitStream.sh │ └── run_PrepareAllTestData.sh ├── meson.build ├── processing │ ├── ProcessUT_AdaptiveQuantization.cpp │ ├── ProcessUT_DownSample.cpp │ ├── ProcessUT_ScrollDetection.cpp │ ├── ProcessUT_VaaCalc.cpp │ ├── meson.build │ └── targets.mk ├── sha1.h ├── test_stdint.h └── utils │ ├── BufferedData.h │ ├── DataGenerator.h │ ├── FileInputStream.h │ ├── HashFunctions.h │ └── InputStream.h ├── testbin ├── AutoBuild_Windows_VS2008.bat ├── CmdLineExample.sh ├── CmdLineReadMe ├── layer2.cfg ├── layer2_arbitrary_res.cfg ├── layer2_vd.cfg ├── layer2_vd_rc.cfg ├── welsenc.cfg ├── welsenc_arbitrary_res.cfg ├── welsenc_ios.cfg ├── welsenc_vd_1d.cfg └── welsenc_vd_rc.cfg └── ut.def /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.obj 4 | *.res 5 | 6 | # Dependency files 7 | *.d 8 | 9 | # orig files generated by astyle 10 | *.orig 11 | 12 | # Libraries 13 | *.lib 14 | *.a 15 | 16 | # Shared objects (inc. Windows DLLs) 17 | *.dll 18 | *.so 19 | *.so.* 20 | *.dylib 21 | 22 | # Executables 23 | *.exe 24 | *.out 25 | *.app 26 | h264dec 27 | h264enc 28 | codec_unittest 29 | 30 | # Other files generated by the MSVC compiler 31 | *.exp 32 | *.pdb 33 | *.map 34 | 35 | # Executables built by the MSVC project files 36 | bin 37 | 38 | # External source 39 | gtest 40 | gmp-api 41 | 42 | # Output files from example commands 43 | testbin/test_vd_1d.264 44 | testbin/test_vd_1d.yuv 45 | testbin/test_vd_rc.264 46 | testbin/test_vd_rc.yuv 47 | testbin/test.264 48 | testbin/test.yuv 49 | 50 | # iOS output files 51 | codec/build/iOS/common/build/ 52 | codec/build/iOS/dec/welsdec/build/ 53 | 54 | # pkg-config file 55 | *.pc 56 | 57 | # editor files 58 | *~ 59 | 60 | # android gradle integration – regenerated when the project is opened in Android Studio 61 | /.idea/ 62 | /.gradle/ 63 | /gradle/ 64 | /gradlew.bat 65 | /local.properties 66 | -------------------------------------------------------------------------------- /.reviewboardrc: -------------------------------------------------------------------------------- 1 | REVIEWBOARD_URL = 'https://rbcommons.com/s/OpenH264/' 2 | REPOSITORY = 'OpenH264' 3 | 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | dist: xenial 3 | 4 | compiler: 5 | - g++ 6 | - clang 7 | 8 | before_install: 9 | - sudo apt-get update -qq 10 | - sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386 python3-pip python3-setuptools 11 | - sudo python3 -m pip install meson==0.50.1 ninja 12 | 13 | install: 14 | - make gmp-bootstrap 15 | - make gtest-bootstrap 16 | - meson builddir 17 | - ninja -C builddir -v 18 | 19 | before_script: 20 | - WorkingDir=`pwd` 21 | - cd test/encoder_binary_comparison 22 | - ./run_PrepareAllTestData.sh 64 23 | - cd ${WorkingDir} 24 | 25 | env: 26 | - TASK=UnitTest; TestParameter="" 27 | - TASK=BinaryCompare; TestParameter=BA_MW_D.264 28 | - TASK=BinaryCompare; TestParameter=Zhling_1280x720.264 29 | - TASK=BinaryCompare; TestParameter=Adobe_PDF_sample_a_1024x768_50Frms.264 30 | matrix: 31 | exclude: 32 | - compiler: clang 33 | env: TASK=BinaryCompare; TestParameter=BA_MW_D.264 34 | - compiler: clang 35 | env: TASK=BinaryCompare; TestParameter=Zhling_1280x720.264 36 | - compiler: clang 37 | env: TASK=BinaryCompare; TestParameter=Adobe_PDF_sample_a_1024x768_50Frms.264 38 | script: 39 | - echo "currrent test is for ${TASK}" 40 | - echo "test parameter is ${TestParameter}" 41 | - ./run_Test.sh ${TASK} ${TestParameter} 42 | - if [ ${TASK} == "UnitTest" ]; then echo "Running meson test suite"; meson test -C builddir -v; fi 43 | -------------------------------------------------------------------------------- /CODING_STYLE: -------------------------------------------------------------------------------- 1 | Code Guidelines 2 | 3 | Try to follow the style of the existing code. 4 | 5 | Please do not add tabs, trailing whitespace, or Windows-style line endings (CRLF). 6 | 7 | The C++ code was pretty-printed with astyle on 05/01/2014 using the configuration found in build/astyle.cfg 8 | 9 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Contributors to the OpenH264 project 2 | 3 | Patrick Ai 4 | Sijia Chen 5 | ZhaoZheng Chu 6 | Paley Du 7 | Martin Ettl 8 | Andreas Gal 9 | Xu Guang 10 | Licai Guo 11 | Yi Guo 12 | Horace Huang 13 | Steven Huang 14 | Ethan Hugg 15 | Cullen Jennings 16 | Zhaofeng Jia 17 | Derrick Jin 18 | Jesse Li 19 | Jifei Li 20 | Kai Li 21 | Karina Li 22 | Matt Li 23 | Xiang Li 24 | Bourne Ling 25 | Alex Liu 26 | Wayne Liu 27 | Varun Patil 28 | Eric Rescorla 29 | Adam Roach 30 | Sawyer Shan 31 | Siping Tao 32 | Martin Storsjö 33 | Brion Vibber 34 | James Wang 35 | Juanny Wang 36 | Zhiliang Wang 37 | Hervé Willems 38 | Gregory J Wolfe 39 | Katherine Wu 40 | Guang Xu 41 | Jeffery Xu 42 | Gang Yang 43 | Li Yao 44 | Jiessie Zhang 45 | Rory Zhang 46 | Volvet Zhang 47 | Ling Zhu 48 | James Zhu 49 | Dong Zhang 50 | Haibo Zhu 51 | Huade Shi 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Cisco Systems 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you have discovered a security vulnerability in this project, please report it 4 | privately. **Do not disclose it as a public issue.** This gives us time to work with you 5 | to fix the issue before public exposure, reducing the chance that the exploit will be 6 | used before a patch is released. 7 | 8 | You may submit the report as an email to benzzhan@cisco.com. 9 | 10 | Please provide the following information in your report: 11 | 12 | - A description of the vulnerability and its impact 13 | - How to reproduce the issue 14 | 15 | This project is maintained on a reasonable-effort basis. As such, please give us 90 days to 16 | work on a fix before public exposure. 17 | -------------------------------------------------------------------------------- /autotest/performanceTest/.gitignore: -------------------------------------------------------------------------------- 1 | #performance test resource folder 2 | ./EncoderPerfTestRes 3 | ./DecoderPerfTestRes 4 | ./DecoderPerfTestRes/*.* 5 | ./EncoderPerfTestRes/*.* 6 | #performance test result folder 7 | ./TestResultCSV 8 | # 9 | .DS_Store 10 | #. 11 | ./android/report 12 | ./ios/report 13 | 14 | -------------------------------------------------------------------------------- /autotest/performanceTest/ios/fruitstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cisco/openh264/0c9a557a9a6f1d267c4d372221669a8ae69ccda0/autotest/performanceTest/ios/fruitstrap -------------------------------------------------------------------------------- /autotest/performanceTest/ios/iFileTransfer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cisco/openh264/0c9a557a9a6f1d267c4d372221669a8ae69ccda0/autotest/performanceTest/ios/iFileTransfer -------------------------------------------------------------------------------- /autotest/performanceTest/ios/uiascript.js: -------------------------------------------------------------------------------- 1 | UIATarget.onAlert = function onAlert(alert){ 2 | 3 | UIALogger.logMessage("In Alert!"); 4 | title = alert.name(); 5 | if (title && title.indexOf("Microphone") !== -1) { 6 | UIALogger.logMessage("Alert with title '" + title + "' encountered!"); 7 | var buttons = alert.buttons(); 8 | var buttonCount = buttons.length; 9 | 10 | if (buttonCount > 0) { 11 | var acceptButton = buttons[buttonCount - 1]; 12 | acceptButton.tap(); // last button is accept 13 | } 14 | return true; //forbid the default cancel processing 15 | } 16 | return false; //using the default cancel processing 17 | } 18 | var target = UIATarget.localTarget(); 19 | target.delay(6000); 20 | -------------------------------------------------------------------------------- /autotest/unitTest/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | ./ios/report/ 3 | ./android/report/ 4 | 5 | -------------------------------------------------------------------------------- /autotest/unitTest/run_ParseUTxml.sh: -------------------------------------------------------------------------------- 1 | if [ $# -ne 1 ];then 2 | echo Please input $0 [report dir] 3 | exit 1 4 | fi 5 | 6 | REPORT=$1 7 | if [ ! -e ${REPORT} ];then 8 | echo "The directory of ${REPORT} dose't not exit,please check the test log" 9 | exit 1 10 | fi 11 | 12 | UT_Failed_Num=0 13 | parse_unittest() { 14 | res=$1 15 | echo ${res} 16 | echo Start to parse unittest results of $res 17 | if [ -e $res ];then 18 | tests=`cat $res | grep "> mail.log << EOF 26 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
Total unit test casesFailedTimeDate
${tests}${fails}${waste}${times}
50 |
51 | EOF 52 | fi 53 | } 54 | 55 | xmlcount=`ls $REPORT | wc -l` 56 | xmlfiles=`ls $REPORT` 57 | if [ ${xmlcount} -eq 0 ]; 58 | then echo There is nothing xml files generated at $REPORT 59 | exit 1 60 | fi 61 | for file in $xmlfiles;do 62 | parse_unittest $REPORT/$file 63 | done 64 | if [ ${UT_Failed_Num} = "0" ];then 65 | echo Total $xmlcount files at $REPORT,all sucessful 66 | exit 0 67 | else 68 | echo Total $xmlcount files at $REPORT,${UT_Failed_Num} error cases 69 | exit 2 70 | fi 71 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:3.5.3' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | google() 14 | jcenter() 15 | } 16 | } 17 | 18 | apply plugin: 'idea' 19 | 20 | idea.module { 21 | excludeDirs -= file("build") 22 | excludeDirs += file(".idea") 23 | excludeDirs += file("gradle") 24 | sourceDirs += file("build") 25 | sourceDirs += file("codec") 26 | testSourceDirs += file("test") 27 | testSourceDirs += file("autotest") 28 | resourceDirs += file("res") 29 | resourceDirs += file("docs") 30 | } -------------------------------------------------------------------------------- /build/Dockerfile: -------------------------------------------------------------------------------- 1 | # This is a docker image with all the tools to build openh264 for linux 2 | 3 | # build the docker image with: sudo docker build -t openh264tools - < Dockerfile 4 | # get the result with: sudo docker run -t -i -v /tmp/openH264:/build openh264tools /bin/cp libopenh264.so log /build 5 | # the results will be left in /tmp/openH264 6 | # have a look at log file and if the hash match the "Fluffy got" hashes 7 | 8 | FROM ubuntu:14.04 9 | MAINTAINER Cullen Jennings 10 | RUN apt-get update 11 | RUN apt-get upgrade -y 12 | RUN apt-get install -y bison flex g++ gcc git libgmp3-dev libmpc-dev libmpfr-dev libz-dev make wget 13 | 14 | WORKDIR /tmp 15 | RUN wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz 16 | RUN tar xvfz gcc-4.9.2.tar.gz 17 | WORKDIR /tmp/gcc-4.9.2/ 18 | RUN mkdir build 19 | WORKDIR /tmp/gcc-4.9.2/build 20 | RUN ../configure --disable-checking --enable-languages=c,c++ --enable-multiarch --enable-shared --enable-threads=posix --with-gmp=/usr/local/lib --with-mpc=/usr/lib --with-mpfr=/usr/lib --without-included-gettext --with-system-zlib --with-tune=generic --disable-multilib --disable-nls 21 | RUN make -j 8 22 | RUN make install 23 | 24 | WORKDIR /tmp 25 | RUN wget http://www.nasm.us/pub/nasm/releasebuilds/2.11.06/nasm-2.11.06.tar.gz 26 | RUN tar xvfz nasm-2.11.06.tar.gz 27 | WORKDIR /tmp/nasm-2.11.06/ 28 | RUN ./configure 29 | RUN make 30 | RUN make install 31 | 32 | WORKDIR /tmp 33 | RUN git clone https://github.com/cisco/openh264.git 34 | WORKDIR /tmp/openh264 35 | RUN git checkout v1.1 36 | RUN make ENABLE64BIT=Yes 37 | 38 | RUN date > log 39 | RUN uname -a >> log 40 | RUN nasm -v >> log 41 | RUN gcc -v 2>> log 42 | RUN git status -v >> log 43 | 44 | RUN openssl dgst -sha1 libopenh264.so >> log 45 | RUN echo "Fluffy Got hash of - 3b6280fce36111ab9c911453f4ee1fd99ce6f841" >> log 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /build/arch.mk: -------------------------------------------------------------------------------- 1 | #for x86 2 | HAVE_AVX2 := Yes 3 | 4 | ifneq ($(filter %86 x86_64, $(ARCH)),) 5 | include $(SRC_PATH)build/x86-common.mk 6 | ifeq ($(USE_ASM), Yes) 7 | ifeq ($(HAVE_AVX2), Yes) 8 | CFLAGS += -DHAVE_AVX2 9 | CXXFLAGS += -DHAVE_AVX2 10 | ASMFLAGS += -DHAVE_AVX2 11 | endif 12 | endif 13 | endif 14 | 15 | #for arm 16 | ifneq ($(filter-out arm64 arm64e, $(filter arm%, $(ARCH))),) 17 | ifeq ($(USE_ASM), Yes) 18 | ASM_ARCH = arm 19 | ASMFLAGS += -I$(SRC_PATH)codec/common/arm/ 20 | CFLAGS += -DHAVE_NEON 21 | endif 22 | endif 23 | 24 | #for arm64 25 | ifneq ($(filter arm64 aarch64 arm64e, $(ARCH)),) 26 | ifeq ($(USE_ASM), Yes) 27 | ASM_ARCH = arm64 28 | ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/ 29 | CFLAGS += -DHAVE_NEON_AARCH64 30 | endif 31 | endif 32 | 33 | #for mips 34 | ifneq ($(filter mips mips64, $(ARCH)),) 35 | ifeq ($(USE_ASM), Yes) 36 | ENABLE_MMI=Yes 37 | ENABLE_MSA=Yes 38 | ASM_ARCH = mips 39 | ASMFLAGS += -I$(SRC_PATH)codec/common/mips/ 40 | #mmi 41 | ifeq ($(ENABLE_MMI), Yes) 42 | ENABLE_MMI = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) mmi) 43 | ifeq ($(ENABLE_MMI), Yes) 44 | CFLAGS += -DHAVE_MMI -march=loongson3a 45 | endif 46 | endif 47 | #msa 48 | ifeq ($(ENABLE_MSA), Yes) 49 | ENABLE_MSA = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) msa) 50 | ifeq ($(ENABLE_MSA), Yes) 51 | CFLAGS += -DHAVE_MSA -mmsa 52 | endif 53 | endif 54 | endif 55 | endif 56 | 57 | #for loongarch 58 | ifneq ($(filter loongarch64, $(ARCH)),) 59 | ifeq ($(USE_ASM), Yes) 60 | ENABLE_LSX=Yes 61 | ENABLE_LASX=Yes 62 | ASM_ARCH = loongarch 63 | ASMFLAGS += -I$(SRC_PATH)codec/common/loongarch/ 64 | #lsx 65 | ifeq ($(ENABLE_LSX), Yes) 66 | ENABLE_LSX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lsx) 67 | ifeq ($(ENABLE_LSX), Yes) 68 | CFLAGS += -DHAVE_LSX -mlsx 69 | endif 70 | endif 71 | #lasx 72 | ifeq ($(ENABLE_LASX), Yes) 73 | ENABLE_LASX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lasx) 74 | ifeq ($(ENABLE_LASX), Yes) 75 | CFLAGS += -DHAVE_LASX -mlasx 76 | endif 77 | endif 78 | endif 79 | endif 80 | -------------------------------------------------------------------------------- /build/astyle.cfg: -------------------------------------------------------------------------------- 1 | --style=google 2 | --indent=spaces=2 3 | --max-code-length=120 4 | --pad-oper 5 | --align-pointer=type 6 | --align-reference=type 7 | --unpad-paren 8 | --pad-first-paren-out 9 | --lineend=linux 10 | --convert-tabs 11 | -------------------------------------------------------------------------------- /build/gtest-targets.mk: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit it directly, edit build/mktargets.py 2 | # instead. To regenerate files, run build/mktargets.sh. 3 | 4 | GTEST_SRCDIR=gtest/googletest 5 | GTEST_CPP_SRCS=\ 6 | $(GTEST_SRCDIR)/src/gtest-all.cc\ 7 | 8 | GTEST_OBJS += $(GTEST_CPP_SRCS:.cc=.$(OBJ)) 9 | 10 | OBJS += $(GTEST_OBJS) 11 | 12 | $(GTEST_SRCDIR)/%.$(OBJ): $(GTEST_SRCDIR)/%.cc 13 | $(QUIET_CXX)$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(GTEST_CFLAGS) $(GTEST_INCLUDES) -c $(CXX_O) $< 14 | 15 | $(LIBPREFIX)gtest.$(LIBSUFFIX): $(GTEST_OBJS) 16 | $(QUIET)rm -f $@ 17 | $(QUIET_AR)$(AR) $(AR_OPTS) $+ 18 | 19 | libraries: $(LIBPREFIX)gtest.$(LIBSUFFIX) 20 | LIBRARIES += $(LIBPREFIX)gtest.$(LIBSUFFIX) 21 | -------------------------------------------------------------------------------- /build/loongarch-simd-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2021 Loongson Technology Corporation Limited 3 | # Contributed by Xiwei Gu 4 | # Contributed by Lu Wang 5 | # 6 | #*************************************************************************************** 7 | # This script is used in build/arch.mk for loongarch to detect the simd instructions: 8 | # lsx, lasx (maybe more in the future). 9 | # 10 | # --usage: 11 | # ./loongarch-simd-check.sh $(CC) lsx 12 | # or ./loongarch-simd-check.sh $(CC) lasx 13 | # 14 | # date: 11/23/2021 Created 15 | #*************************************************************************************** 16 | 17 | TMPC=$(mktemp tmp.XXXXXX.c) 18 | TMPO=$(mktemp tmp.XXXXXX.o) 19 | if [ $2 == "lsx" ] 20 | then 21 | echo "void main(void){ __asm__ volatile(\"vadd.b \$vr0, \$vr1, \$vr1\"); }" > $TMPC 22 | $1 -mlsx $TMPC -o $TMPO &> /dev/null 23 | if test -s $TMPO 24 | then 25 | echo "Yes" 26 | fi 27 | elif [ $2 == "lasx" ] 28 | then 29 | echo "void main(void){ __asm__ volatile(\"xvadd.b \$xr0, \$xr1, \$xr1\"); }" > $TMPC 30 | $1 -mlasx $TMPC -o $TMPO &> /dev/null 31 | if test -s $TMPO 32 | then 33 | echo "Yes" 34 | fi 35 | fi 36 | rm -f $TMPC $TMPO 37 | -------------------------------------------------------------------------------- /build/mips-simd-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #********************************************************************************** 3 | # This script is using in build/arch.mk for mips to detect the simd instructions: 4 | # mmi, msa (maybe more in the future). 5 | # 6 | # --usage: 7 | # ./mips-simd-check.sh $(CC) mmi 8 | # or ./mips-simd-check.sh $(CC) msa 9 | # 10 | # date: 10/17/2019 Created 11 | #********************************************************************************** 12 | 13 | TMPC=$(mktemp tmp.XXXXXX.c) 14 | TMPO=$(mktemp tmp.XXXXXX.o) 15 | if [ $2 == "mmi" ] 16 | then 17 | echo "void main(void){ __asm__ volatile(\"punpcklhw \$f0, \$f0, \$f0\"); }" > $TMPC 18 | $1 -march=loongson3a $TMPC -o $TMPO &> /dev/null 19 | if test -s $TMPO 20 | then 21 | echo "Yes" 22 | fi 23 | elif [ $2 == "msa" ] 24 | then 25 | echo "void main(void){ __asm__ volatile(\"addvi.b \$w0, \$w1, 1\"); }" > $TMPC 26 | $1 -mmsa $TMPC -o $TMPO &> /dev/null 27 | if test -s $TMPO 28 | then 29 | echo "Yes" 30 | fi 31 | fi 32 | rm -f $TMPC $TMPO 33 | -------------------------------------------------------------------------------- /build/mktargets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(git rev-parse --show-toplevel 2>/dev/null)" >/dev/null 2>&1 3 | python build/mktargets.py --directory codec/decoder --library decoder 4 | python build/mktargets.py --directory codec/encoder --library encoder --exclude DllEntry.cpp 5 | python build/mktargets.py --directory codec/common --library common --exclude asm_inc.asm --exclude arm_arch_common_macro.S --exclude arm_arch64_common_macro.S 6 | python build/mktargets.py --directory codec/processing --library processing 7 | 8 | python build/mktargets.py --directory codec/console/dec --binary h264dec 9 | python build/mktargets.py --directory codec/console/enc --binary h264enc 10 | python build/mktargets.py --directory codec/console/common --library console_common 11 | python build/mktargets.py --directory test/encoder --prefix encoder_unittest 12 | python build/mktargets.py --directory test/decoder --prefix decoder_unittest 13 | python build/mktargets.py --directory test/processing --prefix processing_unittest 14 | python build/mktargets.py --directory test/api --prefix api_test 15 | python build/mktargets.py --directory test/common --prefix common_unittest 16 | python build/mktargets.py --directory module --prefix module 17 | python build/mktargets.py --directory gtest/googletest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc 18 | -------------------------------------------------------------------------------- /build/msvc-app.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/msvc-common.mk 2 | CFLAGS_OPT += -MD 3 | CFLAGS_DEBUG += -MDd 4 | CFLAGS += -DUNICODE 5 | -------------------------------------------------------------------------------- /build/msvc-common.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | ifeq ($(ASM_ARCH), x86) 3 | ifeq ($(ARCH), x86_64) 4 | ASMFLAGS += -f win64 5 | ASMFLAGS_PLATFORM = -DWIN64 6 | else 7 | ASMFLAGS += -f win32 -DPREFIX 8 | endif 9 | else 10 | endif 11 | ifeq ($(ASM_ARCH), arm) 12 | CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm 13 | CCASFLAGS = -nologo -DHAVE_NEON -ignore 4509 14 | endif 15 | 16 | CC=cl 17 | CXX=cl 18 | AR=lib 19 | CXX_O=-Fo$@ 20 | 21 | ifeq ($(ASM_ARCH), arm64) 22 | CCAS = clang-cl 23 | CCASFLAGS = -nologo -DHAVE_NEON_AARCH64 --target=arm64-windows 24 | endif 25 | 26 | 27 | # -D_VARIADIC_MAX=10 is required to fix building gtest on MSVC 2012, but 28 | # since we don't (easily) know which version of MSVC we use here, we add 29 | # it unconditionally. The same issue can also be worked around by adding 30 | # -DGTEST_HAS_TR1_TUPLE=0 instead, but we prefer this version since it 31 | # matches what gtest itself does. 32 | CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -D_VARIADIC_MAX=10 33 | CXX_LINK_O=-nologo -Fe$@ 34 | AR_OPTS=-nologo -out:$@ 35 | CFLAGS_OPT=-O2 -Ob1 -Oy- -Zi -FS -GF -GS -Gy -DNDEBUG 36 | CFLAGS_DEBUG=-Od -Oy- -Zi -FS -RTC1 -D_DEBUG 37 | CFLAGS_M32= 38 | CFLAGS_M64= 39 | LINK_LOCAL_DIR= 40 | LINK_LIB=$(1).lib 41 | LIBSUFFIX=lib 42 | LIBPREFIX= 43 | EXEEXT=.exe 44 | OBJ=obj 45 | SHAREDLIB_DIR = $(PREFIX)/bin 46 | SHAREDLIBSUFFIX=dll 47 | SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX) 48 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX) 49 | SHARED=-LD 50 | EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib 51 | LDFLAGS += -link 52 | SHLDFLAGS=-debug -map -opt:ref -opt:icf -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY) 53 | STATIC_LDFLAGS= 54 | CODEC_UNITTEST_CFLAGS+=-D_CRT_SECURE_NO_WARNINGS 55 | 56 | ifneq ($(filter %86 x86_64, $(ARCH)),) 57 | LDFLAGS += -cetcompat 58 | endif 59 | 60 | %.res: %.rc 61 | $(QUIET_RC)rc -fo $@ $< 62 | -------------------------------------------------------------------------------- /build/ndk-version-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #********************************************************************************** 3 | # This script is using in Makefile to check the ndk version: 4 | # 5 | # --usage: 6 | # ./ndk-version-check.sh ndkroot 7 | # 8 | # date: 10/20/2023 Created 9 | #********************************************************************************** 10 | 11 | NDK_PATH=$1 12 | if [ ! -n "$NDK_PATH" ] 13 | then 14 | exit 1 15 | fi 16 | NDK_VERSION=${NDK_PATH##*/} 17 | NDK_VERSION_NUM=`echo $NDK_VERSION | tr -cd "[0-9]"` 18 | 19 | if [ $NDK_VERSION_NUM -le 18 ] 20 | then 21 | echo "Yes" 22 | fi 23 | -------------------------------------------------------------------------------- /build/platform-bsd.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | SHAREDLIBSUFFIX = so 3 | SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX).$(FULL_VERSION) 4 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX).$(SHAREDLIB_MAJORVERSION) 5 | SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) 6 | CFLAGS += -fPIC 7 | ifeq ($(USE_STACK_PROTECTOR), Yes) 8 | CFLAGS += -fstack-protector-all 9 | endif 10 | LDFLAGS += -lpthread 11 | STATIC_LDFLAGS += -lpthread -lm 12 | ifeq ($(ASM_ARCH), x86) 13 | ifeq ($(ARCH), x86_64) 14 | ASMFLAGS += -f elf64 15 | else 16 | ASMFLAGS += -f elf 17 | endif 18 | endif 19 | 20 | -------------------------------------------------------------------------------- /build/platform-cygwin_nt.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/x86-common.mk 2 | SHAREDLIB_DIR = $(PREFIX)/bin 3 | SHAREDLIBSUFFIX = dll 4 | SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX) 5 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX) 6 | EXTRA_LIBRARY=$(LIBPREFIX)$(PROJECT_NAME).dll.a 7 | SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY) 8 | CFLAGS += -MMD -MP 9 | LDFLAGS += 10 | ifeq ($(ARCH), x86_64) 11 | ASMFLAGS += -f win64 12 | ASMFLAGS_PLATFORM = -DWIN64 13 | CC = x86_64-pc-cygwin-gcc 14 | CXX = x86_64-pc-cygwin-g++ 15 | AR = x86_64-pc-cygwin-gcc-ar 16 | else 17 | ASMFLAGS += -f win32 -DPREFIX 18 | endif 19 | EXEEXT = .exe 20 | 21 | -------------------------------------------------------------------------------- /build/platform-darwin.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | SHAREDLIB_DIR = $(PREFIX)/lib 3 | SHAREDLIBSUFFIX = dylib 4 | SHAREDLIBSUFFIXFULLVER=$(FULL_VERSION).$(SHAREDLIBSUFFIX) 5 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIB_MAJORVERSION).$(SHAREDLIBSUFFIX) 6 | CURRENT_VERSION := 2.6.0 7 | COMPATIBILITY_VERSION := 2.6.0 8 | SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ 9 | -fno-common -headerpad_max_install_names -install_name \ 10 | $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) 11 | SHARED = -dynamiclib 12 | SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) 13 | CFLAGS += -Wall -fPIC -MMD -MP 14 | CXXFLAGS += -stdlib=libc++ -std=c++17 15 | LDFLAGS += -stdlib=libc++ 16 | ifeq ($(ARCH), arm64) 17 | CFLAGS += -arch arm64 18 | LDFLAGS += -arch arm64 19 | endif 20 | ifeq ($(USE_STACK_PROTECTOR), Yes) 21 | CFLAGS += -fstack-protector-all 22 | endif 23 | ifeq ($(ASM_ARCH), x86) 24 | ASMFLAGS += -DPREFIX 25 | ifeq ($(ARCH), x86_64) 26 | CFLAGS += -arch x86_64 27 | LDFLAGS += -arch x86_64 28 | ASMFLAGS += -f macho64 29 | else 30 | CFLAGS += -arch i386 31 | LDFLAGS += -arch i386 32 | ASMFLAGS += -f macho 33 | LDFLAGS += -read_only_relocs suppress 34 | endif 35 | endif 36 | 37 | -------------------------------------------------------------------------------- /build/platform-gnu-chain.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | SHAREDLIBSUFFIX = so 3 | SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX).$(FULL_VERSION) 4 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX).$(SHAREDLIB_MAJORVERSION) 5 | SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) 6 | CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP 7 | ifeq ($(USE_STACK_PROTECTOR), Yes) 8 | CFLAGS += -fstack-protector-all 9 | endif 10 | LDFLAGS += -lpthread 11 | STATIC_LDFLAGS += -lpthread -lm 12 | AR_OPTS = crD $@ 13 | ifeq ($(ASM_ARCH), x86) 14 | ifeq ($(ARCH), x86_64) 15 | ASMFLAGS += -f elf64 16 | else ifeq ($(ARCH), x32) 17 | ASMFLAGS += -f elfx32 18 | else 19 | ASMFLAGS += -f elf 20 | endif 21 | endif 22 | ifeq ($(ASM_ARCH), arm) 23 | ASMFLAGS += -march=armv7-a -mfpu=neon 24 | endif 25 | 26 | ifeq ($(ASM_ARCH), arm64) 27 | CFLAGS += -march=armv8-a 28 | ASMFLAGS += -march=armv8-a 29 | endif 30 | 31 | ifneq ($(filter %clang++,$(CXX)),) 32 | CXXFLAGS += -Wc++11-compat-reserved-user-defined-literal 33 | endif 34 | -------------------------------------------------------------------------------- /build/platform-gnu.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | include $(SRC_PATH)build/platform-gnu-chain.mk 3 | -------------------------------------------------------------------------------- /build/platform-ios.mk: -------------------------------------------------------------------------------- 1 | ARCH = armv7 2 | include $(SRC_PATH)build/platform-darwin.mk 3 | CXX = clang++ 4 | CC = clang 5 | ifneq ($(filter %86 x86_64, $(ARCH)),) 6 | SDKTYPE = iPhoneSimulator 7 | else 8 | SDKTYPE = iPhoneOS 9 | endif 10 | SDK_MIN = 5.1 11 | 12 | SDKROOT := $(shell xcrun --sdk $(shell echo $(SDKTYPE) | tr A-Z a-z) --show-sdk-path) 13 | CFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) -DAPPLE_IOS -fembed-bitcode 14 | LDFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) 15 | 16 | -------------------------------------------------------------------------------- /build/platform-linux.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | include $(SRC_PATH)build/platform-gnu-chain.mk 3 | -------------------------------------------------------------------------------- /build/platform-mingw_nt.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/arch.mk 2 | SHAREDLIB_DIR = $(PREFIX)/bin 3 | SHAREDLIBSUFFIX = dll 4 | SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX) 5 | SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX) 6 | EXTRA_LIBRARY=$(LIBPREFIX)$(PROJECT_NAME).dll.a 7 | SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY) 8 | CFLAGS += -MMD -MP 9 | LDFLAGS += 10 | ifeq ($(ASM_ARCH), x86) 11 | ifeq ($(ARCH), x86_64) 12 | ASMFLAGS += -f win64 13 | ASMFLAGS_PLATFORM = -DWIN64 14 | else 15 | ASMFLAGS += -f win32 -DPREFIX 16 | endif 17 | endif 18 | ifeq ($(ASM_ARCH), arm) 19 | CCAS = gas-preprocessor.pl -as-type clang -force-thumb -- $(CC) 20 | CCASFLAGS = -DHAVE_NEON -mimplicit-it=always 21 | endif 22 | EXEEXT = .exe 23 | 24 | -------------------------------------------------------------------------------- /build/platform-msvc-app.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/msvc-app.mk 2 | CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP 3 | 4 | -------------------------------------------------------------------------------- /build/platform-msvc-wp.mk: -------------------------------------------------------------------------------- 1 | ARCH = arm 2 | include $(SRC_PATH)build/msvc-app.mk 3 | CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE 4 | LDFLAGS += -nodefaultlib:kernel32.lib -nodefaultlib:ole32.lib WindowsPhoneCore.lib 5 | UTSHLDFLAGS = -def:$(SRC_PATH)ut.def 6 | 7 | -------------------------------------------------------------------------------- /build/platform-msvc.mk: -------------------------------------------------------------------------------- 1 | include $(SRC_PATH)build/msvc-common.mk 2 | LDFLAGS += user32.lib 3 | CFLAGS_OPT += -MT 4 | CFLAGS_DEBUG += -MTd -Gm 5 | 6 | $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXFULLVER): openh264.res 7 | -------------------------------------------------------------------------------- /build/x86-common.mk: -------------------------------------------------------------------------------- 1 | CFLAGS_M32=-m32 2 | CFLAGS_M64=-m64 3 | ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/ 4 | ifneq ($(ENABLE64BIT),) 5 | ifeq ($(ENABLE64BIT), Yes) 6 | ARCH = x86_64 7 | else 8 | ARCH = x86 9 | endif 10 | endif 11 | ifeq ($(ARCH), x86_64) 12 | CFLAGS += $(CFLAGS_M64) 13 | LDFLAGS += $(CFLAGS_M64) 14 | ASMFLAGS_PLATFORM = -DUNIX64 15 | else 16 | CFLAGS += $(CFLAGS_M32) 17 | LDFLAGS += $(CFLAGS_M32) 18 | ASMFLAGS_PLATFORM = -DX86_32 19 | ifeq ($(ENABLEPIC), Yes) 20 | CFLAGS += -DX86_32_PICASM 21 | CXXFLAGS += -DX86_32_PICASM 22 | ASMFLAGS += -DX86_32_PICASM 23 | endif 24 | endif 25 | ifeq ($(USE_ASM),Yes) 26 | CFLAGS += -DX86_ASM 27 | ifneq ($(ARCH), x86_64) 28 | CFLAGS += -DX86_32_ASM 29 | endif 30 | ASM_ARCH = x86 31 | endif 32 | ASM = nasm 33 | ASMFLAGS += $(ASMFLAGS_PLATFORM) 34 | -------------------------------------------------------------------------------- /code-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | lcov -b . -d . -c -o tmp.info 3 | lcov -e tmp.info \*/codec/\* -o gcov.info 4 | mkdir -p code-coverage 5 | genhtml gcov.info -o ./code-coverage 6 | rm -f tmp.info gcov.info 7 | -------------------------------------------------------------------------------- /codec/api/meson.build: -------------------------------------------------------------------------------- 1 | subdir ('wels') 2 | -------------------------------------------------------------------------------- /codec/api/wels/codec_ver.h: -------------------------------------------------------------------------------- 1 | //The current file is auto-generated by script: generate_codec_ver.sh 2 | #ifndef CODEC_VER_H 3 | #define CODEC_VER_H 4 | 5 | #include "codec_app_def.h" 6 | 7 | static const OpenH264Version g_stCodecVersion = {2, 6, 0, 2502}; 8 | static const char* const g_strCodecVer = "OpenH264 version:2.6.0.2502"; 9 | 10 | #define OPENH264_MAJOR (2) 11 | #define OPENH264_MINOR (6) 12 | #define OPENH264_REVISION (0) 13 | #define OPENH264_RESERVED (2502) 14 | 15 | #endif // CODEC_VER_H 16 | -------------------------------------------------------------------------------- /codec/api/wels/meson.build: -------------------------------------------------------------------------------- 1 | headers = [ 2 | 'codec_api.h', 3 | 'codec_app_def.h', 4 | 'codec_def.h', 5 | 'codec_ver.h', 6 | ] 7 | 8 | install_headers(headers, 9 | subdir: 'wels') 10 | -------------------------------------------------------------------------------- /codec/build/android/.gitignore: -------------------------------------------------------------------------------- 1 | build.xml 2 | local.properties 3 | proguard-project.txt 4 | gen 5 | bin 6 | project.properties 7 | -------------------------------------------------------------------------------- /codec/build/android/dec/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /codec/build/android/dec/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /codec/build/android/dec/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | 6 | sourceSets.main { 7 | manifest.srcFile "AndroidManifest.xml" 8 | res.srcDir "res" 9 | java.srcDir "src" 10 | jniLibs.srcDir "libs" 11 | } 12 | } -------------------------------------------------------------------------------- /codec/build/android/dec/jni/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | MY_LOCAL_PATH := $(LOCAL_PATH) 4 | 5 | # Step3 6 | #Generate the libwelsdecdemo.so file 7 | include $(LOCAL_PATH)/welsdecdemo.mk 8 | LOCAL_PATH := $(MY_LOCAL_PATH) 9 | 10 | -------------------------------------------------------------------------------- /codec/build/android/dec/jni/Application.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(NDK_TOOLCHAIN_VERSION), clang) 2 | APP_STL := c++_shared 3 | else 4 | APP_STL := stlport_shared 5 | endif 6 | APP_PLATFORM := android-12 7 | -------------------------------------------------------------------------------- /codec/build/android/dec/jni/myjni.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define LOG_TAG "welsdec" 7 | #define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) 8 | 9 | extern int DecMain (int argc, char* argv[]); 10 | extern "C" 11 | JNIEXPORT void JNICALL Java_com_wels_dec_WelsDecTest_DoDecoderTest 12 | (JNIEnv* env, jobject thiz, jstring jsFileNameIn, jstring jsFileNameOut) { 13 | /**************** Add the native codes/API *****************/ 14 | char* argv[3]; 15 | int argc = 3; 16 | argv[0] = (char*) ("decConsole.exe"); 17 | argv[1] = (char*) ((*env).GetStringUTFChars (jsFileNameIn, NULL)); 18 | argv[2] = (char*) ((*env).GetStringUTFChars (jsFileNameOut, NULL)); 19 | LOGI ("Start to run JNI module!+++"); 20 | DecMain (argc, argv); 21 | LOGI ("End to run JNI module!+++"); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /codec/build/android/dec/jni/welsdecdemo.mk: -------------------------------------------------------------------------------- 1 | # Generate the libwelsdecdemo.so file 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | LOCAL_MODULE := wels 6 | LOCAL_SRC_FILES := ../../../../../libopenh264.so 7 | ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES))) 8 | include $(PREBUILT_SHARED_LIBRARY) 9 | endif 10 | 11 | 12 | 13 | include $(CLEAR_VARS) 14 | 15 | # 16 | # Module Settings 17 | # 18 | LOCAL_MODULE := welsdecdemo 19 | 20 | # 21 | # Source Files 22 | # 23 | CODEC_PATH := ../../../../ 24 | CONSOLE_DEC_PATH := ../../../../console/dec 25 | CONSOLE_COMMON_PATH := ../../../../console/common 26 | LOCAL_SRC_FILES := \ 27 | $(CONSOLE_DEC_PATH)/src/h264dec.cpp \ 28 | $(CONSOLE_COMMON_PATH)/src/read_config.cpp \ 29 | $(CONSOLE_DEC_PATH)/src/d3d9_utils.cpp \ 30 | myjni.cpp 31 | # 32 | # Header Includes 33 | # 34 | LOCAL_C_INCLUDES := \ 35 | $(LOCAL_PATH)/../../../../api/wels \ 36 | $(LOCAL_PATH)/../../../../console/dec/inc \ 37 | $(LOCAL_PATH)/../../../../console/common/inc \ 38 | $(LOCAL_PATH)/../../../../common/inc 39 | # 40 | # Compile Flags and Link Libraries 41 | # 42 | LOCAL_CFLAGS := -DANDROID_NDK 43 | 44 | LOCAL_LDLIBS := -llog 45 | LOCAL_SHARED_LIBRARIES := wels 46 | 47 | include $(BUILD_SHARED_LIBRARY) 48 | -------------------------------------------------------------------------------- /codec/build/android/dec/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 |