├── .gitignore ├── README.md ├── build.gradle ├── config.gradle ├── doc ├── apk │ └── android_v4l2_camera.apk └── img │ ├── qr_apk.png │ └── screenshot.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── sample ├── .gitignore ├── android.jks ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── hsj │ │ └── sample │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── hsj │ │ │ └── sample │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── menu │ │ └── main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── hsj │ └── sample │ └── ExampleUnitTest.java ├── sdk_v4l2_camera ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── hsj │ │ └── camera │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── beauty_fragment.glsl │ │ ├── beauty_vertex.glsl │ │ ├── camera_fragment.glsl │ │ └── camera_vertex.glsl │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── libcamera │ │ │ ├── CameraAPI.cpp │ │ │ ├── CameraAPI.h │ │ │ ├── CameraView.cpp │ │ │ ├── CameraView.h │ │ │ ├── Common.cpp │ │ │ ├── Common.h │ │ │ ├── DecoderFactory.cpp │ │ │ ├── DecoderFactory.h │ │ │ ├── NativeAPI.cpp │ │ │ ├── NativeAPI.h │ │ │ └── OnLoad.cpp │ │ ├── libjpeg-turbo │ │ │ ├── BUILDING.md │ │ │ ├── CMakeLists.txt │ │ │ ├── ChangeLog.md │ │ │ ├── LICENSE.md │ │ │ ├── README.ijg │ │ │ ├── README.md │ │ │ ├── cderror.h │ │ │ ├── cdjpeg.c │ │ │ ├── cdjpeg.h │ │ │ ├── change.log │ │ │ ├── cjpeg.1 │ │ │ ├── cjpeg.c │ │ │ ├── cmakescripts │ │ │ │ ├── BuildPackages.cmake │ │ │ │ ├── GNUInstallDirs.cmake │ │ │ │ ├── cmake_uninstall.cmake.in │ │ │ │ └── testclean.cmake │ │ │ ├── cmyk.h │ │ │ ├── coderules.txt │ │ │ ├── croptest.in │ │ │ ├── djpeg.1 │ │ │ ├── djpeg.c │ │ │ ├── doc │ │ │ │ └── html │ │ │ │ │ ├── annotated.html │ │ │ │ │ ├── bc_s.png │ │ │ │ │ ├── bdwn.png │ │ │ │ │ ├── classes.html │ │ │ │ │ ├── closed.png │ │ │ │ │ ├── doc.png │ │ │ │ │ ├── doxygen-extra.css │ │ │ │ │ ├── doxygen.css │ │ │ │ │ ├── doxygen.svg │ │ │ │ │ ├── dynsections.js │ │ │ │ │ ├── folderclosed.png │ │ │ │ │ ├── folderopen.png │ │ │ │ │ ├── functions.html │ │ │ │ │ ├── functions_vars.html │ │ │ │ │ ├── group___turbo_j_p_e_g.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── jquery.js │ │ │ │ │ ├── menu.js │ │ │ │ │ ├── menudata.js │ │ │ │ │ ├── modules.html │ │ │ │ │ ├── nav_f.png │ │ │ │ │ ├── nav_g.png │ │ │ │ │ ├── nav_h.png │ │ │ │ │ ├── open.png │ │ │ │ │ ├── search │ │ │ │ │ ├── all_0.html │ │ │ │ │ ├── all_0.js │ │ │ │ │ ├── all_1.html │ │ │ │ │ ├── all_1.js │ │ │ │ │ ├── all_2.html │ │ │ │ │ ├── all_2.js │ │ │ │ │ ├── all_3.html │ │ │ │ │ ├── all_3.js │ │ │ │ │ ├── all_4.html │ │ │ │ │ ├── all_4.js │ │ │ │ │ ├── all_5.html │ │ │ │ │ ├── all_5.js │ │ │ │ │ ├── all_6.html │ │ │ │ │ ├── all_6.js │ │ │ │ │ ├── all_7.html │ │ │ │ │ ├── all_7.js │ │ │ │ │ ├── all_8.html │ │ │ │ │ ├── all_8.js │ │ │ │ │ ├── all_9.html │ │ │ │ │ ├── all_9.js │ │ │ │ │ ├── classes_0.html │ │ │ │ │ ├── classes_0.js │ │ │ │ │ ├── close.svg │ │ │ │ │ ├── enums_0.html │ │ │ │ │ ├── enums_0.js │ │ │ │ │ ├── enumvalues_0.html │ │ │ │ │ ├── enumvalues_0.js │ │ │ │ │ ├── functions_0.html │ │ │ │ │ ├── functions_0.js │ │ │ │ │ ├── groups_0.html │ │ │ │ │ ├── groups_0.js │ │ │ │ │ ├── mag_sel.svg │ │ │ │ │ ├── nomatches.html │ │ │ │ │ ├── search.css │ │ │ │ │ ├── search.js │ │ │ │ │ ├── search_l.png │ │ │ │ │ ├── search_m.png │ │ │ │ │ ├── search_r.png │ │ │ │ │ ├── searchdata.js │ │ │ │ │ ├── typedefs_0.html │ │ │ │ │ ├── typedefs_0.js │ │ │ │ │ ├── variables_0.html │ │ │ │ │ ├── variables_0.js │ │ │ │ │ ├── variables_1.html │ │ │ │ │ ├── variables_1.js │ │ │ │ │ ├── variables_2.html │ │ │ │ │ ├── variables_2.js │ │ │ │ │ ├── variables_3.html │ │ │ │ │ ├── variables_3.js │ │ │ │ │ ├── variables_4.html │ │ │ │ │ ├── variables_4.js │ │ │ │ │ ├── variables_5.html │ │ │ │ │ ├── variables_5.js │ │ │ │ │ ├── variables_6.html │ │ │ │ │ ├── variables_6.js │ │ │ │ │ ├── variables_7.html │ │ │ │ │ ├── variables_7.js │ │ │ │ │ ├── variables_8.html │ │ │ │ │ ├── variables_8.js │ │ │ │ │ ├── variables_9.html │ │ │ │ │ └── variables_9.js │ │ │ │ │ ├── splitbar.png │ │ │ │ │ ├── structtjregion.html │ │ │ │ │ ├── structtjscalingfactor.html │ │ │ │ │ ├── structtjtransform.html │ │ │ │ │ ├── sync_off.png │ │ │ │ │ ├── sync_on.png │ │ │ │ │ ├── tab_a.png │ │ │ │ │ ├── tab_b.png │ │ │ │ │ ├── tab_h.png │ │ │ │ │ ├── tab_s.png │ │ │ │ │ └── tabs.css │ │ │ ├── doxygen-extra.css │ │ │ ├── doxygen.config │ │ │ ├── example.txt │ │ │ ├── fuzz │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── build.sh │ │ │ │ ├── cjpeg.cc │ │ │ │ ├── compress.cc │ │ │ │ ├── compress_yuv.cc │ │ │ │ ├── decompress.cc │ │ │ │ ├── decompress_yuv.cc │ │ │ │ └── transform.cc │ │ │ ├── jaricom.c │ │ │ ├── java │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── MANIFEST.MF │ │ │ │ ├── README │ │ │ │ ├── TJBench.java │ │ │ │ ├── TJExample.java │ │ │ │ ├── TJUnitTest.java │ │ │ │ ├── doc │ │ │ │ │ ├── allclasses-frame.html │ │ │ │ │ ├── allclasses-noframe.html │ │ │ │ │ ├── constant-values.html │ │ │ │ │ ├── deprecated-list.html │ │ │ │ │ ├── help-doc.html │ │ │ │ │ ├── index-all.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── org │ │ │ │ │ │ └── libjpegturbo │ │ │ │ │ │ │ └── turbojpeg │ │ │ │ │ │ │ ├── TJ.html │ │ │ │ │ │ │ ├── TJCompressor.html │ │ │ │ │ │ │ ├── TJCustomFilter.html │ │ │ │ │ │ │ ├── TJDecompressor.html │ │ │ │ │ │ │ ├── TJException.html │ │ │ │ │ │ │ ├── TJScalingFactor.html │ │ │ │ │ │ │ ├── TJTransform.html │ │ │ │ │ │ │ ├── TJTransformer.html │ │ │ │ │ │ │ ├── YUVImage.html │ │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ │ └── package-tree.html │ │ │ │ │ ├── overview-tree.html │ │ │ │ │ ├── package-list │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── background.gif │ │ │ │ │ │ ├── tab.gif │ │ │ │ │ │ ├── titlebar.gif │ │ │ │ │ │ └── titlebar_end.gif │ │ │ │ │ ├── script.js │ │ │ │ │ ├── serialized-form.html │ │ │ │ │ └── stylesheet.css │ │ │ │ ├── org │ │ │ │ │ └── libjpegturbo │ │ │ │ │ │ └── turbojpeg │ │ │ │ │ │ ├── TJ.java │ │ │ │ │ │ ├── TJCompressor.java │ │ │ │ │ │ ├── TJCustomFilter.java │ │ │ │ │ │ ├── TJDecompressor.java │ │ │ │ │ │ ├── TJException.java │ │ │ │ │ │ ├── TJLoader-unix.java.in │ │ │ │ │ │ ├── TJLoader-win.java.in │ │ │ │ │ │ ├── TJScalingFactor.java │ │ │ │ │ │ ├── TJTransform.java │ │ │ │ │ │ ├── TJTransformer.java │ │ │ │ │ │ └── YUVImage.java │ │ │ │ ├── org_libjpegturbo_turbojpeg_TJ.h │ │ │ │ ├── org_libjpegturbo_turbojpeg_TJCompressor.h │ │ │ │ ├── org_libjpegturbo_turbojpeg_TJDecompressor.h │ │ │ │ └── org_libjpegturbo_turbojpeg_TJTransformer.h │ │ │ ├── jcapimin.c │ │ │ ├── jcapistd.c │ │ │ ├── jcarith.c │ │ │ ├── jccoefct.c │ │ │ ├── jccolext.c │ │ │ ├── jccolor.c │ │ │ ├── jcdctmgr.c │ │ │ ├── jchuff.c │ │ │ ├── jchuff.h │ │ │ ├── jcicc.c │ │ │ ├── jcinit.c │ │ │ ├── jcmainct.c │ │ │ ├── jcmarker.c │ │ │ ├── jcmaster.c │ │ │ ├── jcomapi.c │ │ │ ├── jconfig.h.in │ │ │ ├── jconfig.txt │ │ │ ├── jconfigint.h.in │ │ │ ├── jcparam.c │ │ │ ├── jcphuff.c │ │ │ ├── jcprepct.c │ │ │ ├── jcsample.c │ │ │ ├── jcstest.c │ │ │ ├── jctrans.c │ │ │ ├── jdapimin.c │ │ │ ├── jdapistd.c │ │ │ ├── jdarith.c │ │ │ ├── jdatadst-tj.c │ │ │ ├── jdatadst.c │ │ │ ├── jdatasrc-tj.c │ │ │ ├── jdatasrc.c │ │ │ ├── jdcoefct.c │ │ │ ├── jdcoefct.h │ │ │ ├── jdcol565.c │ │ │ ├── jdcolext.c │ │ │ ├── jdcolor.c │ │ │ ├── jdct.h │ │ │ ├── jddctmgr.c │ │ │ ├── jdhuff.c │ │ │ ├── jdhuff.h │ │ │ ├── jdicc.c │ │ │ ├── jdinput.c │ │ │ ├── jdmainct.c │ │ │ ├── jdmainct.h │ │ │ ├── jdmarker.c │ │ │ ├── jdmaster.c │ │ │ ├── jdmaster.h │ │ │ ├── jdmerge.c │ │ │ ├── jdmerge.h │ │ │ ├── jdmrg565.c │ │ │ ├── jdmrgext.c │ │ │ ├── jdphuff.c │ │ │ ├── jdpostct.c │ │ │ ├── jdsample.c │ │ │ ├── jdsample.h │ │ │ ├── jdtrans.c │ │ │ ├── jerror.c │ │ │ ├── jerror.h │ │ │ ├── jfdctflt.c │ │ │ ├── jfdctfst.c │ │ │ ├── jfdctint.c │ │ │ ├── jidctflt.c │ │ │ ├── jidctfst.c │ │ │ ├── jidctint.c │ │ │ ├── jidctred.c │ │ │ ├── jinclude.h │ │ │ ├── jmemmgr.c │ │ │ ├── jmemnobs.c │ │ │ ├── jmemsys.h │ │ │ ├── jmorecfg.h │ │ │ ├── jpeg_nbits_table.h │ │ │ ├── jpegcomp.h │ │ │ ├── jpegint.h │ │ │ ├── jpeglib.h │ │ │ ├── jpegtran.1 │ │ │ ├── jpegtran.c │ │ │ ├── jquant1.c │ │ │ ├── jquant2.c │ │ │ ├── jsimd.h │ │ │ ├── jsimd_none.c │ │ │ ├── jsimddct.h │ │ │ ├── jstdhuff.c │ │ │ ├── jutils.c │ │ │ ├── jversion.h │ │ │ ├── libjpeg.map.in │ │ │ ├── libjpeg.txt │ │ │ ├── md5 │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── md5.c │ │ │ │ ├── md5.h │ │ │ │ ├── md5cmp.c │ │ │ │ └── md5hl.c │ │ │ ├── rdbmp.c │ │ │ ├── rdcolmap.c │ │ │ ├── rdgif.c │ │ │ ├── rdjpgcom.1 │ │ │ ├── rdjpgcom.c │ │ │ ├── rdppm.c │ │ │ ├── rdswitch.c │ │ │ ├── rdtarga.c │ │ │ ├── release │ │ │ │ ├── Config.cmake.in │ │ │ │ ├── Distribution.xml.in │ │ │ │ ├── License.rtf │ │ │ │ ├── ReadMe.txt │ │ │ │ ├── Welcome.rtf.in │ │ │ │ ├── deb-control.in │ │ │ │ ├── installer.nsi.in │ │ │ │ ├── libjpeg.pc.in │ │ │ │ ├── libturbojpeg.pc.in │ │ │ │ ├── makedpkg.in │ │ │ │ ├── makemacpkg.in │ │ │ │ ├── makerpm.in │ │ │ │ ├── makesrpm.in │ │ │ │ ├── maketarball.in │ │ │ │ ├── rpm.spec.in │ │ │ │ └── uninstall.in │ │ │ ├── sharedlib │ │ │ │ └── CMakeLists.txt │ │ │ ├── simd │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── arm │ │ │ │ │ ├── aarch32 │ │ │ │ │ │ ├── jccolext-neon.c │ │ │ │ │ │ ├── jchuff-neon.c │ │ │ │ │ │ ├── jsimd.c │ │ │ │ │ │ └── jsimd_neon.S │ │ │ │ │ ├── aarch64 │ │ │ │ │ │ ├── jccolext-neon.c │ │ │ │ │ │ ├── jchuff-neon.c │ │ │ │ │ │ ├── jsimd.c │ │ │ │ │ │ └── jsimd_neon.S │ │ │ │ │ ├── align.h │ │ │ │ │ ├── jccolor-neon.c │ │ │ │ │ ├── jcgray-neon.c │ │ │ │ │ ├── jcgryext-neon.c │ │ │ │ │ ├── jchuff.h │ │ │ │ │ ├── jcphuff-neon.c │ │ │ │ │ ├── jcsample-neon.c │ │ │ │ │ ├── jdcolext-neon.c │ │ │ │ │ ├── jdcolor-neon.c │ │ │ │ │ ├── jdmerge-neon.c │ │ │ │ │ ├── jdmrgext-neon.c │ │ │ │ │ ├── jdsample-neon.c │ │ │ │ │ ├── jfdctfst-neon.c │ │ │ │ │ ├── jfdctint-neon.c │ │ │ │ │ ├── jidctfst-neon.c │ │ │ │ │ ├── jidctint-neon.c │ │ │ │ │ ├── jidctred-neon.c │ │ │ │ │ ├── jquanti-neon.c │ │ │ │ │ └── neon-compat.h.in │ │ │ │ ├── i386 │ │ │ │ │ ├── jccolext-avx2.asm │ │ │ │ │ ├── jccolext-mmx.asm │ │ │ │ │ ├── jccolext-sse2.asm │ │ │ │ │ ├── jccolor-avx2.asm │ │ │ │ │ ├── jccolor-mmx.asm │ │ │ │ │ ├── jccolor-sse2.asm │ │ │ │ │ ├── jcgray-avx2.asm │ │ │ │ │ ├── jcgray-mmx.asm │ │ │ │ │ ├── jcgray-sse2.asm │ │ │ │ │ ├── jcgryext-avx2.asm │ │ │ │ │ ├── jcgryext-mmx.asm │ │ │ │ │ ├── jcgryext-sse2.asm │ │ │ │ │ ├── jchuff-sse2.asm │ │ │ │ │ ├── jcphuff-sse2.asm │ │ │ │ │ ├── jcsample-avx2.asm │ │ │ │ │ ├── jcsample-mmx.asm │ │ │ │ │ ├── jcsample-sse2.asm │ │ │ │ │ ├── jdcolext-avx2.asm │ │ │ │ │ ├── jdcolext-mmx.asm │ │ │ │ │ ├── jdcolext-sse2.asm │ │ │ │ │ ├── jdcolor-avx2.asm │ │ │ │ │ ├── jdcolor-mmx.asm │ │ │ │ │ ├── jdcolor-sse2.asm │ │ │ │ │ ├── jdmerge-avx2.asm │ │ │ │ │ ├── jdmerge-mmx.asm │ │ │ │ │ ├── jdmerge-sse2.asm │ │ │ │ │ ├── jdmrgext-avx2.asm │ │ │ │ │ ├── jdmrgext-mmx.asm │ │ │ │ │ ├── jdmrgext-sse2.asm │ │ │ │ │ ├── jdsample-avx2.asm │ │ │ │ │ ├── jdsample-mmx.asm │ │ │ │ │ ├── jdsample-sse2.asm │ │ │ │ │ ├── jfdctflt-3dn.asm │ │ │ │ │ ├── jfdctflt-sse.asm │ │ │ │ │ ├── jfdctfst-mmx.asm │ │ │ │ │ ├── jfdctfst-sse2.asm │ │ │ │ │ ├── jfdctint-avx2.asm │ │ │ │ │ ├── jfdctint-mmx.asm │ │ │ │ │ ├── jfdctint-sse2.asm │ │ │ │ │ ├── jidctflt-3dn.asm │ │ │ │ │ ├── jidctflt-sse.asm │ │ │ │ │ ├── jidctflt-sse2.asm │ │ │ │ │ ├── jidctfst-mmx.asm │ │ │ │ │ ├── jidctfst-sse2.asm │ │ │ │ │ ├── jidctint-avx2.asm │ │ │ │ │ ├── jidctint-mmx.asm │ │ │ │ │ ├── jidctint-sse2.asm │ │ │ │ │ ├── jidctred-mmx.asm │ │ │ │ │ ├── jidctred-sse2.asm │ │ │ │ │ ├── jquant-3dn.asm │ │ │ │ │ ├── jquant-mmx.asm │ │ │ │ │ ├── jquant-sse.asm │ │ │ │ │ ├── jquantf-sse2.asm │ │ │ │ │ ├── jquanti-avx2.asm │ │ │ │ │ ├── jquanti-sse2.asm │ │ │ │ │ ├── jsimd.c │ │ │ │ │ └── jsimdcpu.asm │ │ │ │ ├── jsimd.h │ │ │ │ ├── mips │ │ │ │ │ ├── jsimd.c │ │ │ │ │ ├── jsimd_dspr2.S │ │ │ │ │ └── jsimd_dspr2_asm.h │ │ │ │ ├── mips64 │ │ │ │ │ ├── jccolext-mmi.c │ │ │ │ │ ├── jccolor-mmi.c │ │ │ │ │ ├── jcgray-mmi.c │ │ │ │ │ ├── jcgryext-mmi.c │ │ │ │ │ ├── jcsample-mmi.c │ │ │ │ │ ├── jcsample.h │ │ │ │ │ ├── jdcolext-mmi.c │ │ │ │ │ ├── jdcolor-mmi.c │ │ │ │ │ ├── jdmerge-mmi.c │ │ │ │ │ ├── jdmrgext-mmi.c │ │ │ │ │ ├── jdsample-mmi.c │ │ │ │ │ ├── jfdctfst-mmi.c │ │ │ │ │ ├── jfdctint-mmi.c │ │ │ │ │ ├── jidctfst-mmi.c │ │ │ │ │ ├── jidctint-mmi.c │ │ │ │ │ ├── jquanti-mmi.c │ │ │ │ │ ├── jsimd.c │ │ │ │ │ ├── jsimd_mmi.h │ │ │ │ │ └── loongson-mmintrin.h │ │ │ │ ├── nasm │ │ │ │ │ ├── jcolsamp.inc │ │ │ │ │ ├── jdct.inc │ │ │ │ │ ├── jsimdcfg.inc │ │ │ │ │ ├── jsimdcfg.inc.h │ │ │ │ │ └── jsimdext.inc │ │ │ │ ├── powerpc │ │ │ │ │ ├── jccolext-altivec.c │ │ │ │ │ ├── jccolor-altivec.c │ │ │ │ │ ├── jcgray-altivec.c │ │ │ │ │ ├── jcgryext-altivec.c │ │ │ │ │ ├── jcsample-altivec.c │ │ │ │ │ ├── jcsample.h │ │ │ │ │ ├── jdcolext-altivec.c │ │ │ │ │ ├── jdcolor-altivec.c │ │ │ │ │ ├── jdmerge-altivec.c │ │ │ │ │ ├── jdmrgext-altivec.c │ │ │ │ │ ├── jdsample-altivec.c │ │ │ │ │ ├── jfdctfst-altivec.c │ │ │ │ │ ├── jfdctint-altivec.c │ │ │ │ │ ├── jidctfst-altivec.c │ │ │ │ │ ├── jidctint-altivec.c │ │ │ │ │ ├── jquanti-altivec.c │ │ │ │ │ ├── jsimd.c │ │ │ │ │ └── jsimd_altivec.h │ │ │ │ └── x86_64 │ │ │ │ │ ├── jccolext-avx2.asm │ │ │ │ │ ├── jccolext-sse2.asm │ │ │ │ │ ├── jccolor-avx2.asm │ │ │ │ │ ├── jccolor-sse2.asm │ │ │ │ │ ├── jcgray-avx2.asm │ │ │ │ │ ├── jcgray-sse2.asm │ │ │ │ │ ├── jcgryext-avx2.asm │ │ │ │ │ ├── jcgryext-sse2.asm │ │ │ │ │ ├── jchuff-sse2.asm │ │ │ │ │ ├── jcphuff-sse2.asm │ │ │ │ │ ├── jcsample-avx2.asm │ │ │ │ │ ├── jcsample-sse2.asm │ │ │ │ │ ├── jdcolext-avx2.asm │ │ │ │ │ ├── jdcolext-sse2.asm │ │ │ │ │ ├── jdcolor-avx2.asm │ │ │ │ │ ├── jdcolor-sse2.asm │ │ │ │ │ ├── jdmerge-avx2.asm │ │ │ │ │ ├── jdmerge-sse2.asm │ │ │ │ │ ├── jdmrgext-avx2.asm │ │ │ │ │ ├── jdmrgext-sse2.asm │ │ │ │ │ ├── jdsample-avx2.asm │ │ │ │ │ ├── jdsample-sse2.asm │ │ │ │ │ ├── jfdctflt-sse.asm │ │ │ │ │ ├── jfdctfst-sse2.asm │ │ │ │ │ ├── jfdctint-avx2.asm │ │ │ │ │ ├── jfdctint-sse2.asm │ │ │ │ │ ├── jidctflt-sse2.asm │ │ │ │ │ ├── jidctfst-sse2.asm │ │ │ │ │ ├── jidctint-avx2.asm │ │ │ │ │ ├── jidctint-sse2.asm │ │ │ │ │ ├── jidctred-sse2.asm │ │ │ │ │ ├── jquantf-sse2.asm │ │ │ │ │ ├── jquanti-avx2.asm │ │ │ │ │ ├── jquanti-sse2.asm │ │ │ │ │ ├── jsimd.c │ │ │ │ │ └── jsimdcpu.asm │ │ │ ├── structure.txt │ │ │ ├── testimages │ │ │ │ ├── nightshot_iso_100.bmp │ │ │ │ ├── nightshot_iso_100.txt │ │ │ │ ├── test.scan │ │ │ │ ├── test1.icc │ │ │ │ ├── test1.icc.txt │ │ │ │ ├── test2.icc │ │ │ │ ├── test2.icc.txt │ │ │ │ ├── testimgari.jpg │ │ │ │ ├── testimgint.jpg │ │ │ │ ├── testorig.jpg │ │ │ │ ├── testorig.ppm │ │ │ │ ├── testorig12.jpg │ │ │ │ ├── vgl_5674_0098.bmp │ │ │ │ ├── vgl_6434_0018a.bmp │ │ │ │ └── vgl_6548_0026a.bmp │ │ │ ├── tjbench.c │ │ │ ├── tjbenchtest.in │ │ │ ├── tjbenchtest.java.in │ │ │ ├── tjexample.c │ │ │ ├── tjexampletest.in │ │ │ ├── tjexampletest.java.in │ │ │ ├── tjunittest.c │ │ │ ├── tjutil.c │ │ │ ├── tjutil.h │ │ │ ├── transupp.c │ │ │ ├── transupp.h │ │ │ ├── turbojpeg-jni.c │ │ │ ├── turbojpeg-mapfile │ │ │ ├── turbojpeg-mapfile.jni │ │ │ ├── turbojpeg.c │ │ │ ├── turbojpeg.h │ │ │ ├── usage.txt │ │ │ ├── win │ │ │ │ ├── gcc │ │ │ │ │ └── projectTargets-release.cmake.in │ │ │ │ ├── jconfig.h.in │ │ │ │ ├── jpeg62-memsrcdst.def │ │ │ │ ├── jpeg62.def │ │ │ │ ├── jpeg7-memsrcdst.def │ │ │ │ ├── jpeg7.def │ │ │ │ ├── jpeg8.def │ │ │ │ ├── projectTargets.cmake.in │ │ │ │ └── vc │ │ │ │ │ └── projectTargets-release.cmake.in │ │ │ ├── wizard.txt │ │ │ ├── wrbmp.c │ │ │ ├── wrgif.c │ │ │ ├── wrjpgcom.1 │ │ │ ├── wrjpgcom.c │ │ │ ├── wrppm.c │ │ │ └── wrtarga.c │ │ └── libyuv │ │ │ ├── CMakeLists.txt │ │ │ ├── include │ │ │ ├── libyuv.h │ │ │ └── libyuv │ │ │ │ ├── basic_types.h │ │ │ │ ├── compare.h │ │ │ │ ├── compare_row.h │ │ │ │ ├── convert.h │ │ │ │ ├── convert_argb.h │ │ │ │ ├── convert_from.h │ │ │ │ ├── convert_from_argb.h │ │ │ │ ├── cpu_id.h │ │ │ │ ├── macros_msa.h │ │ │ │ ├── mjpeg_decoder.h │ │ │ │ ├── planar_functions.h │ │ │ │ ├── rotate.h │ │ │ │ ├── rotate_argb.h │ │ │ │ ├── rotate_row.h │ │ │ │ ├── row.h │ │ │ │ ├── scale.h │ │ │ │ ├── scale_argb.h │ │ │ │ ├── scale_row.h │ │ │ │ ├── version.h │ │ │ │ └── video_common.h │ │ │ └── source │ │ │ ├── compare.cc │ │ │ ├── compare_common.cc │ │ │ ├── compare_gcc.cc │ │ │ ├── compare_mmi.cc │ │ │ ├── compare_msa.cc │ │ │ ├── compare_neon.cc │ │ │ ├── compare_neon64.cc │ │ │ ├── compare_win.cc │ │ │ ├── convert.cc │ │ │ ├── convert_argb.cc │ │ │ ├── convert_from.cc │ │ │ ├── convert_from_argb.cc │ │ │ ├── convert_jpeg.cc │ │ │ ├── convert_to_argb.cc │ │ │ ├── convert_to_i420.cc │ │ │ ├── cpu_id.cc │ │ │ ├── mjpeg_decoder.cc │ │ │ ├── mjpeg_validate.cc │ │ │ ├── planar_functions.cc │ │ │ ├── rotate.cc │ │ │ ├── rotate_any.cc │ │ │ ├── rotate_argb.cc │ │ │ ├── rotate_common.cc │ │ │ ├── rotate_gcc.cc │ │ │ ├── rotate_mmi.cc │ │ │ ├── rotate_msa.cc │ │ │ ├── rotate_neon.cc │ │ │ ├── rotate_neon64.cc │ │ │ ├── rotate_win.cc │ │ │ ├── row_any.cc │ │ │ ├── row_common.cc │ │ │ ├── row_gcc.cc │ │ │ ├── row_mmi.cc │ │ │ ├── row_msa.cc │ │ │ ├── row_neon.cc │ │ │ ├── row_neon64.cc │ │ │ ├── row_win.cc │ │ │ ├── scale.cc │ │ │ ├── scale_any.cc │ │ │ ├── scale_argb.cc │ │ │ ├── scale_common.cc │ │ │ ├── scale_gcc.cc │ │ │ ├── scale_mmi.cc │ │ │ ├── scale_msa.cc │ │ │ ├── scale_neon.cc │ │ │ ├── scale_neon64.cc │ │ │ ├── scale_win.cc │ │ │ ├── test.sh │ │ │ └── video_common.cc │ └── java │ │ └── com │ │ └── hsj │ │ └── camera │ │ ├── CameraAPI.java │ │ ├── CameraView.java │ │ ├── IFrameCallback.java │ │ ├── IRender.java │ │ ├── ISurfaceCallback.java │ │ ├── Logger.java │ │ ├── RenderBeauty.java │ │ ├── RenderCommon.java │ │ └── RenderDepth.java │ └── test │ └── java │ └── com │ └── hsj │ └── camera │ └── ExampleUnitTest.java └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | .gradle 4 | /local.properties 5 | /.idea/caches 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | /.idea/navEditor.xml 10 | /.idea/assetWizardSettings.xml 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # android_v4l2_camera 2 | 🔥 V4L2 Camera on Android 3 | 4 | ### Image 5 | 6 | 7 | ### Sample 8 | | | 9 | | :--------: | 10 | | Scan QR code or [Download][1] | 11 | 12 | ### App Running Environment 13 | ```text 14 | If your app can't access /dev/video* on Android device,you need grant read and write permission. 15 | 16 | adb shell 17 | su 18 | chmod 666 /dev/video* 19 | ``` 20 | 21 | ### Add Function 22 | - 1.FPS 30 of Dual cameras. 23 | - 1.Package Android camera based on V4L2 protocol. 24 | - 2.Support setting resolution and original format of image acquisition: MJPEG, YUYV 25 | - 3.Use NdkMediaCodec for MJPEG decoding. If the device does not support hard decoding, 26 | it is recommended to use libjpeg-turbo instead of HwDecoder. 27 | - 4.Support OpenGL ES rendering YUYV, NV12, NV21, DEPTH and other image formats. 28 | 29 | ### Plan Add Function 30 | - 1.Add opengl filter for beauty by face color 31 | 32 | ### About Build 33 | - CMake: 3.10.2 34 | - Android Studio 4.0 35 | 36 | ### About Author: 37 | - Author: shengjunhu 38 | - Date : 2021/05/12 39 | - E-Mail: shengjunhu@foxmail.com 40 | - GitHub: https://github.com/shengjunhu 41 | 42 | ### About Third Party Libraries 43 | - [libjpeg-turbo][2] 44 | - [libyuv][3] 45 | 46 | ### About License 47 | ```text 48 | Copyright (c) 2020 shengjunhu 49 | Please comply with the relevant third party libraries license 50 | ``` 51 | 52 | [1]: https://github.com/shengjunhu/android_v4l2_camera/raw/master/doc/apk/android_v4l2_camera.apk 53 | [2]: https://github.com/libjpeg-turbo/libjpeg-turbo 54 | [3]: https://chromium.googlesource.com/external/libyuv 55 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | apply from: 'config.gradle' 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:4.0.1' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } 25 | -------------------------------------------------------------------------------- /doc/apk/android_v4l2_camera.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/doc/apk/android_v4l2_camera.apk -------------------------------------------------------------------------------- /doc/img/qr_apk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/doc/img/qr_apk.png -------------------------------------------------------------------------------- /doc/img/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/doc/img/screenshot.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 01 10:25:00 GMT+08:00 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /sample/android.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sample/android.jks -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /sample/src/androidTest/java/com/hsj/sample/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hsj.sample; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.hsj.sample", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 24 | 25 |