[x264-devel] [PATCH v2 00/29] Bitdepth selection at runtime

Vittorio Giovara vittorio.giovara at gmail.com
Thu Feb 2 10:05:12 CET 2017


This is the second iteration of the patchset and contains the following
changes:
- there are no more lists or scripts that generate headers, and instead
  proper macroes are added next to the function (or block of functions)
  that need templating
- more tables are moved to a shared file so that the final library size
  is reduced, rather than duplicating tables
- opencl behaviour is unchanged and enabled only at 8 bitdepth
- Makefile changes are done in a separate patch

Open issues:
- there is no replacement for the versioned linking
- X264_BUILD bumps
- should bitdepth selection be kept at configure time?
- MIPS support

I wasn't able to compile master with the official MIPS compiler.
This set is dependent on the previous 5-patch set that renames static
functions.

Vittorio

Vittorio Giovara (29):
  arm: Set the function symbol prefix in a single location
  aarch64: Set the function symbol prefix in a single location
  x264.h: Disable renaming x264_encoder_open()
  common: Move log helper functions to a separate file
  log: Add an internal log function and use it where needed
  osdep: Decouple module from common.h
  cpu: Decouple module from common.h
  common: Move memory functions to a separate file
  common: Move picture functions to a separate file
  common: Move mathematics functions to a separate file
  mathematics: Move LUTs to the common file
  common: Move parameter functions to a separate file
  common: Move shared tables to a common file
  param: Modify default qp parameters to maximum allowable
  Adjust headers to make x264cli independent of common.h
  Add API to set bitdepth at runtime
  Templatize the public API
  Move global symbols to the implementation file
  Makefile: Split core and bitdepth-dependent modules
  Templatize the main C library code
  Templatize x86/x86_64 assembly code
  Templatize ARM assembly code
  Templatize AARCH64 assembly code
  Templatize PowerPC assembly code
  x264cli: Duplicate depth and cache filters
  x264cli: Duplicate threaded input module
  x264cli: Add --output-depth command line option
  Restore bitdepth selection at configure time
  Duplicate checkasm targets

 Makefile                     |  136 +++-
 common/aarch64/asm.S         |   19 +-
 common/aarch64/bitstream-a.S |    2 +-
 common/aarch64/cabac-a.S     |   10 +-
 common/aarch64/dct-a.S       |  106 ++--
 common/aarch64/dct.h         |   27 +
 common/aarch64/deblock-a.S   |   36 +-
 common/aarch64/mc-a.S        |  104 ++--
 common/aarch64/mc-c.c        |   55 ++
 common/aarch64/mc.h          |    1 +
 common/aarch64/pixel-a.S     |   92 +--
 common/aarch64/pixel.h       |   55 ++
 common/aarch64/predict-a.S   |   66 +-
 common/aarch64/predict.h     |   71 +++
 common/aarch64/quant-a.S     |   44 +-
 common/aarch64/quant.h       |   21 +
 common/api.c                 |  202 ++++++
 common/arm/asm.S             |   19 +-
 common/arm/bitstream-a.S     |    2 +-
 common/arm/cpu-a.S           |   12 +-
 common/arm/dct-a.S           |   94 +--
 common/arm/dct.h             |   17 +
 common/arm/deblock-a.S       |   30 +-
 common/arm/mc-a.S            |  129 ++--
 common/arm/mc-c.c            |   57 ++
 common/arm/mc.h              |    1 +
 common/arm/pixel-a.S         |  118 ++--
 common/arm/pixel.h           |   79 +++
 common/arm/predict-a.S       |   60 +-
 common/arm/predict.h         |   36 ++
 common/arm/quant-a.S         |   32 +-
 common/arm/quant.h           |   18 +
 common/bitstream.c           |   15 +
 common/bitstream.h           |   13 +-
 common/cabac.c               |   85 ---
 common/cabac.h               |   11 +
 common/common.c              | 1404 +-----------------------------------------
 common/common.h              |  108 +---
 common/cpu.c                 |    7 +-
 common/cpu.h                 |    2 +
 common/dct.c                 |   64 --
 common/dct.h                 |    7 +-
 common/deblock.c             |   43 ++
 common/frame.c               |   16 +-
 common/frame.h               |   32 +
 common/{x86/mc.h => log.c}   |   41 +-
 common/{x86/mc.h => log.h}   |   20 +-
 common/macroblock.h          |   20 +
 common/mathematics.c         |   86 +++
 common/mathematics.h         |  113 ++++
 common/mc.c                  |    3 -
 common/mc.h                  |    9 +-
 common/mem.c                 |  126 ++++
 common/{x86/mc.h => mem.h}   |   25 +-
 common/osdep.c               |    2 +-
 common/osdep.h               |    5 +
 common/{common.c => param.c} |  299 +--------
 common/picture.c             |  107 ++++
 common/pixel.h               |   24 +
 common/ppc/dct.h             |   16 +
 common/ppc/mc.h              |    1 +
 common/ppc/pixel.c           |    1 +
 common/ppc/pixel.h           |    1 +
 common/ppc/predict.h         |    2 +
 common/ppc/quant.h           |    6 +
 common/predict.h             |   23 +
 common/quant.c               |   12 -
 common/quant.h               |    1 +
 common/rectangle.h           |    9 +-
 common/set.h                 |    4 +
 common/{vlc.c => tables.c}   |  422 +++++++++----
 common/tables.h              |   69 +++
 common/threadpool.h          |    4 +
 common/vlc.c                 |  710 ---------------------
 common/{x86/mc.h => vlc.h}   |   13 +-
 common/x86/cabac-a.asm       |   24 +-
 common/x86/dct.h             |   95 +++
 common/x86/mc-c.c            |  173 ++++++
 common/x86/mc.h              |    1 +
 common/x86/pixel.h           |  396 ++++++++++++
 common/x86/predict.h         |  111 ++++
 common/x86/quant-a.asm       |    4 +-
 common/x86/quant.h           |   98 +++
 common/x86/trellis-64.asm    |   22 +-
 common/x86/x86inc.asm        |    7 +
 configure                    |   24 +-
 encoder/analyse.c            |   67 --
 encoder/analyse.h            |   11 +
 encoder/cabac.c              |   47 --
 encoder/encoder.c            |   12 +-
 encoder/macroblock.h         |   24 +-
 encoder/me.c                 |    1 +
 encoder/me.h                 |    7 +
 encoder/ratecontrol.h        |   21 +
 encoder/rdo.c                |    3 +
 encoder/set.c                |   29 +-
 encoder/set.h                |   16 +
 encoder/slicetype-cl.c       |    1 +
 encoder/slicetype.c          |    1 +
 filters/filters.c            |    2 +
 filters/video/cache.c        |   10 +-
 filters/video/depth.c        |   23 +-
 filters/video/fix_vfr_pts.c  |    1 +
 filters/video/resize.c       |    2 +
 filters/video/select_every.c |    6 +-
 filters/video/video.c        |   10 +-
 input/input.c                |    1 +
 input/input.h                |    8 +-
 input/lavf.c                 |    2 +
 input/thread.c               |    4 +
 input/timecode.c             |    3 +
 input/y4m.c                  |    2 +
 output/flv.c                 |    3 +
 output/flv_bytestream.c      |    1 +
 output/flv_bytestream.h      |    2 +
 output/matroska_ebml.c       |    3 +
 output/mp4_lsmash.c          |    1 +
 output/raw.c                 |    1 +
 tools/checkasm-aarch64.S     |    4 +-
 tools/checkasm-arm.S         |    8 +-
 tools/checkasm.c             |    5 +
 x264.c                       |   55 +-
 x264.h                       |   28 +-
 x264cli.h                    |    5 +-
 124 files changed, 3550 insertions(+), 3567 deletions(-)
 create mode 100644 common/api.c
 copy common/{x86/mc.h => log.c} (56%)
 copy common/{x86/mc.h => log.h} (74%)
 create mode 100644 common/mathematics.c
 create mode 100644 common/mathematics.h
 create mode 100644 common/mem.c
 copy common/{x86/mc.h => mem.h} (70%)
 copy common/{common.c => param.c} (81%)
 create mode 100644 common/picture.c
 copy common/{vlc.c => tables.c} (63%)
 create mode 100644 common/tables.h
 copy common/{x86/mc.h => vlc.h} (88%)

-- 
2.10.0



More information about the x264-devel mailing list