[FFmpeg-devel] [PATCH] Nvidia NVENC 10-bit HEVC encoding and rate control lookahead support
ovcollyer at mac.com
Thu Aug 25 00:24:15 EEST 2016
> On 24 Aug 2016, at 20:57, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2016-08-24 10:00 GMT+02:00 Oliver Collyer <ovcollyer at mac.com>:
>> I’m not sure what would happen - currently the nvenc.c code enforces
>> 10-bit encoding when it gets a 10-bit input pixel format.
> Yes, my question was about what happens if you remove the enforcement /
> force an 8bit profile.
Ok, I’ve been doing some testing.
I have a single test file which is in yuv420p pixel format and has file size 42,730KB.
I then ran different combinations of -pix_fmt and -profile:v while setting the encoder to a constant global quality of 21.
1. pix_fmt = yuv420p and profile is main => output file size 79,769KB
2. pix_fmt = yuv420p and profile is main10 => output file size 79,769KB
Although the file sizes of 1. and 2. are identical, the md5s were not. VLC reports both as “Planar YUV 420”, ffprobe reports 1. as having Main profile and 2. as having Main 10 profile. I suspect this internal labelling is what accounts for the md5 difference.
3. pix_fmt = yuv444p16 and profile is main => output file size 72,279KB
4. pix_fmt = yuv444p16 and profile is main10 => output file size 72,279KB
Both file sizes and md5s of 3. and 4. are identical. VLC reports both as “Planar YUV 444 10-bit LE”. ffprobe reports both as having Rext profile (why not Main 10 I wonder?)
In summary (and this ties-in with the NVidia documentation which details the steps for 10-bit encoding):
a) to get 10-bit encoding you need to set up a 10-bit input buffer.
b) if you force an 8-bit profile but give the encoder a 10-bit input buffer it treats it as a 10-bit profile
c) you can get some nice savings by converting an 8-bit input to 10-bits and encoding in 10-bits, although this comes at the expense of CPU processing when doing the 8-bit to 10-bit conversion of the input pixel format.
> And of course if it is possible to encode 10bit with 8bit input?
> Carl Eugen
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel