Back in 2009 when this was added it improved scheduling of lookahead
threads on prevalent operating systems at the time.
According to more recent testing by Intel however, lowering thread
priorities does not improve performance on modern operating systems.
And more importantly, doing so on systems with heterogeneous CPU
topologies may actually result in a severe performance reduction.
Removing this code altogether eliminates the issue with performance
degradation on such systems, while having no noticeable impact on
regular systems with homogeneous CPU topologies.
The lookahead_thread main loop checks b_exit_thread and exits if it is set.
That flag is set by x264_lookahead_delete, which uses ifbuf.mutex to guard accessing it.
However, the read in the while-loop condition of lookahead_thread is not guarded,
and so TSAN sometimes reports a data race.
Use --cll to specify the maximum content light level (MaxCLL)
and the maximum frame average light level (MaxFALL) as described
by the CTA 861.3 specification.
Use --mastering-display to specify the properties of the reference display.
A formatted string with all 10 values is required: G,B,R primaries and
white point coordinates, plus max/min brightness. Coordinates are in
0.00002 increments. Brightness units are 0.0001 cd/m^2.
For example, a 1000 nit BT.2020 display with a 0.0001 nit black level:
--mastering-display G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)
Should be called to free struct members allocated internally by libx264,
e.g. by x264_param_parse.
Partially based on videolan/x264!18 by Derek Buitenhuis.
Simplifies a lot of code and avoids having to export public asm functions.
Note that the force_align_arg_pointer function attribute is broken in clang
versions prior to 6.0.1 which may result in crashes, so make sure to either
use a newer clang version or a different compiler.
Progressive High, Constrained High, and Progressive High 10.
Even in Main profile, constraint_set4_flag is now set to 1 if progressive,
and constraint_set5_flag is set to 1 if no B-slices are present.