[x264-devel] Lossless Compression

Raul Lopez raulizahi at gmail.com
Wed Aug 21 17:32:47 CEST 2013


Interesting, it is an artifact of JM 18.4 decoding the x264 output.

Decoding with ffmpeg:

ffmpeg -i X_cr0_1920x1056_QP0.h264 -vcodec rawvideo -pix_fmt yuv420p
ff_X_cr0_1920x1056_QP0.yuv

is lossless, there is just two interesting lines in the output of ffmpeg:

ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 10 2013 07:28:36 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --enable-shared --enable-gpl
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[h264 @ 0x7fc1f901a600] decoding for stream 0 failed
Input #0, h264, from 'X_cr0_1920x1056_QP0.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv420p, 1920x1056,
25 tbr, 1200k tbn, 50 tbc                  <-----------
Output #0, rawvideo, to 'ff_X_cr0_1920x1056_QP0.yuv':
  Metadata:
    encoder         : Lavf55.12.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1056,
q=2-31, 200 kb/s, 90k tbn, 25 tbc <-------------
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> rawvideo)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=    2970kB time=00:00:00.04
bitrate=608256.0kbits/s
video:2970kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.000000%


why does it say:

    Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv420p, 1920x1056,
25 tbr, 1200k tbn, 50 tbc

and then

    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1056,
q=2-31, 200 kb/s, 90k tbn, 25 tbc

Q=2-31?  High 4:4:4 Predictive? Is it possible that something is signaled
incorrectly in the x264 stream for JM 18.4?

RAUL


On Wed, Aug 21, 2013 at 8:04 AM, Raul Lopez <raulizahi at gmail.com> wrote:

> I am trying to use x264 to do Lossless Image and Video Compression, I am
> using this command line:
>
> x264 --qp 0 --input-res 1920x1056 --output X_cr0_1920x1056_QP0.h264
> --dump-yuv X_cr0_1920x1056_QP0.yuv
> ~/Desktop/Uncompressed/crowd_run_1920x1056p50_GL420_0.yuv
>
> The --dump-yuv file : X_cr0_1920x1056_QP0.yuv is lossless (Y, U and V)
>
> but
>
> when I decode X_cr0_1920x1056_QP0.h264 with JM 18.4, the decoded output's
> Y component is NOT lossless.
>
> The Y PSNR is 29.29dB while for U and V it is Perfect.  The picture also
> looks different as if the contrast changed.
>
> This is the version I am using:
>
> x264 0.135.x
> (libswscale 2.3.100)
> (libavformat 55.12.100)
> built on Aug 15 2013, gcc: 4.2.1 (Based on Apple Inc. build 5658) (LLVM
> build 2336.11.00)
> configuration: --bit-depth=8 --chroma-format=all
> x264 license: GPL version 2 or later
> libswscale/libavformat license: GPL version 2 or later
>
> Are there any other command line settings that I should use to achieve
> decoded Y lossless output?
>
> RAUL
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130821/fdf981ea/attachment.html>


More information about the x264-devel mailing list