Unify 8-bit and 10-bit CLI and libraries
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 6 Jan 2017 14:23:38 +0000 (15:23 +0100)
committerAnton Mitrofanov <BugMaster@narod.ru>
Sun, 24 Dec 2017 20:47:24 +0000 (23:47 +0300)
commit71ed44c7312438fac7c5c5301e45522e57127db4
tree8bb9bc0372860330d31c1f728345584119a6f51c
parent2451a7282463f68e532f2eee090a70ab139bb3e7
Unify 8-bit and 10-bit CLI and libraries

Add 'i_bitdepth' to x264_param_t with the corresponding '--output-depth' CLI
option to set the bit depth at runtime.

Drop the 'x264_bit_depth' global variable. Rather than hardcoding it to an
incorrect value, it's preferable to induce a linking failure. If applications
relies on this symbol this will make it more obvious where the problem is.

Add Makefile rules that compiles modules with different bit depths. Assembly
on x86 is prefixed with the 'private_prefix' define, while all other archs
modify their function prefix internally.

Templatize the main C library, x86/x86_64 assembly, ARM assembly, AARCH64
assembly, PowerPC assembly, and MIPS assembly.

The depth and cache CLI filters heavily depend on bit depth size, so they
need to be duplicated for each value. This means having to rename these
filters, and adjust the callers to use the right version.

Unfortunately the threaded input CLI module inherits a common.h dependency
(input/frame -> common/threadpool -> common/frame -> common/common) which
is extremely complicated to address in a sensible way. Instead duplicate
the module and select the appropriate one at run time.

Each bitdepth needs different checkasm compilation rules, so split the main
checkasm target into two executables.
129 files changed:
Makefile
common/aarch64/asm.S
common/aarch64/bitstream.h [new file with mode: 0644]
common/aarch64/cabac-a.S
common/aarch64/dct.h
common/aarch64/deblock.h [new file with mode: 0644]
common/aarch64/mc-c.c
common/aarch64/mc.h
common/aarch64/pixel.h
common/aarch64/predict-c.c
common/aarch64/predict.h
common/aarch64/quant-a.S
common/aarch64/quant.h
common/arm/asm.S
common/arm/bitstream.h [new file with mode: 0644]
common/arm/dct.h
common/arm/deblock.h [new file with mode: 0644]
common/arm/mc-c.c
common/arm/mc.h
common/arm/pixel.h
common/arm/predict.h
common/arm/quant-a.S
common/arm/quant.h
common/base.c [new file with mode: 0644]
common/base.h [new file with mode: 0644]
common/bitstream.c
common/bitstream.h
common/cabac.c
common/cabac.h
common/common.c
common/common.h
common/cpu.c
common/dct.c
common/dct.h
common/deblock.c
common/frame.h
common/macroblock.h
common/mc.c
common/mc.h
common/mips/dct-c.c
common/mips/dct.h
common/mips/deblock-c.c
common/mips/deblock.h [new file with mode: 0644]
common/mips/mc.h
common/mips/pixel.h
common/mips/predict-c.c
common/mips/predict.h
common/mips/quant-c.c
common/mips/quant.h
common/opencl.h
common/osdep.c
common/osdep.h
common/pixel.h
common/ppc/dct.c
common/ppc/dct.h
common/ppc/deblock.c
common/ppc/deblock.h [new file with mode: 0644]
common/ppc/mc.c
common/ppc/mc.h
common/ppc/pixel.c
common/ppc/pixel.h
common/ppc/predict.c
common/ppc/predict.h
common/ppc/quant.h
common/predict.h
common/quant.c
common/quant.h
common/rectangle.h
common/set.h
common/tables.c [new file with mode: 0644]
common/tables.h [new file with mode: 0644]
common/threadpool.h
common/vlc.c
common/win32thread.c
common/x86/bitstream.h [new file with mode: 0644]
common/x86/cabac-a.asm
common/x86/dct.h
common/x86/deblock.h [new file with mode: 0644]
common/x86/mc-c.c
common/x86/mc.h
common/x86/pixel-32.asm
common/x86/pixel-a.asm
common/x86/pixel.h
common/x86/predict.h
common/x86/quant-a.asm
common/x86/quant.h
common/x86/trellis-64.asm
common/x86/x86util.asm
configure
encoder/analyse.c
encoder/analyse.h
encoder/api.c [new file with mode: 0644]
encoder/cabac.c
encoder/encoder.c
encoder/macroblock.h
encoder/me.c
encoder/me.h
encoder/ratecontrol.h
encoder/rdo.c
encoder/set.c
encoder/set.h
encoder/slicetype-cl.c
encoder/slicetype-cl.h [new file with mode: 0644]
encoder/slicetype.c
example.c
filters/filters.c
filters/video/cache.c
filters/video/crop.c
filters/video/depth.c
filters/video/internal.c
filters/video/internal.h
filters/video/resize.c
filters/video/select_every.c
filters/video/video.c
input/avs.c
input/ffms.c
input/input.h
input/lavf.c
input/raw.c
input/thread.c
input/timecode.c
input/y4m.c
tools/checkasm-aarch64.S
tools/checkasm-arm.S
tools/checkasm.c
x264.c
x264.h
x264cli.h
x264dll.c