Comparison of x265 and x264 (summer 2014)

At this time, we compare encoding of video with large dimensions and large number of frames per second. For the test we used video Crowd Run with resolution 3840×2160 and frame rate 50 FPS. Video consists of 500 video frames. The video itself can be downloaded here: Crowd Run 2160p @ 50 (~ 5.8 GB).

Extremely low bitrate Is used to encode video for such parameters: 4000kbps.
Читать полностью…

New 1.1 version of x265

This is an incremental update with several important rate control improvements and a few new features.

= New Features =

1. Psycho-visual rate distortion optimizations. These RD optimizations are only effective on presets which use RDO (rd levels 5 and 6).
Psy-rd is still considered experimental in this release and is not enabled by default. We recommend evaluating with a low psy weight factor, for instance: –rd 5 –psy-rd 0.4

2. Lossless coding. This release of x265 can create a bit-accurate output bitstream by using –lossless. This feature disables rate control and distortion metrics, and instead just reports the compression ratio at the end of the encode. Lossless coding is considered experimental in this release, we believe there is room for improvement in both compression efficiency and performance.

3. Support for Y4M streams with more than 8 bit depth (for example, ffmpeg -i vid.avi -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe – | ./x265 – –y4m o.hevc)

= API Changes =

* new x265_picture.forceQp for qpfile functionality
* new param.levelIdc to force a decoder requirement level
* new param.psyRd for (experimental) psycho-visual rate distortion optimizations
* new param.bIntraInBFrames to disable intra predictions in B slices regardless of preset
* new param.noiseReduction, very similar to x264 noise reduction
* new param.bLossless to enable lossless coding (experimental)
* new param.bCULossless to include trans-quant bypass modes in CU RD analysis
* new param.rc.rfConstantMin to limit rate factors in rate control
* param.rc.aqMode now defaults to 2 (to match CLI behavior)

new x265_encoder_parameters() function which retrieves a copy of the active parameters from the encoder. x265_encoder_open() was modified to ensure it never modified the param structure passed to the function; it makes a private copy of the param prior to making any modifications to it.

The default setting (the medium preset) was be adjusted to include the –no-rect and –no-amp options, becoming faster (on average, about 70%, but as much as 90%), with a very slight (~ 1 – 4%) impact on encoding efficiency.

We have sped up the ultrafast preset by about 10 to 30% (bigger benefit at higher bit rates). There is a very small impact on encoding efficiency, but you can always increase efficiency by using a slower (higher quality) preset. We’ve also sped up the superfast, veryfast and faster presets in a similar way.

= CLI Changes =

New options:
–level
–repeat-headers (older feature, newly exposed to CLI) –nr –lossless –psy-rd –crf-min –no-b-intra –cu-lossless –qpfile

–tune fast-decode now also disabled intra in B frames

As always, the most detailed documentation for the command line arguments can be found in our online documentation:
http://x265.readthedocs.org/en/1.1/

= Rate Control =

Single pass ABR received a lot of attention in this release, in particular the tendency for ABR to undershoot and overshoot wildly in the first two seconds of the video. We added two new features to ABR to limit this tendency. First, we now amortize a portion of the cost of I frames across many frames. Second, we limit frame parallelism until we have about a half-second of P frames encoded. Together these two changes have greatly improved the ability of single pass ABR to arrive at the good QP for the first GOP without any large swings.

Further improvements were made to ABR to allow it to reach very high bit rates.

We also did some re-balancing of CRF between Main and Main10 so they achieve closer quality, and several fixes were made to VBV.

Recovery Point SEI are now generated at each keyframe

In the near future we will be focusing on two-pass encoding and making mode decision more efficient.

New 1.0 version of x265

There were many bugs fixed since the 0.9 tag, particularly in rate control and Main10 mode decision. There have been a couple of minor performance improvements.

= Feature changes =

