[x264-devel] Lossless with 10bit pixel depth
Simon Dumke
simon.dumke at ipp.mpg.de
Wed Jul 10 10:13:44 CEST 2019
Hi all,
I was today experimenting with lossless encoding in x264 (using ffmpeg).
My experiment was coming in with a raw yuv420 stream, encoding that with
h264 high444 witch crf=0. Than decoding it again to raw yuv420 and
making a binary diff to the original.
When using 8bit yuv, this works as expected:
ffmpeg -f rawvideo -video_size 1024x1280 -pixel_format yuv420 -i
yuv420-8.yuv -c:v libx264 -pix_fmt yuv420 -profile:v high444 -crf 0
-preset:v slow h264-8-420.m4v
ffmpeg -i h264-8-420.m4v -c:v rawvideo -f rawvideo -pix_fmt
yuv420p10le decompressed-8-420.yuv
diff -s yuv420-8.yuv decompressed-8-420.yuv
The diff, as expected, resulted in identical files.
Doing the same with a yuv420p10le however, does not:
ffmpeg -f rawvideo -video_size 1024x1280 -pixel_format yuv420p10le
-i yuv420-10.yuv -c:v libx264 -pix_fmt yuv420p10 -profile:v high444
-crf 0 -preset:v slow h264-10-420.m4v
ffmpeg -i h264-10-420.m4v -c:v rawvideo -f rawvideo -pix_fmt
yuv420p10le decompressed-10-420.yuv
diff -s yuv420-10.yuv decompressed-10-420.yuv
Here, while the result looks ok optically, the diff (or a cmp) show a
lot of differences.
My question: Do i have to do more to have lossless 10bit encoding? Is it
even possible? Or is there another error in my thinking?
Thanks & regards,
Simon
P.S.: BTW - will support for 12 and 14 bit come at any time in the future?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20190710/a67e1024/attachment.html>
More information about the x264-devel
mailing list