35 |
36 |
37 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/search/variables_9.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['y_159',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/splitbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/splitbar.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/sync_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/sync_off.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/sync_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/sync_on.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_a.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_b.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_h.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doc/html/tab_s.png
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doxygen-extra.css:
--------------------------------------------------------------------------------
1 | code {
2 | color: #4665A2;
3 | }
4 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/doxygen.config:
--------------------------------------------------------------------------------
1 | PROJECT_NAME = TurboJPEG
2 | PROJECT_NUMBER = 2.1
3 | OUTPUT_DIRECTORY = doc/
4 | USE_WINDOWS_ENCODING = NO
5 | OPTIMIZE_OUTPUT_FOR_C = YES
6 | WARN_NO_PARAMDOC = YES
7 | GENERATE_LATEX = NO
8 | FILE_PATTERNS = turbojpeg.h
9 | HIDE_UNDOC_MEMBERS = YES
10 | VERBATIM_HEADERS = NO
11 | EXTRACT_STATIC = YES
12 | JAVADOC_AUTOBRIEF = YES
13 | MAX_INITIALIZER_LINES = 0
14 | ALWAYS_DETAILED_SEC = YES
15 | HTML_TIMESTAMP = NO
16 | HTML_EXTRA_STYLESHEET = doxygen-extra.css
17 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/fuzz/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(NOT ENABLE_STATIC)
2 | message(FATAL_ERROR "Fuzz targets require static libraries.")
3 | endif()
4 | if(NOT WITH_TURBOJPEG)
5 | message(FATAL_ERROR "Fuzz targets require the TurboJPEG API library.")
6 | endif()
7 |
8 | set(FUZZ_BINDIR "" CACHE PATH
9 | "Directory into which fuzz targets should be installed")
10 | if(NOT FUZZ_BINDIR)
11 | message(FATAL_ERROR "FUZZ_BINDIR must be specified.")
12 | endif()
13 | message(STATUS "FUZZ_BINDIR = ${FUZZ_BINDIR}")
14 |
15 | set(FUZZ_LIBRARY "" CACHE STRING
16 | "Path to fuzzer library or flags necessary to link with it")
17 | if(NOT FUZZ_LIBRARY)
18 | message(FATAL_ERROR "FUZZ_LIBRARY must be specified.")
19 | endif()
20 | message(STATUS "FUZZ_LIBRARY = ${FUZZ_LIBRARY}")
21 |
22 | enable_language(CXX)
23 |
24 | set(EFFECTIVE_CXX_FLAGS
25 | "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
26 | message(STATUS "C++ Compiler flags = ${EFFECTIVE_CXX_FLAGS}")
27 |
28 | add_executable(cjpeg_fuzzer cjpeg.cc ../cdjpeg.c ../rdbmp.c ../rdgif.c
29 | ../rdppm.c ../rdswitch.c ../rdtarga.c)
30 | set_property(TARGET cjpeg_fuzzer PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
31 | target_link_libraries(cjpeg_fuzzer ${FUZZ_LIBRARY} jpeg-static)
32 | install(TARGETS cjpeg_fuzzer RUNTIME DESTINATION ${FUZZ_BINDIR})
33 |
34 | macro(add_fuzz_target target source_file)
35 | add_executable(${target}_fuzzer ${source_file})
36 | target_link_libraries(${target}_fuzzer ${FUZZ_LIBRARY} turbojpeg-static)
37 | install(TARGETS ${target}_fuzzer RUNTIME DESTINATION ${FUZZ_BINDIR})
38 | endmacro()
39 |
40 | add_fuzz_target(compress compress.cc)
41 |
42 | add_fuzz_target(compress_yuv compress_yuv.cc)
43 |
44 | # NOTE: This target is named libjpeg_turbo_fuzzer instead of decompress_fuzzer
45 | # in order to preserve the corpora from Google's OSS-Fuzz target for
46 | # libjpeg-turbo, which this target replaces.
47 | add_fuzz_target(libjpeg_turbo decompress.cc)
48 |
49 | add_fuzz_target(decompress_yuv decompress_yuv.cc)
50 |
51 | add_fuzz_target(transform transform.cc)
52 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/fuzz/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -u
4 | set -e
5 |
6 | cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_STATIC=1 -DENABLE_SHARED=0 \
7 | -DCMAKE_C_FLAGS_RELWITHDEBINFO="-g -DNDEBUG" \
8 | -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -DNDEBUG" -DCMAKE_INSTALL_PREFIX=$WORK \
9 | -DWITH_FUZZ=1 -DFUZZ_BINDIR=$OUT -DFUZZ_LIBRARY=$LIB_FUZZING_ENGINE
10 | make "-j$(nproc)" "--load-average=$(nproc)"
11 | make install
12 |
13 | cp $SRC/compress_fuzzer_seed_corpus.zip $OUT/cjpeg_fuzzer_seed_corpus.zip
14 | cp $SRC/compress_fuzzer_seed_corpus.zip $OUT/compress_fuzzer_seed_corpus.zip
15 | cp $SRC/compress_fuzzer_seed_corpus.zip $OUT/compress_yuv_fuzzer_seed_corpus.zip
16 | cp $SRC/decompress_fuzzer_seed_corpus.zip $OUT/libjpeg_turbo_fuzzer_seed_corpus.zip
17 | cp $SRC/decompress_fuzzer_seed_corpus.zip $OUT/decompress_yuv_fuzzer_seed_corpus.zip
18 | cp $SRC/decompress_fuzzer_seed_corpus.zip $OUT/transform_fuzzer_seed_corpus.zip
19 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Main-Class: TJExample
3 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/README:
--------------------------------------------------------------------------------
1 | TurboJPEG Java Wrapper
2 | ======================
3 |
4 | The TurboJPEG shared library can optionally be built with a Java Native
5 | Interface wrapper, which allows the library to be loaded and used directly from
6 | Java applications. The Java front end for this is defined in several classes
7 | located under org/libjpegturbo/turbojpeg. The source code for these Java
8 | classes is licensed under a BSD-style license, so the files can be incorporated
9 | directly into both open source and proprietary projects without restriction. A
10 | Java archive (JAR) file containing these classes is also shipped with the
11 | "official" distribution packages of libjpeg-turbo.
12 |
13 | TJExample.java, which should also be located in the same directory as this
14 | README file, demonstrates how to use the TurboJPEG Java API to compress and
15 | decompress JPEG images in memory.
16 |
17 |
18 | Performance Pitfalls
19 | --------------------
20 |
21 | The TurboJPEG Java API defines several convenience methods that can allocate
22 | image buffers or instantiate classes to hold the result of compress,
23 | decompress, or transform operations. However, if you use these methods, then
24 | be mindful of the amount of new data you are creating on the heap. It may be
25 | necessary to manually invoke the garbage collector to prevent heap exhaustion
26 | or to prevent performance degradation. Background garbage collection can kill
27 | performance, particularly in a multi-threaded environment (Java pauses all
28 | threads when the GC runs.)
29 |
30 | The TurboJPEG Java API always gives you the option of pre-allocating your own
31 | source and destination buffers, which allows you to re-use those buffers for
32 | compressing/decompressing multiple images. If the image sequence you are
33 | compressing or decompressing consists of images of the same size, then
34 | pre-allocating the buffers is recommended.
35 |
36 |
37 | Installation Directory
38 | ----------------------
39 |
40 | The TurboJPEG Java Wrapper will look for the TurboJPEG JNI library
41 | (libturbojpeg.so, libturbojpeg.dylib, or turbojpeg.dll) in the system library
42 | paths or in any paths specified in LD_LIBRARY_PATH (Un*x), DYLD_LIBRARY_PATH
43 | (Mac), or PATH (Windows.) Failing this, on Un*x and Mac systems, the wrapper
44 | will look for the JNI library under the library directory configured when
45 | libjpeg-turbo was built. If that library directory is
46 | /opt/libjpeg-turbo/lib32, then /opt/libjpeg-turbo/lib64 is also searched, and
47 | vice versa.
48 |
49 | If you installed the JNI library into another directory, then you will need
50 | to pass an argument of -Djava.library.path={path_to_JNI_library} to java, or
51 | manipulate LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, or PATH to include the directory
52 | containing the JNI library.
53 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/allclasses-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | All Classes
6 |
7 |
8 |
9 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/package-list:
--------------------------------------------------------------------------------
1 | org.libjpegturbo.turbojpeg
2 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/background.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/background.gif
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/tab.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/tab.gif
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/titlebar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/titlebar.gif
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/titlebar_end.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/resources/titlebar_end.gif
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/doc/script.js:
--------------------------------------------------------------------------------
1 | function show(type)
2 | {
3 | count = 0;
4 | for (var key in methods) {
5 | var row = document.getElementById(key);
6 | if ((methods[key] & type) != 0) {
7 | row.style.display = '';
8 | row.className = (count++ % 2) ? rowColor : altColor;
9 | }
10 | else
11 | row.style.display = 'none';
12 | }
13 | updateTabs(type);
14 | }
15 |
16 | function updateTabs(type)
17 | {
18 | for (var value in tabs) {
19 | var sNode = document.getElementById(tabs[value][0]);
20 | var spanNode = sNode.firstChild;
21 | if (value == type) {
22 | sNode.className = activeTableTab;
23 | spanNode.innerHTML = tabs[value][1];
24 | }
25 | else {
26 | sNode.className = tableTab;
27 | spanNode.innerHTML = "" + tabs[value][1] + "";
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJLoader-win.java.in:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are met:
6 | *
7 | * - Redistributions of source code must retain the above copyright notice,
8 | * this list of conditions and the following disclaimer.
9 | * - Redistributions in binary form must reproduce the above copyright notice,
10 | * this list of conditions and the following disclaimer in the documentation
11 | * and/or other materials provided with the distribution.
12 | * - Neither the name of the libjpeg-turbo Project nor the names of its
13 | * contributors may be used to endorse or promote products derived from this
14 | * software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 | * POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | package org.libjpegturbo.turbojpeg;
30 |
31 | final class TJLoader {
32 | static void load() {
33 | System.loadLibrary("@TURBOJPEG_DLL_NAME@");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/java/org_libjpegturbo_turbojpeg_TJTransformer.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class org_libjpegturbo_turbojpeg_TJTransformer */
4 |
5 | #ifndef _Included_org_libjpegturbo_turbojpeg_TJTransformer
6 | #define _Included_org_libjpegturbo_turbojpeg_TJTransformer
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 | /*
11 | * Class: org_libjpegturbo_turbojpeg_TJTransformer
12 | * Method: init
13 | * Signature: ()V
14 | */
15 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_init
16 | (JNIEnv *, jobject);
17 |
18 | /*
19 | * Class: org_libjpegturbo_turbojpeg_TJTransformer
20 | * Method: transform
21 | * Signature: ([BI[[B[Lorg/libjpegturbo/turbojpeg/TJTransform;I)[I
22 | */
23 | JNIEXPORT jintArray JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_transform
24 | (JNIEnv *, jobject, jbyteArray, jint, jobjectArray, jobjectArray, jint);
25 |
26 | #ifdef __cplusplus
27 | }
28 | #endif
29 | #endif
30 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jchuff.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jchuff.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-1997, Thomas G. Lane.
6 | * It was modified by The libjpeg-turbo Project to include only code relevant
7 | * to libjpeg-turbo.
8 | * For conditions of distribution and use, see the accompanying README.ijg
9 | * file.
10 | *
11 | * This file contains declarations for Huffman entropy encoding routines
12 | * that are shared between the sequential encoder (jchuff.c) and the
13 | * progressive encoder (jcphuff.c). No other modules need to see these.
14 | */
15 |
16 | /* The legal range of a DCT coefficient is
17 | * -1024 .. +1023 for 8-bit data;
18 | * -16384 .. +16383 for 12-bit data.
19 | * Hence the magnitude should always fit in 10 or 14 bits respectively.
20 | */
21 |
22 | #if BITS_IN_JSAMPLE == 8
23 | #define MAX_COEF_BITS 10
24 | #else
25 | #define MAX_COEF_BITS 14
26 | #endif
27 |
28 | /* Derived data constructed for each Huffman table */
29 |
30 | typedef struct {
31 | unsigned int ehufco[256]; /* code for each symbol */
32 | char ehufsi[256]; /* length of code for each symbol */
33 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
34 | } c_derived_tbl;
35 |
36 | /* Expand a Huffman table definition into the derived format */
37 | EXTERN(void) jpeg_make_c_derived_tbl(j_compress_ptr cinfo, boolean isDC,
38 | int tblno, c_derived_tbl **pdtbl);
39 |
40 | /* Generate an optimal table definition given the specified counts */
41 | EXTERN(void) jpeg_gen_optimal_table(j_compress_ptr cinfo, JHUFF_TBL *htbl,
42 | long freq[]);
43 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jconfig.h.in:
--------------------------------------------------------------------------------
1 | /* Version ID for the JPEG library.
2 | * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
3 | */
4 | #define JPEG_LIB_VERSION @JPEG_LIB_VERSION@
5 |
6 | /* libjpeg-turbo version */
7 | #define LIBJPEG_TURBO_VERSION @VERSION@
8 |
9 | /* libjpeg-turbo version in integer form */
10 | #define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
11 |
12 | /* Support arithmetic encoding */
13 | #cmakedefine C_ARITH_CODING_SUPPORTED 1
14 |
15 | /* Support arithmetic decoding */
16 | #cmakedefine D_ARITH_CODING_SUPPORTED 1
17 |
18 | /* Support in-memory source/destination managers */
19 | #cmakedefine MEM_SRCDST_SUPPORTED 1
20 |
21 | /* Use accelerated SIMD routines. */
22 | #cmakedefine WITH_SIMD 1
23 |
24 | /*
25 | * Define BITS_IN_JSAMPLE as either
26 | * 8 for 8-bit sample values (the usual setting)
27 | * 12 for 12-bit sample values
28 | * Only 8 and 12 are legal data precisions for lossy JPEG according to the
29 | * JPEG standard, and the IJG code does not support anything else!
30 | * We do not support run-time selection of data precision, sorry.
31 | */
32 |
33 | #define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
34 |
35 | /* Define to 1 if you have the header file. */
36 | #cmakedefine HAVE_LOCALE_H 1
37 |
38 | /* Define to 1 if you have the header file. */
39 | #cmakedefine HAVE_STDDEF_H 1
40 |
41 | /* Define to 1 if you have the header file. */
42 | #cmakedefine HAVE_STDLIB_H 1
43 |
44 | /* Define if you need to include to get size_t. */
45 | #cmakedefine NEED_SYS_TYPES_H 1
46 |
47 | /* Define if you have BSD-like bzero and bcopy in rather than
48 | memset/memcpy in . */
49 | #cmakedefine NEED_BSD_STRINGS 1
50 |
51 | /* Define to 1 if the system has the type `unsigned char'. */
52 | #cmakedefine HAVE_UNSIGNED_CHAR 1
53 |
54 | /* Define to 1 if the system has the type `unsigned short'. */
55 | #cmakedefine HAVE_UNSIGNED_SHORT 1
56 |
57 | /* Compiler does not support pointers to undefined structures. */
58 | #cmakedefine INCOMPLETE_TYPES_BROKEN 1
59 |
60 | /* Define if your (broken) compiler shifts signed values as if they were
61 | unsigned. */
62 | #cmakedefine RIGHT_SHIFT_IS_UNSIGNED 1
63 |
64 | /* Define to empty if `const' does not conform to ANSI C. */
65 | /* #undef const */
66 |
67 | /* Define to `unsigned int' if does not define. */
68 | /* #undef size_t */
69 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jconfigint.h.in:
--------------------------------------------------------------------------------
1 | /* libjpeg-turbo build number */
2 | #define BUILD "@BUILD@"
3 |
4 | /* Compiler's inline keyword */
5 | #undef inline
6 |
7 | /* How to obtain function inlining. */
8 | #define INLINE @INLINE@
9 |
10 | /* How to obtain thread-local storage */
11 | #define THREAD_LOCAL @THREAD_LOCAL@
12 |
13 | /* Define to the full name of this package. */
14 | #define PACKAGE_NAME "@CMAKE_PROJECT_NAME@"
15 |
16 | /* Version number of package */
17 | #define VERSION "@VERSION@"
18 |
19 | /* The size of `size_t', as computed by sizeof. */
20 | #define SIZEOF_SIZE_T @SIZE_T@
21 |
22 | /* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */
23 | #cmakedefine HAVE_BUILTIN_CTZL
24 |
25 | /* Define to 1 if you have the header file. */
26 | #cmakedefine HAVE_INTRIN_H
27 |
28 | #if defined(_MSC_VER) && defined(HAVE_INTRIN_H)
29 | #if (SIZEOF_SIZE_T == 8)
30 | #define HAVE_BITSCANFORWARD64
31 | #elif (SIZEOF_SIZE_T == 4)
32 | #define HAVE_BITSCANFORWARD
33 | #endif
34 | #endif
35 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jdmainct.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jdmainct.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1994-1996, Thomas G. Lane.
6 | * For conditions of distribution and use, see the accompanying README.ijg
7 | * file.
8 | */
9 |
10 | #define JPEG_INTERNALS
11 | #include "jpeglib.h"
12 | #include "jpegcomp.h"
13 |
14 |
15 | /* Private buffer controller object */
16 |
17 | typedef struct {
18 | struct jpeg_d_main_controller pub; /* public fields */
19 |
20 | /* Pointer to allocated workspace (M or M+2 row groups). */
21 | JSAMPARRAY buffer[MAX_COMPONENTS];
22 |
23 | boolean buffer_full; /* Have we gotten an iMCU row from decoder? */
24 | JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */
25 |
26 | /* Remaining fields are only used in the context case. */
27 |
28 | /* These are the master pointers to the funny-order pointer lists. */
29 | JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */
30 |
31 | int whichptr; /* indicates which pointer set is now in use */
32 | int context_state; /* process_data state machine status */
33 | JDIMENSION rowgroups_avail; /* row groups available to postprocessor */
34 | JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */
35 | } my_main_controller;
36 |
37 | typedef my_main_controller *my_main_ptr;
38 |
39 |
40 | /* context_state values: */
41 | #define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */
42 | #define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */
43 | #define CTX_POSTPONED_ROW 2 /* feeding postponed row group */
44 |
45 |
46 | LOCAL(void)
47 | set_wraparound_pointers(j_decompress_ptr cinfo)
48 | /* Set up the "wraparound" pointers at top and bottom of the pointer lists.
49 | * This changes the pointer list state from top-of-image to the normal state.
50 | */
51 | {
52 | my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
53 | int ci, i, rgroup;
54 | int M = cinfo->_min_DCT_scaled_size;
55 | jpeg_component_info *compptr;
56 | JSAMPARRAY xbuf0, xbuf1;
57 |
58 | for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
59 | ci++, compptr++) {
60 | rgroup = (compptr->v_samp_factor * compptr->_DCT_scaled_size) /
61 | cinfo->_min_DCT_scaled_size; /* height of a row group of component */
62 | xbuf0 = main_ptr->xbuffer[0][ci];
63 | xbuf1 = main_ptr->xbuffer[1][ci];
64 | for (i = 0; i < rgroup; i++) {
65 | xbuf0[i - rgroup] = xbuf0[rgroup * (M + 1) + i];
66 | xbuf1[i - rgroup] = xbuf1[rgroup * (M + 1) + i];
67 | xbuf0[rgroup * (M + 2) + i] = xbuf0[i];
68 | xbuf1[rgroup * (M + 2) + i] = xbuf1[i];
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jdmaster.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jdmaster.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-1995, Thomas G. Lane.
6 | * For conditions of distribution and use, see the accompanying README.ijg
7 | * file.
8 | *
9 | * This file contains the master control structure for the JPEG decompressor.
10 | */
11 |
12 | /* Private state */
13 |
14 | typedef struct {
15 | struct jpeg_decomp_master pub; /* public fields */
16 |
17 | int pass_number; /* # of passes completed */
18 |
19 | boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
20 |
21 | /* Saved references to initialized quantizer modules,
22 | * in case we need to switch modes.
23 | */
24 | struct jpeg_color_quantizer *quantizer_1pass;
25 | struct jpeg_color_quantizer *quantizer_2pass;
26 | } my_decomp_master;
27 |
28 | typedef my_decomp_master *my_master_ptr;
29 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jdmerge.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jdmerge.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1994-1996, Thomas G. Lane.
6 | * libjpeg-turbo Modifications:
7 | * Copyright (C) 2020, D. R. Commander.
8 | * For conditions of distribution and use, see the accompanying README.ijg
9 | * file.
10 | */
11 |
12 | #define JPEG_INTERNALS
13 | #include "jpeglib.h"
14 |
15 | #ifdef UPSAMPLE_MERGING_SUPPORTED
16 |
17 |
18 | /* Private subobject */
19 |
20 | typedef struct {
21 | struct jpeg_upsampler pub; /* public fields */
22 |
23 | /* Pointer to routine to do actual upsampling/conversion of one row group */
24 | void (*upmethod) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
25 | JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
26 |
27 | /* Private state for YCC->RGB conversion */
28 | int *Cr_r_tab; /* => table for Cr to R conversion */
29 | int *Cb_b_tab; /* => table for Cb to B conversion */
30 | JLONG *Cr_g_tab; /* => table for Cr to G conversion */
31 | JLONG *Cb_g_tab; /* => table for Cb to G conversion */
32 |
33 | /* For 2:1 vertical sampling, we produce two output rows at a time.
34 | * We need a "spare" row buffer to hold the second output row if the
35 | * application provides just a one-row buffer; we also use the spare
36 | * to discard the dummy last row if the image height is odd.
37 | */
38 | JSAMPROW spare_row;
39 | boolean spare_full; /* T if spare buffer is occupied */
40 |
41 | JDIMENSION out_row_width; /* samples per output row */
42 | JDIMENSION rows_to_go; /* counts rows remaining in image */
43 | } my_merged_upsampler;
44 |
45 | typedef my_merged_upsampler *my_merged_upsample_ptr;
46 |
47 | #endif /* UPSAMPLE_MERGING_SUPPORTED */
48 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jdsample.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jdsample.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-1996, Thomas G. Lane.
6 | * For conditions of distribution and use, see the accompanying README.ijg
7 | * file.
8 | */
9 |
10 | #define JPEG_INTERNALS
11 | #include "jpeglib.h"
12 |
13 |
14 | /* Pointer to routine to upsample a single component */
15 | typedef void (*upsample1_ptr) (j_decompress_ptr cinfo,
16 | jpeg_component_info *compptr,
17 | JSAMPARRAY input_data,
18 | JSAMPARRAY *output_data_ptr);
19 |
20 | /* Private subobject */
21 |
22 | typedef struct {
23 | struct jpeg_upsampler pub; /* public fields */
24 |
25 | /* Color conversion buffer. When using separate upsampling and color
26 | * conversion steps, this buffer holds one upsampled row group until it
27 | * has been color converted and output.
28 | * Note: we do not allocate any storage for component(s) which are full-size,
29 | * ie do not need rescaling. The corresponding entry of color_buf[] is
30 | * simply set to point to the input data array, thereby avoiding copying.
31 | */
32 | JSAMPARRAY color_buf[MAX_COMPONENTS];
33 |
34 | /* Per-component upsampling method pointers */
35 | upsample1_ptr methods[MAX_COMPONENTS];
36 |
37 | int next_row_out; /* counts rows emitted from color_buf */
38 | JDIMENSION rows_to_go; /* counts rows remaining in image */
39 |
40 | /* Height of an input row group for each component. */
41 | int rowgroup_height[MAX_COMPONENTS];
42 |
43 | /* These arrays save pixel expansion factors so that int_expand need not
44 | * recompute them each time. They are unused for other upsampling methods.
45 | */
46 | UINT8 h_expand[MAX_COMPONENTS];
47 | UINT8 v_expand[MAX_COMPONENTS];
48 | } my_upsampler;
49 |
50 | typedef my_upsampler *my_upsample_ptr;
51 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jpegcomp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jpegcomp.h
3 | *
4 | * Copyright (C) 2010, 2020, D. R. Commander.
5 | * For conditions of distribution and use, see the accompanying README.ijg
6 | * file.
7 | *
8 | * JPEG compatibility macros
9 | * These declarations are considered internal to the JPEG library; most
10 | * applications using the library shouldn't need to include this file.
11 | */
12 |
13 | #if JPEG_LIB_VERSION >= 70
14 | #define _DCT_scaled_size DCT_h_scaled_size
15 | #define _DCT_h_scaled_size DCT_h_scaled_size
16 | #define _DCT_v_scaled_size DCT_v_scaled_size
17 | #define _min_DCT_scaled_size min_DCT_h_scaled_size
18 | #define _min_DCT_h_scaled_size min_DCT_h_scaled_size
19 | #define _min_DCT_v_scaled_size min_DCT_v_scaled_size
20 | #define _jpeg_width jpeg_width
21 | #define _jpeg_height jpeg_height
22 | #define JERR_ARITH_NOTIMPL JERR_NOT_COMPILED
23 | #else
24 | #define _DCT_scaled_size DCT_scaled_size
25 | #define _DCT_h_scaled_size DCT_scaled_size
26 | #define _DCT_v_scaled_size DCT_scaled_size
27 | #define _min_DCT_scaled_size min_DCT_scaled_size
28 | #define _min_DCT_h_scaled_size min_DCT_scaled_size
29 | #define _min_DCT_v_scaled_size min_DCT_scaled_size
30 | #define _jpeg_width image_width
31 | #define _jpeg_height image_height
32 | #endif
33 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/jversion.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jversion.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
6 | * libjpeg-turbo Modifications:
7 | * Copyright (C) 2010, 2012-2021, D. R. Commander.
8 | * For conditions of distribution and use, see the accompanying README.ijg
9 | * file.
10 | *
11 | * This file contains software version identification.
12 | */
13 |
14 |
15 | #if JPEG_LIB_VERSION >= 80
16 |
17 | #define JVERSION "8d 15-Jan-2012"
18 |
19 | #elif JPEG_LIB_VERSION >= 70
20 |
21 | #define JVERSION "7 27-Jun-2009"
22 |
23 | #else
24 |
25 | #define JVERSION "6b 27-Mar-1998"
26 |
27 | #endif
28 |
29 | /*
30 | * NOTE: It is our convention to place the authors in the following order:
31 | * - libjpeg-turbo authors (2009-) in descending order of the date of their
32 | * most recent contribution to the project, then in ascending order of the
33 | * date of their first contribution to the project, then in alphabetical
34 | * order
35 | * - Upstream authors in descending order of the date of the first inclusion of
36 | * their code
37 | */
38 |
39 | #define JCOPYRIGHT \
40 | "Copyright (C) 2009-2021 D. R. Commander\n" \
41 | "Copyright (C) 2015, 2020 Google, Inc.\n" \
42 | "Copyright (C) 2019-2020 Arm Limited\n" \
43 | "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
44 | "Copyright (C) 2011-2016 Siarhei Siamashka\n" \
45 | "Copyright (C) 2015 Intel Corporation\n" \
46 | "Copyright (C) 2013-2014 Linaro Limited\n" \
47 | "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \
48 | "Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \
49 | "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \
50 | "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \
51 | "Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding"
52 |
53 | #define JCOPYRIGHT_SHORT \
54 | "Copyright (C) 1991-2021 The libjpeg-turbo Project and many others"
55 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/libjpeg.map.in:
--------------------------------------------------------------------------------
1 | LIBJPEGTURBO_@JPEG_LIB_VERSION_DECIMAL@ {
2 | @MEM_SRCDST_FUNCTIONS@
3 | local:
4 | jsimd_*;
5 | jconst_*;
6 | };
7 |
8 | LIBJPEG_@JPEG_LIB_VERSION_DECIMAL@ {
9 | global:
10 | *;
11 | };
12 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/md5/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_executable(md5cmp md5cmp.c md5.c md5hl.c)
2 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/md5/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libjpeg-turbo Modifications:
3 | * Copyright (C)2018 D. R. Commander. All Rights Reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | *
8 | * - Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * - Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * - Neither the name of the libjpeg-turbo Project nor the names of its
14 | * contributors may be used to endorse or promote products derived from this
15 | * software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | * POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | #ifndef MD5_H
31 | #define MD5_H
32 |
33 | #include
34 | #ifdef __amigaos4__
35 | #include
36 | #endif
37 |
38 | /* On machines where "long" is 64 bits, we need to declare
39 | uint32 as something guaranteed to be 32 bits. */
40 |
41 | typedef unsigned int uint32;
42 |
43 | typedef struct MD5Context {
44 | uint32 buf[4];
45 | uint32 bits[2];
46 | unsigned char in[64];
47 | } MD5_CTX;
48 |
49 | extern void MD5Init(struct MD5Context *ctx);
50 | extern void MD5Update(struct MD5Context *ctx, unsigned char *buf,
51 | unsigned int len);
52 | extern void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
53 | extern void MD5Transform(uint32 buf[4], uint32 in[16]);
54 | extern char *MD5File(const char *, char *);
55 | extern char *MD5FileChunk(const char *, char *, off_t, off_t);
56 |
57 | #endif /* !MD5_H */
58 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/md5/md5cmp.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2013, 2016 D. R. Commander. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are met:
6 | *
7 | * - Redistributions of source code must retain the above copyright notice,
8 | * this list of conditions and the following disclaimer.
9 | * - Redistributions in binary form must reproduce the above copyright notice,
10 | * this list of conditions and the following disclaimer in the documentation
11 | * and/or other materials provided with the distribution.
12 | * - Neither the name of the libjpeg-turbo Project nor the names of its
13 | * contributors may be used to endorse or promote products derived from this
14 | * software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 | * POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #include
30 | #include
31 | #include "./md5.h"
32 | #include "../tjutil.h"
33 |
34 | int main(int argc, char *argv[])
35 | {
36 | char *md5sum = NULL, buf[65];
37 |
38 | if (argc < 3) {
39 | fprintf(stderr, "USAGE: %s \n", argv[0]);
40 | return -1;
41 | }
42 |
43 | if (strlen(argv[1]) != 32)
44 | fprintf(stderr, "WARNING: MD5 hash size is wrong.\n");
45 |
46 | md5sum = MD5File(argv[2], buf);
47 | if (!md5sum) {
48 | perror("Could not obtain MD5 sum");
49 | return -1;
50 | }
51 |
52 | if (!strcasecmp(md5sum, argv[1])) {
53 | fprintf(stderr, "%s: OK\n", argv[2]);
54 | return 0;
55 | } else {
56 | fprintf(stderr, "%s: FAILED. Checksum is %s\n", argv[2], md5sum);
57 | return -1;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/rdjpgcom.1:
--------------------------------------------------------------------------------
1 | .TH RDJPGCOM 1 "02 April 2009"
2 | .SH NAME
3 | rdjpgcom \- display text comments from a JPEG file
4 | .SH SYNOPSIS
5 | .B rdjpgcom
6 | [
7 | .B \-raw
8 | ]
9 | [
10 | .B \-verbose
11 | ]
12 | [
13 | .I filename
14 | ]
15 | .LP
16 | .SH DESCRIPTION
17 | .LP
18 | .B rdjpgcom
19 | reads the named JPEG/JFIF file, or the standard input if no file is named,
20 | and prints any text comments found in the file on the standard output.
21 | .PP
22 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
23 | Although the standard doesn't actually define what COM blocks are for, they
24 | are widely used to hold user-supplied text strings. This lets you add
25 | annotations, titles, index terms, etc to your JPEG files, and later retrieve
26 | them as text. COM blocks do not interfere with the image stored in the JPEG
27 | file. The maximum size of a COM block is 64K, but you can have as many of
28 | them as you like in one JPEG file.
29 | .SH OPTIONS
30 | .TP
31 | .B \-raw
32 | Normally
33 | .B rdjpgcom
34 | escapes non-printable characters in comments, for security reasons.
35 | This option avoids that.
36 | .PP
37 | .B \-verbose
38 | Causes
39 | .B rdjpgcom
40 | to also display the JPEG image dimensions.
41 | .PP
42 | Switch names may be abbreviated, and are not case sensitive.
43 | .SH HINTS
44 | .B rdjpgcom
45 | does not depend on the IJG JPEG library. Its source code is intended as an
46 | illustration of the minimum amount of code required to parse a JPEG file
47 | header correctly.
48 | .PP
49 | In
50 | .B \-verbose
51 | mode,
52 | .B rdjpgcom
53 | will also attempt to print the contents of any "APP12" markers as text.
54 | Some digital cameras produce APP12 markers containing useful textual
55 | information. If you like, you can modify the source code to print
56 | other APPn marker types as well.
57 | .SH SEE ALSO
58 | .BR cjpeg (1),
59 | .BR djpeg (1),
60 | .BR jpegtran (1),
61 | .BR wrjpgcom (1)
62 | .SH AUTHOR
63 | Independent JPEG Group
64 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/Config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 |
3 | include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@Targets.cmake")
4 | check_required_components("@CMAKE_PROJECT_NAME@")
5 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/Distribution.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
3 | @CMAKE_PROJECT_NAME@
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | @PKGNAME@.pkg
24 |
25 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/License.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3 | {\colortbl;\red255\green255\blue255;}
4 | {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
5 | {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
6 | \margl1440\margr1440\vieww9820\viewh8480\viewkind0
7 | \deftab720
8 | \pard\pardeftab720
9 |
10 | \f0\fs24 \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
11 | \
12 | \pard\tx220\tx720\pardeftab720\li720\fi-720
13 | \ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\
14 | {\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\
15 | {\listtext \'95 }Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\
16 | \pard\pardeftab720\qc
17 | \cf0 \
18 | \pard\pardeftab720
19 | \cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
20 | }
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/ReadMe.txt:
--------------------------------------------------------------------------------
1 | libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and MIPS systems, as well as progressive JPEG compression on x86, x86-64, and Arm systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
2 |
3 | libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.
4 |
5 | libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.
6 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/Welcome.rtf.in:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0
5 | \deftab720
6 | \pard\pardeftab720\ql\qnatural
7 |
8 | \f0\fs24 \cf0 This installer will install the libjpeg-turbo SDK and run-time libraries onto your computer so that you can use libjpeg-turbo to build new applications or accelerate existing ones. To remove the libjpeg-turbo package, run\
9 | \
10 | \pard\pardeftab720\ql\qnatural
11 |
12 | \f1 \cf0 @CMAKE_INSTALL_FULL_BINDIR@/uninstall\
13 | \pard\pardeftab720\ql\qnatural
14 |
15 | \f0 \cf0 \
16 | from the command line.\
17 | }
18 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/deb-control.in:
--------------------------------------------------------------------------------
1 | Package: {__PKGNAME}
2 | Version: @VERSION@-@BUILD@
3 | Section: misc
4 | Priority: optional
5 | Architecture: {__ARCH}
6 | Essential: no
7 | Maintainer: @PKGVENDOR@ <@PKGEMAIL@>
8 | Homepage: @PKGURL@
9 | Installed-Size: {__SIZE}
10 | Description: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
11 | libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate
12 | baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and
13 | MIPS systems, as well as progressive JPEG compression on x86, x86-64, and
14 | Arm systems. On such systems, libjpeg-turbo is generally 2-6x as fast as
15 | libjpeg, all else being equal. On other types of systems, libjpeg-turbo can
16 | still outperform libjpeg by a significant amount, by virtue of its
17 | highly-optimized Huffman coding routines. In many cases, the performance of
18 | libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
19 | .
20 | libjpeg-turbo implements both the traditional libjpeg API as well as the less
21 | powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
22 | colorspace extensions that allow it to compress from/decompress to 32-bit and
23 | big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
24 | interface.
25 | .
26 | libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
27 | derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
28 | VirtualGL projects made numerous enhancements to the codec in 2009, and in
29 | early 2010, libjpeg-turbo spun off into an independent project, with the goal
30 | of making high-speed JPEG compression/decompression technology available to a
31 | broader range of users and developers.
32 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/libjpeg.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=@CMAKE_INSTALL_PREFIX@
3 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
4 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
5 |
6 | Name: libjpeg
7 | Description: A SIMD-accelerated JPEG codec that provides the libjpeg API
8 | Version: @VERSION@
9 | Libs: -L${libdir} -ljpeg
10 | Cflags: -I${includedir}
11 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/libturbojpeg.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=@CMAKE_INSTALL_PREFIX@
3 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@
4 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
5 |
6 | Name: libturbojpeg
7 | Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API
8 | Version: @VERSION@
9 | Libs: -L${libdir} -lturbojpeg
10 | Cflags: -I${includedir}
11 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/makerpm.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -u
4 | set -e
5 | trap onexit INT
6 | trap onexit TERM
7 | trap onexit EXIT
8 |
9 | TMPDIR=
10 |
11 | onexit()
12 | {
13 | if [ ! "$TMPDIR" = "" ]; then
14 | rm -rf $TMPDIR
15 | fi
16 | }
17 |
18 | if [ -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm ]; then
19 | rm -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm
20 | fi
21 |
22 | umask 022
23 | TMPDIR=`mktemp -d /tmp/@CMAKE_PROJECT_NAME@-build.XXXXXX`
24 |
25 | mkdir -p $TMPDIR/RPMS
26 | ln -fs `pwd` $TMPDIR/BUILD
27 | rpmbuild -bb --define "_blddir $TMPDIR/buildroot" --define "_topdir $TMPDIR" \
28 | --target @RPMARCH@ pkgscripts/rpm.spec; \
29 | cp $TMPDIR/RPMS/@RPMARCH@/@PKGNAME@-@VERSION@-@BUILD@.@RPMARCH@.rpm \
30 | @PKGNAME@-@VERSION@.@RPMARCH@.rpm
31 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/makesrpm.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -u
4 | set -e
5 | trap onexit INT
6 | trap onexit TERM
7 | trap onexit EXIT
8 |
9 | TMPDIR=
10 |
11 | onexit()
12 | {
13 | if [ ! "$TMPDIR" = "" ]; then
14 | rm -rf $TMPDIR
15 | fi
16 | }
17 |
18 | PKGNAME=@PKGNAME@
19 | PROJECT=@CMAKE_PROJECT_NAME@
20 | VERSION=@VERSION@
21 | BUILD=@BUILD@
22 |
23 | if [ -f $PKGNAME-$VERSION.src.rpm ]; then
24 | rm -f $PKGNAME-$VERSION.src.rpm
25 | fi
26 |
27 | umask 022
28 | TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
29 |
30 | mkdir -p $TMPDIR/RPMS
31 | mkdir -p $TMPDIR/SRPMS
32 | mkdir -p $TMPDIR/BUILD
33 | mkdir -p $TMPDIR/SOURCES
34 | mkdir -p $TMPDIR/SPECS
35 |
36 | if [ ! -f $PROJECT-$VERSION.tar.gz ]; then
37 | echo "ERROR: $PROJECT-$VERSION.tar.gz does not exist."
38 | fi
39 |
40 | cp $PROJECT-$VERSION.tar.gz $TMPDIR/SOURCES/$PROJECT-$VERSION.tar.gz
41 |
42 | cat pkgscripts/rpm.spec | sed s/%{_blddir}/%{_tmppath}/g \
43 | | sed s/#--\>//g > $TMPDIR/SPECS/$PKGNAME.spec
44 |
45 | rpmbuild -bs --define "_topdir $TMPDIR" $TMPDIR/SPECS/$PKGNAME.spec
46 | mv $TMPDIR/SRPMS/$PKGNAME-$VERSION-$BUILD.src.rpm $PKGNAME-$VERSION.src.rpm
47 |
48 | exit
49 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/release/maketarball.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -u
4 | set -e
5 | trap onexit INT
6 | trap onexit TERM
7 | trap onexit EXIT
8 |
9 | TMPDIR=
10 | SUDO=
11 |
12 | onexit()
13 | {
14 | if [ ! "$TMPDIR" = "" ]; then
15 | rm -rf $TMPDIR
16 | fi
17 | }
18 |
19 | uid()
20 | {
21 | id | cut -f2 -d = | cut -f1 -d \(;
22 | }
23 |
24 | PKGNAME=@PKGNAME@
25 | VERSION=@VERSION@
26 | ARCH=@CPU_TYPE@
27 | OS=@CMAKE_SYSTEM_NAME@
28 | PREFIX=@CMAKE_INSTALL_PREFIX@
29 |
30 | umask 022
31 | rm -f $PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
32 | TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
33 | mkdir -p $TMPDIR/install
34 |
35 | DESTDIR=$TMPDIR/install @CMAKE_MAKE_PROGRAM@ install
36 | echo tartest >$TMPDIR/tartest
37 | GNUTAR=0
38 | BSDTAR=0
39 | tar cf $TMPDIR/tartest.tar --owner=root --group=root -C $TMPDIR tartest >/dev/null 2>&1 && GNUTAR=1
40 | if [ "$GNUTAR" = "1" ]; then
41 | tar cf - --owner=root --group=root -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
42 | else
43 | tar cf $TMPDIR/tartest.tar --uid 0 --gid 0 -C $TMPDIR tartest >/dev/null 2>&1 && BSDTAR=1
44 | if [ "$BSDTAR" = "1" ]; then
45 | tar cf - --uid=0 --gid=0 -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
46 | else
47 | tar cf - -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
48 | fi
49 | fi
50 |
51 | exit
52 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/arm/align.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020, Arm Limited. All Rights Reserved.
3 | *
4 | * This software is provided 'as-is', without any express or implied
5 | * warranty. In no event will the authors be held liable for any damages
6 | * arising from the use of this software.
7 | *
8 | * Permission is granted to anyone to use this software for any purpose,
9 | * including commercial applications, and to alter it and redistribute it
10 | * freely, subject to the following restrictions:
11 | *
12 | * 1. The origin of this software must not be misrepresented; you must not
13 | * claim that you wrote the original software. If you use this software
14 | * in a product, an acknowledgment in the product documentation would be
15 | * appreciated but is not required.
16 | * 2. Altered source versions must be plainly marked as such, and must not be
17 | * misrepresented as being the original software.
18 | * 3. This notice may not be removed or altered from any source distribution.
19 | */
20 |
21 | /* How to obtain memory alignment for structures and variables */
22 | #if defined(_MSC_VER)
23 | #define ALIGN(alignment) __declspec(align(alignment))
24 | #elif defined(__clang__) || defined(__GNUC__)
25 | #define ALIGN(alignment) __attribute__((aligned(alignment)))
26 | #else
27 | #error "Unknown compiler"
28 | #endif
29 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/arm/neon-compat.h.in:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020, D. R. Commander. All Rights Reserved.
3 | * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved.
4 | *
5 | * This software is provided 'as-is', without any express or implied
6 | * warranty. In no event will the authors be held liable for any damages
7 | * arising from the use of this software.
8 | *
9 | * Permission is granted to anyone to use this software for any purpose,
10 | * including commercial applications, and to alter it and redistribute it
11 | * freely, subject to the following restrictions:
12 | *
13 | * 1. The origin of this software must not be misrepresented; you must not
14 | * claim that you wrote the original software. If you use this software
15 | * in a product, an acknowledgment in the product documentation would be
16 | * appreciated but is not required.
17 | * 2. Altered source versions must be plainly marked as such, and must not be
18 | * misrepresented as being the original software.
19 | * 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | #cmakedefine HAVE_VLD1_S16_X3
23 | #cmakedefine HAVE_VLD1_U16_X2
24 | #cmakedefine HAVE_VLD1Q_U8_X4
25 |
26 | /* Define compiler-independent count-leading-zeros and byte-swap macros */
27 | #if defined(_MSC_VER) && !defined(__clang__)
28 | #define BUILTIN_CLZ(x) _CountLeadingZeros(x)
29 | #define BUILTIN_CLZLL(x) _CountLeadingZeros64(x)
30 | #define BUILTIN_BSWAP32(x) _byteswap_ulong(x)
31 | #define BUILTIN_BSWAP64(x) _byteswap_uint64(x)
32 | #elif defined(__clang__) || defined(__GNUC__)
33 | #define BUILTIN_CLZ(x) __builtin_clz(x)
34 | #define BUILTIN_CLZLL(x) __builtin_clzll(x)
35 | #define BUILTIN_BSWAP32(x) __builtin_bswap32(x)
36 | #define BUILTIN_BSWAP64(x) __builtin_bswap64(x)
37 | #else
38 | #error "Unknown compiler"
39 | #endif
40 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/mips64/jcsample.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jcsample.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-1996, Thomas G. Lane.
6 | * For conditions of distribution and use, see the accompanying README.ijg
7 | * file.
8 | */
9 |
10 | LOCAL(void)
11 | expand_right_edge(JSAMPARRAY image_data, int num_rows, JDIMENSION input_cols,
12 | JDIMENSION output_cols)
13 | {
14 | register JSAMPROW ptr;
15 | register JSAMPLE pixval;
16 | register int count;
17 | int row;
18 | int numcols = (int)(output_cols - input_cols);
19 |
20 | if (numcols > 0) {
21 | for (row = 0; row < num_rows; row++) {
22 | ptr = image_data[row] + input_cols;
23 | pixval = ptr[-1];
24 | for (count = numcols; count > 0; count--)
25 | *ptr++ = pixval;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/mips64/jsimd_mmi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Loongson MMI optimizations for libjpeg-turbo
3 | *
4 | * Copyright (C) 2016-2018, Loongson Technology Corporation Limited, BeiJing.
5 | * All Rights Reserved.
6 | * Authors: ZhuChen
7 | * CaiWanwei
8 | * SunZhangzhi
9 | * QingfaLiu
10 | *
11 | * This software is provided 'as-is', without any express or implied
12 | * warranty. In no event will the authors be held liable for any damages
13 | * arising from the use of this software.
14 | *
15 | * Permission is granted to anyone to use this software for any purpose,
16 | * including commercial applications, and to alter it and redistribute it
17 | * freely, subject to the following restrictions:
18 | *
19 | * 1. The origin of this software must not be misrepresented; you must not
20 | * claim that you wrote the original software. If you use this software
21 | * in a product, an acknowledgment in the product documentation would be
22 | * appreciated but is not required.
23 | * 2. Altered source versions must be plainly marked as such, and must not be
24 | * misrepresented as being the original software.
25 | * 3. This notice may not be removed or altered from any source distribution.
26 | */
27 |
28 | #define JPEG_INTERNALS
29 | #include "../../jinclude.h"
30 | #include "../../jpeglib.h"
31 | #include "../../jdct.h"
32 | #include "loongson-mmintrin.h"
33 |
34 |
35 | /* Common code */
36 | #if defined(_ABI64) && _MIPS_SIM == _ABI64
37 | # define PTR_ADDU "daddu "
38 | # define PTR_SLL "dsll "
39 | #else
40 | # define PTR_ADDU "addu "
41 | # define PTR_SLL "sll "
42 | #endif
43 |
44 | #define SIZEOF_MMWORD 8
45 | #define BYTE_BIT 8
46 | #define WORD_BIT 16
47 | #define SCALEBITS 16
48 |
49 | #define _uint64_set_pi8(a, b, c, d, e, f, g, h) \
50 | (((uint64_t)(uint8_t)a << 56) | \
51 | ((uint64_t)(uint8_t)b << 48) | \
52 | ((uint64_t)(uint8_t)c << 40) | \
53 | ((uint64_t)(uint8_t)d << 32) | \
54 | ((uint64_t)(uint8_t)e << 24) | \
55 | ((uint64_t)(uint8_t)f << 16) | \
56 | ((uint64_t)(uint8_t)g << 8) | \
57 | ((uint64_t)(uint8_t)h))
58 | #define _uint64_set1_pi8(a) _uint64_set_pi8(a, a, a, a, a, a, a, a)
59 | #define _uint64_set_pi16(a, b, c, d) \
60 | (((uint64_t)(uint16_t)a << 48) | \
61 | ((uint64_t)(uint16_t)b << 32) | \
62 | ((uint64_t)(uint16_t)c << 16) | \
63 | ((uint64_t)(uint16_t)d))
64 | #define _uint64_set1_pi16(a) _uint64_set_pi16(a, a, a, a)
65 | #define _uint64_set_pi32(a, b) \
66 | (((uint64_t)(uint32_t)a << 32) | \
67 | ((uint64_t)(uint32_t)b))
68 |
69 | #define get_const_value(index) (*(__m64 *)&const_value[index])
70 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/nasm/jdct.inc:
--------------------------------------------------------------------------------
1 | ;
2 | ; jdct.inc - private declarations for forward & reverse DCT subsystems
3 | ;
4 | ; Copyright 2009 Pierre Ossman for Cendio AB
5 | ; Copyright (C) 2018, D. R. Commander.
6 | ;
7 | ; Based on the x86 SIMD extension for IJG JPEG library
8 | ; Copyright (C) 1999-2006, MIYASAKA Masaru.
9 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc
10 |
11 | ; Each IDCT routine is responsible for range-limiting its results and
12 | ; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
13 | ; be quite far out of range if the input data is corrupt, so a bulletproof
14 | ; range-limiting step is required. We use a mask-and-table-lookup method
15 | ; to do the combined operations quickly.
16 | ;
17 | %define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples
18 |
19 | %define ROW(n, b, s) ((b) + (n) * (s))
20 | %define COL(n, b, s) ((b) + (n) * (s) * DCTSIZE)
21 |
22 | %define DWBLOCK(m, n, b, s) \
23 | ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_DWORD)
24 | %define MMBLOCK(m, n, b, s) \
25 | ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_MMWORD)
26 | %define XMMBLOCK(m, n, b, s) \
27 | ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_XMMWORD)
28 | %define YMMBLOCK(m, n, b, s) \
29 | ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_YMMWORD)
30 |
31 | ; --------------------------------------------------------------------------
32 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/powerpc/jcsample.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jcsample.h
3 | *
4 | * This file was part of the Independent JPEG Group's software:
5 | * Copyright (C) 1991-1996, Thomas G. Lane.
6 | * For conditions of distribution and use, see the accompanying README.ijg
7 | * file.
8 | */
9 |
10 | LOCAL(void)
11 | expand_right_edge(JSAMPARRAY image_data, int num_rows, JDIMENSION input_cols,
12 | JDIMENSION output_cols)
13 | {
14 | register JSAMPROW ptr;
15 | register JSAMPLE pixval;
16 | register int count;
17 | int row;
18 | int numcols = (int)(output_cols - input_cols);
19 |
20 | if (numcols > 0) {
21 | for (row = 0; row < num_rows; row++) {
22 | ptr = image_data[row] + input_cols;
23 | pixval = ptr[-1];
24 | for (count = numcols; count > 0; count--)
25 | *ptr++ = pixval;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/simd/x86_64/jsimdcpu.asm:
--------------------------------------------------------------------------------
1 | ;
2 | ; jsimdcpu.asm - SIMD instruction support check
3 | ;
4 | ; Copyright 2009 Pierre Ossman for Cendio AB
5 | ; Copyright (C) 2016, D. R. Commander.
6 | ;
7 | ; Based on
8 | ; x86 SIMD extension for IJG JPEG library
9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru.
10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc
11 | ;
12 | ; This file should be assembled with NASM (Netwide Assembler),
13 | ; can *not* be assembled with Microsoft's MASM or any compatible
14 | ; assembler (including Borland's Turbo Assembler).
15 | ; NASM is available from http://nasm.sourceforge.net/ or
16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208
17 |
18 | %include "jsimdext.inc"
19 |
20 | ; --------------------------------------------------------------------------
21 | SECTION SEG_TEXT
22 | BITS 64
23 | ;
24 | ; Check if the CPU supports SIMD instructions
25 | ;
26 | ; GLOBAL(unsigned int)
27 | ; jpeg_simd_cpu_support(void)
28 | ;
29 |
30 | align 32
31 | GLOBAL_FUNCTION(jpeg_simd_cpu_support)
32 |
33 | EXTN(jpeg_simd_cpu_support):
34 | push rbx
35 | push rdi
36 |
37 | xor rdi, rdi ; simd support flag
38 |
39 | ; Assume that all x86-64 processors support SSE & SSE2 instructions
40 | or rdi, JSIMD_SSE2
41 | or rdi, JSIMD_SSE
42 |
43 | ; Check whether CPUID leaf 07H is supported
44 | ; (leaf 07H is used to check for AVX2 instruction support)
45 | mov rax, 0
46 | cpuid
47 | cmp rax, 7
48 | jl short .return ; Maximum leaf < 07H
49 |
50 | ; Check for AVX2 instruction support
51 | mov rax, 7
52 | xor rcx, rcx
53 | cpuid
54 | mov rax, rbx ; rax = Extended feature flags
55 |
56 | test rax, 1<<5 ; bit5:AVX2
57 | jz short .return
58 |
59 | ; Check for AVX2 O/S support
60 | mov rax, 1
61 | xor rcx, rcx
62 | cpuid
63 | test rcx, 1<<27
64 | jz short .return ; O/S does not support XSAVE
65 | test rcx, 1<<28
66 | jz short .return ; CPU does not support AVX2
67 |
68 | xor rcx, rcx
69 | xgetbv
70 | and rax, 6
71 | cmp rax, 6 ; O/S does not manage XMM/YMM state
72 | ; using XSAVE
73 | jnz short .return
74 |
75 | or rdi, JSIMD_AVX2
76 |
77 | .return:
78 | mov rax, rdi
79 |
80 | pop rdi
81 | pop rbx
82 | ret
83 |
84 | ; For some reason, the OS X linker does not honor the request to align the
85 | ; segment unless we do this.
86 | align 32
87 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/nightshot_iso_100.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/nightshot_iso_100.bmp
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/nightshot_iso_100.txt:
--------------------------------------------------------------------------------
1 | libjpeg-turbo note: This image was extracted from the 8-bit nightshot_iso_100
2 | image. The original can be downloaded at the link below.
3 |
4 | The New Image Compression Test Set - Jan 2008
5 | http://www.imagecompression.info/test_images
6 |
7 | The images historically used for compression research (lena, barbra, pepper etc...) have outlived their useful life and its about time they become a part of history only. They are too small, come from data sources too old and are available in only 8-bit precision.
8 |
9 | These images have been carefully selected to aid in image compression algorithm research and evaluation. These are photographic images chosen to come from a wide variety of sources and each one picked to stress different aspects of algorithms. Images are available in 8-bit, 16-bit and 16-bit linear variations, RGB and gray.
10 |
11 | Images are available without any prohibitive copyright restrictions.
12 |
13 | These images are (c) there respective owners. You are granted full redistribution and publication rights on these images provided:
14 |
15 | 1. The origin of the pictures must not be misrepresented; you must not claim that you took the original pictures. If you use, publish or redistribute them, an acknowledgment would be appreciated but is not required.
16 | 2. Altered versions must be plainly marked as such, and must not be misinterpreted as being the originals.
17 | 3. No payment is required for distribution this material, it must be available freely under the conditions stated here. That is, it is prohibited to sell the material.
18 | 4. This notice may not be removed or altered from any distribution.
19 |
20 | Acknowledgments: A lot of people contributed a lot of time and effort in making this test set possible. Thanks to everyone who voiced their opinion in any of the discussions online. Thanks to Axel Becker, Thomas Richter and Niels Fröhling for their extensive help in picking images, running all the various tests etc... Thanks to Pete Fraser, Tony Story, Wayne J. Cosshall, David Coffin, Bruce Lindbloom and raw.fotosite.pl for the images which make up this set.
21 |
22 | Sachin Garg [India]
23 | sachingarg@c10n.info
24 |
25 | www.sachingarg.com | www.c10n.info | www.imagecompression.info
26 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test.scan:
--------------------------------------------------------------------------------
1 | 0 1 2: 0 0 0 0;
2 | 0: 1 9 0 0;
3 | 0: 10 41 0 2;
4 | 0: 10 41 2 1;
5 | 0: 10 41 1 0;
6 | 0: 42 63 0 0;
7 | 1: 1 63 0 0;
8 | 2: 1 63 0 0;
9 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test1.icc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test1.icc
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test1.icc.txt:
--------------------------------------------------------------------------------
1 | Little CMS
2 | Copyright (c) 1998-2011 Marti Maria Saguer
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | this software and associated documentation files (the "Software"), to deal in
6 | the Software without restriction, including without limitation the rights to
7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | of the Software, and to permit persons to whom the Software is furnished to do
9 | so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test2.icc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test2.icc
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/test2.icc.txt:
--------------------------------------------------------------------------------
1 | Little CMS
2 | Copyright (c) 1998-2011 Marti Maria Saguer
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | this software and associated documentation files (the "Software"), to deal in
6 | the Software without restriction, including without limitation the rights to
7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | of the Software, and to permit persons to whom the Software is furnished to do
9 | so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testimgari.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testimgari.jpg
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testimgint.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testimgint.jpg
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig.jpg
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig.ppm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig.ppm
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/testorig12.jpg
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_5674_0098.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_5674_0098.bmp
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_6434_0018a.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_6434_0018a.bmp
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_6548_0026a.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengjunhu/android_camera_v4l2/1f266fbbe6772ea2dcbd40248adc4b7088daf839/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/testimages/vgl_6548_0026a.bmp
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/tjutil.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2011, 2019 D. R. Commander. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are met:
6 | *
7 | * - Redistributions of source code must retain the above copyright notice,
8 | * this list of conditions and the following disclaimer.
9 | * - Redistributions in binary form must reproduce the above copyright notice,
10 | * this list of conditions and the following disclaimer in the documentation
11 | * and/or other materials provided with the distribution.
12 | * - Neither the name of the libjpeg-turbo Project nor the names of its
13 | * contributors may be used to endorse or promote products derived from this
14 | * software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 | * POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifdef _WIN32
30 |
31 | #include
32 | #include "tjutil.h"
33 |
34 | static double getFreq(void)
35 | {
36 | LARGE_INTEGER freq;
37 |
38 | if (!QueryPerformanceFrequency(&freq)) return 0.0;
39 | return (double)freq.QuadPart;
40 | }
41 |
42 | static double f = -1.0;
43 |
44 | double getTime(void)
45 | {
46 | LARGE_INTEGER t;
47 |
48 | if (f < 0.0) f = getFreq();
49 | if (f == 0.0) return (double)GetTickCount() / 1000.;
50 | else {
51 | QueryPerformanceCounter(&t);
52 | return (double)t.QuadPart / f;
53 | }
54 | }
55 |
56 | #else
57 |
58 | #include
59 | #include
60 | #include "tjutil.h"
61 |
62 | double getTime(void)
63 | {
64 | struct timeval tv;
65 |
66 | if (gettimeofday(&tv, NULL) < 0) return 0.0;
67 | else return (double)tv.tv_sec + ((double)tv.tv_usec / 1000000.);
68 | }
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/tjutil.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are met:
6 | *
7 | * - Redistributions of source code must retain the above copyright notice,
8 | * this list of conditions and the following disclaimer.
9 | * - Redistributions in binary form must reproduce the above copyright notice,
10 | * this list of conditions and the following disclaimer in the documentation
11 | * and/or other materials provided with the distribution.
12 | * - Neither the name of the libjpeg-turbo Project nor the names of its
13 | * contributors may be used to endorse or promote products derived from this
14 | * software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 | * POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifdef _WIN32
30 | #ifndef __MINGW32__
31 | #include
32 | #define snprintf(str, n, format, ...) \
33 | _snprintf_s(str, n, _TRUNCATE, format, ##__VA_ARGS__)
34 | #endif
35 | #define strcasecmp stricmp
36 | #define strncasecmp strnicmp
37 | #endif
38 |
39 | #ifndef min
40 | #define min(a, b) ((a) < (b) ? (a) : (b))
41 | #endif
42 |
43 | #ifndef max
44 | #define max(a, b) ((a) > (b) ? (a) : (b))
45 | #endif
46 |
47 | extern double getTime(void);
48 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/turbojpeg-mapfile:
--------------------------------------------------------------------------------
1 | TURBOJPEG_1.0
2 | {
3 | global:
4 | tjInitCompress;
5 | tjCompress;
6 | TJBUFSIZE;
7 | tjInitDecompress;
8 | tjDecompressHeader;
9 | tjDecompress;
10 | tjDestroy;
11 | tjGetErrorStr;
12 | local:
13 | *;
14 | };
15 |
16 | TURBOJPEG_1.1
17 | {
18 | global:
19 | TJBUFSIZEYUV;
20 | tjDecompressHeader2;
21 | tjDecompressToYUV;
22 | tjEncodeYUV;
23 | } TURBOJPEG_1.0;
24 |
25 | TURBOJPEG_1.2
26 | {
27 | global:
28 | tjAlloc;
29 | tjBufSize;
30 | tjBufSizeYUV;
31 | tjCompress2;
32 | tjDecompress2;
33 | tjEncodeYUV2;
34 | tjFree;
35 | tjGetScalingFactors;
36 | tjInitTransform;
37 | tjTransform;
38 | } TURBOJPEG_1.1;
39 |
40 | TURBOJPEG_1.4
41 | {
42 | global:
43 | tjBufSizeYUV2;
44 | tjCompressFromYUV;
45 | tjCompressFromYUVPlanes;
46 | tjDecodeYUV;
47 | tjDecodeYUVPlanes;
48 | tjDecompressHeader3;
49 | tjDecompressToYUV2;
50 | tjDecompressToYUVPlanes;
51 | tjEncodeYUV3;
52 | tjEncodeYUVPlanes;
53 | tjPlaneHeight;
54 | tjPlaneSizeYUV;
55 | tjPlaneWidth;
56 | } TURBOJPEG_1.2;
57 |
58 | TURBOJPEG_2.0
59 | {
60 | global:
61 | tjGetErrorCode;
62 | tjGetErrorStr2;
63 | tjLoadImage;
64 | tjSaveImage;
65 | } TURBOJPEG_1.4;
66 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/win/jconfig.h.in:
--------------------------------------------------------------------------------
1 | #define JPEG_LIB_VERSION @JPEG_LIB_VERSION@
2 | #define LIBJPEG_TURBO_VERSION @VERSION@
3 | #define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
4 |
5 | #cmakedefine C_ARITH_CODING_SUPPORTED
6 | #cmakedefine D_ARITH_CODING_SUPPORTED
7 | #cmakedefine MEM_SRCDST_SUPPORTED
8 | #cmakedefine WITH_SIMD
9 |
10 | #define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
11 |
12 | #define HAVE_STDDEF_H
13 | #define HAVE_STDLIB_H
14 | #undef NEED_SYS_TYPES_H
15 | #undef NEED_BSD_STRINGS
16 |
17 | #define HAVE_UNSIGNED_CHAR
18 | #define HAVE_UNSIGNED_SHORT
19 | #undef INCOMPLETE_TYPES_BROKEN
20 | #undef RIGHT_SHIFT_IS_UNSIGNED
21 |
22 | /* Define "boolean" as unsigned char, not int, per Windows custom */
23 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
24 | typedef unsigned char boolean;
25 | #endif
26 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
27 |
28 | /* Define "INT32" as int, not long, per Windows custom */
29 | #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
30 | typedef short INT16;
31 | typedef signed int INT32;
32 | #endif
33 | #define XMD_H /* prevent jmorecfg.h from redefining it */
34 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libjpeg-turbo/win/vc/projectTargets-release.cmake.in:
--------------------------------------------------------------------------------
1 | #----------------------------------------------------------------
2 | # Generated CMake target import file for configuration "Release".
3 | #----------------------------------------------------------------
4 |
5 | # Commands may need to know the format version.
6 | set(CMAKE_IMPORT_FILE_VERSION 1)
7 |
8 | # Import target "@CMAKE_PROJECT_NAME@::jpeg" for configuration "Release"
9 | set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
10 | set_target_properties(@CMAKE_PROJECT_NAME@::jpeg PROPERTIES
11 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/jpeg.lib"
12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/jpeg62.dll"
13 | )
14 |
15 | list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg )
16 | list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg "${_IMPORT_PREFIX}/lib/jpeg.lib" "${_IMPORT_PREFIX}/bin/jpeg62.dll" )
17 |
18 | # Import target "@CMAKE_PROJECT_NAME@::turbojpeg" for configuration "Release"
19 | set_property(TARGET @CMAKE_PROJECT_NAME@::turbojpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
20 | set_target_properties(@CMAKE_PROJECT_NAME@::turbojpeg PROPERTIES
21 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/turbojpeg.lib"
22 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/turbojpeg.dll"
23 | )
24 |
25 | list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::turbojpeg )
26 | list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::turbojpeg "${_IMPORT_PREFIX}/lib/turbojpeg.lib" "${_IMPORT_PREFIX}/bin/turbojpeg.dll" )
27 |
28 | # Import target "@CMAKE_PROJECT_NAME@::turbojpeg-static" for configuration "Release"
29 | set_property(TARGET @CMAKE_PROJECT_NAME@::turbojpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
30 | set_target_properties(@CMAKE_PROJECT_NAME@::turbojpeg-static PROPERTIES
31 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "ASM_NASM;C"
32 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/turbojpeg-static.lib"
33 | )
34 |
35 | list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::turbojpeg-static )
36 | list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::turbojpeg-static "${_IMPORT_PREFIX}/lib/turbojpeg-static.lib" )
37 |
38 | # Import target "@CMAKE_PROJECT_NAME@::jpeg-static" for configuration "Release"
39 | set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
40 | set_target_properties(@CMAKE_PROJECT_NAME@::jpeg-static PROPERTIES
41 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "ASM_NASM;C"
42 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/jpeg-static.lib"
43 | )
44 |
45 | list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg-static )
46 | list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg-static "${_IMPORT_PREFIX}/lib/jpeg-static.lib" )
47 |
48 | # Commands beyond this point should not need to know the version.
49 | set(CMAKE_IMPORT_FILE_VERSION)
50 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10.2)
2 |
3 | # set common name
4 | set(MODULE_YUV yuv)
5 | option(LIBYUV_ENABLE_JPEG "option for libjpeg" OFF)
6 |
7 | # set include
8 | include_directories(include include/libyuv)
9 |
10 | # set source
11 | set(DIR_SRC
12 | source/compare.cc
13 | source/compare_common.cc
14 | source/convert.cc
15 | source/convert_argb.cc
16 | source/convert_from.cc
17 | source/convert_from_argb.cc
18 | source/convert_to_argb.cc
19 | source/convert_to_i420.cc
20 | source/cpu_id.cc
21 | source/planar_functions.cc
22 | source/rotate.cc
23 | source/rotate_any.cc
24 | source/rotate_argb.cc
25 | source/rotate_common.cc
26 | source/row_any.cc
27 | source/row_common.cc
28 | source/scale.cc
29 | source/scale_any.cc
30 | source/scale_argb.cc
31 | source/scale_common.cc
32 | source/video_common.cc)
33 |
34 | if(${ANDROID_ABI} MATCHES "armeabi-v7a")
35 | add_definitions(-DLIBYUV_NEON)
36 | set(DIR_ABI
37 | source/compare_neon.cc
38 | source/rotate_neon.cc
39 | source/row_neon.cc
40 | source/scale_neon.cc)
41 | elseif(${ANDROID_ABI} MATCHES "arm64-v8a")
42 | add_definitions(-DLIBYUV_NEON)
43 | set(DIR_ABI
44 | source/compare_neon64.cc
45 | source/rotate_neon64.cc
46 | source/row_neon64.cc
47 | source/scale_neon64.cc)
48 | endif()
49 |
50 | if(LIBYUV_ENABLE_JPEG)
51 | add_definitions(-DHAVE_JPEG)
52 | add_library(jpeg SHARED IMPORTED)
53 | set(DIR_JPEG
54 | source/convert_jpeg.cc
55 | source/mjpeg_decoder.cc
56 | source/mjpeg_validate.cc
57 | source/scale_neon64.cc)
58 | list(APPEND DIR_SRC ${DIR_JPEG})
59 | endif()
60 |
61 | list(APPEND DIR_SRC ${DIR_ABI})
62 | add_library(${MODULE_YUV} SHARED ${DIR_SRC})
63 |
64 | # target link libraries
65 | target_link_libraries(${MODULE_YUV})
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/include/libyuv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_H_
12 | #define INCLUDE_LIBYUV_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/compare.h"
16 | #include "libyuv/convert.h"
17 | #include "libyuv/convert_argb.h"
18 | #include "libyuv/convert_from.h"
19 | #include "libyuv/convert_from_argb.h"
20 | #include "libyuv/cpu_id.h"
21 | #include "libyuv/mjpeg_decoder.h"
22 | #include "libyuv/planar_functions.h"
23 | #include "libyuv/rotate.h"
24 | #include "libyuv/rotate_argb.h"
25 | #include "libyuv/row.h"
26 | #include "libyuv/scale.h"
27 | #include "libyuv/scale_argb.h"
28 | #include "libyuv/scale_row.h"
29 | #include "libyuv/version.h"
30 | #include "libyuv/video_common.h"
31 |
32 | #endif // INCLUDE_LIBYUV_H_
33 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/include/libyuv/basic_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_
12 | #define INCLUDE_LIBYUV_BASIC_TYPES_H_
13 |
14 | #include // For size_t and NULL
15 |
16 | #if !defined(INT_TYPES_DEFINED) && !defined(GG_LONGLONG)
17 | #define INT_TYPES_DEFINED
18 |
19 | #if defined(_MSC_VER) && (_MSC_VER < 1600)
20 | #include // for uintptr_t on x86
21 | typedef unsigned __int64 uint64_t;
22 | typedef __int64 int64_t;
23 | typedef unsigned int uint32_t;
24 | typedef int int32_t;
25 | typedef unsigned short uint16_t;
26 | typedef short int16_t;
27 | typedef unsigned char uint8_t;
28 | typedef signed char int8_t;
29 | #else
30 | #include // for uintptr_t and C99 types
31 | #endif // defined(_MSC_VER) && (_MSC_VER < 1600)
32 | // Types are deprecated. Enable this macro for legacy types.
33 | #ifdef LIBYUV_LEGACY_TYPES
34 | typedef uint64_t uint64;
35 | typedef int64_t int64;
36 | typedef uint32_t uint32;
37 | typedef int32_t int32;
38 | typedef uint16_t uint16;
39 | typedef int16_t int16;
40 | typedef uint8_t uint8;
41 | typedef int8_t int8;
42 | #endif // LIBYUV_LEGACY_TYPES
43 | #endif // INT_TYPES_DEFINED
44 |
45 | #if !defined(LIBYUV_API)
46 | #if defined(_WIN32) || defined(__CYGWIN__)
47 | #if defined(LIBYUV_BUILDING_SHARED_LIBRARY)
48 | #define LIBYUV_API __declspec(dllexport)
49 | #elif defined(LIBYUV_USING_SHARED_LIBRARY)
50 | #define LIBYUV_API __declspec(dllimport)
51 | #else
52 | #define LIBYUV_API
53 | #endif // LIBYUV_BUILDING_SHARED_LIBRARY
54 | #elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \
55 | (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \
56 | defined(LIBYUV_USING_SHARED_LIBRARY))
57 | #define LIBYUV_API __attribute__((visibility("default")))
58 | #else
59 | #define LIBYUV_API
60 | #endif // __GNUC__
61 | #endif // LIBYUV_API
62 |
63 | // TODO(fbarchard): Remove bool macros.
64 | #define LIBYUV_BOOL int
65 | #define LIBYUV_FALSE 0
66 | #define LIBYUV_TRUE 1
67 |
68 | #endif // INCLUDE_LIBYUV_BASIC_TYPES_H_
69 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/include/libyuv/rotate_argb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_
12 | #define INCLUDE_LIBYUV_ROTATE_ARGB_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/rotate.h" // For RotationMode.
16 |
17 | #ifdef __cplusplus
18 | namespace libyuv {
19 | extern "C" {
20 | #endif
21 |
22 | // Rotate ARGB frame
23 | LIBYUV_API
24 | int ARGBRotate(const uint8_t* src_argb,
25 | int src_stride_argb,
26 | uint8_t* dst_argb,
27 | int dst_stride_argb,
28 | int src_width,
29 | int src_height,
30 | enum RotationMode mode);
31 |
32 | #ifdef __cplusplus
33 | } // extern "C"
34 | } // namespace libyuv
35 | #endif
36 |
37 | #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_
38 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/include/libyuv/scale_argb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_
12 | #define INCLUDE_LIBYUV_SCALE_ARGB_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/scale.h" // For FilterMode
16 |
17 | #ifdef __cplusplus
18 | namespace libyuv {
19 | extern "C" {
20 | #endif
21 |
22 | LIBYUV_API
23 | int ARGBScale(const uint8_t* src_argb,
24 | int src_stride_argb,
25 | int src_width,
26 | int src_height,
27 | uint8_t* dst_argb,
28 | int dst_stride_argb,
29 | int dst_width,
30 | int dst_height,
31 | enum FilterMode filtering);
32 |
33 | // Clipped scale takes destination rectangle coordinates for clip values.
34 | LIBYUV_API
35 | int ARGBScaleClip(const uint8_t* src_argb,
36 | int src_stride_argb,
37 | int src_width,
38 | int src_height,
39 | uint8_t* dst_argb,
40 | int dst_stride_argb,
41 | int dst_width,
42 | int dst_height,
43 | int clip_x,
44 | int clip_y,
45 | int clip_width,
46 | int clip_height,
47 | enum FilterMode filtering);
48 |
49 | // Scale with YUV conversion to ARGB and clipping.
50 | LIBYUV_API
51 | int YUVToARGBScaleClip(const uint8_t* src_y,
52 | int src_stride_y,
53 | const uint8_t* src_u,
54 | int src_stride_u,
55 | const uint8_t* src_v,
56 | int src_stride_v,
57 | uint32_t src_fourcc,
58 | int src_width,
59 | int src_height,
60 | uint8_t* dst_argb,
61 | int dst_stride_argb,
62 | uint32_t dst_fourcc,
63 | int dst_width,
64 | int dst_height,
65 | int clip_x,
66 | int clip_y,
67 | int clip_width,
68 | int clip_height,
69 | enum FilterMode filtering);
70 |
71 | #ifdef __cplusplus
72 | } // extern "C"
73 | } // namespace libyuv
74 | #endif
75 |
76 | #endif // INCLUDE_LIBYUV_SCALE_ARGB_H_
77 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/include/libyuv/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_VERSION_H_
12 | #define INCLUDE_LIBYUV_VERSION_H_
13 |
14 | #define LIBYUV_VERSION 1763
15 |
16 | #endif // INCLUDE_LIBYUV_VERSION_H_
17 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/source/mjpeg_validate.cc:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #include "libyuv/mjpeg_decoder.h"
12 |
13 | #include // For memchr.
14 |
15 | #ifdef __cplusplus
16 | namespace libyuv {
17 | extern "C" {
18 | #endif
19 |
20 | // Helper function to scan for EOI marker (0xff 0xd9).
21 | static LIBYUV_BOOL ScanEOI(const uint8_t* src_mjpg, size_t src_size_mjpg) {
22 | if (src_size_mjpg >= 2) {
23 | const uint8_t* end = src_mjpg + src_size_mjpg - 1;
24 | const uint8_t* it = src_mjpg;
25 | while (it < end) {
26 | // TODO(fbarchard): scan for 0xd9 instead.
27 | it = (const uint8_t*)(memchr(it, 0xff, end - it));
28 | if (it == NULL) {
29 | break;
30 | }
31 | if (it[1] == 0xd9) {
32 | return LIBYUV_TRUE; // Success: Valid jpeg.
33 | }
34 | ++it; // Skip over current 0xff.
35 | }
36 | }
37 | // ERROR: Invalid jpeg end code not found. Size src_size_mjpg
38 | return LIBYUV_FALSE;
39 | }
40 |
41 | // Helper function to validate the jpeg appears intact.
42 | LIBYUV_BOOL ValidateJpeg(const uint8_t* src_mjpg, size_t src_size_mjpg) {
43 | // Maximum size that ValidateJpeg will consider valid.
44 | const size_t kMaxJpegSize = 0x7fffffffull;
45 | const size_t kBackSearchSize = 1024;
46 | if (src_size_mjpg < 64 || src_size_mjpg > kMaxJpegSize || !src_mjpg) {
47 | // ERROR: Invalid jpeg size: src_size_mjpg
48 | return LIBYUV_FALSE;
49 | }
50 | // SOI marker
51 | if (src_mjpg[0] != 0xff || src_mjpg[1] != 0xd8 || src_mjpg[2] != 0xff) {
52 | // ERROR: Invalid jpeg initial start code
53 | return LIBYUV_FALSE;
54 | }
55 |
56 | // Look for the End Of Image (EOI) marker near the end of the buffer.
57 | if (src_size_mjpg > kBackSearchSize) {
58 | if (ScanEOI(src_mjpg + src_size_mjpg - kBackSearchSize, kBackSearchSize)) {
59 | return LIBYUV_TRUE; // Success: Valid jpeg.
60 | }
61 | // Reduce search size for forward search.
62 | src_size_mjpg = src_size_mjpg - kBackSearchSize + 1;
63 | }
64 | // Step over SOI marker and scan for EOI.
65 | return ScanEOI(src_mjpg + 2, src_size_mjpg - 2);
66 | }
67 |
68 | #ifdef __cplusplus
69 | } // extern "C"
70 | } // namespace libyuv
71 | #endif
72 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/source/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -x
3 |
4 | function runbenchmark1 {
5 | perf record /google/src/cloud/fbarchard/clean/google3/blaze-bin/third_party/libyuv/libyuv_test --gunit_filter=*$1 --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=1000 --libyuv_flags=-1 --libyuv_cpu_info=-1
6 | perf report | grep AVX
7 | }
8 |
9 | runbenchmark1 ABGRToI420
10 | runbenchmark1 Android420ToI420
11 | runbenchmark1 ARGBToI420
12 | runbenchmark1 Convert16To8Plane
13 | runbenchmark1 ConvertToARGB
14 | runbenchmark1 ConvertToI420
15 | runbenchmark1 CopyPlane
16 | runbenchmark1 H010ToAB30
17 | runbenchmark1 H010ToAR30
18 | runbenchmark1 HalfFloatPlane
19 | runbenchmark1 I010ToAB30
20 | runbenchmark1 I010ToAR30
21 | runbenchmark1 I420Copy
22 | runbenchmark1 I420Psnr
23 | runbenchmark1 I420Scale
24 | runbenchmark1 I420Ssim
25 | runbenchmark1 I420ToARGB
26 | runbenchmark1 I420ToNV12
27 | runbenchmark1 I420ToUYVY
28 | runbenchmark1 I422ToI420
29 | runbenchmark1 InitCpuFlags
30 | runbenchmark1 J420ToARGB
31 | runbenchmark1 NV12ToARGB
32 | runbenchmark1 NV12ToI420
33 | runbenchmark1 NV12ToI420Rotate
34 | runbenchmark1 SetCpuFlags
35 | runbenchmark1 YUY2ToI420
36 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/cpp/libyuv/source/video_common.cc:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #include "libyuv/video_common.h"
12 |
13 | #ifdef __cplusplus
14 | namespace libyuv {
15 | extern "C" {
16 | #endif
17 |
18 | struct FourCCAliasEntry {
19 | uint32_t alias;
20 | uint32_t canonical;
21 | };
22 |
23 | #define NUM_ALIASES 18
24 | static const struct FourCCAliasEntry kFourCCAliases[NUM_ALIASES] = {
25 | {FOURCC_IYUV, FOURCC_I420},
26 | {FOURCC_YU12, FOURCC_I420},
27 | {FOURCC_YU16, FOURCC_I422},
28 | {FOURCC_YU24, FOURCC_I444},
29 | {FOURCC_YUYV, FOURCC_YUY2},
30 | {FOURCC_YUVS, FOURCC_YUY2}, // kCMPixelFormat_422YpCbCr8_yuvs
31 | {FOURCC_HDYC, FOURCC_UYVY},
32 | {FOURCC_2VUY, FOURCC_UYVY}, // kCMPixelFormat_422YpCbCr8
33 | {FOURCC_JPEG, FOURCC_MJPG}, // Note: JPEG has DHT while MJPG does not.
34 | {FOURCC_DMB1, FOURCC_MJPG},
35 | {FOURCC_BA81, FOURCC_BGGR}, // deprecated.
36 | {FOURCC_RGB3, FOURCC_RAW},
37 | {FOURCC_BGR3, FOURCC_24BG},
38 | {FOURCC_CM32, FOURCC_BGRA}, // kCMPixelFormat_32ARGB
39 | {FOURCC_CM24, FOURCC_RAW}, // kCMPixelFormat_24RGB
40 | {FOURCC_L555, FOURCC_RGBO}, // kCMPixelFormat_16LE555
41 | {FOURCC_L565, FOURCC_RGBP}, // kCMPixelFormat_16LE565
42 | {FOURCC_5551, FOURCC_RGBO}, // kCMPixelFormat_16LE5551
43 | };
44 | // TODO(fbarchard): Consider mapping kCMPixelFormat_32BGRA to FOURCC_ARGB.
45 | // {FOURCC_BGRA, FOURCC_ARGB}, // kCMPixelFormat_32BGRA
46 |
47 | LIBYUV_API
48 | uint32_t CanonicalFourCC(uint32_t fourcc) {
49 | int i;
50 | for (i = 0; i < NUM_ALIASES; ++i) {
51 | if (kFourCCAliases[i].alias == fourcc) {
52 | return kFourCCAliases[i].canonical;
53 | }
54 | }
55 | // Not an alias, so return it as-is.
56 | return fourcc;
57 | }
58 |
59 | #ifdef __cplusplus
60 | } // extern "C"
61 | } // namespace libyuv
62 | #endif
63 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/java/com/hsj/camera/CameraView.java:
--------------------------------------------------------------------------------
1 | package com.hsj.camera;
2 |
3 | import android.content.Context;
4 | import android.opengl.GLSurfaceView;
5 | import android.util.AttributeSet;
6 |
7 | import javax.microedition.khronos.egl.EGLConfig;
8 | import javax.microedition.khronos.opengles.GL10;
9 |
10 | /**
11 | * @Author:Hsj
12 | * @Date:2021/5/10
13 | * @Class:CameraView
14 | * @Desc:
15 | */
16 | public final class CameraView extends GLSurfaceView implements GLSurfaceView.Renderer {
17 |
18 | private static final String TAG = "CameraView";
19 | public static final int COMMON = 0;
20 | public static final int BEAUTY = 1;
21 | public static final int DEPTH = 2;
22 | private IRender render;
23 |
24 | public CameraView(Context context) {
25 | this(context, null);
26 | }
27 |
28 | public CameraView(Context context, AttributeSet attrs) {
29 | super(context, attrs);
30 | setZOrderOnTop(true);
31 | setZOrderMediaOverlay(true);
32 |
33 | setEGLContextClientVersion(2);
34 | setRenderer(this);
35 | setRenderMode(RENDERMODE_WHEN_DIRTY);
36 | //setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS);
37 | }
38 |
39 | public IRender getRender(int renderType) {
40 | if (render == null) {
41 | switch (renderType) {
42 | case COMMON:
43 | render = new RenderCommon(this);
44 | break;
45 | case BEAUTY:
46 | render = new RenderBeauty(this);
47 | break;
48 | case DEPTH:
49 | render = new RenderDepth(this);
50 | break;
51 | default:
52 | throw new IllegalArgumentException("Not support render type: " + renderType);
53 | }
54 | }
55 | return render;
56 | }
57 |
58 | @Override
59 | public void onSurfaceCreated(GL10 gl, EGLConfig config) {
60 | if (render != null) render.onSurfaceCreated(gl, config);
61 | }
62 |
63 | @Override
64 | public void onSurfaceChanged(GL10 gl, int width, int height) {
65 | if (render != null) render.onSurfaceChanged(gl, width, height);
66 | }
67 |
68 | @Override
69 | public void onDrawFrame(GL10 gl) {
70 | if (render != null) render.onDrawFrame(gl);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/java/com/hsj/camera/IFrameCallback.java:
--------------------------------------------------------------------------------
1 | package com.hsj.camera;
2 |
3 | import java.nio.ByteBuffer;
4 |
5 | /**
6 | * @Author:Hsj
7 | * @Date:2021/5/11
8 | * @Class:IFrameCallback
9 | * @Desc:
10 | */
11 | public interface IFrameCallback {
12 | void onFrame(ByteBuffer data);
13 | }
14 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/java/com/hsj/camera/IRender.java:
--------------------------------------------------------------------------------
1 | package com.hsj.camera;
2 |
3 | import android.opengl.GLSurfaceView;
4 | import android.view.Surface;
5 |
6 | /**
7 | * @Author:Hsj
8 | * @Date:2021/5/10
9 | * @Class:IRender
10 | * @Desc:
11 | */
12 | public interface IRender extends GLSurfaceView.Renderer {
13 | void onRender(boolean isResume);
14 | void setSurfaceCallback(ISurfaceCallback callback);
15 | }
16 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/main/java/com/hsj/camera/ISurfaceCallback.java:
--------------------------------------------------------------------------------
1 | package com.hsj.camera;
2 |
3 | import android.view.Surface;
4 |
5 | /**
6 | * @Author:Hsj
7 | * @Date:2021/6/16
8 | * @Class:ISurfaceCallback
9 | * @Desc:
10 | */
11 | public interface ISurfaceCallback {
12 | void onSurface(Surface surface);
13 | }
14 |
--------------------------------------------------------------------------------
/sdk_v4l2_camera/src/test/java/com/hsj/camera/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.hsj.camera;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = "android_v4l2_camera"
2 | include ':sample'
3 | include ':sdk_v4l2_camera'
4 |
--------------------------------------------------------------------------------