├── .gitignore ├── components ├── libjpeg │ ├── Makefile.projbuild │ ├── jpeg-6b │ │ ├── jdosabcc.obj │ │ ├── jdosamsc.obj │ │ ├── testimg.bmp │ │ ├── testimg.jpg │ │ ├── testimg.ppm │ │ ├── testimgp.jpg │ │ ├── testorig.jpg │ │ ├── testprog.jpg │ │ ├── makvms.opt │ │ ├── jversion.h │ │ ├── readme.dos │ │ ├── jdosaobj.doc │ │ ├── jconfig.vms │ │ ├── jconfig.wat │ │ ├── jconfig.dj │ │ ├── jconfig.sas │ │ ├── jconfig.cfg │ │ ├── jconfig.mac │ │ ├── jconfig.manx │ │ ├── jconfig.h │ │ ├── rdgif.c │ │ ├── maktjpeg.st │ │ ├── jconfig.st │ │ ├── jconfig.vc │ │ ├── jconfig.bcc │ │ ├── ansi2knr.1 │ │ ├── jchuff.h │ │ ├── rdjpgcom.1 │ │ ├── jconfig.mc6 │ │ ├── makcjpeg.st │ │ ├── makdjpeg.st │ │ ├── jcinit.c │ │ ├── wrjpgcom.1 │ │ ├── jmemnobs.c │ │ ├── jinclude.h │ │ └── jcomapi.c │ └── component.mk └── x264 │ ├── Makefile.projbuild │ ├── x264-snapshot-20181221-2245-stable │ ├── tools │ │ ├── digress │ │ │ ├── scm │ │ │ │ ├── __init__.py │ │ │ │ ├── dummy.py │ │ │ │ └── git.py │ │ │ ├── constants.py │ │ │ ├── __init__.py │ │ │ ├── errors.py │ │ │ └── comparers.py │ │ ├── cltostr.sh │ │ ├── countquant_x264.pl │ │ ├── q_matrix_jvt.cfg │ │ └── msvsdepend.sh │ ├── encoder │ │ ├── ratecontrol.c │ │ ├── rdo.inc │ │ ├── slicetype-cl.h │ │ ├── analyse.h │ │ └── set.h │ ├── .gitignore │ ├── doc │ │ ├── regression_test.txt │ │ └── standards.txt │ ├── version.sh │ ├── common │ │ ├── arm │ │ │ ├── mc.h │ │ │ ├── bitstream.h │ │ │ ├── bitstream-a.S │ │ │ ├── quant.h │ │ │ ├── dct.h │ │ │ └── deblock.h │ │ ├── mips │ │ │ ├── mc.h │ │ │ ├── quant.h │ │ │ ├── deblock.h │ │ │ └── dct.h │ │ ├── ppc │ │ │ ├── mc.h │ │ │ ├── pixel.h │ │ │ ├── predict.h │ │ │ ├── deblock.h │ │ │ ├── quant.h │ │ │ └── dct.h │ │ ├── aarch64 │ │ │ ├── mc.h │ │ │ ├── bitstream.h │ │ │ ├── asm-offsets.h │ │ │ ├── asm-offsets.c │ │ │ ├── bitstream-a.S │ │ │ └── deblock.h │ │ ├── x86 │ │ │ ├── mc.h │ │ │ └── const-a.asm │ │ ├── opencl │ │ │ └── weightp.cl │ │ ├── common.c │ │ ├── threadpool.h │ │ ├── rectangle.c │ │ ├── cpu.h │ │ ├── win32thread.h │ │ ├── dct.h │ │ └── quant.h │ ├── filters │ │ ├── video │ │ │ ├── internal.h │ │ │ ├── internal.c │ │ │ ├── source.c │ │ │ ├── video.c │ │ │ └── video.h │ │ └── filters.h │ ├── extras │ │ └── intel_dispatcher.h │ ├── x264dll.c │ ├── output │ │ ├── output.h │ │ ├── matroska_ebml.h │ │ └── raw.c │ ├── AUTHORS │ ├── x264cli.h │ └── x264res.rc │ ├── x264_config.h │ ├── component.mk │ └── config.h ├── main ├── component.mk ├── Makefile.projbuild ├── accessory.h ├── debug.h ├── crypto.h ├── streaming.h ├── config.h ├── camera_session.c ├── debug.c ├── streaming_session.h ├── camera_session.h └── app_main.c ├── readme_images ├── homekit.png ├── homekit2.png ├── part_table.png ├── part_table2.png ├── part_table3.png ├── spi-ram-menu.png ├── spi-ram-menu2.png ├── esp32-specific.png ├── esp32-specific2.png ├── camera-configuration.png └── camera-configuration2.png ├── Makefile ├── partitions.csv ├── esp32-camera.patch ├── .gitmodules └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig 3 | sdkconfig.old 4 | -------------------------------------------------------------------------------- /components/libjpeg/Makefile.projbuild: -------------------------------------------------------------------------------- 1 | CFLAGS += -Wno-error=main 2 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | COMPONENT_DEPENDS := homekit esp32-camera x264 2 | -------------------------------------------------------------------------------- /components/x264/Makefile.projbuild: -------------------------------------------------------------------------------- 1 | CFLAGS += -DBIT_DEPTH=8 -DHIGH_BIT_DEPTH=0 2 | -------------------------------------------------------------------------------- /main/Makefile.projbuild: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -UNO_SHA \ 3 | -DWOLFSSL_AES_DIRECT 4 | -------------------------------------------------------------------------------- /readme_images/homekit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/homekit.png -------------------------------------------------------------------------------- /readme_images/homekit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/homekit2.png -------------------------------------------------------------------------------- /readme_images/part_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/part_table.png -------------------------------------------------------------------------------- /readme_images/part_table2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/part_table2.png -------------------------------------------------------------------------------- /readme_images/part_table3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/part_table3.png -------------------------------------------------------------------------------- /readme_images/spi-ram-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/spi-ram-menu.png -------------------------------------------------------------------------------- /readme_images/spi-ram-menu2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/spi-ram-menu2.png -------------------------------------------------------------------------------- /readme_images/esp32-specific.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/esp32-specific.png -------------------------------------------------------------------------------- /readme_images/esp32-specific2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/esp32-specific2.png -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/scm/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Source control backends for Digress. 3 | """ 4 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jdosabcc.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/jdosabcc.obj -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jdosamsc.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/jdosamsc.obj -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testimg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testimg.bmp -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testimg.jpg -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testimg.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testimg.ppm -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testimgp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testimgp.jpg -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testorig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testorig.jpg -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/testprog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/libjpeg/jpeg-6b/testprog.jpg -------------------------------------------------------------------------------- /readme_images/camera-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/camera-configuration.png -------------------------------------------------------------------------------- /readme_images/camera-configuration2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/readme_images/camera-configuration2.png -------------------------------------------------------------------------------- /main/accessory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | void camera_accessory_init(); 7 | void camera_accessory_set_ip_address(ip4_addr_t ip); 8 | -------------------------------------------------------------------------------- /main/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEBUG_H__ 2 | #define __DEBUG_H__ 3 | 4 | #include 5 | 6 | void dump_binary(const char *prompt, const uint8_t *data, size_t size); 7 | 8 | #endif // __DEBUG_H__ 9 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/encoder/ratecontrol.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HomeKidd/esp32-homekit-camera/HEAD/components/x264/x264-snapshot-20181221-2245-stable/encoder/ratecontrol.c -------------------------------------------------------------------------------- /components/x264/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_GPL 1 2 | #define X264_INTERLACED 1 3 | #define X264_BIT_DEPTH 0 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_VERSION "" 6 | #define X264_POINTVER "0.155.x" 7 | -------------------------------------------------------------------------------- /main/crypto.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "streaming_session.h" 4 | 5 | 6 | void session_init_crypto(streaming_session_t *session); 7 | int session_encrypt(streaming_session_t *session, uint8_t *in, int len, int outlen); 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PROJECT_NAME := esp32-homekit-camera 2 | 3 | CFLAGS += -DHOMEKIT_SHORT_APPLE_UUIDS 4 | 5 | include $(IDF_PATH)/make/project.mk 6 | 7 | erase_homekit_data: 8 | $(ESPTOOLPY_SERIAL) erase_region $(CONFIG_HOMEKIT_SPI_FLASH_BASE_ADDR) 4096 9 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/makvms.opt: -------------------------------------------------------------------------------- 1 | ! A pointer to the VAX/VMS C Run-Time Shareable Library. 2 | ! This file is needed by makefile.mms and makefile.vms, 3 | ! but only for the older VAX C compiler. DEC C does not need it. 4 | Sys$Library:VAXCRTL.EXE /Share 5 | -------------------------------------------------------------------------------- /main/streaming.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int streaming_init(); 4 | 5 | int streaming_get_video_port(); 6 | int streaming_get_audio_port(); 7 | 8 | int streaming_sessions_add(camera_session_t *session); 9 | void streaming_sessions_remove(camera_session_t *session); 10 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/constants.py: -------------------------------------------------------------------------------- 1 | """ 2 | All of Digress's constants. 3 | """ 4 | 5 | TEST_PASS = 0 6 | TEST_FAIL = 1 7 | TEST_DISABLED = 2 8 | TEST_SKIPPED = 3 9 | 10 | CASE_PASS = 0 11 | CASE_FAIL = 1 12 | 13 | FIXTURE_PASS = 0 14 | FIXTURE_FAIL = 1 15 | -------------------------------------------------------------------------------- /partitions.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild 3 | nvs, data, nvs, , 0x6000, 4 | phy_init, data, phy, , 0x1000, 5 | factory, app, factory, , 0x200000, 6 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Automated regression/unit testing suite. 3 | """ 4 | 5 | __version__ = '0.2' 6 | 7 | def digress(fixture): 8 | """ 9 | Command-line helper for Digress. 10 | """ 11 | from digress.cli import Dispatcher 12 | Dispatcher(fixture).dispatch() 13 | -------------------------------------------------------------------------------- /components/libjpeg/component.mk: -------------------------------------------------------------------------------- 1 | # ESP_IDF 2 | libjpeg_THIRDPARTY_ROOT = jpeg-6b 3 | 4 | COMPONENT_SRCDIRS = $(libjpeg_THIRDPARTY_ROOT) 5 | COMPONENT_ADD_INCLUDEDIRS = . $(libjpeg_THIRDPARTY_ROOT) 6 | 7 | $(eval $(call compile_exclude, $(addprefix $(libjpeg_THIRDPARTY_ROOT)/, \ 8 | ansi2knr.o \ 9 | example.o \ 10 | jmemname.o \ 11 | jmemdos.o \ 12 | jmemmac.o \ 13 | ))) 14 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /esp32-camera.patch: -------------------------------------------------------------------------------- 1 | diff --git a/driver/xclk.c b/driver/xclk.c 2 | index 89ced66..21db2fc 100755 3 | --- a/driver/xclk.c 4 | +++ b/driver/xclk.c 5 | @@ -20,6 +20,7 @@ esp_err_t camera_enable_out_clock(camera_config_t* config) 6 | timer_conf.freq_hz = config->xclk_freq_hz; 7 | timer_conf.speed_mode = LEDC_HIGH_SPEED_MODE; 8 | timer_conf.timer_num = config->ledc_timer; 9 | + timer_conf.clk_cfg = LEDC_USE_APB_CLK; 10 | esp_err_t err = ledc_timer_config(&timer_conf); 11 | if (err != ESP_OK) { 12 | ESP_LOGE(TAG, "ledc_timer_config failed, rc=%x", err); 13 | -------------------------------------------------------------------------------- /components/x264/component.mk: -------------------------------------------------------------------------------- 1 | # ESP_IDF 2 | x264_THIRDPARTY_ROOT = x264-snapshot-20181221-2245-stable 3 | 4 | COMPONENT_SRCDIRS = $(x264_THIRDPARTY_ROOT)/common $(x264_THIRDPARTY_ROOT)/encoder 5 | COMPONENT_ADD_INCLUDEDIRS = . $(x264_THIRDPARTY_ROOT) 6 | 7 | ifneq ($(shell $(CC) -v 2>&1 | grep 'gcc version [^0-7]'),) 8 | CFLAGS += -Wno-error=format-truncation= 9 | endif 10 | 11 | $(eval $(call compile_exclude, $(addprefix $(x264_THIRDPARTY_ROOT)/, \ 12 | common/opencl.o \ 13 | common/threadpool.o \ 14 | common/win32thread.o \ 15 | encoder/rdo.o \ 16 | encoder/slicetype.o \ 17 | ))) 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/cJSON"] 2 | path = components/cJSON 3 | url = https://github.com/maximkulkin/esp-cjson 4 | [submodule "components/wolfssl"] 5 | path = components/wolfssl 6 | url = https://github.com/maximkulkin/esp-wolfssl 7 | [submodule "components/homekit"] 8 | path = components/homekit 9 | url = https://github.com/maximkulkin/esp-homekit 10 | [submodule "components/http-parser"] 11 | path = components/http-parser 12 | url = https://github.com/maximkulkin/esp-http-parser.git 13 | [submodule "components/esp32-camera"] 14 | path = components/esp32-camera 15 | url = https://github.com/espressif/esp32-camera.git 16 | -------------------------------------------------------------------------------- /main/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Configuration stuff 4 | #include 5 | 6 | #define TAG "esp32_camera" 7 | 8 | #define CAMERA_FRAME_RATE 30 9 | #define CAMERA_FRAME_SIZE FRAMESIZE_VGA 10 | #define CAMERA_WIDTH 640 11 | #define CAMERA_HEIGHT 480 12 | 13 | // Scale factors to get image for video stream 14 | #define VIDEO_IMAGE_SCALE_NUM 1 15 | #define VIDEO_IMAGE_SCALE_DENOM 4 16 | 17 | // Calculated stuff 18 | #define VIDEO_IMAGE_SCALED(x) ((x) * VIDEO_IMAGE_SCALE_NUM / VIDEO_IMAGE_SCALE_DENOM) 19 | 20 | #define VIDEO_WIDTH VIDEO_IMAGE_SCALED(CAMERA_WIDTH) 21 | #define VIDEO_HEIGHT VIDEO_IMAGE_SCALED(CAMERA_HEIGHT) 22 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.a 3 | *.diff 4 | *.orig 5 | *.rej 6 | *.dll* 7 | *.exe 8 | *.def 9 | *.lib 10 | *.pdb 11 | *.mo 12 | *.o 13 | *.patch 14 | *.pc 15 | *.pot 16 | *.so* 17 | *.dylib 18 | .*.swp 19 | .depend 20 | .DS_Store 21 | TAGS 22 | config.h 23 | config.mak 24 | config.log 25 | x264_config.h 26 | x264 27 | checkasm 28 | 29 | *.264 30 | *.h264 31 | *.2pass 32 | *.ffindex 33 | *.avs 34 | *.mkv 35 | *.flv 36 | *.mp4 37 | *.y4m 38 | *.yuv 39 | *.log 40 | *.mbtree 41 | *.temp 42 | *.pyc 43 | *.pgd 44 | *.pgc 45 | 46 | .digress_x264 47 | dataDec.txt 48 | log.dec 49 | common/oclobj.h 50 | x264_lookahead.clbin 51 | -------------------------------------------------------------------------------- /main/camera_session.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | #include "camera_session.h" 8 | 9 | 10 | camera_session_t *camera_session_new() { 11 | camera_session_t *session = calloc(1, sizeof(camera_session_t)); 12 | session->video_ssrc = 1; 13 | session->audio_ssrc = 1; 14 | 15 | return session; 16 | } 17 | 18 | 19 | void camera_session_free(camera_session_t *session) { 20 | if (!session) 21 | return; 22 | 23 | if (session->controller_ip_address) 24 | free(session->controller_ip_address); 25 | 26 | free(session); 27 | } 28 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/readme.dos: -------------------------------------------------------------------------------- 1 | This archive contains a DOS-friendly version of the Independent JPEG Group's 2 | source code. It differs from the normal distribution in that: 3 | 4 | 1. The archive format is zip rather than tar+gzip. You should be able to 5 | unpack it with PKUNZIP (2.04g or later) or Info-Zip's unzip. 6 | 7 | 2. Newlines have been converted from Unix (LF) to DOS (CR/LF) style in all 8 | text files, but not in the binary files (test*.*). 9 | 10 | 3. Object files have been included for jmemdosa.asm. See jdosaobj.doc. 11 | 12 | Please see the main README file for the primary documentation. 13 | 14 | If you'd rather have a non-DOSified archive, see the ARCHIVE LOCATIONS section 15 | of README. 16 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/doc/regression_test.txt: -------------------------------------------------------------------------------- 1 | Here is one test method which checks that the encoder's 2 | view of decoded pictures in the same as the decoder's view. 3 | This ensures that there is no distortion besides what is 4 | inherently caused by compression. 5 | 6 | # Install and compile x264 : 7 | git clone git://git.videolan.org/x264.git x264 8 | cd x264 9 | ./configure 10 | make 11 | cd .. 12 | 13 | # Install and compile JM reference decoder : 14 | wget http://iphome.hhi.de/suehring/tml/download/jm17.2.zip 15 | unzip jm17.2.zip 16 | cd JM 17 | sh unixprep.sh 18 | cd ldecod 19 | make 20 | cd ../.. 21 | 22 | ./x264/x264 input.yuv --dump-yuv fdec.yuv -o output.h264 23 | ./JM/bin/ldecod.exe -i output.h264 -o ref.yuv 24 | diff ref.yuv fdec.yuv 25 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jdosaobj.doc: -------------------------------------------------------------------------------- 1 | This archive contains already-assembled object files for JMEMDOSA.ASM 2 | of the Independent JPEG Group's JPEG package. These files will be helpful 3 | if you want to compile the IJG code for DOS, but don't have an assembler. 4 | 5 | These files were prepared from the 3/13/1992 version of JMEMDOSA.ASM, 6 | which is still unchanged as of mid-1998. You can use these files with 7 | releases 3 through 6 of the IJG code, and probably future releases too. 8 | 9 | To use these files, copy the proper version to JMEMDOSA.OBJ. Make sure 10 | this file has a newer date than JMEMDOSA.ASM. Then compile the code as 11 | usual. 12 | 13 | Object files included: 14 | 15 | JDOSAMSC.OBJ For Microsoft C version 5 or later. 16 | JDOSABCC.OBJ For Borland C version 3.0 or later. 17 | -------------------------------------------------------------------------------- /main/debug.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static char *binary_to_string(const uint8_t *data, size_t size) { 6 | int i; 7 | 8 | size_t buffer_size = size * 3 + 1; // 1 char for eos 9 | 10 | char *buffer = malloc(buffer_size); 11 | 12 | int pos = 0; 13 | for (i=0; i 0) { 16 | pos += printed; 17 | } 18 | } 19 | buffer[pos] = 0; 20 | 21 | return buffer; 22 | } 23 | 24 | 25 | void dump_binary(const char *prompt, const uint8_t *data, size_t size) { 26 | char *buffer = binary_to_string(data, size); 27 | printf("%s (%d bytes): \"%s\"\n", prompt, (int)size, buffer); 28 | free(buffer); 29 | } 30 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/doc/standards.txt: -------------------------------------------------------------------------------- 1 | x264 is written in C. The particular variant of C is: intersection of C99 and gcc>=3.4. 2 | checkasm is written in gcc, with no attempt at compatibility with anything else. 3 | 4 | We make the following additional assumptions which are true of real systems but not guaranteed by C99: 5 | * Two's complement. 6 | * Signed right-shifts are sign-extended. 7 | * int is 32-bit or larger. 8 | 9 | x86-specific assumptions: 10 | * The stack is 16-byte aligned. We align it on entry to libx264 and on entry to any thread, but the compiler must preserve alignment after that. 11 | * We call emms before any float operation and before returning from libx264, not after each mmx operation. So bad things could happen if the compiler inserts float operations where they aren't expected. 12 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/scm/dummy.py: -------------------------------------------------------------------------------- 1 | """ 2 | Dummy SCM backend for Digress. 3 | """ 4 | 5 | from random import random 6 | 7 | def checkout(revision): 8 | """ 9 | Checkout a revision. 10 | """ 11 | pass 12 | 13 | def current_rev(): 14 | """ 15 | Get the current revision 16 | """ 17 | return str(random()) 18 | 19 | def revisions(rev_a, rev_b): 20 | """ 21 | Get a list of revisions from one to another. 22 | """ 23 | pass 24 | 25 | def stash(): 26 | """ 27 | Stash the repository. 28 | """ 29 | pass 30 | 31 | def unstash(): 32 | """ 33 | Unstash the repository. 34 | """ 35 | pass 36 | 37 | def bisect(command, revision): 38 | """ 39 | Perform a bisection. 40 | """ 41 | raise NotImplementedError("dummy SCM backend does not support bisection") 42 | -------------------------------------------------------------------------------- /main/streaming_session.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #include 5 | #include "camera_session.h" 6 | 7 | 8 | typedef struct { 9 | uint8_t key[16]; 10 | uint8_t salt[14]; 11 | uint8_t auth[20]; 12 | } srtp_keys_t; 13 | 14 | 15 | typedef struct _streaming_session { 16 | struct sockaddr_in controller_addr; 17 | 18 | bool started; 19 | bool failed; 20 | 21 | uint32_t timestamp; 22 | uint16_t sequence; 23 | 24 | int sequence_largest; 25 | uint32_t rtcp_index; 26 | uint32_t roc; 27 | uint8_t buffered_nals; 28 | 29 | uint8_t *video_buffer; 30 | uint8_t *video_buffer_ptr; 31 | 32 | srtp_keys_t video_rtp; 33 | srtp_keys_t video_rtcp; 34 | 35 | /* 36 | srtp_keys_t audio_rtp; 37 | srtp_keys_t audio_rtcp; 38 | */ 39 | 40 | camera_session_t *settings; 41 | 42 | struct _streaming_session *next; 43 | } streaming_session_t; 44 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(dirname "$0")" >/dev/null && [ -f x264.h ] || exit 1 4 | 5 | api="$(grep '#define X264_BUILD' < x264.h | sed 's/^.* \([1-9][0-9]*\).*$/\1/')" 6 | ver="x" 7 | version="" 8 | 9 | if [ -d .git ] && command -v git >/dev/null 2>&1 ; then 10 | localver="$(($(git rev-list HEAD | wc -l)))" 11 | if [ "$localver" -gt 1 ] ; then 12 | ver_diff="$(($(git rev-list origin/master..HEAD | wc -l)))" 13 | ver="$((localver-ver_diff))" 14 | echo "#define X264_REV $ver" 15 | echo "#define X264_REV_DIFF $ver_diff" 16 | if [ "$ver_diff" -ne 0 ] ; then 17 | ver="$ver+$ver_diff" 18 | fi 19 | if git status | grep -q "modified:" ; then 20 | ver="${ver}M" 21 | fi 22 | ver="$ver $(git rev-list -n 1 HEAD | cut -c 1-7)" 23 | version=" r$ver" 24 | fi 25 | fi 26 | 27 | echo "#define X264_VERSION \"$version\"" 28 | echo "#define X264_POINTVER \"0.$api.$ver\"" 29 | -------------------------------------------------------------------------------- /components/x264/config.h: -------------------------------------------------------------------------------- 1 | #define ARCH_X86_64 0 2 | #define STACK_ALIGNMENT 32 3 | #define HAVE_POSIXTHREAD 0 4 | #define HAVE_THREAD 0 5 | #define HAVE_LOG2F 1 6 | #define HAVE_STRTOK_R 0 7 | #define HAVE_MMAP 0 8 | #define HAVE_VECTOREXT 0 9 | #define fseek fseeko 10 | #define ftell ftello 11 | #define HAVE_BITDEPTH8 1 12 | #define HAVE_BITDEPTH10 0 13 | #define HAVE_GPL 0 14 | #define HAVE_INTERLACED 0 15 | #define HAVE_OPENCL 0 16 | #define HAVE_MALLOC_H 0 17 | #define HAVE_ALTIVEC 0 18 | #define HAVE_ALTIVEC_H 0 19 | #define HAVE_MMX 0 20 | #define HAVE_ARMV6 0 21 | #define HAVE_ARMV6T2 0 22 | #define HAVE_NEON 0 23 | #define HAVE_BEOSTHREAD 0 24 | #define HAVE_WIN32THREAD 0 25 | #define HAVE_SWSCALE 0 26 | #define HAVE_LAVF 0 27 | #define HAVE_FFMS 0 28 | #define HAVE_GPAC 0 29 | #define HAVE_AVS 0 30 | #define HAVE_CPU_COUNT 0 31 | #define HAVE_THP 0 32 | #define HAVE_LSMASH 0 33 | #define HAVE_X86_INLINE_ASM 0 34 | #define HAVE_AS_FUNC 0 35 | #define HAVE_INTEL_DISPATCHER 0 36 | #define HAVE_MSA 0 37 | #define HAVE_WINRT 0 38 | #define HAVE_VSX 0 39 | #define HAVE_ARM_INLINE_ASM 0 40 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/cltostr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Convert standard input to a C char array, write to a file, then create an 4 | # MD5 sum of that file and append said MD5 sum as char array to the file. 5 | 6 | [ -n "$1" ] || exit 1 7 | 8 | # Filter out whitespace, empty lines, and comments. 9 | sanitize() { 10 | sed 's/^[[:space:]]*//; /^$/d; /^\/\//d' 11 | } 12 | 13 | # Convert stdin to a \0-terminated char array. 14 | dump() { 15 | echo "static const char $1[] = {" 16 | od -v -A n -t x1 | sed 's/[[:space:]]*\([[:alnum:]]\{2\}\)/0x\1, /g' 17 | echo '0x00 };' 18 | } 19 | 20 | # Print MD5 hash w/o newline character to not embed the character in the array. 21 | hash() { 22 | # md5sum is not standard, so try different platform-specific alternatives. 23 | { md5sum "$1" || md5 -q "$1" || digest -a md5 "$1"; } 2>/dev/null | 24 | cut -b -32 | tr -d '\n\r' 25 | } 26 | 27 | trap 'rm -f "$1.temp"' EXIT 28 | 29 | sanitize | tee "$1.temp" | 30 | dump 'x264_opencl_source' > "$1" 31 | 32 | hash "$1.temp" | 33 | dump 'x264_opencl_source_hash' >> "$1" 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Maxim Kulkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.vms: -------------------------------------------------------------------------------- 1 | /* jconfig.vms --- jconfig.h for use on Digital VMS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #define TWO_FILE_COMMANDLINE /* Needed on VMS */ 33 | #undef NEED_SIGNAL_CATCHER 34 | #undef DONT_USE_B_MODE 35 | #undef PROGRESS_REPORT /* optional */ 36 | 37 | #endif /* JPEG_CJPEG_DJPEG */ 38 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.wat: -------------------------------------------------------------------------------- 1 | /* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #define CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in Watcom */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.dj: -------------------------------------------------------------------------------- 1 | /* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in DJGPP */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/errors.py: -------------------------------------------------------------------------------- 1 | """ 2 | Digress errors. 3 | """ 4 | 5 | class DigressError(Exception): 6 | """ 7 | Digress error base class. 8 | """ 9 | 10 | class NoSuchTestError(DigressError): 11 | """ 12 | Raised when no such test exists. 13 | """ 14 | 15 | class DisabledTestError(DigressError): 16 | """ 17 | Test is disabled. 18 | """ 19 | 20 | class SkippedTestError(DigressError): 21 | """ 22 | Test is marked as skipped. 23 | """ 24 | 25 | class DisabledCaseError(DigressError): 26 | """ 27 | Case is marked as disabled. 28 | """ 29 | 30 | class SkippedCaseError(DigressError): 31 | """ 32 | Case is marked as skipped. 33 | """ 34 | 35 | class FailedTestError(DigressError): 36 | """ 37 | Test failed. 38 | """ 39 | 40 | class ComparisonError(DigressError): 41 | """ 42 | Comparison failed. 43 | """ 44 | 45 | class IncomparableError(DigressError): 46 | """ 47 | Values cannot be compared. 48 | """ 49 | 50 | class AlreadyRunError(DigressError): 51 | """ 52 | Test/case has already been run. 53 | """ 54 | 55 | class SCMError(DigressError): 56 | """ 57 | Error occurred in SCM. 58 | """ 59 | def __init__(self, message): 60 | self.message = message.replace("\n", " ") 61 | 62 | def __str__(self): 63 | return self.message 64 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.sas: -------------------------------------------------------------------------------- 1 | /* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define NO_MKTEMP /* SAS C doesn't have mktemp() */ 25 | 26 | #define SHORTxSHORT_32 /* produces better DCT code with SAS C */ 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #define TWO_FILE_COMMANDLINE 39 | #define NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.cfg: -------------------------------------------------------------------------------- 1 | /* jconfig.cfg --- source file edited by configure script */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #undef HAVE_PROTOTYPES 5 | #undef HAVE_UNSIGNED_CHAR 6 | #undef HAVE_UNSIGNED_SHORT 7 | #undef void 8 | #undef const 9 | #undef CHAR_IS_UNSIGNED 10 | #undef HAVE_STDDEF_H 11 | #undef HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | /* Define this if you get warnings about undefined structures. */ 17 | #undef INCOMPLETE_TYPES_BROKEN 18 | 19 | #ifdef JPEG_INTERNALS 20 | 21 | #undef RIGHT_SHIFT_IS_UNSIGNED 22 | #undef INLINE 23 | /* These are for configuring the JPEG memory manager. */ 24 | #undef DEFAULT_MAX_MEM 25 | #undef NO_MKTEMP 26 | 27 | #endif /* JPEG_INTERNALS */ 28 | 29 | #ifdef JPEG_CJPEG_DJPEG 30 | 31 | #define BMP_SUPPORTED /* BMP image file format */ 32 | #define GIF_SUPPORTED /* GIF image file format */ 33 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 34 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 35 | #define TARGA_SUPPORTED /* Targa image file format */ 36 | 37 | #undef TWO_FILE_COMMANDLINE 38 | #undef NEED_SIGNAL_CATCHER 39 | #undef DONT_USE_B_MODE 40 | 41 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 42 | #undef PROGRESS_REPORT 43 | 44 | #endif /* JPEG_CJPEG_DJPEG */ 45 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.mac: -------------------------------------------------------------------------------- 1 | /* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ 23 | 24 | #define ALIGN_TYPE long /* Needed for 680x0 Macs */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define USE_CCOMMAND /* Command line reader for Macintosh */ 37 | #define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ 38 | 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.manx: -------------------------------------------------------------------------------- 1 | /* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define TWO_FILE_COMMANDLINE 37 | #define NEED_SIGNAL_CATCHER 38 | #undef DONT_USE_B_MODE 39 | #undef PROGRESS_REPORT /* optional */ 40 | 41 | #define signal_catcher _abort /* hack for Aztec C naming requirements */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #undef HAVE_PROTOTYPES 6 | #undef HAVE_UNSIGNED_CHAR 7 | #undef HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #undef HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | /* Define this if you get warnings about undefined structures. */ 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | #undef INLINE 24 | /* These are for configuring the JPEG memory manager. */ 25 | #undef DEFAULT_MAX_MEM 26 | #undef NO_MKTEMP 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #undef TWO_FILE_COMMANDLINE 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | 42 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 43 | #undef PROGRESS_REPORT 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/rdgif.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rdgif.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains routines to read input images in GIF format. 9 | * 10 | ***************************************************************************** 11 | * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * 12 | * the ability to read GIF files has been removed from the IJG distribution. * 13 | * Sorry about that. * 14 | ***************************************************************************** 15 | * 16 | * We are required to state that 17 | * "The Graphics Interchange Format(c) is the Copyright property of 18 | * CompuServe Incorporated. GIF(sm) is a Service Mark property of 19 | * CompuServe Incorporated." 20 | */ 21 | 22 | #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ 23 | 24 | #ifdef GIF_SUPPORTED 25 | 26 | /* 27 | * The module selection routine for GIF format input. 28 | */ 29 | 30 | GLOBAL(cjpeg_source_ptr) 31 | jinit_read_gif (j_compress_ptr cinfo) 32 | { 33 | fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); 34 | exit(EXIT_FAILURE); 35 | return NULL; /* keep compiler happy */ 36 | } 37 | 38 | #endif /* GIF_SUPPORTED */ 39 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/maktjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to jpegtran.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | jpegtran.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) 30 | libjpeg.lib ; built by libjpeg.prj 31 | pcstdlib.lib ; standard library 32 | pcextlib.lib ; extended library 33 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.st: -------------------------------------------------------------------------------- 1 | /* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define ALIGN_TYPE long /* apparently double is a weird size? */ 23 | 24 | #endif /* JPEG_INTERNALS */ 25 | 26 | #ifdef JPEG_CJPEG_DJPEG 27 | 28 | #define BMP_SUPPORTED /* BMP image file format */ 29 | #define GIF_SUPPORTED /* GIF image file format */ 30 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 31 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 32 | #define TARGA_SUPPORTED /* Targa image file format */ 33 | 34 | #define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ 35 | /* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define 36 | * USE_SETMODE. Some Atari compilers require it, some do not. 37 | */ 38 | #define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ 39 | #undef DONT_USE_B_MODE 40 | #undef PROGRESS_REPORT /* optional */ 41 | 42 | #endif /* JPEG_CJPEG_DJPEG */ 43 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/mc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mc.h: arm motion compensation 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2018 x264 project 5 | * 6 | * Authors: David Conrad 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ARM_MC_H 27 | #define X264_ARM_MC_H 28 | 29 | #define x264_mc_init_arm x264_template(mc_init_arm) 30 | void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/mips/mc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mc.h: msa motion compensation 3 | ***************************************************************************** 4 | * Copyright (C) 2015-2018 x264 project 5 | * 6 | * Authors: Neha Rana 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_MIPS_MC_H 27 | #define X264_MIPS_MC_H 28 | 29 | #define x264_mc_init_mips x264_template(mc_init_mips) 30 | void x264_mc_init_mips( int cpu, x264_mc_functions_t *pf ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/mc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mc.h: ppc motion compensation 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Eric Petit 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_PPC_MC_H 27 | #define X264_PPC_MC_H 28 | 29 | #define x264_mc_init_altivec x264_template(mc_init_altivec) 30 | void x264_mc_init_altivec( x264_mc_functions_t *pf ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/pixel.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pixel.h: ppc pixel metrics 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Eric Petit 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_PPC_PIXEL_H 27 | #define X264_PPC_PIXEL_H 28 | 29 | #define x264_pixel_init_altivec x264_template(pixel_init_altivec) 30 | void x264_pixel_init_altivec( x264_pixel_function_t *pixf ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/mc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mc.h: aarch64 motion compensation 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Janne Grunau 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_AARCH64_MC_H 27 | #define X264_AARCH64_MC_H 28 | 29 | #define x264_mc_init_aarch64 x264_template(mc_init_aarch64) 30 | void x264_mc_init_aarch64( int cpu, x264_mc_functions_t *pf ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.vc: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 19 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 20 | typedef unsigned char boolean; 21 | #endif 22 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 23 | 24 | 25 | #ifdef JPEG_INTERNALS 26 | 27 | #undef RIGHT_SHIFT_IS_UNSIGNED 28 | 29 | #endif /* JPEG_INTERNALS */ 30 | 31 | #ifdef JPEG_CJPEG_DJPEG 32 | 33 | #define BMP_SUPPORTED /* BMP image file format */ 34 | #define GIF_SUPPORTED /* GIF image file format */ 35 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 36 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 37 | #define TARGA_SUPPORTED /* Targa image file format */ 38 | 39 | #define TWO_FILE_COMMANDLINE /* optional */ 40 | #define USE_SETMODE /* Microsoft has setmode() */ 41 | #undef NEED_SIGNAL_CATCHER 42 | #undef DONT_USE_B_MODE 43 | #undef PROGRESS_REPORT /* optional */ 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/bitstream.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * bitstream.h: arm bitstream functions 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ARM_BITSTREAM_H 27 | #define X264_ARM_BITSTREAM_H 28 | 29 | #define x264_nal_escape_neon x264_template(nal_escape_neon) 30 | uint8_t *x264_nal_escape_neon( uint8_t *dst, uint8_t *src, uint8_t *end ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/x86/mc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mc.h: x86 motion compensation 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Loren Merritt 7 | * Laurent Aimar 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_X86_MC_H 28 | #define X264_X86_MC_H 29 | 30 | #define x264_mc_init_mmx x264_template(mc_init_mmx) 31 | void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf ); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/bitstream.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * bitstream.h: aarch64 bitstream functions 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_AARCH64_BITSTREAM_H 27 | #define X264_AARCH64_BITSTREAM_H 28 | 29 | #define x264_nal_escape_neon x264_template(nal_escape_neon) 30 | uint8_t *x264_nal_escape_neon( uint8_t *dst, uint8_t *src, uint8_t *end ); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/countquant_x264.pl: -------------------------------------------------------------------------------- 1 | #!/bin/env perl 2 | # countquant_x264.pl: displays statistics from x264 multipass logfiles 3 | # by Loren Merritt, 2005-4-5 4 | 5 | @size{I,P,B} = 6 | @n{I,P,B} = (0)x3; 7 | 8 | sub proc_file { 9 | my $fh = shift; 10 | while(<$fh>) { 11 | /type:(.) q:(\d+\.\d+) tex:(\d+) mv:(\d+) misc:(\d+)/ or next; 12 | $type = uc $1; 13 | $n{$type} ++; 14 | $q[int($2+.5)] ++; 15 | $avgq += $2; 16 | $avgq{$type} += $2; 17 | my $bytes = ($3+$4+$5)/8; 18 | $size{$type} += $bytes; 19 | } 20 | $size = $size{I} + $size{P} + $size{B}; 21 | $n = $n{I} + $n{P} + $n{B}; 22 | $n or die "unrecognized input\n"; 23 | } 24 | 25 | if(@ARGV) { 26 | foreach(@ARGV) { 27 | open $fh, "<", $_ or die "can't open '$_': $!"; 28 | proc_file($fh); 29 | } 30 | } else { 31 | proc_file(STDIN); 32 | } 33 | 34 | for(0..51) { 35 | $q[$_] or next; 36 | printf "q%2d: %6d %4.1f%%\n", $_, $q[$_], 100*$q[$_]/$n; 37 | } 38 | print "\n"; 39 | $digits = int(log($n+1)/log(10))+2; 40 | printf "All: %${digits}d %s avgQP:%5.2f avgBytes:%5d\n", 41 | $n, $n==$n{I}?" ":"", $avgq/$n, $size/$n; 42 | foreach(qw(I P B S)) { 43 | $n{$_} or next; 44 | printf "%s: %${digits}d (%4.1f%%) avgQP:%5.2f avgBytes:%5d\n", 45 | $_, $n{$_}, 100*$n{$_}/$n, $avgq{$_}/$n{$_}, $size{$_}/$n{$_}; 46 | } 47 | print "\n"; 48 | printf "total size: $size B = %.2f KiB = %.2f MiB\n", 49 | $size/2**10, $size/2**20; 50 | print "bitrate: ", join("\n = ", 51 | map sprintf("%.2f kbps @ %s fps", $_*$size*8/1000/$n, $_), 52 | 23.976, 25, 29.97), "\n"; 53 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/video/internal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * internal.h: video filter utilities 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_FILTER_VIDEO_INTERNAL_H 27 | #define X264_FILTER_VIDEO_INTERNAL_H 28 | 29 | #include "video.h" 30 | 31 | void x264_cli_plane_copy( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int w, int h ); 32 | int x264_cli_pic_copy( cli_pic_t *out, cli_pic_t *in ); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.bcc: -------------------------------------------------------------------------------- 1 | /* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #ifdef __MSDOS__ 15 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 16 | #endif 17 | #undef NEED_SHORT_EXTERNAL_NAMES 18 | #undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | 24 | #ifdef __MSDOS__ 25 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 26 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 27 | #define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ 28 | #endif 29 | 30 | #endif /* JPEG_INTERNALS */ 31 | 32 | #ifdef JPEG_CJPEG_DJPEG 33 | 34 | #define BMP_SUPPORTED /* BMP image file format */ 35 | #define GIF_SUPPORTED /* GIF image file format */ 36 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 37 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 38 | #define TARGA_SUPPORTED /* Targa image file format */ 39 | 40 | #define TWO_FILE_COMMANDLINE 41 | #define USE_SETMODE /* Borland has setmode() */ 42 | #ifdef __MSDOS__ 43 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 44 | #endif 45 | #undef DONT_USE_B_MODE 46 | #undef PROGRESS_REPORT /* optional */ 47 | 48 | #endif /* JPEG_CJPEG_DJPEG */ 49 | -------------------------------------------------------------------------------- /main/camera_session.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #define MAX_CAMERA_SESSIONS 4 8 | 9 | 10 | typedef enum { 11 | IP_VERSION_IPV4 = 0, 12 | IP_VERSION_IPV6 = 1 13 | } ip_version_t; 14 | 15 | 16 | typedef enum { 17 | SRTP_CRYPTO_AES_CM_128_HMAC_SHA1_80 = 0, 18 | SRTP_CRYPTO_AES_256_CM_HMAC_SHA1_80 = 1, 19 | SRTP_CRYPTO_DISABLED = 2 20 | } srtp_crypto_suite_t; 21 | 22 | 23 | typedef struct _camera_session_t { 24 | homekit_client_id_t client_id; 25 | 26 | char session_id[17]; 27 | uint8_t status; 28 | 29 | ip_version_t controller_ip_version; 30 | char *controller_ip_address; 31 | uint16_t controller_video_port; 32 | uint16_t controller_audio_port; 33 | 34 | srtp_crypto_suite_t srtp_video_crypto_suite; 35 | uint8_t srtp_video_master_key[33]; 36 | size_t srtp_video_master_key_size; 37 | uint8_t srtp_video_master_salt[15]; 38 | size_t srtp_video_master_salt_size; 39 | 40 | srtp_crypto_suite_t srtp_audio_crypto_suite; 41 | uint8_t srtp_audio_master_key[33]; 42 | size_t srtp_audio_master_key_size; 43 | uint8_t srtp_audio_master_salt[15]; 44 | size_t srtp_audio_master_salt_size; 45 | 46 | uint32_t video_ssrc; 47 | uint32_t audio_ssrc; 48 | 49 | uint8_t video_rtp_payload_type; 50 | uint16_t video_rtp_max_bitrate; 51 | float video_rtp_min_rtcp_interval; 52 | uint16_t video_rtp_max_mtu; 53 | 54 | bool active; 55 | bool started; 56 | 57 | struct _camera_session_t *next; 58 | } camera_session_t; 59 | 60 | 61 | camera_session_t *camera_session_new(); 62 | void camera_session_free(camera_session_t *session); 63 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/ansi2knr.1: -------------------------------------------------------------------------------- 1 | .TH ANSI2KNR 1 "19 Jan 1996" 2 | .SH NAME 3 | ansi2knr \- convert ANSI C to Kernighan & Ritchie C 4 | .SH SYNOPSIS 5 | .I ansi2knr 6 | [--varargs] input_file [output_file] 7 | .SH DESCRIPTION 8 | If no output_file is supplied, output goes to stdout. 9 | .br 10 | There are no error messages. 11 | .sp 12 | .I ansi2knr 13 | recognizes function definitions by seeing a non-keyword identifier at the left 14 | margin, followed by a left parenthesis, with a right parenthesis as the last 15 | character on the line, and with a left brace as the first token on the 16 | following line (ignoring possible intervening comments). It will recognize a 17 | multi-line header provided that no intervening line ends with a left or right 18 | brace or a semicolon. These algorithms ignore whitespace and comments, except 19 | that the function name must be the first thing on the line. 20 | .sp 21 | The following constructs will confuse it: 22 | .br 23 | - Any other construct that starts at the left margin and follows the 24 | above syntax (such as a macro or function call). 25 | .br 26 | - Some macros that tinker with the syntax of the function header. 27 | .sp 28 | The --varargs switch is obsolete, and is recognized only for 29 | backwards compatibility. The present version of 30 | .I ansi2knr 31 | will always attempt to convert a ... argument to va_alist and va_dcl. 32 | .SH AUTHOR 33 | L. Peter Deutsch wrote the original ansi2knr and 34 | continues to maintain the current version; most of the code in the current 35 | version is his work. ansi2knr also includes contributions by Francois 36 | Pinard and Jim Avera . 37 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/predict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * predict.h: ppc intra prediction 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 x264 project 5 | * 6 | * Authors: Guillaume Poirier 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_PPC_PREDICT_H 27 | #define X264_PPC_PREDICT_H 28 | 29 | #define x264_predict_16x16_init_altivec x264_template(predict_16x16_init_altivec) 30 | void x264_predict_16x16_init_altivec( x264_predict_t pf[7] ); 31 | #define x264_predict_8x8c_init_altivec x264_template(predict_8x8c_init_altivec) 32 | void x264_predict_8x8c_init_altivec( x264_predict_t pf[7] ); 33 | 34 | #endif /* X264_PPC_PREDICT_H */ 35 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/deblock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * deblock.h: ppc deblocking 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_PPC_DEBLOCK_H 27 | #define X264_PPC_DEBLOCK_H 28 | 29 | #define x264_deblock_v_luma_altivec x264_template(deblock_v_luma_altivec) 30 | void x264_deblock_v_luma_altivec( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 31 | #define x264_deblock_h_luma_altivec x264_template(deblock_h_luma_altivec) 32 | void x264_deblock_h_luma_altivec( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/encoder/rdo.inc: -------------------------------------------------------------------------------- 1 | static const uint8_t cabac_transition_5ones[128] = { 2 | 0, 1, 96, 3, 96, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 5, 3 | 100, 7, 100, 9, 100, 11, 100, 13, 100, 15, 100, 17, 102, 19, 102, 21, 4 | 102, 23, 102, 25, 102, 27, 102, 29, 102, 31, 102, 33, 102, 35, 102, 37, 5 | 102, 39, 102, 41, 104, 43, 104, 45, 104, 47, 104, 49, 108, 51, 108, 53, 6 | 108, 55, 108, 57, 108, 59, 108, 61, 108, 63, 108, 65, 112, 67, 112, 69, 7 | 112, 71, 112, 73, 112, 75, 112, 77, 116, 79, 116, 81, 116, 83, 116, 85, 8 | 118, 87, 118, 89, 118, 91, 122, 93, 122, 95, 124, 97, 124, 99, 126, 101, 9 | 126, 103, 127, 105, 127, 107, 125, 109, 125, 111, 123, 113, 121, 115, 119, 117, 10 | }; 11 | 12 | static const uint16_t cabac_size_5ones[128] = { 13 | 7601, 291, 4768, 291, 4749, 292, 4635, 293, 14 | 4616, 295, 4596, 297, 4558, 300, 4539, 302, 15 | 4520, 305, 4461, 307, 4442, 310, 4423, 312, 16 | 4384, 315, 4364, 318, 4250, 322, 4231, 325, 17 | 4212, 329, 4154, 333, 4135, 337, 4097, 341, 18 | 4019, 346, 3999, 351, 3980, 356, 3922, 362, 19 | 3903, 368, 3864, 374, 3730, 381, 3711, 388, 20 | 3672, 395, 3652, 403, 3538, 412, 3500, 421, 21 | 3481, 431, 3422, 441, 3383, 451, 3364, 462, 22 | 3230, 473, 3210, 485, 3076, 498, 3057, 512, 23 | 3018, 526, 2998, 542, 2883, 559, 2864, 577, 24 | 2730, 596, 2710, 616, 2633, 637, 2614, 659, 25 | 2460, 683, 2421, 709, 2402, 737, 2248, 767, 26 | 2229, 799, 2113, 833, 2056, 870, 1940, 910, 27 | 1902, 952, 1786, 998, 1767, 1048, 1671, 1101, 28 | 1652, 1159, 1576, 1223, 1502, 1293, 1433, 1369, 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* The legal range of a DCT coefficient is 14 | * -1024 .. +1023 for 8-bit data; 15 | * -16384 .. +16383 for 12-bit data. 16 | * Hence the magnitude should always fit in 10 or 14 bits respectively. 17 | */ 18 | 19 | #if BITS_IN_JSAMPLE == 8 20 | #define MAX_COEF_BITS 10 21 | #else 22 | #define MAX_COEF_BITS 14 23 | #endif 24 | 25 | /* Derived data constructed for each Huffman table */ 26 | 27 | typedef struct { 28 | unsigned int ehufco[256]; /* code for each symbol */ 29 | char ehufsi[256]; /* length of code for each symbol */ 30 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 31 | } c_derived_tbl; 32 | 33 | /* Short forms of external names for systems with brain-damaged linkers. */ 34 | 35 | #ifdef NEED_SHORT_EXTERNAL_NAMES 36 | #define jpeg_make_c_derived_tbl jMkCDerived 37 | #define jpeg_gen_optimal_table jGenOptTbl 38 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 39 | 40 | /* Expand a Huffman table definition into the derived format */ 41 | EXTERN(void) jpeg_make_c_derived_tbl 42 | JPP((j_compress_ptr cinfo, boolean isDC, int tblno, 43 | c_derived_tbl ** pdtbl)); 44 | 45 | /* Generate an optimal table definition given the specified counts */ 46 | EXTERN(void) jpeg_gen_optimal_table 47 | JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); 48 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/q_matrix_jvt.cfg: -------------------------------------------------------------------------------- 1 | # This an example configuration file for initializing the quantization matrix. 2 | # Altogether 6 matrices for 4x4 blocks and 2 matrix for 8x8 blocks. 3 | # The values range from 1 to 255. 4 | # If first value of matrix is equal to 0, default values ("JVT") will be used 5 | # for that matrix. 6 | # If a matrix is completely omitted, it will be filled with 16s. 7 | # 8 | # Note: JM expects CHROMAU and CHROMAV to be specified separately, whereas 9 | # x264 forces them to use the same matrix. If U and V are specified to have 10 | # different matrices, only the first is used. 11 | #################################################################################### 12 | 13 | INTRA4X4_LUMA = 14 | 6,13,20,28, 15 | 13,20,28,32, 16 | 20,28,32,37, 17 | 28,32,37,42 18 | 19 | INTRA4X4_CHROMAU = 20 | 6,13,20,28, 21 | 13,20,28,32, 22 | 20,28,32,37, 23 | 28,32,37,42 24 | 25 | INTRA4X4_CHROMAV = 26 | 6,13,20,28, 27 | 13,20,28,32, 28 | 20,28,32,37, 29 | 28,32,37,42 30 | 31 | INTER4X4_LUMA = 32 | 10,14,20,24, 33 | 14,20,24,27, 34 | 20,24,27,30, 35 | 24,27,30,34 36 | 37 | INTER4X4_CHROMAU = 38 | 10,14,20,24, 39 | 14,20,24,27, 40 | 20,24,27,30, 41 | 24,27,30,34 42 | 43 | INTER4X4_CHROMAV = 44 | 10,14,20,24, 45 | 14,20,24,27, 46 | 20,24,27,30, 47 | 24,27,30,34 48 | 49 | INTRA8X8_LUMA = 50 | 6,10,13,16,18,23,25,27, 51 | 10,11,16,18,23,25,27,29, 52 | 13,16,18,23,25,27,29,31, 53 | 16,18,23,25,27,29,31,33, 54 | 18,23,25,27,29,31,33,36, 55 | 23,25,27,29,31,33,36,38, 56 | 25,27,29,31,33,36,38,40, 57 | 27,29,31,33,36,38,40,42 58 | 59 | INTER8X8_LUMA = 60 | 9,13,15,17,19,21,22,24, 61 | 13,13,17,19,21,22,24,25, 62 | 15,17,19,21,22,24,25,27, 63 | 17,19,21,22,24,25,27,28, 64 | 19,21,22,24,25,27,28,30, 65 | 21,22,24,25,27,28,30,32, 66 | 22,24,25,27,28,30,32,33, 67 | 24,25,27,28,30,32,33,35 68 | 69 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/rdjpgcom.1: -------------------------------------------------------------------------------- 1 | .TH RDJPGCOM 1 "11 October 1997" 2 | .SH NAME 3 | rdjpgcom \- display text comments from a JPEG file 4 | .SH SYNOPSIS 5 | .B rdjpgcom 6 | [ 7 | .B \-verbose 8 | ] 9 | [ 10 | .I filename 11 | ] 12 | .LP 13 | .SH DESCRIPTION 14 | .LP 15 | .B rdjpgcom 16 | reads the named JPEG/JFIF file, or the standard input if no file is named, 17 | and prints any text comments found in the file on the standard output. 18 | .PP 19 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. 20 | Although the standard doesn't actually define what COM blocks are for, they 21 | are widely used to hold user-supplied text strings. This lets you add 22 | annotations, titles, index terms, etc to your JPEG files, and later retrieve 23 | them as text. COM blocks do not interfere with the image stored in the JPEG 24 | file. The maximum size of a COM block is 64K, but you can have as many of 25 | them as you like in one JPEG file. 26 | .SH OPTIONS 27 | .TP 28 | .B \-verbose 29 | Causes 30 | .B rdjpgcom 31 | to also display the JPEG image dimensions. 32 | .PP 33 | Switch names may be abbreviated, and are not case sensitive. 34 | .SH HINTS 35 | .B rdjpgcom 36 | does not depend on the IJG JPEG library. Its source code is intended as an 37 | illustration of the minimum amount of code required to parse a JPEG file 38 | header correctly. 39 | .PP 40 | In 41 | .B \-verbose 42 | mode, 43 | .B rdjpgcom 44 | will also attempt to print the contents of any "APP12" markers as text. 45 | Some digital cameras produce APP12 markers containing useful textual 46 | information. If you like, you can modify the source code to print 47 | other APPn marker types as well. 48 | .SH SEE ALSO 49 | .BR cjpeg (1), 50 | .BR djpeg (1), 51 | .BR jpegtran (1), 52 | .BR wrjpgcom (1) 53 | .SH AUTHOR 54 | Independent JPEG Group 55 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/asm-offsets.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * asm-offsets.h: asm offsets for aarch64 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Janne Grunau 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_AARCH64_ASM_OFFSETS_H 27 | #define X264_AARCH64_ASM_OFFSETS_H 28 | 29 | #define CABAC_I_LOW 0x00 30 | #define CABAC_I_RANGE 0x04 31 | #define CABAC_I_QUEUE 0x08 32 | #define CABAC_I_BYTES_OUTSTANDING 0x0c 33 | #define CABAC_P_START 0x10 34 | #define CABAC_P 0x18 35 | #define CABAC_P_END 0x20 36 | #define CABAC_F8_BITS_ENCODED 0x30 37 | #define CABAC_STATE 0x34 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jconfig.mc6: -------------------------------------------------------------------------------- 1 | /* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 23 | 24 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 25 | 26 | #define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ 27 | 28 | #define NEED_FHEAPMIN /* far heap management routines are broken */ 29 | 30 | #define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ 31 | /* Note: the above define is known to improve the code with Microsoft C 6.00A. 32 | * I do not know whether it is good for later compiler versions. 33 | * Please report any info on this point to jpeg-info@uunet.uu.net. 34 | */ 35 | 36 | #endif /* JPEG_INTERNALS */ 37 | 38 | #ifdef JPEG_CJPEG_DJPEG 39 | 40 | #define BMP_SUPPORTED /* BMP image file format */ 41 | #define GIF_SUPPORTED /* GIF image file format */ 42 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 43 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 44 | #define TARGA_SUPPORTED /* Targa image file format */ 45 | 46 | #define TWO_FILE_COMMANDLINE 47 | #define USE_SETMODE /* Microsoft has setmode() */ 48 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 49 | #undef DONT_USE_B_MODE 50 | #undef PROGRESS_REPORT /* optional */ 51 | 52 | #endif /* JPEG_CJPEG_DJPEG */ 53 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/opencl/weightp.cl: -------------------------------------------------------------------------------- 1 | /* Weightp filter a downscaled image into a temporary output buffer. 2 | * This kernel is launched once for each scale. 3 | * 4 | * Launch dimensions: width x height (in pixels) 5 | */ 6 | kernel void weightp_scaled_images( read_only image2d_t in_plane, 7 | write_only image2d_t out_plane, 8 | uint offset, 9 | uint scale, 10 | uint denom ) 11 | { 12 | int gx = get_global_id( 0 ); 13 | int gy = get_global_id( 1 ); 14 | uint4 input_val; 15 | uint4 output_val; 16 | 17 | input_val = read_imageui( in_plane, sampler, (int2)(gx, gy)); 18 | output_val = (uint4)(offset) + ( ( ((uint4)(scale)) * input_val ) >> ((uint4)(denom)) ); 19 | write_imageui( out_plane, (int2)(gx, gy), output_val ); 20 | } 21 | 22 | /* Weightp filter for the half-pel interpolated image 23 | * 24 | * Launch dimensions: width x height (in pixels) 25 | */ 26 | kernel void weightp_hpel( read_only image2d_t in_plane, 27 | write_only image2d_t out_plane, 28 | uint offset, 29 | uint scale, 30 | uint denom ) 31 | { 32 | int gx = get_global_id( 0 ); 33 | int gy = get_global_id( 1 ); 34 | uint input_val; 35 | uint output_val; 36 | 37 | input_val = read_imageui( in_plane, sampler, (int2)(gx, gy)).s0; 38 | //Unpack 39 | uint4 temp; 40 | temp.s0 = input_val & 0x00ff; temp.s1 = (input_val >> 8) & 0x00ff; 41 | temp.s2 = (input_val >> 16) & 0x00ff; temp.s3 = (input_val >> 24) & 0x00ff; 42 | 43 | temp = (uint4)(offset) + ( ( ((uint4)(scale)) * temp ) >> ((uint4)(denom)) ); 44 | 45 | //Pack 46 | output_val = temp.s0 | (temp.s1 << 8) | (temp.s2 << 16) | (temp.s3 << 24); 47 | write_imageui( out_plane, (int2)(gx, gy), output_val ); 48 | } 49 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/makcjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to cjpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | cjpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/makdjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to djpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | djpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/filters.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * filters.h: common filter functions 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Diogo Franco 7 | * Steven Walters 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_FILTERS_H 28 | #define X264_FILTERS_H 29 | 30 | #include "x264cli.h" 31 | #include "filters/video/video.h" 32 | 33 | char **x264_split_options( const char *opt_str, const char * const *options ); 34 | char *x264_get_option( const char *name, char **split_options ); 35 | int x264_otob( const char *str, int def ); // option to bool 36 | double x264_otof( const char *str, double def ); // option to float/double 37 | int x264_otoi( const char *str, int def ); // option to int 38 | char *x264_otos( char *str, char *def ); // option to string 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/common.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * common.c: misc common functions 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Loren Merritt 7 | * Laurent Aimar 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #include "common.h" 28 | 29 | /**************************************************************************** 30 | * x264_log: 31 | ****************************************************************************/ 32 | void x264_log( x264_t *h, int i_level, const char *psz_fmt, ... ) 33 | { 34 | if( !h || i_level <= h->param.i_log_level ) 35 | { 36 | va_list arg; 37 | va_start( arg, psz_fmt ); 38 | if( !h ) 39 | x264_log_default( NULL, i_level, psz_fmt, arg ); 40 | else 41 | h->param.pf_log( h->param.p_log_private, i_level, psz_fmt, arg ); 42 | va_end( arg ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/msvsdepend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Output a Makefile rule describing the dependencies of a given source file. 4 | # Expected arguments are $(CC) $(CFLAGS) $(SRC) $(OBJ) 5 | 6 | set -f 7 | 8 | [ -n "$1" ] && [ -n "$3" ] && [ -n "$4" ] || exit 1 9 | 10 | # Add flags to only perform syntax checking and output a list of included files 11 | # Discard all output other than included files 12 | # Convert '\' directory separators to '/' 13 | # Remove system includes (hack: check for "/Program Files" string in path) 14 | # Add the source file itself as a dependency 15 | deps="$($1 $2 -nologo -showIncludes -W0 -Zs "$3" 2>&1 | 16 | grep '^Note: including file:' | 17 | sed 's/^Note: including file:[[:space:]]*\(.*\)$/\1/; s/\\/\//g' | 18 | sed '/\/[Pp]rogram [Ff]iles/d') 19 | $3" 20 | 21 | # Convert Windows paths to Unix paths if possible 22 | if command -v cygpath >/dev/null 2>&1 ; then 23 | IFS=' 24 | ' 25 | deps="$(cygpath -u -- $deps)" 26 | elif grep -q 'Microsoft' /proc/sys/kernel/osrelease 2>/dev/null ; then 27 | # Running under WSL. We don't have access to cygpath but since the Windows 28 | # file system resides under "/mnt//" we can simply replace 29 | # "C:" with "/mnt/c". This command uses a GNU extension to sed but that's 30 | # available on WSL so we don't need to limit ourselves by what POSIX says. 31 | deps="$(printf '%s' "$deps" | sed 's/^\([a-zA-Z]\):/\/mnt\/\L\1/')" 32 | fi 33 | 34 | # Escape characters as required to create valid Makefile file names 35 | escape() { 36 | sed 's/ /\\ /g; s/#/\\#/g; s/\$/\$\$/g' 37 | } 38 | 39 | # Remove prefixes that are equal to the working directory 40 | # Sort and remove duplicate entries 41 | # Escape and collapse the dependencies into one line 42 | deps="$(printf '%s' "$deps" | 43 | sed "s/^$(pwd | sed 's/\//\\\//g')\///; s/^\.\///" | 44 | sort | uniq | 45 | escape | tr -s '\n\r' ' ' | sed 's/^ *\(.*\) $/\1/')" 46 | 47 | # Escape the target file name as well 48 | target="$(printf '%s' "$4" | escape)" 49 | 50 | printf '%s: %s\n' "$target" "$deps" 51 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/extras/intel_dispatcher.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * intel_dispatcher.h: intel compiler cpu dispatcher override 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_INTEL_DISPATCHER_H 27 | #define X264_INTEL_DISPATCHER_H 28 | 29 | /* Feature flags using _FEATURE_* defines from immintrin.h */ 30 | extern unsigned long long __intel_cpu_feature_indicator; 31 | extern unsigned long long __intel_cpu_feature_indicator_x; 32 | 33 | /* CPU vendor independent version of dispatcher */ 34 | void __intel_cpu_features_init_x( void ); 35 | 36 | static void x264_intel_dispatcher_override( void ) 37 | { 38 | if( __intel_cpu_feature_indicator & ~1ULL ) 39 | return; 40 | __intel_cpu_feature_indicator = 0; 41 | __intel_cpu_feature_indicator_x = 0; 42 | __intel_cpu_features_init_x(); 43 | __intel_cpu_feature_indicator = __intel_cpu_feature_indicator_x; 44 | } 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/x264dll.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * x264dll: x264 DLLMain for win32 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "common/base.h" 27 | #include 28 | 29 | /* Callback for our DLL so we can initialize pthread */ 30 | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) 31 | { 32 | #if PTW32_STATIC_LIB 33 | switch( fdwReason ) 34 | { 35 | case DLL_PROCESS_ATTACH: 36 | pthread_win32_process_attach_np(); 37 | 38 | case DLL_THREAD_ATTACH: 39 | pthread_win32_thread_attach_np(); 40 | break; 41 | 42 | case DLL_THREAD_DETACH: 43 | pthread_win32_thread_detach_np(); 44 | break; 45 | 46 | case DLL_PROCESS_DETACH: 47 | pthread_win32_thread_detach_np(); 48 | pthread_win32_process_detach_np(); 49 | break; 50 | } 51 | #endif 52 | 53 | return TRUE; 54 | } 55 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/comparers.py: -------------------------------------------------------------------------------- 1 | """ 2 | Digress comparers. 3 | """ 4 | 5 | from digress.errors import ComparisonError 6 | 7 | import os 8 | from itertools import imap, izip 9 | 10 | def compare_direct(value_a, value_b): 11 | if value_a != value_b: 12 | raise ComparisonError("%s is not %s" % (value_a, value_b)) 13 | 14 | def compare_pass(value_a, value_b): 15 | """ 16 | Always true, as long as the test is passed. 17 | """ 18 | 19 | def compare_tolerance(tolerance): 20 | def _compare_tolerance(value_a, value_b): 21 | if abs(value_a - value_b) > tolerance: 22 | raise ComparisonError("%s is not %s (tolerance: %s)" % ( 23 | value_a, 24 | value_b, 25 | tolerance 26 | )) 27 | return _compare_tolerance 28 | 29 | def compare_files(file_a, file_b): 30 | size_a = os.path.getsize(file_a) 31 | size_b = os.path.getsize(file_b) 32 | 33 | print file_a, file_b 34 | 35 | if size_a != size_b: 36 | raise ComparisonError("%s is not the same size as %s" % ( 37 | file_a, 38 | file_b 39 | )) 40 | 41 | BUFFER_SIZE = 8196 42 | 43 | offset = 0 44 | 45 | with open(file_a) as f_a: 46 | with open(file_b) as f_b: 47 | for chunk_a, chunk_b in izip( 48 | imap( 49 | lambda i: f_a.read(BUFFER_SIZE), 50 | xrange(size_a // BUFFER_SIZE + 1) 51 | ), 52 | imap( 53 | lambda i: f_b.read(BUFFER_SIZE), 54 | xrange(size_b // BUFFER_SIZE + 1) 55 | ) 56 | ): 57 | chunk_size = len(chunk_a) 58 | 59 | if chunk_a != chunk_b: 60 | for i in xrange(chunk_size): 61 | if chunk_a[i] != chunk_b[i]: 62 | raise ComparisonError("%s differs from %s at offset %d" % ( 63 | file_a, 64 | file_b, 65 | offset + i 66 | )) 67 | 68 | offset += chunk_size 69 | -------------------------------------------------------------------------------- /main/app_main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "config.h" 14 | #include "accessory.h" 15 | 16 | 17 | static void on_wifi_ready() { 18 | camera_accessory_init(); 19 | } 20 | 21 | 22 | static esp_err_t event_handler(void *ctx, system_event_t *event) { 23 | switch(event->event_id) { 24 | case SYSTEM_EVENT_STA_START: 25 | ESP_LOGI(TAG, "STA start"); 26 | esp_wifi_connect(); 27 | break; 28 | case SYSTEM_EVENT_STA_GOT_IP: 29 | ESP_LOGI(TAG, "WiFI ready"); 30 | 31 | camera_accessory_set_ip_address((ip4_addr_t){ 32 | .addr = event->event_info.got_ip.ip_info.ip.addr 33 | }); 34 | 35 | on_wifi_ready(); 36 | break; 37 | case SYSTEM_EVENT_STA_DISCONNECTED: 38 | ESP_LOGI(TAG, "STA disconnected"); 39 | esp_wifi_connect(); 40 | break; 41 | default: 42 | break; 43 | } 44 | return ESP_OK; 45 | } 46 | 47 | 48 | static void wifi_init() { 49 | tcpip_adapter_init(); 50 | ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL)); 51 | 52 | wifi_init_config_t wifi_init_config = WIFI_INIT_CONFIG_DEFAULT(); 53 | ESP_ERROR_CHECK(esp_wifi_init(&wifi_init_config)); 54 | ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); 55 | 56 | wifi_config_t wifi_config = { 57 | .sta = { 58 | .ssid = CONFIG_ESP_WIFI_SSID, 59 | .password = CONFIG_ESP_WIFI_PASSWORD, 60 | }, 61 | }; 62 | 63 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); 64 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); 65 | ESP_ERROR_CHECK(esp_wifi_start()); 66 | } 67 | 68 | 69 | void app_main(void) { 70 | // Initialize NVS 71 | esp_err_t ret = nvs_flash_init(); 72 | if (ret != ESP_OK) { 73 | ESP_ERROR_CHECK( nvs_flash_erase() ); 74 | ESP_ERROR_CHECK( nvs_flash_init() ); 75 | } 76 | 77 | wifi_init(); 78 | } 79 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/output/output.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * output.h: x264 file output modules 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Laurent Aimar 7 | * Loren Merritt 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_OUTPUT_H 28 | #define X264_OUTPUT_H 29 | 30 | #include "x264cli.h" 31 | 32 | typedef struct 33 | { 34 | int use_dts_compress; 35 | } cli_output_opt_t; 36 | 37 | typedef struct 38 | { 39 | int (*open_file)( char *psz_filename, hnd_t *p_handle, cli_output_opt_t *opt ); 40 | int (*set_param)( hnd_t handle, x264_param_t *p_param ); 41 | int (*write_headers)( hnd_t handle, x264_nal_t *p_nal ); 42 | int (*write_frame)( hnd_t handle, uint8_t *p_nal, int i_size, x264_picture_t *p_picture ); 43 | int (*close_file)( hnd_t handle, int64_t largest_pts, int64_t second_largest_pts ); 44 | } cli_output_t; 45 | 46 | extern const cli_output_t raw_output; 47 | extern const cli_output_t mkv_output; 48 | extern const cli_output_t mp4_output; 49 | extern const cli_output_t flv_output; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/asm-offsets.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * asm-offsets.c: check asm offsets for aarch64 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Janne Grunau 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "common/common.h" 27 | #include "asm-offsets.h" 28 | 29 | #define X264_CHECK_OFFSET(s, m, o) struct check_##s##_##m \ 30 | { \ 31 | int m_##m[2 * (offsetof(s, m) == o) - 1]; \ 32 | } 33 | 34 | X264_CHECK_OFFSET(x264_cabac_t, i_low, CABAC_I_LOW); 35 | X264_CHECK_OFFSET(x264_cabac_t, i_range, CABAC_I_RANGE); 36 | X264_CHECK_OFFSET(x264_cabac_t, i_queue, CABAC_I_QUEUE); 37 | X264_CHECK_OFFSET(x264_cabac_t, i_bytes_outstanding, CABAC_I_BYTES_OUTSTANDING); 38 | X264_CHECK_OFFSET(x264_cabac_t, p_start, CABAC_P_START); 39 | X264_CHECK_OFFSET(x264_cabac_t, p, CABAC_P); 40 | X264_CHECK_OFFSET(x264_cabac_t, p_end, CABAC_P_END); 41 | X264_CHECK_OFFSET(x264_cabac_t, f8_bits_encoded, CABAC_F8_BITS_ENCODED); 42 | X264_CHECK_OFFSET(x264_cabac_t, state, CABAC_STATE); 43 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/threadpool.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * threadpool.h: thread pooling 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_THREADPOOL_H 27 | #define X264_THREADPOOL_H 28 | 29 | typedef struct x264_threadpool_t x264_threadpool_t; 30 | 31 | #if HAVE_THREAD 32 | #define x264_threadpool_init x264_template(threadpool_init) 33 | int x264_threadpool_init( x264_threadpool_t **p_pool, int threads, 34 | void (*init_func)(void *), void *init_arg ); 35 | #define x264_threadpool_run x264_template(threadpool_run) 36 | void x264_threadpool_run( x264_threadpool_t *pool, void *(*func)(void *), void *arg ); 37 | #define x264_threadpool_wait x264_template(threadpool_wait) 38 | void *x264_threadpool_wait( x264_threadpool_t *pool, void *arg ); 39 | #define x264_threadpool_delete x264_template(threadpool_delete) 40 | void x264_threadpool_delete( x264_threadpool_t *pool ); 41 | #else 42 | #define x264_threadpool_init(p,t,f,a) -1 43 | #define x264_threadpool_run(p,f,a) 44 | #define x264_threadpool_wait(p,a) NULL 45 | #define x264_threadpool_delete(p) 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/quant.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * quant.h: ppc quantization 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 x264 project 5 | * 6 | * Authors: Guillaume Poirier 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_PPC_QUANT_H 27 | #define X264_PPC_QUANT_H 28 | 29 | #define x264_quant_4x4_altivec x264_template(quant_4x4_altivec) 30 | int x264_quant_4x4_altivec( int16_t dct[16], uint16_t mf[16], uint16_t bias[16] ); 31 | #define x264_quant_8x8_altivec x264_template(quant_8x8_altivec) 32 | int x264_quant_8x8_altivec( int16_t dct[64], uint16_t mf[64], uint16_t bias[64] ); 33 | 34 | #define x264_quant_4x4_dc_altivec x264_template(quant_4x4_dc_altivec) 35 | int x264_quant_4x4_dc_altivec( int16_t dct[16], int mf, int bias ); 36 | #define x264_quant_2x2_dc_altivec x264_template(quant_2x2_dc_altivec) 37 | int x264_quant_2x2_dc_altivec( int16_t dct[4], int mf, int bias ); 38 | 39 | #define x264_dequant_4x4_altivec x264_template(dequant_4x4_altivec) 40 | void x264_dequant_4x4_altivec( int16_t dct[16], int dequant_mf[6][16], int i_qp ); 41 | #define x264_dequant_8x8_altivec x264_template(dequant_8x8_altivec) 42 | void x264_dequant_8x8_altivec( int16_t dct[64], int dequant_mf[6][64], int i_qp ); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/rectangle.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rectangle.c: rectangle filling 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Fiona Glaser 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "common.h" 27 | 28 | #define CACHE_FUNC(name,size,width,height)\ 29 | static void macroblock_cache_##name##_##width##_##height( void *target, uint32_t val )\ 30 | {\ 31 | x264_macroblock_cache_rect( target, width*size, height, size, val );\ 32 | } 33 | 34 | #define CACHE_FUNCS(name,size)\ 35 | CACHE_FUNC(name,size,4,4)\ 36 | CACHE_FUNC(name,size,2,4)\ 37 | CACHE_FUNC(name,size,4,2)\ 38 | CACHE_FUNC(name,size,2,2)\ 39 | CACHE_FUNC(name,size,2,1)\ 40 | CACHE_FUNC(name,size,1,2)\ 41 | CACHE_FUNC(name,size,1,1)\ 42 | void (*x264_cache_##name##_func_table[10])(void *, uint32_t) =\ 43 | {\ 44 | macroblock_cache_##name##_1_1,\ 45 | macroblock_cache_##name##_2_1,\ 46 | macroblock_cache_##name##_1_2,\ 47 | macroblock_cache_##name##_2_2,\ 48 | NULL,\ 49 | macroblock_cache_##name##_4_2,\ 50 | NULL,\ 51 | macroblock_cache_##name##_2_4,\ 52 | NULL,\ 53 | macroblock_cache_##name##_4_4\ 54 | };\ 55 | 56 | CACHE_FUNCS(mv, 4) 57 | CACHE_FUNCS(mvd, 2) 58 | CACHE_FUNCS(ref, 1) 59 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/output/matroska_ebml.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * matroska_ebml.h: matroska muxer utilities 3 | ***************************************************************************** 4 | * Copyright (C) 2005-2018 x264 project 5 | * 6 | * Authors: Mike Matsnev 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_MATROSKA_EBML_H 27 | #define X264_MATROSKA_EBML_H 28 | 29 | /* Matroska display size units from the spec */ 30 | #define DS_PIXELS 0 31 | #define DS_CM 1 32 | #define DS_INCHES 2 33 | #define DS_ASPECT_RATIO 3 34 | 35 | typedef struct mk_writer mk_writer; 36 | 37 | mk_writer *mk_create_writer( const char *filename ); 38 | 39 | int mk_write_header( mk_writer *w, const char *writing_app, 40 | const char *codec_id, 41 | const void *codec_private, unsigned codec_private_size, 42 | int64_t default_frame_duration, 43 | int64_t timescale, 44 | unsigned width, unsigned height, 45 | unsigned d_width, unsigned d_height, int display_size_units, int stereo_mode ); 46 | 47 | int mk_start_frame( mk_writer *w ); 48 | int mk_add_frame_data( mk_writer *w, const void *data, unsigned size ); 49 | int mk_set_frame_flags( mk_writer *w, int64_t timestamp, int keyframe, int skippable ); 50 | int mk_close( mk_writer *w, int64_t last_delta ); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/AUTHORS: -------------------------------------------------------------------------------- 1 | # Contributors to x264 2 | # 3 | # The format of this file was inspired by the Linux kernel CREDITS file. 4 | # Authors are listed alphabetically. 5 | # 6 | # The fields are: name (N), email (E), web-address (W), CVS account login (C), 7 | # PGP key ID and fingerprint (P), description (D), and snail-mail address (S). 8 | 9 | N: Alex Izvorski 10 | E: aizvorski AT gmail DOT com 11 | D: x86 asm (sse2) 12 | 13 | N: Alex Wright 14 | E: alexw0885 AT gmail DOT com 15 | D: Motion estimation (subpel and mixed refs) 16 | D: B-RDO 17 | 18 | N: bobololo 19 | D: Avisynth input 20 | D: MP4 muxing 21 | 22 | N: Christian Heine 23 | E: sennindemokrit AT gmx DOT net 24 | D: x86 asm 25 | 26 | N: David Wolstencroft 27 | D: Altivec optimizations 28 | 29 | N: Eric Petit 30 | E: eric.petit AT lapsus DOT org 31 | C: titer 32 | D: Altivec asm 33 | D: BeOS and MacOS X ports. 34 | S: France 35 | 36 | N: Fiona Glaser 37 | E: fiona AT x264 DOT com 38 | D: Maintainer 39 | D: All areas of encoder analysis and algorithms 40 | D: Motion estimation, rate control, macroblock & frame decisions, RDO, etc 41 | D: x86 asm 42 | S: USA 43 | 44 | N: Gabriel Bouvigne 45 | E: bouvigne AT mp3-tech DOT org 46 | D: 2pass VBV 47 | 48 | N: Guillaume Poirier 49 | E: gpoirier CHEZ mplayerhq POINT hu 50 | D: Altivec optimizations 51 | S: Brittany, France 52 | 53 | N: Henrik Gramner 54 | E: henrik AT gramner DOT com 55 | D: 4:2:2 chroma subsampling, x86 asm, Windows improvements, bugfixes 56 | S: Sweden 57 | 58 | N: Laurent Aimar 59 | E: fenrir AT videolan DOT org 60 | C: fenrir 61 | D: Intial import, former maintainer 62 | D: x86 asm (mmx/mmx2) 63 | S: France 64 | 65 | N: Loren Merritt 66 | E: pengvado AT akuvian DOT org 67 | C: pengvado 68 | D: Maintainer 69 | D: All areas of encoder analysis and algorithms 70 | D: Motion estimation, rate control, macroblock & frame decisions, RDO, etc 71 | D: Multithreading 72 | D: x86 asm 73 | S: USA 74 | 75 | N: Mans Rullgard 76 | E: mru AT mansr DOT com 77 | C: mru 78 | D: Rate control 79 | S: Southampton, UK 80 | 81 | N: Michael Niedermayer 82 | E: michaelni AT gmx DOT at 83 | D: Rate control 84 | 85 | N: Mike Matsnev 86 | E: mike AT po DOT cs DOT msu DOT su 87 | D: Matroska muxing 88 | 89 | N: Min Chen 90 | E: chenm001 AT 163 DOT com 91 | C: chenm001 92 | D: Win32/VC 6.0 port 93 | D: gcc asm to nasm conversion 94 | S: China 95 | 96 | N: Radek Czyz 97 | E: radoslaw AT syskin DOT cjb DOT net 98 | D: Cached motion compensation 99 | 100 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/output/raw.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * raw.c: raw muxer 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Laurent Aimar 7 | * Loren Merritt 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #include "output.h" 28 | 29 | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_opt_t *opt ) 30 | { 31 | if( !strcmp( psz_filename, "-" ) ) 32 | *p_handle = stdout; 33 | else if( !(*p_handle = x264_fopen( psz_filename, "w+b" )) ) 34 | return -1; 35 | 36 | return 0; 37 | } 38 | 39 | static int set_param( hnd_t handle, x264_param_t *p_param ) 40 | { 41 | return 0; 42 | } 43 | 44 | static int write_headers( hnd_t handle, x264_nal_t *p_nal ) 45 | { 46 | int size = p_nal[0].i_payload + p_nal[1].i_payload + p_nal[2].i_payload; 47 | 48 | if( fwrite( p_nal[0].p_payload, size, 1, (FILE*)handle ) ) 49 | return size; 50 | return -1; 51 | } 52 | 53 | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_picture_t *p_picture ) 54 | { 55 | if( fwrite( p_nalu, i_size, 1, (FILE*)handle ) ) 56 | return i_size; 57 | return -1; 58 | } 59 | 60 | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest_pts ) 61 | { 62 | if( !handle || handle == stdout ) 63 | return 0; 64 | 65 | return fclose( (FILE*)handle ); 66 | } 67 | 68 | const cli_output_t raw_output = { open_file, set_param, write_headers, write_frame, close_file }; 69 | 70 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/encoder/slicetype-cl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * slicetype-cl.h: OpenCL slicetype decision code (lowres lookahead) 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ENCODER_SLICETYPE_CL_H 27 | #define X264_ENCODER_SLICETYPE_CL_H 28 | 29 | #define x264_opencl_lowres_init x264_template(opencl_lowres_init) 30 | int x264_opencl_lowres_init( x264_t *h, x264_frame_t *fenc, int lambda ); 31 | #define x264_opencl_motionsearch x264_template(opencl_motionsearch) 32 | int x264_opencl_motionsearch( x264_t *h, x264_frame_t **frames, int b, int ref, int b_islist1, int lambda, const x264_weight_t *w ); 33 | #define x264_opencl_finalize_cost x264_template(opencl_finalize_cost) 34 | int x264_opencl_finalize_cost( x264_t *h, int lambda, x264_frame_t **frames, int p0, int p1, int b, int dist_scale_factor ); 35 | #define x264_opencl_precalculate_frame_cost x264_template(opencl_precalculate_frame_cost) 36 | int x264_opencl_precalculate_frame_cost( x264_t *h, x264_frame_t **frames, int lambda, int p0, int p1, int b ); 37 | #define x264_opencl_flush x264_template(opencl_flush) 38 | void x264_opencl_flush( x264_t *h ); 39 | #define x264_opencl_slicetype_prep x264_template(opencl_slicetype_prep) 40 | void x264_opencl_slicetype_prep( x264_t *h, x264_frame_t **frames, int num_frames, int lambda ); 41 | #define x264_opencl_slicetype_end x264_template(opencl_slicetype_end) 42 | void x264_opencl_slicetype_end( x264_t *h ); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/video/internal.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * internal.c: video filter utilities 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "internal.h" 27 | 28 | #define FAIL_IF_ERROR( cond, ... ) FAIL_IF_ERR( cond, "x264", __VA_ARGS__ ) 29 | 30 | void x264_cli_plane_copy( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int w, int h ) 31 | { 32 | while( h-- ) 33 | { 34 | memcpy( dst, src, w ); 35 | dst += i_dst; 36 | src += i_src; 37 | } 38 | } 39 | 40 | int x264_cli_pic_copy( cli_pic_t *out, cli_pic_t *in ) 41 | { 42 | int csp = in->img.csp & X264_CSP_MASK; 43 | FAIL_IF_ERROR( x264_cli_csp_is_invalid( in->img.csp ), "invalid colorspace arg %d\n", in->img.csp ); 44 | FAIL_IF_ERROR( in->img.csp != out->img.csp || in->img.height != out->img.height 45 | || in->img.width != out->img.width, "incompatible frame properties\n" ); 46 | /* copy data */ 47 | out->duration = in->duration; 48 | out->pts = in->pts; 49 | out->opaque = in->opaque; 50 | 51 | for( int i = 0; i < out->img.planes; i++ ) 52 | { 53 | int height = in->img.height * x264_cli_csps[csp].height[i]; 54 | int width = in->img.width * x264_cli_csps[csp].width[i]; 55 | width *= x264_cli_csp_depth_factor( in->img.csp ); 56 | x264_cli_plane_copy( out->img.plane[i], out->img.stride[i], in->img.plane[i], 57 | in->img.stride[i], width, height ); 58 | } 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jcinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcinit.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains initialization logic for the JPEG compressor. 9 | * This routine is in charge of selecting the modules to be executed and 10 | * making an initialization call to each one. 11 | * 12 | * Logically, this code belongs in jcmaster.c. It's split out because 13 | * linking this routine implies linking the entire compression library. 14 | * For a transcoding-only application, we want to be able to use jcmaster.c 15 | * without linking in the whole library. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | 22 | 23 | /* 24 | * Master selection of compression modules. 25 | * This is done once at the start of processing an image. We determine 26 | * which modules will be used and give them appropriate initialization calls. 27 | */ 28 | 29 | GLOBAL(void) 30 | jinit_compress_master (j_compress_ptr cinfo) 31 | { 32 | /* Initialize master control (includes parameter checking/processing) */ 33 | jinit_c_master_control(cinfo, FALSE /* full compression */); 34 | 35 | /* Preprocessing */ 36 | if (! cinfo->raw_data_in) { 37 | jinit_color_converter(cinfo); 38 | jinit_downsampler(cinfo); 39 | jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); 40 | } 41 | /* Forward DCT */ 42 | jinit_forward_dct(cinfo); 43 | /* Entropy encoding: either Huffman or arithmetic coding. */ 44 | if (cinfo->arith_code) { 45 | ERREXIT(cinfo, JERR_ARITH_NOTIMPL); 46 | } else { 47 | if (cinfo->progressive_mode) { 48 | #ifdef C_PROGRESSIVE_SUPPORTED 49 | jinit_phuff_encoder(cinfo); 50 | #else 51 | ERREXIT(cinfo, JERR_NOT_COMPILED); 52 | #endif 53 | } else 54 | jinit_huff_encoder(cinfo); 55 | } 56 | 57 | /* Need a full-image coefficient buffer in any multi-pass mode. */ 58 | jinit_c_coef_controller(cinfo, 59 | (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); 60 | jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); 61 | 62 | jinit_marker_writer(cinfo); 63 | 64 | /* We can now tell the memory manager to allocate virtual arrays. */ 65 | (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 66 | 67 | /* Write the datastream header (SOI) immediately. 68 | * Frame and scan headers are postponed till later. 69 | * This lets application insert special markers after the SOI. 70 | */ 71 | (*cinfo->marker->write_file_header) (cinfo); 72 | } 73 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/encoder/analyse.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * analyse.h: macroblock analysis 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Laurent Aimar 7 | * Loren Merritt 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_ENCODER_ANALYSE_H 28 | #define X264_ENCODER_ANALYSE_H 29 | 30 | #define x264_analyse_init_costs x264_template(analyse_init_costs) 31 | int x264_analyse_init_costs( x264_t *h ); 32 | #define x264_analyse_free_costs x264_template(analyse_free_costs) 33 | void x264_analyse_free_costs( x264_t *h ); 34 | #define x264_analyse_weight_frame x264_template(analyse_weight_frame) 35 | void x264_analyse_weight_frame( x264_t *h, int end ); 36 | #define x264_macroblock_analyse x264_template(macroblock_analyse) 37 | void x264_macroblock_analyse( x264_t *h ); 38 | #define x264_slicetype_decide x264_template(slicetype_decide) 39 | void x264_slicetype_decide( x264_t *h ); 40 | 41 | #define x264_slicetype_analyse x264_template(slicetype_analyse) 42 | void x264_slicetype_analyse( x264_t *h, int intra_minigop ); 43 | 44 | #define x264_lookahead_init x264_template(lookahead_init) 45 | int x264_lookahead_init( x264_t *h, int i_slicetype_length ); 46 | #define x264_lookahead_is_empty x264_template(lookahead_is_empty) 47 | int x264_lookahead_is_empty( x264_t *h ); 48 | #define x264_lookahead_put_frame x264_template(lookahead_put_frame) 49 | void x264_lookahead_put_frame( x264_t *h, x264_frame_t *frame ); 50 | #define x264_lookahead_get_frames x264_template(lookahead_get_frames) 51 | void x264_lookahead_get_frames( x264_t *h ); 52 | #define x264_lookahead_delete x264_template(lookahead_delete) 53 | void x264_lookahead_delete( x264_t *h ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/mips/quant.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * quant.h: msa quantization and level-run 3 | ***************************************************************************** 4 | * Copyright (C) 2015-2018 x264 project 5 | * 6 | * Authors: Rishikesh More 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_MIPS_QUANT_H 27 | #define X264_MIPS_QUANT_H 28 | 29 | #define x264_dequant_4x4_msa x264_template(dequant_4x4_msa) 30 | void x264_dequant_4x4_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][16], 31 | int32_t i_qp ); 32 | #define x264_dequant_8x8_msa x264_template(dequant_8x8_msa) 33 | void x264_dequant_8x8_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][64], 34 | int32_t i_qp ); 35 | #define x264_dequant_4x4_dc_msa x264_template(dequant_4x4_dc_msa) 36 | void x264_dequant_4x4_dc_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][16], 37 | int32_t i_qp ); 38 | #define x264_quant_4x4_msa x264_template(quant_4x4_msa) 39 | int32_t x264_quant_4x4_msa( int16_t *p_dct, uint16_t *p_mf, uint16_t *p_bias ); 40 | #define x264_quant_4x4x4_msa x264_template(quant_4x4x4_msa) 41 | int32_t x264_quant_4x4x4_msa( int16_t p_dct[4][16], 42 | uint16_t pu_mf[16], uint16_t pu_bias[16] ); 43 | #define x264_quant_8x8_msa x264_template(quant_8x8_msa) 44 | int32_t x264_quant_8x8_msa( int16_t *p_dct, uint16_t *p_mf, uint16_t *p_bias ); 45 | #define x264_quant_4x4_dc_msa x264_template(quant_4x4_dc_msa) 46 | int32_t x264_quant_4x4_dc_msa( int16_t *p_dct, int32_t i_mf, int32_t i_bias ); 47 | #define x264_coeff_last64_msa x264_template(coeff_last64_msa) 48 | int32_t x264_coeff_last64_msa( int16_t *p_src ); 49 | #define x264_coeff_last16_msa x264_template(coeff_last16_msa) 50 | int32_t x264_coeff_last16_msa( int16_t *p_src ); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/bitstream-a.S: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * bitstream-a.S: arm bitstream functions 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Janne Grunau 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "asm.S" 27 | 28 | function nal_escape_neon 29 | push {r4-r5,lr} 30 | vmov.u8 q0, #0xff 31 | vmov.u8 q8, #4 32 | mov r3, #3 33 | subs lr, r1, r2 34 | beq 99f 35 | 0: 36 | cmn lr, #15 37 | blt 16f 38 | mov r1, r2 39 | b 100f 40 | 16: 41 | vld1.8 {q1}, [r1]! 42 | vext.8 q2, q0, q1, #14 43 | vext.8 q3, q0, q1, #15 44 | vcgt.u8 q11, q8, q1 45 | vceq.u8 q9, q2, #0 46 | vceq.u8 q10, q3, #0 47 | vand q9, q9, q11 48 | vand q9, q9, q10 49 | vshrn.u16 d22, q9, #4 50 | vmov ip, lr, d22 51 | orrs ip, ip, lr 52 | beq 16f 53 | mov lr, #-16 54 | 100: 55 | vmov.u8 r5, d1[6] 56 | vmov.u8 r4, d1[7] 57 | orr r5, r4, r5, lsl #8 58 | 101: 59 | ldrb r4, [r1, lr] 60 | orr ip, r4, r5, lsl #16 61 | cmp ip, #3 62 | bhi 102f 63 | strb r3, [r0], #1 64 | orr r5, r3, r5, lsl #8 65 | 102: 66 | adds lr, lr, #1 67 | strb r4, [r0], #1 68 | orr r5, r4, r5, lsl #8 69 | blt 101b 70 | subs lr, r1, r2 71 | lsr ip, r5, #8 72 | vmov.u8 d1[6], ip 73 | vmov.u8 d1[7], r5 74 | blt 0b 75 | 76 | pop {r4-r5,pc} 77 | 16: 78 | subs lr, r1, r2 79 | vst1.8 {q1}, [r0]! 80 | vmov q0, q1 81 | blt 0b 82 | 99: 83 | pop {r4-r5,pc} 84 | endfunc 85 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/x264cli.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * x264cli.h: x264cli common 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Laurent Aimar 7 | * Loren Merritt 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_CLI_H 28 | #define X264_CLI_H 29 | 30 | #include "common/base.h" 31 | 32 | /* In microseconds */ 33 | #define UPDATE_INTERVAL 250000 34 | 35 | typedef void *hnd_t; 36 | 37 | static inline uint64_t gcd( uint64_t a, uint64_t b ) 38 | { 39 | while( 1 ) 40 | { 41 | int64_t c = a % b; 42 | if( !c ) 43 | return b; 44 | a = b; 45 | b = c; 46 | } 47 | } 48 | 49 | static inline uint64_t lcm( uint64_t a, uint64_t b ) 50 | { 51 | return ( a / gcd( a, b ) ) * b; 52 | } 53 | 54 | static inline char *get_filename_extension( char *filename ) 55 | { 56 | char *ext = filename + strlen( filename ); 57 | while( *ext != '.' && ext > filename ) 58 | ext--; 59 | ext += *ext == '.'; 60 | return ext; 61 | } 62 | 63 | void x264_cli_log( const char *name, int i_level, const char *fmt, ... ); 64 | void x264_cli_printf( int i_level, const char *fmt, ... ); 65 | 66 | #ifdef _WIN32 67 | void x264_cli_set_console_title( const char *title ); 68 | int x264_ansi_filename( const char *filename, char *ansi_filename, int size, int create_file ); 69 | #else 70 | #define x264_cli_set_console_title( title ) 71 | #endif 72 | 73 | #define RETURN_IF_ERR( cond, name, ret, ... )\ 74 | do\ 75 | {\ 76 | if( cond )\ 77 | {\ 78 | x264_cli_log( name, X264_LOG_ERROR, __VA_ARGS__ );\ 79 | return ret;\ 80 | }\ 81 | } while( 0 ) 82 | 83 | #define FAIL_IF_ERR( cond, name, ... ) RETURN_IF_ERR( cond, name, -1, __VA_ARGS__ ) 84 | 85 | typedef enum 86 | { 87 | RANGE_AUTO = -1, 88 | RANGE_TV, 89 | RANGE_PC 90 | } range_enum; 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/bitstream-a.S: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * bitstream-a.S: aarch64 bitstream functions 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2018 x264 project 5 | * 6 | * Authors: Janne Grunau 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "asm.S" 27 | 28 | function nal_escape_neon, export=1 29 | movi v0.16b, #0xff 30 | movi v4.16b, #4 31 | mov w3, #3 32 | subs x6, x1, x2 33 | cbz x6, 99f 34 | 0: 35 | cmn x6, #15 36 | b.lt 16f 37 | mov x1, x2 38 | b 100f 39 | 16: 40 | ld1 {v1.16b}, [x1], #16 41 | ext v2.16b, v0.16b, v1.16b, #14 42 | ext v3.16b, v0.16b, v1.16b, #15 43 | cmhi v7.16b, v4.16b, v1.16b 44 | cmeq v5.16b, v2.16b, #0 45 | cmeq v6.16b, v3.16b, #0 46 | and v5.16b, v5.16b, v7.16b 47 | and v5.16b, v5.16b, v6.16b 48 | shrn v7.8b, v5.8h, #4 49 | mov x7, v7.d[0] 50 | cbz x7, 16f 51 | mov x6, #-16 52 | 100: 53 | umov w5, v0.b[14] 54 | umov w4, v0.b[15] 55 | orr w5, w4, w5, lsl #8 56 | 101: 57 | ldrb w4, [x1, x6] 58 | orr w9, w4, w5, lsl #16 59 | cmp w9, #3 60 | b.hi 102f 61 | strb w3, [x0], #1 62 | orr w5, w3, w5, lsl #8 63 | 102: 64 | adds x6, x6, #1 65 | strb w4, [x0], #1 66 | orr w5, w4, w5, lsl #8 67 | b.lt 101b 68 | subs x6, x1, x2 69 | lsr w9, w5, #8 70 | mov v0.b[14], w9 71 | mov v0.b[15], w5 72 | b.lt 0b 73 | 74 | ret 75 | 16: 76 | subs x6, x1, x2 77 | st1 {v1.16b}, [x0], #16 78 | mov v0.16b, v1.16b 79 | b.lt 0b 80 | 99: 81 | ret 82 | endfunc 83 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/x264res.rc: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * x264res.rc: windows resource file 3 | ***************************************************************************** 4 | * Copyright (C) 2012-2018 x264 project 5 | * 6 | * Authors: Henrik Gramner 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include 27 | #include 28 | #include "x264.h" 29 | 30 | #ifndef X264_REV 31 | #define X264_REV 0 32 | #define X264_REV_DIFF 0 33 | #endif 34 | 35 | #define str(s) #s 36 | #define xstr(s) str(s) 37 | 38 | VS_VERSION_INFO VERSIONINFO 39 | FILEVERSION 0, X264_BUILD, X264_REV, X264_REV_DIFF 40 | PRODUCTVERSION 0, X264_BUILD, X264_REV, X264_REV_DIFF 41 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 42 | #ifdef DEBUG 43 | FILEFLAGS VS_FF_DEBUG 44 | #else 45 | FILEFLAGS 0 46 | #endif 47 | FILEOS VOS_NT_WINDOWS32 /* Identical for x86-64 */ 48 | #ifdef DLL 49 | FILETYPE VFT_DLL 50 | #else 51 | FILETYPE VFT_APP 52 | #endif 53 | FILESUBTYPE VFT2_UNKNOWN 54 | BEGIN 55 | BLOCK "StringFileInfo" 56 | BEGIN 57 | BLOCK "040904B0" 58 | BEGIN 59 | VALUE "CompanyName", "x264 project" 60 | #ifdef DLL 61 | VALUE "FileDescription", "H.264 (MPEG-4 AVC) encoder library" 62 | #else 63 | VALUE "FileDescription", "H.264 (MPEG-4 AVC) encoder" 64 | #endif 65 | VALUE "FileVersion", X264_POINTVER 66 | VALUE "InternalName", "x264" 67 | VALUE "LegalCopyright", "Copyright (C) 2003-2018 x264 project" 68 | #ifdef DLL 69 | VALUE "OriginalFilename", "libx264-" xstr(X264_BUILD) ".dll" 70 | #else 71 | VALUE "OriginalFilename", "x264.exe" 72 | #endif 73 | VALUE "ProductName", "x264" 74 | VALUE "ProductVersion", X264_POINTVER 75 | END 76 | END 77 | 78 | BLOCK "VarFileInfo" 79 | BEGIN 80 | VALUE "Translation", 0x0409, 0x04B0 /* U.S. English (Unicode) */ 81 | END 82 | END 83 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/video/source.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * source.c: source video filter 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "video.h" 27 | 28 | /* This filter converts the demuxer API into the filtering API for video frames. 29 | * Backseeking is prohibited here as not all demuxers are capable of doing so. */ 30 | 31 | typedef struct 32 | { 33 | cli_pic_t pic; 34 | hnd_t hin; 35 | int cur_frame; 36 | } source_hnd_t; 37 | 38 | cli_vid_filter_t source_filter; 39 | 40 | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x264_param_t *param, char *opt_string ) 41 | { 42 | source_hnd_t *h = calloc( 1, sizeof(source_hnd_t) ); 43 | if( !h ) 44 | return -1; 45 | h->cur_frame = -1; 46 | 47 | if( cli_input.picture_alloc( &h->pic, *handle, info->csp, info->width, info->height ) ) 48 | return -1; 49 | 50 | h->hin = *handle; 51 | *handle = h; 52 | *filter = source_filter; 53 | 54 | return 0; 55 | } 56 | 57 | static int get_frame( hnd_t handle, cli_pic_t *output, int frame ) 58 | { 59 | source_hnd_t *h = handle; 60 | /* do not allow requesting of frames from before the current position */ 61 | if( frame <= h->cur_frame || cli_input.read_frame( &h->pic, h->hin, frame ) ) 62 | return -1; 63 | h->cur_frame = frame; 64 | *output = h->pic; 65 | return 0; 66 | } 67 | 68 | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame ) 69 | { 70 | source_hnd_t *h = handle; 71 | if( cli_input.release_frame && cli_input.release_frame( &h->pic, h->hin ) ) 72 | return -1; 73 | return 0; 74 | } 75 | 76 | static void free_filter( hnd_t handle ) 77 | { 78 | source_hnd_t *h = handle; 79 | cli_input.picture_clean( &h->pic, h->hin ); 80 | cli_input.close_file( h->hin ); 81 | free( h ); 82 | } 83 | 84 | cli_vid_filter_t source_filter = { "source", NULL, init, get_frame, release_frame, free_filter, NULL }; 85 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/video/video.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * video.c: video filters 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #include "video.h" 27 | 28 | static cli_vid_filter_t *first_filter = NULL; 29 | 30 | static void register_vid_filter( cli_vid_filter_t *new_filter ) 31 | { 32 | cli_vid_filter_t *filter_i = first_filter; 33 | while( filter_i->next ) 34 | filter_i = filter_i->next; 35 | filter_i->next = new_filter; 36 | new_filter->next = NULL; 37 | } 38 | 39 | #define REGISTER_VFILTER(name)\ 40 | {\ 41 | extern cli_vid_filter_t name##_filter;\ 42 | register_vid_filter( &name##_filter );\ 43 | } 44 | 45 | void x264_register_vid_filters( void ) 46 | { 47 | extern cli_vid_filter_t source_filter; 48 | first_filter = &source_filter; 49 | #if HAVE_BITDEPTH8 50 | REGISTER_VFILTER( cache_8 ); 51 | REGISTER_VFILTER( depth_8 ); 52 | #endif 53 | #if HAVE_BITDEPTH10 54 | REGISTER_VFILTER( cache_10 ); 55 | REGISTER_VFILTER( depth_10 ); 56 | #endif 57 | REGISTER_VFILTER( crop ); 58 | REGISTER_VFILTER( fix_vfr_pts ); 59 | REGISTER_VFILTER( resize ); 60 | REGISTER_VFILTER( select_every ); 61 | #if HAVE_GPL 62 | #endif 63 | } 64 | 65 | int x264_init_vid_filter( const char *name, hnd_t *handle, cli_vid_filter_t *filter, 66 | video_info_t *info, x264_param_t *param, char *opt_string ) 67 | { 68 | cli_vid_filter_t *filter_i = first_filter; 69 | while( filter_i && strcasecmp( name, filter_i->name ) ) 70 | filter_i = filter_i->next; 71 | FAIL_IF_ERR( !filter_i, "x264", "invalid filter `%s'\n", name ); 72 | if( filter_i->init( handle, filter, info, param, opt_string ) ) 73 | return -1; 74 | 75 | return 0; 76 | } 77 | 78 | void x264_vid_filter_help( int longhelp ) 79 | { 80 | for( cli_vid_filter_t *filter_i = first_filter; filter_i; filter_i = filter_i->next ) 81 | if( filter_i->help ) 82 | filter_i->help( longhelp ); 83 | } 84 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/mips/deblock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * deblock.h: msa deblocking 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_MIPS_DEBLOCK_H 27 | #define X264_MIPS_DEBLOCK_H 28 | 29 | #if !HIGH_BIT_DEPTH 30 | #define x264_deblock_v_luma_msa x264_template(deblock_v_luma_msa) 31 | void x264_deblock_v_luma_msa( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 32 | #define x264_deblock_h_luma_msa x264_template(deblock_h_luma_msa) 33 | void x264_deblock_h_luma_msa( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 34 | #define x264_deblock_v_chroma_msa x264_template(deblock_v_chroma_msa) 35 | void x264_deblock_v_chroma_msa( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 36 | #define x264_deblock_h_chroma_msa x264_template(deblock_h_chroma_msa) 37 | void x264_deblock_h_chroma_msa( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 38 | #define x264_deblock_v_luma_intra_msa x264_template(deblock_v_luma_intra_msa) 39 | void x264_deblock_v_luma_intra_msa( uint8_t *pix, intptr_t stride, int alpha, int beta ); 40 | #define x264_deblock_h_luma_intra_msa x264_template(deblock_h_luma_intra_msa) 41 | void x264_deblock_h_luma_intra_msa( uint8_t *pix, intptr_t stride, int alpha, int beta ); 42 | #define x264_deblock_v_chroma_intra_msa x264_template(deblock_v_chroma_intra_msa) 43 | void x264_deblock_v_chroma_intra_msa( uint8_t *pix, intptr_t stride, int alpha, int beta ); 44 | #define x264_deblock_h_chroma_intra_msa x264_template(deblock_h_chroma_intra_msa) 45 | void x264_deblock_h_chroma_intra_msa( uint8_t *pix, intptr_t stride, int alpha, int beta ); 46 | #define x264_deblock_strength_msa x264_template(deblock_strength_msa) 47 | void x264_deblock_strength_msa( uint8_t nnz[X264_SCAN8_SIZE], int8_t ref[2][X264_SCAN8_LUMA_SIZE], 48 | int16_t mv[2][X264_SCAN8_LUMA_SIZE][2], uint8_t bs[2][8][4], int mvy_limit, 49 | int bframe ); 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/filters/video/video.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * video.h: video filters 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_FILTER_VIDEO_H 27 | #define X264_FILTER_VIDEO_H 28 | 29 | #include "input/input.h" 30 | #include "filters/filters.h" 31 | 32 | typedef struct cli_vid_filter_t cli_vid_filter_t; 33 | 34 | struct cli_vid_filter_t 35 | { 36 | /* name of the filter */ 37 | const char *name; 38 | /* help: a short message on what the filter does and how to use it. 39 | * this should only be implemented by filters directly accessible by the user */ 40 | void (*help)( int longhelp ); 41 | /* init: initializes the filter given the input clip properties and parameter to adjust them as necessary 42 | * with the given options provided by the user. 43 | * returns 0 on success, nonzero on error. */ 44 | int (*init)( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x264_param_t *param, char *opt_string ); 45 | /* get_frame: given the storage for the output frame and desired frame number, generate the frame accordingly. 46 | * the image data returned by get_frame should be treated as const and not be altered. 47 | * returns 0 on success, nonzero on error. */ 48 | int (*get_frame)( hnd_t handle, cli_pic_t *output, int frame ); 49 | /* release_frame: frame is done being used and is signaled for cleanup. 50 | * returns 0 on succeess, nonzero on error. */ 51 | int (*release_frame)( hnd_t handle, cli_pic_t *pic, int frame ); 52 | /* free: run filter cleanup procedures. */ 53 | void (*free)( hnd_t handle ); 54 | /* next registered filter, unused by filters themselves */ 55 | cli_vid_filter_t *next; 56 | }; 57 | 58 | void x264_register_vid_filters( void ); 59 | void x264_vid_filter_help( int longhelp ); 60 | int x264_init_vid_filter( const char *name, hnd_t *handle, cli_vid_filter_t *filter, 61 | video_info_t *info, x264_param_t *param, char *opt_string ); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/cpu.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * cpu.h: cpu detection 3 | ***************************************************************************** 4 | * Copyright (C) 2004-2018 x264 project 5 | * 6 | * Authors: Loren Merritt 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_CPU_H 27 | #define X264_CPU_H 28 | 29 | uint32_t x264_cpu_detect( void ); 30 | int x264_cpu_num_processors( void ); 31 | void x264_cpu_emms( void ); 32 | void x264_cpu_sfence( void ); 33 | #if HAVE_MMX 34 | /* There is no way to forbid the compiler from using float instructions 35 | * before the emms so miscompilation could theoretically occur in the 36 | * unlikely event that the compiler reorders emms and float instructions. */ 37 | #if HAVE_X86_INLINE_ASM 38 | /* Clobbering memory makes the compiler less likely to reorder code. */ 39 | #define x264_emms() asm volatile( "emms":::"memory","st","st(1)","st(2)", \ 40 | "st(3)","st(4)","st(5)","st(6)","st(7)" ) 41 | #else 42 | #define x264_emms() x264_cpu_emms() 43 | #endif 44 | #else 45 | #define x264_emms() 46 | #endif 47 | #define x264_sfence x264_cpu_sfence 48 | 49 | /* kludge: 50 | * gcc can't give variables any greater alignment than the stack frame has. 51 | * We need 32 byte alignment for AVX2, so here we make sure that the stack is 52 | * aligned to 32 bytes. 53 | * gcc 4.2 introduced __attribute__((force_align_arg_pointer)) to fix this 54 | * problem, but I don't want to require such a new version. 55 | * aligning to 32 bytes only works if the compiler supports keeping that 56 | * alignment between functions (osdep.h handles manual alignment of arrays 57 | * if it doesn't). 58 | */ 59 | #if HAVE_MMX && (STACK_ALIGNMENT > 16 || (ARCH_X86 && STACK_ALIGNMENT > 4)) 60 | intptr_t x264_stack_align( void (*func)(), ... ); 61 | #define x264_stack_align(func,...) x264_stack_align((void (*)())func, __VA_ARGS__) 62 | #else 63 | #define x264_stack_align(func,...) func(__VA_ARGS__) 64 | #endif 65 | 66 | typedef struct 67 | { 68 | const char *name; 69 | uint32_t flags; 70 | } x264_cpu_name_t; 71 | extern const x264_cpu_name_t x264_cpu_names[]; 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/wrjpgcom.1: -------------------------------------------------------------------------------- 1 | .TH WRJPGCOM 1 "15 June 1995" 2 | .SH NAME 3 | wrjpgcom \- insert text comments into a JPEG file 4 | .SH SYNOPSIS 5 | .B wrjpgcom 6 | [ 7 | .B \-replace 8 | ] 9 | [ 10 | .BI \-comment " text" 11 | ] 12 | [ 13 | .BI \-cfile " name" 14 | ] 15 | [ 16 | .I filename 17 | ] 18 | .LP 19 | .SH DESCRIPTION 20 | .LP 21 | .B wrjpgcom 22 | reads the named JPEG/JFIF file, or the standard input if no file is named, 23 | and generates a new JPEG/JFIF file on standard output. A comment block is 24 | added to the file. 25 | .PP 26 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. 27 | Although the standard doesn't actually define what COM blocks are for, they 28 | are widely used to hold user-supplied text strings. This lets you add 29 | annotations, titles, index terms, etc to your JPEG files, and later retrieve 30 | them as text. COM blocks do not interfere with the image stored in the JPEG 31 | file. The maximum size of a COM block is 64K, but you can have as many of 32 | them as you like in one JPEG file. 33 | .PP 34 | .B wrjpgcom 35 | adds a COM block, containing text you provide, to a JPEG file. 36 | Ordinarily, the COM block is added after any existing COM blocks; but you 37 | can delete the old COM blocks if you wish. 38 | .SH OPTIONS 39 | Switch names may be abbreviated, and are not case sensitive. 40 | .TP 41 | .B \-replace 42 | Delete any existing COM blocks from the file. 43 | .TP 44 | .BI \-comment " text" 45 | Supply text for new COM block on command line. 46 | .TP 47 | .BI \-cfile " name" 48 | Read text for new COM block from named file. 49 | .PP 50 | If you have only one line of comment text to add, you can provide it on the 51 | command line with 52 | .BR \-comment . 53 | The comment text must be surrounded with quotes so that it is treated as a 54 | single argument. Longer comments can be read from a text file. 55 | .PP 56 | If you give neither 57 | .B \-comment 58 | nor 59 | .BR \-cfile , 60 | then 61 | .B wrjpgcom 62 | will read the comment text from standard input. (In this case an input image 63 | file name MUST be supplied, so that the source JPEG file comes from somewhere 64 | else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file 65 | indicator (usually control-D) to terminate the comment text entry. 66 | .PP 67 | .B wrjpgcom 68 | will not add a COM block if the provided comment string is empty. Therefore 69 | \fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. 70 | .SH EXAMPLES 71 | .LP 72 | Add a short comment to in.jpg, producing out.jpg: 73 | .IP 74 | .B wrjpgcom \-c 75 | \fI"View of my back yard" in.jpg 76 | .B > 77 | .I out.jpg 78 | .PP 79 | Attach a long comment previously stored in comment.txt: 80 | .IP 81 | .B wrjpgcom 82 | .I in.jpg 83 | .B < 84 | .I comment.txt 85 | .B > 86 | .I out.jpg 87 | .PP 88 | or equivalently 89 | .IP 90 | .B wrjpgcom 91 | .B -cfile 92 | .I comment.txt 93 | .B < 94 | .I in.jpg 95 | .B > 96 | .I out.jpg 97 | .SH SEE ALSO 98 | .BR cjpeg (1), 99 | .BR djpeg (1), 100 | .BR jpegtran (1), 101 | .BR rdjpgcom (1) 102 | .SH AUTHOR 103 | Independent JPEG Group 104 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/win32thread.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * win32thread.h: windows threading 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2018 x264 project 5 | * 6 | * Authors: Steven Walters 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_WIN32THREAD_H 27 | #define X264_WIN32THREAD_H 28 | 29 | #include 30 | /* the following macro is used within x264 */ 31 | #undef ERROR 32 | 33 | typedef struct 34 | { 35 | void *handle; 36 | void *(*func)( void* arg ); 37 | void *arg; 38 | void **p_ret; 39 | void *ret; 40 | } x264_pthread_t; 41 | #define x264_pthread_attr_t int 42 | 43 | /* the conditional variable api for windows 6.0+ uses critical sections and not mutexes */ 44 | typedef CRITICAL_SECTION x264_pthread_mutex_t; 45 | #define X264_PTHREAD_MUTEX_INITIALIZER {0} 46 | #define x264_pthread_mutexattr_t int 47 | 48 | #if HAVE_WINRT 49 | typedef CONDITION_VARIABLE x264_pthread_cond_t; 50 | #else 51 | typedef struct 52 | { 53 | void *Ptr; 54 | } x264_pthread_cond_t; 55 | #endif 56 | #define x264_pthread_condattr_t int 57 | 58 | int x264_pthread_create( x264_pthread_t *thread, const x264_pthread_attr_t *attr, 59 | void *(*start_routine)( void* ), void *arg ); 60 | int x264_pthread_join( x264_pthread_t thread, void **value_ptr ); 61 | 62 | int x264_pthread_mutex_init( x264_pthread_mutex_t *mutex, const x264_pthread_mutexattr_t *attr ); 63 | int x264_pthread_mutex_destroy( x264_pthread_mutex_t *mutex ); 64 | int x264_pthread_mutex_lock( x264_pthread_mutex_t *mutex ); 65 | int x264_pthread_mutex_unlock( x264_pthread_mutex_t *mutex ); 66 | 67 | int x264_pthread_cond_init( x264_pthread_cond_t *cond, const x264_pthread_condattr_t *attr ); 68 | int x264_pthread_cond_destroy( x264_pthread_cond_t *cond ); 69 | int x264_pthread_cond_broadcast( x264_pthread_cond_t *cond ); 70 | int x264_pthread_cond_wait( x264_pthread_cond_t *cond, x264_pthread_mutex_t *mutex ); 71 | int x264_pthread_cond_signal( x264_pthread_cond_t *cond ); 72 | 73 | #define x264_pthread_attr_init(a) 0 74 | #define x264_pthread_attr_destroy(a) 0 75 | 76 | int x264_win32_threading_init( void ); 77 | void x264_win32_threading_destroy( void ); 78 | 79 | int x264_pthread_num_processors_np( void ); 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/x86/const-a.asm: -------------------------------------------------------------------------------- 1 | ;***************************************************************************** 2 | ;* const-a.asm: x86 global constants 3 | ;***************************************************************************** 4 | ;* Copyright (C) 2010-2018 x264 project 5 | ;* 6 | ;* Authors: Loren Merritt 7 | ;* Fiona Glaser 8 | ;* 9 | ;* This program is free software; you can redistribute it and/or modify 10 | ;* it under the terms of the GNU General Public License as published by 11 | ;* the Free Software Foundation; either version 2 of the License, or 12 | ;* (at your option) any later version. 13 | ;* 14 | ;* This program is distributed in the hope that it will be useful, 15 | ;* but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;* GNU General Public License for more details. 18 | ;* 19 | ;* You should have received a copy of the GNU General Public License 20 | ;* along with this program; if not, write to the Free Software 21 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | ;* 23 | ;* This program is also available under a commercial proprietary license. 24 | ;* For more information, contact us at licensing@x264.com. 25 | ;***************************************************************************** 26 | 27 | %include "x86inc.asm" 28 | 29 | SECTION_RODATA 32 30 | 31 | const pb_1, times 32 db 1 32 | const hsub_mul, times 16 db 1, -1 33 | const pw_1, times 16 dw 1 34 | const pw_16, times 16 dw 16 35 | const pw_32, times 16 dw 32 36 | const pw_512, times 16 dw 512 37 | const pw_00ff, times 16 dw 0x00ff 38 | const pw_pixel_max,times 16 dw ((1 << BIT_DEPTH)-1) 39 | const pw_0to15, dw 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 40 | const pd_1, times 8 dd 1 41 | const pd_0123, dd 0,1,2,3 42 | const pd_4567, dd 4,5,6,7 43 | const deinterleave_shufd, dd 0,4,1,5,2,6,3,7 44 | const pb_unpackbd1, times 2 db 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3 45 | const pb_unpackbd2, times 2 db 4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7 46 | 47 | const pb_01, times 8 db 0,1 48 | const pb_0, times 16 db 0 49 | const pb_a1, times 16 db 0xa1 50 | const pb_3, times 16 db 3 51 | const pb_shuf8x8c, db 0,0,0,0,2,2,2,2,4,4,4,4,6,6,6,6 52 | 53 | const pw_2, times 8 dw 2 54 | const pw_m2, times 8 dw -2 55 | const pw_4, times 8 dw 4 56 | const pw_8, times 8 dw 8 57 | const pw_64, times 8 dw 64 58 | const pw_256, times 8 dw 256 59 | const pw_32_0, times 4 dw 32, 60 | times 4 dw 0 61 | const pw_8000, times 8 dw 0x8000 62 | const pw_3fff, times 8 dw 0x3fff 63 | const pw_ppppmmmm, dw 1,1,1,1,-1,-1,-1,-1 64 | const pw_ppmmppmm, dw 1,1,-1,-1,1,1,-1,-1 65 | const pw_pmpmpmpm, dw 1,-1,1,-1,1,-1,1,-1 66 | const pw_pmmpzzzz, dw 1,-1,-1,1,0,0,0,0 67 | 68 | const pd_8, times 4 dd 8 69 | const pd_32, times 4 dd 32 70 | const pd_1024, times 4 dd 1024 71 | const pd_ffff, times 4 dd 0xffff 72 | const pw_ff00, times 8 dw 0xff00 73 | 74 | const popcnt_table 75 | %assign x 0 76 | %rep 256 77 | ; population count 78 | db ((x>>0)&1)+((x>>1)&1)+((x>>2)&1)+((x>>3)&1)+((x>>4)&1)+((x>>5)&1)+((x>>6)&1)+((x>>7)&1) 79 | %assign x x+1 80 | %endrep 81 | 82 | const sw_64, dd 64 83 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/tools/digress/scm/git.py: -------------------------------------------------------------------------------- 1 | """ 2 | Git SCM backend for Digress. 3 | """ 4 | 5 | from subprocess import Popen, PIPE, STDOUT 6 | import re 7 | 8 | from digress.errors import SCMError 9 | 10 | GIT_BRANCH_EXPR = re.compile("[*] (.*)") 11 | 12 | def checkout(revision): 13 | """ 14 | Checkout a revision from git. 15 | """ 16 | proc = Popen([ 17 | "git", 18 | "checkout", 19 | "-f", 20 | revision 21 | ], stdout=PIPE, stderr=STDOUT) 22 | 23 | output = proc.communicate()[0].strip() 24 | if proc.returncode != 0: 25 | raise SCMError("checkout error: %s" % output) 26 | 27 | def rev_parse(ref): 28 | proc = Popen([ 29 | "git", 30 | "rev-parse", 31 | ref 32 | ], stdout=PIPE, stderr=STDOUT) 33 | 34 | output = proc.communicate()[0].strip() 35 | if proc.returncode != 0: 36 | raise SCMError("rev-parse error: %s" % output) 37 | return output 38 | 39 | def current_rev(): 40 | """ 41 | Get the current revision. 42 | """ 43 | return rev_parse("HEAD") 44 | 45 | def current_branch(): 46 | """ 47 | Get the current branch. 48 | """ 49 | proc = Popen([ 50 | "git", 51 | "branch", 52 | "--no-color" 53 | ], stdout=PIPE, stderr=STDOUT) 54 | 55 | output = proc.communicate()[0].strip() 56 | if proc.returncode != 0: 57 | raise SCMError("branch error: %s" % output) 58 | branch_name = GIT_BRANCH_EXPR.findall(output)[0] 59 | return branch_name != "(no branch)" and branch_name or None 60 | 61 | def revisions(rev_a, rev_b): 62 | """ 63 | Get a list of revisions from one to another. 64 | """ 65 | proc = Popen([ 66 | "git", 67 | "log", 68 | "--format=%H", ("%s...%s" % (rev_a, rev_b)) 69 | ], stdout=PIPE, stderr=STDOUT) 70 | 71 | output = proc.communicate()[0].strip() 72 | if proc.returncode != 0: 73 | raise SCMError("log error: %s" % output) 74 | return output.split("\n") 75 | 76 | def stash(): 77 | """ 78 | Stash the repository. 79 | """ 80 | proc = Popen([ 81 | "git", 82 | "stash", 83 | "save", 84 | "--keep-index" 85 | ], stdout=PIPE, stderr=STDOUT) 86 | 87 | output = proc.communicate()[0].strip() 88 | if proc.returncode != 0: 89 | raise SCMError("stash error: %s" % output) 90 | 91 | def unstash(): 92 | """ 93 | Unstash the repository. 94 | """ 95 | proc = Popen(["git", "stash", "pop"], stdout=PIPE, stderr=STDOUT) 96 | proc.communicate() 97 | 98 | def bisect(*args): 99 | """ 100 | Perform a bisection. 101 | """ 102 | proc = Popen((["git", "bisect"] + list(args)), stdout=PIPE, stderr=STDOUT) 103 | output = proc.communicate()[0] 104 | if proc.returncode != 0: 105 | raise SCMError("bisect error: %s" % output) 106 | return output 107 | 108 | def dirty(): 109 | """ 110 | Check if the working tree is dirty. 111 | """ 112 | proc = Popen(["git", "status"], stdout=PIPE, stderr=STDOUT) 113 | output = proc.communicate()[0].strip() 114 | if proc.returncode != 0: 115 | raise SCMError("status error: %s" % output) 116 | if "modified:" in output: 117 | return True 118 | else: 119 | return False 120 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jmemnobs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jmemnobs.c 3 | * 4 | * Copyright (C) 1992-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file provides a really simple implementation of the system- 9 | * dependent portion of the JPEG memory manager. This implementation 10 | * assumes that no backing-store files are needed: all required space 11 | * can be obtained from malloc(). 12 | * This is very portable in the sense that it'll compile on almost anything, 13 | * but you'd better have lots of main memory (or virtual memory) if you want 14 | * to process big images. 15 | * Note that the max_memory_to_use option is ignored by this implementation. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | #include "jmemsys.h" /* import the system-dependent declarations */ 22 | 23 | #ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ 24 | extern void * malloc JPP((size_t size)); 25 | extern void free JPP((void *ptr)); 26 | #endif 27 | 28 | 29 | /* 30 | * Memory allocation and freeing are controlled by the regular library 31 | * routines malloc() and free(). 32 | */ 33 | 34 | GLOBAL(void *) 35 | jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) 36 | { 37 | return (void *) malloc(sizeofobject); 38 | } 39 | 40 | GLOBAL(void) 41 | jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) 42 | { 43 | free(object); 44 | } 45 | 46 | 47 | /* 48 | * "Large" objects are treated the same as "small" ones. 49 | * NB: although we include FAR keywords in the routine declarations, 50 | * this file won't actually work in 80x86 small/medium model; at least, 51 | * you probably won't be able to process useful-size images in only 64KB. 52 | */ 53 | 54 | GLOBAL(void FAR *) 55 | jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) 56 | { 57 | return (void FAR *) malloc(sizeofobject); 58 | } 59 | 60 | GLOBAL(void) 61 | jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) 62 | { 63 | free(object); 64 | } 65 | 66 | 67 | /* 68 | * This routine computes the total memory space available for allocation. 69 | * Here we always say, "we got all you want bud!" 70 | */ 71 | 72 | GLOBAL(long) 73 | jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, 74 | long max_bytes_needed, long already_allocated) 75 | { 76 | return max_bytes_needed; 77 | } 78 | 79 | 80 | /* 81 | * Backing store (temporary file) management. 82 | * Since jpeg_mem_available always promised the moon, 83 | * this should never be called and we can just error out. 84 | */ 85 | 86 | GLOBAL(void) 87 | jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, 88 | long total_bytes_needed) 89 | { 90 | ERREXIT(cinfo, JERR_NO_BACKING_STORE); 91 | } 92 | 93 | 94 | /* 95 | * These routines take care of any system-dependent initialization and 96 | * cleanup required. Here, there isn't any. 97 | */ 98 | 99 | GLOBAL(long) 100 | jpeg_mem_init (j_common_ptr cinfo) 101 | { 102 | return 0; /* just set max_memory_to_use to 0 */ 103 | } 104 | 105 | GLOBAL(void) 106 | jpeg_mem_term (j_common_ptr cinfo) 107 | { 108 | /* no work */ 109 | } 110 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/dct.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dct.h: transform and zigzag 3 | ***************************************************************************** 4 | * Copyright (C) 2004-2018 x264 project 5 | * 6 | * Authors: Loren Merritt 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_DCT_H 27 | #define X264_DCT_H 28 | 29 | typedef struct 30 | { 31 | // pix1 stride = FENC_STRIDE 32 | // pix2 stride = FDEC_STRIDE 33 | // p_dst stride = FDEC_STRIDE 34 | void (*sub4x4_dct) ( dctcoef dct[16], pixel *pix1, pixel *pix2 ); 35 | void (*add4x4_idct)( pixel *p_dst, dctcoef dct[16] ); 36 | 37 | void (*sub8x8_dct) ( dctcoef dct[4][16], pixel *pix1, pixel *pix2 ); 38 | void (*sub8x8_dct_dc) ( dctcoef dct[4], pixel *pix1, pixel *pix2 ); 39 | void (*add8x8_idct) ( pixel *p_dst, dctcoef dct[4][16] ); 40 | void (*add8x8_idct_dc)( pixel *p_dst, dctcoef dct[4] ); 41 | 42 | void (*sub8x16_dct_dc)( dctcoef dct[8], pixel *pix1, pixel *pix2 ); 43 | 44 | void (*sub16x16_dct) ( dctcoef dct[16][16], pixel *pix1, pixel *pix2 ); 45 | void (*add16x16_idct) ( pixel *p_dst, dctcoef dct[16][16] ); 46 | void (*add16x16_idct_dc)( pixel *p_dst, dctcoef dct[16] ); 47 | 48 | void (*sub8x8_dct8) ( dctcoef dct[64], pixel *pix1, pixel *pix2 ); 49 | void (*add8x8_idct8)( pixel *p_dst, dctcoef dct[64] ); 50 | 51 | void (*sub16x16_dct8) ( dctcoef dct[4][64], pixel *pix1, pixel *pix2 ); 52 | void (*add16x16_idct8)( pixel *p_dst, dctcoef dct[4][64] ); 53 | 54 | void (*dct4x4dc) ( dctcoef d[16] ); 55 | void (*idct4x4dc)( dctcoef d[16] ); 56 | 57 | void (*dct2x4dc)( dctcoef dct[8], dctcoef dct4x4[8][16] ); 58 | 59 | } x264_dct_function_t; 60 | 61 | typedef struct 62 | { 63 | void (*scan_8x8)( dctcoef level[64], dctcoef dct[64] ); 64 | void (*scan_4x4)( dctcoef level[16], dctcoef dct[16] ); 65 | int (*sub_8x8) ( dctcoef level[64], const pixel *p_src, pixel *p_dst ); 66 | int (*sub_4x4) ( dctcoef level[16], const pixel *p_src, pixel *p_dst ); 67 | int (*sub_4x4ac)( dctcoef level[16], const pixel *p_src, pixel *p_dst, dctcoef *dc ); 68 | void (*interleave_8x8_cavlc)( dctcoef *dst, dctcoef *src, uint8_t *nnz ); 69 | 70 | } x264_zigzag_function_t; 71 | 72 | #define x264_dct_init x264_template(dct_init) 73 | void x264_dct_init( int cpu, x264_dct_function_t *dctf ); 74 | #define x264_zigzag_init x264_template(zigzag_init) 75 | void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf_progressive, x264_zigzag_function_t *pf_interlaced ); 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/mips/dct.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dct.h: msa transform and zigzag 3 | ***************************************************************************** 4 | * Copyright (C) 2015-2018 x264 project 5 | * 6 | * Authors: Rishikesh More 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_MIPS_DCT_H 27 | #define X264_MIPS_DCT_H 28 | 29 | #define x264_dct4x4dc_msa x264_template(dct4x4dc_msa) 30 | void x264_dct4x4dc_msa( int16_t d[16] ); 31 | #define x264_idct4x4dc_msa x264_template(idct4x4dc_msa) 32 | void x264_idct4x4dc_msa( int16_t d[16] ); 33 | #define x264_add4x4_idct_msa x264_template(add4x4_idct_msa) 34 | void x264_add4x4_idct_msa( uint8_t *p_dst, int16_t pi_dct[16] ); 35 | #define x264_add8x8_idct_msa x264_template(add8x8_idct_msa) 36 | void x264_add8x8_idct_msa( uint8_t *p_dst, int16_t pi_dct[4][16] ); 37 | #define x264_add16x16_idct_msa x264_template(add16x16_idct_msa) 38 | void x264_add16x16_idct_msa( uint8_t *p_dst, int16_t pi_dct[16][16] ); 39 | #define x264_add8x8_idct8_msa x264_template(add8x8_idct8_msa) 40 | void x264_add8x8_idct8_msa( uint8_t *p_dst, int16_t pi_dct[64] ); 41 | #define x264_add16x16_idct8_msa x264_template(add16x16_idct8_msa) 42 | void x264_add16x16_idct8_msa( uint8_t *p_dst, int16_t pi_dct[4][64] ); 43 | #define x264_add8x8_idct_dc_msa x264_template(add8x8_idct_dc_msa) 44 | void x264_add8x8_idct_dc_msa( uint8_t *p_dst, int16_t pi_dct[4] ); 45 | #define x264_add16x16_idct_dc_msa x264_template(add16x16_idct_dc_msa) 46 | void x264_add16x16_idct_dc_msa( uint8_t *p_dst, int16_t pi_dct[16] ); 47 | #define x264_sub4x4_dct_msa x264_template(sub4x4_dct_msa) 48 | void x264_sub4x4_dct_msa( int16_t p_dst[16], uint8_t *p_src, uint8_t *p_ref ); 49 | #define x264_sub8x8_dct_msa x264_template(sub8x8_dct_msa) 50 | void x264_sub8x8_dct_msa( int16_t p_dst[4][16], uint8_t *p_src, 51 | uint8_t *p_ref ); 52 | #define x264_sub16x16_dct_msa x264_template(sub16x16_dct_msa) 53 | void x264_sub16x16_dct_msa( int16_t p_dst[16][16], uint8_t *p_src, 54 | uint8_t *p_ref ); 55 | #define x264_sub8x8_dct_dc_msa x264_template(sub8x8_dct_dc_msa) 56 | void x264_sub8x8_dct_dc_msa( int16_t pi_dct[4], uint8_t *p_pix1, 57 | uint8_t *p_pix2 ); 58 | #define x264_sub8x16_dct_dc_msa x264_template(sub8x16_dct_dc_msa) 59 | void x264_sub8x16_dct_dc_msa( int16_t pi_dct[8], uint8_t *p_pix1, 60 | uint8_t *p_pix2 ); 61 | #define x264_zigzag_scan_4x4_frame_msa x264_template(zigzag_scan_4x4_frame_msa) 62 | void x264_zigzag_scan_4x4_frame_msa( int16_t pi_level[16], int16_t pi_dct[16] ); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jinclude.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jinclude.h 3 | * 4 | * Copyright (C) 1991-1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file exists to provide a single place to fix any problems with 9 | * including the wrong system include files. (Common problems are taken 10 | * care of by the standard jconfig symbols, but on really weird systems 11 | * you may have to edit this file.) 12 | * 13 | * NOTE: this file is NOT intended to be included by applications using the 14 | * JPEG library. Most applications need only include jpeglib.h. 15 | */ 16 | 17 | 18 | /* Include auto-config file to find out which system include files we need. */ 19 | 20 | #include "jconfig.h" /* auto configuration options */ 21 | #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ 22 | 23 | /* 24 | * We need the NULL macro and size_t typedef. 25 | * On an ANSI-conforming system it is sufficient to include . 26 | * Otherwise, we get them from or ; we may have to 27 | * pull in as well. 28 | * Note that the core JPEG library does not require ; 29 | * only the default error handler and data source/destination modules do. 30 | * But we must pull it in because of the references to FILE in jpeglib.h. 31 | * You can remove those references if you want to compile without . 32 | */ 33 | 34 | #ifdef HAVE_STDDEF_H 35 | #include 36 | #endif 37 | 38 | #ifdef HAVE_STDLIB_H 39 | #include 40 | #endif 41 | 42 | #ifdef NEED_SYS_TYPES_H 43 | #include 44 | #endif 45 | 46 | #include 47 | 48 | /* 49 | * We need memory copying and zeroing functions, plus strncpy(). 50 | * ANSI and System V implementations declare these in . 51 | * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). 52 | * Some systems may declare memset and memcpy in . 53 | * 54 | * NOTE: we assume the size parameters to these functions are of type size_t. 55 | * Change the casts in these macros if not! 56 | */ 57 | 58 | #ifdef NEED_BSD_STRINGS 59 | 60 | #include 61 | #define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) 62 | #define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) 63 | 64 | #else /* not BSD, assume ANSI/SysV string lib */ 65 | 66 | #include 67 | #define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) 68 | #define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) 69 | 70 | #endif 71 | 72 | /* 73 | * In ANSI C, and indeed any rational implementation, size_t is also the 74 | * type returned by sizeof(). However, it seems there are some irrational 75 | * implementations out there, in which sizeof() returns an int even though 76 | * size_t is defined as long or unsigned long. To ensure consistent results 77 | * we always use this SIZEOF() macro in place of using sizeof() directly. 78 | */ 79 | 80 | #define SIZEOF(object) ((size_t) sizeof(object)) 81 | 82 | /* 83 | * The modules that use fread() and fwrite() always invoke them through 84 | * these macros. On some systems you may need to twiddle the argument casts. 85 | * CAUTION: argument order is different from underlying functions! 86 | */ 87 | 88 | #define JFREAD(file,buf,sizeofbuf) \ 89 | ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 90 | #define JFWRITE(file,buf,sizeofbuf) \ 91 | ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 92 | -------------------------------------------------------------------------------- /components/libjpeg/jpeg-6b/jcomapi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcomapi.c 3 | * 4 | * Copyright (C) 1994-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains application interface routines that are used for both 9 | * compression and decompression. 10 | */ 11 | 12 | #define JPEG_INTERNALS 13 | #include "jinclude.h" 14 | #include "jpeglib.h" 15 | 16 | 17 | /* 18 | * Abort processing of a JPEG compression or decompression operation, 19 | * but don't destroy the object itself. 20 | * 21 | * For this, we merely clean up all the nonpermanent memory pools. 22 | * Note that temp files (virtual arrays) are not allowed to belong to 23 | * the permanent pool, so we will be able to close all temp files here. 24 | * Closing a data source or destination, if necessary, is the application's 25 | * responsibility. 26 | */ 27 | 28 | GLOBAL(void) 29 | jpeg_abort (j_common_ptr cinfo) 30 | { 31 | int pool; 32 | 33 | /* Do nothing if called on a not-initialized or destroyed JPEG object. */ 34 | if (cinfo->mem == NULL) 35 | return; 36 | 37 | /* Releasing pools in reverse order might help avoid fragmentation 38 | * with some (brain-damaged) malloc libraries. 39 | */ 40 | for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { 41 | (*cinfo->mem->free_pool) (cinfo, pool); 42 | } 43 | 44 | /* Reset overall state for possible reuse of object */ 45 | if (cinfo->is_decompressor) { 46 | cinfo->global_state = DSTATE_START; 47 | /* Try to keep application from accessing now-deleted marker list. 48 | * A bit kludgy to do it here, but this is the most central place. 49 | */ 50 | ((j_decompress_ptr) cinfo)->marker_list = NULL; 51 | } else { 52 | cinfo->global_state = CSTATE_START; 53 | } 54 | } 55 | 56 | 57 | /* 58 | * Destruction of a JPEG object. 59 | * 60 | * Everything gets deallocated except the master jpeg_compress_struct itself 61 | * and the error manager struct. Both of these are supplied by the application 62 | * and must be freed, if necessary, by the application. (Often they are on 63 | * the stack and so don't need to be freed anyway.) 64 | * Closing a data source or destination, if necessary, is the application's 65 | * responsibility. 66 | */ 67 | 68 | GLOBAL(void) 69 | jpeg_destroy (j_common_ptr cinfo) 70 | { 71 | /* We need only tell the memory manager to release everything. */ 72 | /* NB: mem pointer is NULL if memory mgr failed to initialize. */ 73 | if (cinfo->mem != NULL) 74 | (*cinfo->mem->self_destruct) (cinfo); 75 | cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ 76 | cinfo->global_state = 0; /* mark it destroyed */ 77 | } 78 | 79 | 80 | /* 81 | * Convenience routines for allocating quantization and Huffman tables. 82 | * (Would jutils.c be a more reasonable place to put these?) 83 | */ 84 | 85 | GLOBAL(JQUANT_TBL *) 86 | jpeg_alloc_quant_table (j_common_ptr cinfo) 87 | { 88 | JQUANT_TBL *tbl; 89 | 90 | tbl = (JQUANT_TBL *) 91 | (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); 92 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 93 | return tbl; 94 | } 95 | 96 | 97 | GLOBAL(JHUFF_TBL *) 98 | jpeg_alloc_huff_table (j_common_ptr cinfo) 99 | { 100 | JHUFF_TBL *tbl; 101 | 102 | tbl = (JHUFF_TBL *) 103 | (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); 104 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 105 | return tbl; 106 | } 107 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/encoder/set.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * set.h: header writing 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Laurent Aimar 7 | * Loren Merritt 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_ENCODER_SET_H 28 | #define X264_ENCODER_SET_H 29 | 30 | #define x264_sps_init x264_template(sps_init) 31 | void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param ); 32 | #define x264_sps_init_reconfigurable x264_template(sps_init_reconfigurable) 33 | void x264_sps_init_reconfigurable( x264_sps_t *sps, x264_param_t *param ); 34 | #define x264_sps_write x264_template(sps_write) 35 | void x264_sps_write( bs_t *s, x264_sps_t *sps ); 36 | #define x264_pps_init x264_template(pps_init) 37 | void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t *sps ); 38 | #define x264_pps_write x264_template(pps_write) 39 | void x264_pps_write( bs_t *s, x264_sps_t *sps, x264_pps_t *pps ); 40 | #define x264_sei_recovery_point_write x264_template(sei_recovery_point_write) 41 | void x264_sei_recovery_point_write( x264_t *h, bs_t *s, int recovery_frame_cnt ); 42 | #define x264_sei_version_write x264_template(sei_version_write) 43 | int x264_sei_version_write( x264_t *h, bs_t *s ); 44 | #define x264_validate_levels x264_template(validate_levels) 45 | int x264_validate_levels( x264_t *h, int verbose ); 46 | #define x264_sei_buffering_period_write x264_template(sei_buffering_period_write) 47 | void x264_sei_buffering_period_write( x264_t *h, bs_t *s ); 48 | #define x264_sei_pic_timing_write x264_template(sei_pic_timing_write) 49 | void x264_sei_pic_timing_write( x264_t *h, bs_t *s ); 50 | #define x264_sei_dec_ref_pic_marking_write x264_template(sei_dec_ref_pic_marking_write) 51 | void x264_sei_dec_ref_pic_marking_write( x264_t *h, bs_t *s ); 52 | #define x264_sei_frame_packing_write x264_template(sei_frame_packing_write) 53 | void x264_sei_frame_packing_write( x264_t *h, bs_t *s ); 54 | #define x264_sei_alternative_transfer_write x264_template(sei_alternative_transfer_write) 55 | void x264_sei_alternative_transfer_write( x264_t *h, bs_t *s ); 56 | #define x264_sei_avcintra_umid_write x264_template(sei_avcintra_umid_write) 57 | int x264_sei_avcintra_umid_write( x264_t *h, bs_t *s ); 58 | #define x264_sei_avcintra_vanc_write x264_template(sei_avcintra_vanc_write) 59 | int x264_sei_avcintra_vanc_write( x264_t *h, bs_t *s, int len ); 60 | #define x264_sei_write x264_template(sei_write) 61 | void x264_sei_write( bs_t *s, uint8_t *payload, int payload_size, int payload_type ); 62 | #define x264_filler_write x264_template(filler_write) 63 | void x264_filler_write( x264_t *h, bs_t *s, int filler ); 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/quant.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * quant.h: arm quantization and level-run 3 | ***************************************************************************** 4 | * Copyright (C) 2005-2018 x264 project 5 | * 6 | * Authors: David Conrad 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ARM_QUANT_H 27 | #define X264_ARM_QUANT_H 28 | 29 | #define x264_quant_2x2_dc_armv6 x264_template(quant_2x2_dc_armv6) 30 | int x264_quant_2x2_dc_armv6( int16_t dct[4], int mf, int bias ); 31 | 32 | #define x264_quant_2x2_dc_neon x264_template(quant_2x2_dc_neon) 33 | int x264_quant_2x2_dc_neon( int16_t dct[4], int mf, int bias ); 34 | #define x264_quant_4x4_dc_neon x264_template(quant_4x4_dc_neon) 35 | int x264_quant_4x4_dc_neon( int16_t dct[16], int mf, int bias ); 36 | #define x264_quant_4x4_neon x264_template(quant_4x4_neon) 37 | int x264_quant_4x4_neon( int16_t dct[16], uint16_t mf[16], uint16_t bias[16] ); 38 | #define x264_quant_4x4x4_neon x264_template(quant_4x4x4_neon) 39 | int x264_quant_4x4x4_neon( int16_t dct[4][16], uint16_t mf[16], uint16_t bias[16] ); 40 | #define x264_quant_8x8_neon x264_template(quant_8x8_neon) 41 | int x264_quant_8x8_neon( int16_t dct[64], uint16_t mf[64], uint16_t bias[64] ); 42 | 43 | #define x264_dequant_4x4_dc_neon x264_template(dequant_4x4_dc_neon) 44 | void x264_dequant_4x4_dc_neon( int16_t dct[16], int dequant_mf[6][16], int i_qp ); 45 | #define x264_dequant_4x4_neon x264_template(dequant_4x4_neon) 46 | void x264_dequant_4x4_neon( int16_t dct[16], int dequant_mf[6][16], int i_qp ); 47 | #define x264_dequant_8x8_neon x264_template(dequant_8x8_neon) 48 | void x264_dequant_8x8_neon( int16_t dct[64], int dequant_mf[6][64], int i_qp ); 49 | 50 | #define x264_decimate_score15_neon x264_template(decimate_score15_neon) 51 | int x264_decimate_score15_neon( int16_t * ); 52 | #define x264_decimate_score16_neon x264_template(decimate_score16_neon) 53 | int x264_decimate_score16_neon( int16_t * ); 54 | #define x264_decimate_score64_neon x264_template(decimate_score64_neon) 55 | int x264_decimate_score64_neon( int16_t * ); 56 | 57 | #define x264_coeff_last4_arm x264_template(coeff_last4_arm) 58 | int x264_coeff_last4_arm( int16_t * ); 59 | #define x264_coeff_last8_arm x264_template(coeff_last8_arm) 60 | int x264_coeff_last8_arm( int16_t * ); 61 | #define x264_coeff_last15_neon x264_template(coeff_last15_neon) 62 | int x264_coeff_last15_neon( int16_t * ); 63 | #define x264_coeff_last16_neon x264_template(coeff_last16_neon) 64 | int x264_coeff_last16_neon( int16_t * ); 65 | #define x264_coeff_last64_neon x264_template(coeff_last64_neon) 66 | int x264_coeff_last64_neon( int16_t * ); 67 | 68 | #define x264_denoise_dct_neon x264_template(denoise_dct_neon) 69 | void x264_denoise_dct_neon( dctcoef *, uint32_t *, udctcoef *, int ); 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/dct.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dct.h: arm transform and zigzag 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2018 x264 project 5 | * 6 | * Authors: David Conrad 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ARM_DCT_H 27 | #define X264_ARM_DCT_H 28 | 29 | #define x264_dct4x4dc_neon x264_template(dct4x4dc_neon) 30 | void x264_dct4x4dc_neon( int16_t d[16] ); 31 | #define x264_idct4x4dc_neon x264_template(idct4x4dc_neon) 32 | void x264_idct4x4dc_neon( int16_t d[16] ); 33 | 34 | #define x264_sub4x4_dct_neon x264_template(sub4x4_dct_neon) 35 | void x264_sub4x4_dct_neon( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 ); 36 | #define x264_sub8x8_dct_neon x264_template(sub8x8_dct_neon) 37 | void x264_sub8x8_dct_neon( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 ); 38 | #define x264_sub16x16_dct_neon x264_template(sub16x16_dct_neon) 39 | void x264_sub16x16_dct_neon( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 ); 40 | 41 | #define x264_add4x4_idct_neon x264_template(add4x4_idct_neon) 42 | void x264_add4x4_idct_neon( uint8_t *p_dst, int16_t dct[16] ); 43 | #define x264_add8x8_idct_neon x264_template(add8x8_idct_neon) 44 | void x264_add8x8_idct_neon( uint8_t *p_dst, int16_t dct[4][16] ); 45 | #define x264_add16x16_idct_neon x264_template(add16x16_idct_neon) 46 | void x264_add16x16_idct_neon( uint8_t *p_dst, int16_t dct[16][16] ); 47 | 48 | #define x264_add8x8_idct_dc_neon x264_template(add8x8_idct_dc_neon) 49 | void x264_add8x8_idct_dc_neon( uint8_t *p_dst, int16_t dct[4] ); 50 | #define x264_add16x16_idct_dc_neon x264_template(add16x16_idct_dc_neon) 51 | void x264_add16x16_idct_dc_neon( uint8_t *p_dst, int16_t dct[16] ); 52 | #define x264_sub8x8_dct_dc_neon x264_template(sub8x8_dct_dc_neon) 53 | void x264_sub8x8_dct_dc_neon( int16_t dct[4], uint8_t *pix1, uint8_t *pix2 ); 54 | #define x264_sub8x16_dct_dc_neon x264_template(sub8x16_dct_dc_neon) 55 | void x264_sub8x16_dct_dc_neon( int16_t dct[8], uint8_t *pix1, uint8_t *pix2 ); 56 | 57 | #define x264_sub8x8_dct8_neon x264_template(sub8x8_dct8_neon) 58 | void x264_sub8x8_dct8_neon( int16_t dct[64], uint8_t *pix1, uint8_t *pix2 ); 59 | #define x264_sub16x16_dct8_neon x264_template(sub16x16_dct8_neon) 60 | void x264_sub16x16_dct8_neon( int16_t dct[4][64], uint8_t *pix1, uint8_t *pix2 ); 61 | 62 | #define x264_add8x8_idct8_neon x264_template(add8x8_idct8_neon) 63 | void x264_add8x8_idct8_neon( uint8_t *p_dst, int16_t dct[64] ); 64 | #define x264_add16x16_idct8_neon x264_template(add16x16_idct8_neon) 65 | void x264_add16x16_idct8_neon( uint8_t *p_dst, int16_t dct[4][64] ); 66 | 67 | #define x264_zigzag_scan_4x4_frame_neon x264_template(zigzag_scan_4x4_frame_neon) 68 | void x264_zigzag_scan_4x4_frame_neon( int16_t level[16], int16_t dct[16] ); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/arm/deblock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * deblock.h: arm deblocking 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_ARM_DEBLOCK_H 27 | #define X264_ARM_DEBLOCK_H 28 | 29 | #define x264_deblock_v_luma_neon x264_template(deblock_v_luma_neon) 30 | void x264_deblock_v_luma_neon ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 31 | #define x264_deblock_h_luma_neon x264_template(deblock_h_luma_neon) 32 | void x264_deblock_h_luma_neon ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 33 | #define x264_deblock_v_chroma_neon x264_template(deblock_v_chroma_neon) 34 | void x264_deblock_v_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 35 | #define x264_deblock_h_chroma_neon x264_template(deblock_h_chroma_neon) 36 | void x264_deblock_h_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 37 | #define x264_deblock_strength_neon x264_template(deblock_strength_neon) 38 | void x264_deblock_strength_neon( uint8_t nnz[X264_SCAN8_SIZE], int8_t ref[2][X264_SCAN8_LUMA_SIZE], 39 | int16_t mv[2][X264_SCAN8_LUMA_SIZE][2], uint8_t bs[2][8][4], 40 | int mvy_limit, int bframe ); 41 | #define x264_deblock_h_chroma_422_neon x264_template(deblock_h_chroma_422_neon) 42 | void x264_deblock_h_chroma_422_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 43 | #define x264_deblock_h_chroma_mbaff_neon x264_template(deblock_h_chroma_mbaff_neon) 44 | void x264_deblock_h_chroma_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 45 | #define x264_deblock_h_chroma_intra_mbaff_neon x264_template(deblock_h_chroma_intra_mbaff_neon) 46 | void x264_deblock_h_chroma_intra_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 47 | #define x264_deblock_h_chroma_intra_neon x264_template(deblock_h_chroma_intra_neon) 48 | void x264_deblock_h_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 49 | #define x264_deblock_h_chroma_422_intra_neon x264_template(deblock_h_chroma_422_intra_neon) 50 | void x264_deblock_h_chroma_422_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 51 | #define x264_deblock_v_chroma_intra_neon x264_template(deblock_v_chroma_intra_neon) 52 | void x264_deblock_v_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 53 | #define x264_deblock_h_luma_intra_neon x264_template(deblock_h_luma_intra_neon) 54 | void x264_deblock_h_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 55 | #define x264_deblock_v_luma_intra_neon x264_template(deblock_v_luma_intra_neon) 56 | void x264_deblock_v_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/aarch64/deblock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * deblock.h: aarch64 deblocking 3 | ***************************************************************************** 4 | * Copyright (C) 2017-2018 x264 project 5 | * 6 | * Authors: Anton Mitrofanov 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at licensing@x264.com. 24 | *****************************************************************************/ 25 | 26 | #ifndef X264_AARCH64_DEBLOCK_H 27 | #define X264_AARCH64_DEBLOCK_H 28 | 29 | #define x264_deblock_v_luma_neon x264_template(deblock_v_luma_neon) 30 | void x264_deblock_v_luma_neon ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 31 | #define x264_deblock_h_luma_neon x264_template(deblock_h_luma_neon) 32 | void x264_deblock_h_luma_neon ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 33 | #define x264_deblock_v_chroma_neon x264_template(deblock_v_chroma_neon) 34 | void x264_deblock_v_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 35 | #define x264_deblock_h_chroma_neon x264_template(deblock_h_chroma_neon) 36 | void x264_deblock_h_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 37 | #define x264_deblock_strength_neon x264_template(deblock_strength_neon) 38 | void x264_deblock_strength_neon( uint8_t nnz[X264_SCAN8_SIZE], int8_t ref[2][X264_SCAN8_LUMA_SIZE], 39 | int16_t mv[2][X264_SCAN8_LUMA_SIZE][2], uint8_t bs[2][8][4], 40 | int mvy_limit, int bframe ); 41 | #define x264_deblock_h_chroma_422_neon x264_template(deblock_h_chroma_422_neon) 42 | void x264_deblock_h_chroma_422_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 43 | #define x264_deblock_h_chroma_mbaff_neon x264_template(deblock_h_chroma_mbaff_neon) 44 | void x264_deblock_h_chroma_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 ); 45 | #define x264_deblock_h_chroma_intra_mbaff_neon x264_template(deblock_h_chroma_intra_mbaff_neon) 46 | void x264_deblock_h_chroma_intra_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 47 | #define x264_deblock_h_chroma_intra_neon x264_template(deblock_h_chroma_intra_neon) 48 | void x264_deblock_h_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 49 | #define x264_deblock_h_chroma_422_intra_neon x264_template(deblock_h_chroma_422_intra_neon) 50 | void x264_deblock_h_chroma_422_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 51 | #define x264_deblock_v_chroma_intra_neon x264_template(deblock_v_chroma_intra_neon) 52 | void x264_deblock_v_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 53 | #define x264_deblock_h_luma_intra_neon x264_template(deblock_h_luma_intra_neon) 54 | void x264_deblock_h_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 55 | #define x264_deblock_v_luma_intra_neon x264_template(deblock_v_luma_intra_neon) 56 | void x264_deblock_v_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta ); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/ppc/dct.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dct.h: ppc transform and zigzag 3 | ***************************************************************************** 4 | * Copyright (C) 2003-2018 x264 project 5 | * 6 | * Authors: Eric Petit 7 | * Guillaume Poirier 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_PPC_DCT_H 28 | #define X264_PPC_DCT_H 29 | 30 | #define x264_sub4x4_dct_altivec x264_template(sub4x4_dct_altivec) 31 | void x264_sub4x4_dct_altivec( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 ); 32 | #define x264_sub8x8_dct_altivec x264_template(sub8x8_dct_altivec) 33 | void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 ); 34 | #define x264_sub16x16_dct_altivec x264_template(sub16x16_dct_altivec) 35 | void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 ); 36 | 37 | #define x264_add8x8_idct_dc_altivec x264_template(add8x8_idct_dc_altivec) 38 | void x264_add8x8_idct_dc_altivec( uint8_t *p_dst, int16_t dct[4] ); 39 | 40 | #define x264_add4x4_idct_altivec x264_template(add4x4_idct_altivec) 41 | void x264_add4x4_idct_altivec( uint8_t *p_dst, int16_t dct[16] ); 42 | #define x264_add8x8_idct_altivec x264_template(add8x8_idct_altivec) 43 | void x264_add8x8_idct_altivec( uint8_t *p_dst, int16_t dct[4][16] ); 44 | #define x264_add16x16_idct_altivec x264_template(add16x16_idct_altivec) 45 | void x264_add16x16_idct_altivec( uint8_t *p_dst, int16_t dct[16][16] ); 46 | 47 | #define x264_sub8x8_dct_dc_altivec x264_template(sub8x8_dct_dc_altivec) 48 | void x264_sub8x8_dct_dc_altivec( int16_t dct[4], uint8_t *pix1, uint8_t *pix2 ); 49 | #define x264_sub8x8_dct8_altivec x264_template(sub8x8_dct8_altivec) 50 | void x264_sub8x8_dct8_altivec( int16_t dct[64], uint8_t *pix1, uint8_t *pix2 ); 51 | #define x264_sub16x16_dct8_altivec x264_template(sub16x16_dct8_altivec) 52 | void x264_sub16x16_dct8_altivec( int16_t dct[4][64], uint8_t *pix1, uint8_t *pix2 ); 53 | 54 | #define x264_add8x8_idct8_altivec x264_template(add8x8_idct8_altivec) 55 | void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[64] ); 56 | #define x264_add16x16_idct8_altivec x264_template(add16x16_idct8_altivec) 57 | void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][64] ); 58 | 59 | #define x264_zigzag_scan_4x4_frame_altivec x264_template(zigzag_scan_4x4_frame_altivec) 60 | void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[16] ); 61 | #define x264_zigzag_scan_4x4_field_altivec x264_template(zigzag_scan_4x4_field_altivec) 62 | void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[16] ); 63 | #define x264_zigzag_scan_8x8_frame_altivec x264_template(zigzag_scan_8x8_frame_altivec) 64 | void x264_zigzag_scan_8x8_frame_altivec( int16_t level[64], int16_t dct[64] ); 65 | #define x264_zigzag_interleave_8x8_cavlc_altivec x264_template(zigzag_interleave_8x8_cavlc_altivec) 66 | void x264_zigzag_interleave_8x8_cavlc_altivec( int16_t *dst, int16_t *src, uint8_t *nnz ); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /components/x264/x264-snapshot-20181221-2245-stable/common/quant.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * quant.h: quantization and level-run 3 | ***************************************************************************** 4 | * Copyright (C) 2005-2018 x264 project 5 | * 6 | * Authors: Loren Merritt 7 | * Fiona Glaser 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 22 | * 23 | * This program is also available under a commercial proprietary license. 24 | * For more information, contact us at licensing@x264.com. 25 | *****************************************************************************/ 26 | 27 | #ifndef X264_QUANT_H 28 | #define X264_QUANT_H 29 | 30 | typedef struct 31 | { 32 | int (*quant_8x8) ( dctcoef dct[64], udctcoef mf[64], udctcoef bias[64] ); 33 | int (*quant_4x4) ( dctcoef dct[16], udctcoef mf[16], udctcoef bias[16] ); 34 | int (*quant_4x4x4)( dctcoef dct[4][16], udctcoef mf[16], udctcoef bias[16] ); 35 | int (*quant_4x4_dc)( dctcoef dct[16], int mf, int bias ); 36 | int (*quant_2x2_dc)( dctcoef dct[4], int mf, int bias ); 37 | 38 | void (*dequant_8x8)( dctcoef dct[64], int dequant_mf[6][64], int i_qp ); 39 | void (*dequant_4x4)( dctcoef dct[16], int dequant_mf[6][16], int i_qp ); 40 | void (*dequant_4x4_dc)( dctcoef dct[16], int dequant_mf[6][16], int i_qp ); 41 | 42 | void (*idct_dequant_2x4_dc)( dctcoef dct[8], dctcoef dct4x4[8][16], int dequant_mf[6][16], int i_qp ); 43 | void (*idct_dequant_2x4_dconly)( dctcoef dct[8], int dequant_mf[6][16], int i_qp ); 44 | 45 | int (*optimize_chroma_2x2_dc)( dctcoef dct[4], int dequant_mf ); 46 | int (*optimize_chroma_2x4_dc)( dctcoef dct[8], int dequant_mf ); 47 | 48 | void (*denoise_dct)( dctcoef *dct, uint32_t *sum, udctcoef *offset, int size ); 49 | 50 | int (*decimate_score15)( dctcoef *dct ); 51 | int (*decimate_score16)( dctcoef *dct ); 52 | int (*decimate_score64)( dctcoef *dct ); 53 | int (*coeff_last[14])( dctcoef *dct ); 54 | int (*coeff_last4)( dctcoef *dct ); 55 | int (*coeff_last8)( dctcoef *dct ); 56 | int (*coeff_level_run[13])( dctcoef *dct, x264_run_level_t *runlevel ); 57 | int (*coeff_level_run4)( dctcoef *dct, x264_run_level_t *runlevel ); 58 | int (*coeff_level_run8)( dctcoef *dct, x264_run_level_t *runlevel ); 59 | 60 | #define TRELLIS_PARAMS const int *unquant_mf, const uint8_t *zigzag, int lambda2,\ 61 | int last_nnz, dctcoef *coefs, dctcoef *quant_coefs, dctcoef *dct,\ 62 | uint8_t *cabac_state_sig, uint8_t *cabac_state_last,\ 63 | uint64_t level_state0, uint16_t level_state1 64 | int (*trellis_cabac_4x4)( TRELLIS_PARAMS, int b_ac ); 65 | int (*trellis_cabac_8x8)( TRELLIS_PARAMS, int b_interlaced ); 66 | int (*trellis_cabac_4x4_psy)( TRELLIS_PARAMS, int b_ac, dctcoef *fenc_dct, int psy_trellis ); 67 | int (*trellis_cabac_8x8_psy)( TRELLIS_PARAMS, int b_interlaced, dctcoef *fenc_dct, int psy_trellis ); 68 | int (*trellis_cabac_dc)( TRELLIS_PARAMS, int num_coefs ); 69 | int (*trellis_cabac_chroma_422_dc)( TRELLIS_PARAMS ); 70 | } x264_quant_function_t; 71 | 72 | #define x264_quant_init x264_template(quant_init) 73 | void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf ); 74 | 75 | #endif 76 | --------------------------------------------------------------------------------