[FFmpeg-devel] [PATCH] avcodec/dpx: Support for RGB and RGBA 12-bit packed decoding

Kieran O Leary kieran.o.leary at gmail.com
Thu Feb 8 17:23:58 EET 2018


Hi Jerome,

Thank you so much for this patch.

I ran a quick test and ffmpeg and ffplay seems to decode these files
just fine. I noticed that taking a short 12-bit sequence (i didn't
even realise that they were big endian actually) from the Blackmagic
Cintel Scanner turned into FFV1 version 3 in Matroska with identical
framemd5s. I did get some past duration errors in the terminal though:

Here's a few frames that I used in this example. It seems to happen at
the 16th frame..
https://www.dropbox.com/sh/imaasud6yora8me/AAAXXGIQ9w6fFfvx9qigizyVa?dl=0https://www.dropbox.com/sh/imaasud6yora8me/AAAXXGIQ9w6fFfvx9qigizyVa?dl=0

./ffmpeg -start_number 00086400 -i
first_frames/99075c82-2770-4020-a289-d191dab0b852_1_%08d.dpx -c:v ffv1
-level 3 out.mkv

ffmpeg version N-89977-gddd851f Copyright (c) 2000-2018 the FFmpeg developers

  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)

  configuration:

  libavutil      56.  7.100 / 56.  7.100

  libavcodec     58. 10.100 / 58. 10.100

  libavformat    58.  9.100 / 58.  9.100

  libavdevice    58.  1.100 / 58.  1.100

  libavfilter     7. 11.101 /  7. 11.101

  libswscale      5.  0.101 /  5.  0.101

  libswresample   3.  0.101 /  3.  0.101

Input #0, image2, from
'first_frames/99075c82-2770-4020-a289-d191dab0b852_1_%08d.dpx':

  Duration: 00:00:00.92, start: 0.000000, bitrate: N/A

    Stream #0:0: Video: dpx, gbrp12le, 2160x1702 [SAR 1:1 DAR
1080:851], 24 tbr, 25 tbn, 24 tbc

Stream mapping:

  Stream #0:0 -> #0:0 (dpx (native) -> ffv1 (native))

Press [q] to stop, [?] for help

[ffv1 @ 0x7fd89c013800] bits_per_raw_sample > 8, forcing range coder

Output #0, matroska, to 'out.mkv':

  Metadata:

    encoder         : Lavf58.9.100

    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), gbrp12le, 2160x1702
[SAR 1:1 DAR 1080:851], q=2-31, 200 kb/s, 24 fps, 1k tbn, 24 tbc

    Metadata:

      encoder         : Lavc58.10.100 ffv1

frame=    2 fps=0.0 q=-0.0 size=   11653kB time=00:00:00.04
bitrate=2220121.7kbiframe=    4 fps=3.4 q=-0.0 size=   34930kB
time=00:00:00.12 bitrate=2270993.5kbiframe=    6 fps=3.4 q=-0.0 size=
 58259kB time=00:00:00.20 bitrate=2283544.4kbiframe=    8 fps=3.3
q=-0.0 size=   81588kB time=00:00:00.29 bitrate=2281121.4kbiframe=
10 fps=3.3 q=-0.0 size=  104852kB
time=00:00:00.37bitrate=2284434.3kbiframe=   12 fps=3.3 q=-0.0 size=
128130kB time=00:00:00.45 bitrate=2286805.8kbiframe=   14 fps=3.3
q=-0.0 size=  151452kB time=00:00:00.54 bitrate=2284891.4kbiframe=
16 fps=3.3 q=-0.0 size=  174741kB time=00:00:00.62
bitrate=2286710.7kbiPast duration 0.639992 too large

Past duration 0.679985 too large

frame=   18 fps=3.2 q=-0.0 size=  198043kB time=00:00:00.70
bitrate=2288247.4kbiPast duration 0.719994 too large

Past duration 0.759987 too large

frame=   20 fps=3.2 q=-0.0 size=  221335kB time=00:00:00.79
bitrate=2286478.6kbiPast duration 0.799995 too large

Past duration 0.839989 too large

frame=   22 fps=3.2 q=-0.0 size=  244648kB time=00:00:00.87
bitrate=2287850.0kbiPast duration 0.879997 too large

frame=   23 fps=3.1 q=-0.0 size=  256309kB time=00:00:00.91
bitrate=2287235.2kbiframe=   23 fps=3.1 q=-0.0 Lsize=  267948kB
time=00:00:00.91 bitrate=2391103.3kbits/s speed=0.123x

video:267947kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.000610%

Best,

Kieran O'Leary
IFI Irish Film Archive


More information about the ffmpeg-devel mailing list