x264 (x86/x64) - это свободная библиотека программных компонентов для кодирования видеопотоков H.264/MPEG-4 AVC.
x264 (x86/x64) is a free library for encoding H.264/MPEG-4 AVC video streams.
Изменения / Changes:
-
Fix crash in --fullhelp when compiled against recent ffmpeg. Don't assume all pixel formats have a description;
-
Fix overflow in 8-bit x86 vsad asm function;
-
Fix PCM cost overflow;
-
Fix loading custom 8x8 chroma quant matrices in 4:4:4;
-
Fix crash with sliced threads and input height <= 112;
-
Fix wrong conditional inclusion of inttypes.h. inttypes.h;
-
Limit SSIM to 100db. Avoids floating point error for infinite SSIM (lossless);
-
Add out-of-tree build support;
-
Resize filter updates. Use AVPixFmtDescriptors to pick the most compatible x264 csp for any pixel format. Fix deprecated use of av_set_int. Now requires libavutil >= 51.19.0;
-
SSE2 and SSSE3 versions of sub8x16_dct_dc. Also slightly faster sub8x8_dct_dc;
-
More 4:2:2 asm functions. High bit depth version of deblock_h_chroma_422. Regular and high bit depth versions of deblock_h_chroma_intra_422. High bit depth pixel_vsad. SSE2 high bit depth and MMX 8-bit predict_8x8_vl;
-
More ARM NEON assembly functions. predict_8x8_v, predict_4x4_dc_top, predict_8x8_ddl, predict_8x8_ddr, predict_8x8_vl, predict_8x8_vr, predict_8x8_hd, predict_8x8_hu. From Google Code-In;
-
Some MBAFF x86 assembly functions. deblock_chroma_420_mbaff, plus 422/422_intra_mbaff implemented using existing functions. From Google Code-In;
-
MMX 10-bit predict_8x8c_h and predict_8x16c_h. From Google Code-In;
-
High bit depth intra_sad_x3_8x8, intra_satd_x3_4x4/8x8c/16x16. Also add an ACCUM macro to handle accumulator-induced add-or-swap more concisely;
-
Use a large LUT for CAVLC zero-run bit codes. Helps the most with trellis and RD, but also helps with bitstream writing. Seems at worst neutral even in the extreme case of a CPU with small L2 cache (e.g. ARM Cortex A8);
-
High bit depth intra_sad_x3_4x4. From Google Code-In;
-
XOP 8-bit fDCT. Use integer MAC for one of the SUMSUB passes. About a dozen cycles faster for 16x16;
-
MMX/SSE2/AVX predict_8x16_p, high bit depth fdct8. From Google Code-In;
-
High bit depth SSE2/AVX add8x8_idct8 and add16x16_idct8. From Google Code-In;
-
x86inc improvements for 64-bit. Add support for all x86-64 registers. Prefer caller-saved register over callee-saved on WIN64. Support up to 15 function arguments;
-
CABAC trellis opts part 1: minor change in output. Due to different tie-break order;
-
CABAC trellis opts part 2: C optimizations. Hoist the branch on coef value out of the loop over node contexts. Special cases for each possible coef value (0,1,n). Special case for dc-only blocks. Template the main loop for two common subsets of nodes, to avoid a bunch of branches about which nodes are live. Use the nonupdating version of cabac_size_decision in more cases, and omit those bins from the node struct. CABAC offsets are now compile-time constants. Change TRELLIS_SCORE_MAX from a specific constant to anything negative, which is cheaper to test. Remove dct_weight2_zigzag[], since trellis has to lookup zigzag[] anyway. 60% faster on x86_64. 25k->18k codesize;
-
CABAC trellis opts part 3: make some arrays non-static;
-
CABAC trellis opts part 4: x86_64 asm. Another 20% faster. 18k->12k codesize. This patch series may have a large impact on encoding speed. For example, 24% faster at --preset slower --crf 23 with 720p parkjoy. Overall speed increase is proportional to the cost of trellis (which is proportional to bitrate, and much more with --trellis 2).
Encoder features :
-
CAVLC/CABAC
-
Multi-references
-
Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions)
-
Inter P: all partitions (from 16x16 down to 4x4)
-
Inter B: partitions from 16x16 down to 8x8 (including skip/direct)
-
Ratecontrol: constant quantizer, single or multipass ABR, optional VBV
-
Scene cut detection
-
Adaptive B-frame placement
-
B-frames as references / arbitrary frame order
-
8x8 and 4x4 adaptive spatial transform
-
Lossless mode
-
Custom quantization matrices
-
Parallel encoding of multiple slices
Advanced settings :
-
Enabling Cabac: approximately 10% bitrate reduction without loss in quality, but is slow.
-
Enabling De-blocking Filter: smooths out visible blocks during an encode (rather than by using post processing to smooth out blocks while decoding). Is a good idea to enable for low bitrate encodes.
Возможности кодека x264:
-
Контекстнозависимое Адаптивное Бинарное Арифметическое кодирование (CABAC) и Контекстнозависимое Адаптивное Кодирование с Переменной Длиной Кодового Слова (CAVLC)
-
Поддержка нескольких ссылочных кадров
-
Все intra типы макроблоков (16x16, 8x8 и 4x4 — 8x8 это часть AVC HP)
-
Все inter типы макроблоков P фрейма
-
B-Inter типы макроблоков от 16x16 до 8x8
-
Оптимизация отношения вносимых искажений к скорости потока
-
Несколько режимов работы управления скоростью потока: постоянный квантователь, постоянное качество, одно- или многопроходный ABR с режимом VBV
-
Обнаружение смены сцены
-
Адаптивная расстановка B-кадров, с возможностью использования B кадров как ссылочных кадров
-
8x8 и 4x4 адаптивное пространственное преобразование (High Profile)
-
Режим сжатия без потерь (отклоненный High Profile 4:4:4)
-
Произвольные матрицы квантования (High Profile)
-
Параллельное кодирование на нескольких CPU
-
Поддержка компрессии кадров с чересстрочной разверткой (неадаптивный MBAFF — все макроблоки кодируются в режиме чересстрочных)
Доступные настройки кодека для профессионалов:
-
Кодирование Cabac: приблизительно 10%-ое снижение битрэйта без потери качества.
-
Фильтр деблокирования: показывает видимые блоки во время кодирования (гораздо лучший метод по сравнению с пост-процессингом). Отличный метод для кодирования с использованием низкого битрэйта.
Unpatched, fprofiled, GCC 4.6.3: (svn rev. 183227, Pre-Release , 2012.01.17); (avs input, lavf input, ffms input, mp4 output.); (ffmpeg git-67f5650 , ffms2 svn.629, pthreads 2.9.0.0 CVS-20110710, gpac svn.3844, all static).:
|