<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>I was today experimenting with lossless encoding in x264 (using
ffmpeg). <br>
</p>
<p>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.</p>
<p>When using 8bit yuv, this works as expected:</p>
<blockquote>
<p>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<br>
ffmpeg -i h264-8-420.m4v -c:v rawvideo -f rawvideo -pix_fmt
yuv420p10le decompressed-8-420.yuv<br>
diff -s yuv420-8.yuv decompressed-8-420.yuv</p>
</blockquote>
<p>The diff, as expected, resulted in identical files.</p>
<p>Doing the same with a yuv420p10le however, does not:</p>
<blockquote>
<p>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<br>
ffmpeg -i h264-10-420.m4v -c:v rawvideo -f rawvideo -pix_fmt
yuv420p10le decompressed-10-420.yuv<br>
diff -s yuv420-10.yuv decompressed-10-420.yuv</p>
</blockquote>
<p>Here, while the result looks ok optically, the diff (or a cmp)
show a lot of differences.</p>
<p>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?</p>
<p>Thanks & regards,</p>
<p>Simon</p>
<p>P.S.: BTW - will support for 12 and 14 bit come at any time in
the future?</p>
<br>
</body>
</html>