* Experimental support for 4:2:2
* improved profile and level detection
* imported checkasm-a.asm from x264 and fixed the asm bugs it exposed
* lookahead will use a worker thread when beneficial
* Many more motion candidate vectors are passed to motion estimation
* Lambda table improvements for better bitrate response at low QP

= API changes =

* added param.bEnableAccessUnitDelimiters
* removed param.vui.bEnableVuiParametersPresentFlag (now implied)
* removed param.vui.bEnableAspectRatioIdc (now implied)
* removed param.vui.bEnableVuiTimingInfoPresentFlag (always enabled)

= CLI changes =

–aud was added
–vui was removed
–timinginfo was removed (it is always enabled)

New 0.9 version of x265

x265 0.9 is a regularly scheduled bug fix release. Many bugs have been fixed since the 0.8 tag, primarily in rate control and 10bit encodes. A race hazard on POSIX systems was fixed, and several non-determinism problems were resolved.

= API Changes =
* the stride of x265_picture is now in units of bytes, not pixels
* VUI configurables were moved into a param.vui sub-struct
* unimplemented VUI options removed
* bRepeatHeaders option added (inserts VPS+SPS+PPS each keyframe)
* fast-decode tune option added
* x265_encoder_headers() returns NAL byte count on success

= Command Line Interface Changes =
* –dither option to improve quality of pixel downshifts
* –cpuid replaced with x264 compatible –asm option
* –crf-max added
* improved –help documentation, plus new online documentation
* **experimental** –interlaceMode <prog|tff|bff> * **experimental** –weightb

= New Features =
* experimental support for interlaced content (field coding)
* experimental weightb support

We now have online documentation for this release http://x265.readthedocs.org/en/0.9/
plus http://x265.readthedocs.org/en/default/ and http://x265.readthedocs.org/en/stable for the two development branches.

See the online manual for full documentation of CLI (and API) options

Our focus for the near future remains on visual quality and rate control improvements.

New 0.8 version of x265

x265 0.8 is a regularly scheduled feature release. Binaries for 8+17 are available here: Our builds

New in 0.8


* 4:4:4 internal color space is now supported. Input pictures must also be 4:4:4, 8 or 10bit. We advise to disable weightp with 4:4:4. Note that since the HEVC Range Extensions are not finalized, this feature should be considered highly experimental. Our output streams may not be compliant with the final spec.
* Improved VBV. x265 will now do mid-frame QP adjustments in order to better meet the bit target. Further improvements will be in the next release (partial slice re-encode when bit budget is very tight).
* FPS is finally handled in a sane fashion. It may be configured as a rational number (numerator/denominator) or as a float. The frame rate is now signaled in the VPS header for use by the decoder.
* VUI signaling is now exposed in the x265_param structure and in the x265 CLI. The exact params and CLI options should be considered experimental at this point, and are liable to change.
* Near full ASM coverage of the 8bit build, and much more 10bit assembly than the previous release. All of the interpolation and intra primitives that were written with SIMD intrinsics have been replaced with assembly routines.
* Input pixel bit depth is now decoupled from the internal bit depth. An 8bpp build and a 16bpp build of x265 will both be able to encode 8bit or 10bit or 16bit raw video streams. The encoder will shift and mask pixels as necessary to get them to the internal depth.
* Motion compensated weight analysis. This will be further improved in the next release.

CLI changes since 0.7
# Added #
–scenecut
-i/–min-keyint
–vui
–sar
–overscan
–videoformat
–range
–colorprim
–transfer
–colormatrix
–chromaloc
–[no-]fieldseq
–[no-]framefieldinfo
–crop-rect
–timinginfo
–nal-hrd
–bitstreamrestriction
–subpichrd

Replaced options, to sync with x264

–refresh is now –[no]open-gop –frame-skip is now –seek -i/–keyint is now -I/–keyint (short opt case change)

Upcoming work

The next release will focus on improving all of the recently added features, particularly VBV and adaptive quant, and focusing heavily on improving perceptive visual quality.