#5916 closed defect (fixed)

extractplanes YUV and mergeplanes YUV something strange >8 bit depth

Reported by: nicol Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: mergeplanes
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: Extractplanes Y, U, V and mergeplanes that Y, U, V outputs strange color with same >8 bit depth filter setting.
yuv444p9le, yuv444p10le and yuv444p14le pixel of right are green, left are strange.
yuv444p9be, yuv444p10be, yuv444p14be, yuv444p16be and yuv444p16le pixel of right are green, but left are normal.

How to reproduce:

% ffmpeg -v 9 -loglevel 99 -f lavfi -i yuvtestsrc -filter_complex format=yuv444p16le,extractplanes=y+u+v
[y][u][v];[y][u][v]mergeplanes=0x001020:yuv444p16le -vframes 1 yuv444p16le.png
ffmpeg version N-82143-gbf14393 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-n
venc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls
--enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --ena
ble-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enab
le-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-
libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --e
nable-decklink --enable-zlib
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-i' ... matched as input file with argument 'yuvtestsrc'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with ar
gument 'format=yuv444p16le,extractplanes=y+u+v[y][u][v];[y][u][v]mergeplanes=0x001020:yuv444p16le'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argu
ment '1'.
Reading option 'yuv444p16le.png' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option filter_complex (create a complex filtergraph) with argument format=yuv444p16le,extractplanes=y
+u+v[y][u][v];[y][u][v]mergeplanes=0x001020:yuv444p16le.
Successfully parsed a group of options.
Parsing a group of options: input file yuvtestsrc.
Applying option f (force format) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: yuvtestsrc.
detected 4 logical cores
[Parsed_yuvtestsrc_0 @ 000000000032a6a0] size:320x240 rate:25/1 duration:-1.000000 sar:1/1
[AVFilterGraph @ 000000000051af20] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed
[lavfi @ 0000000000326fa0] All info found
[lavfi @ 0000000000326fa0] stream 0: start_time: 0.000 duration: -368934881474191040.000
[lavfi @ 0000000000326fa0] format: start_time: 0.000 duration: -9223372036854.775 bitrate=0 kb/s
Input #0, lavfi, from 'yuvtestsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/25: Video: rawvideo, 1 reference frame (444P / 0x50343434), yuv444p, 320x240 [SAR 1:1 DA
R 4:3], 0/1, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
[Parsed_format_0 @ 0000000000328e00] compat: called with args=[yuv444p16le]
[Parsed_format_0 @ 0000000000328e00] Setting 'pix_fmts' to value 'yuv444p16le'
[Parsed_extractplanes_1 @ 00000000005a5560] Setting 'planes' to value 'y+u+v'
[Parsed_mergeplanes_2 @ 00000000005a5620] Setting 'mapping' to value '0x001020'
[Parsed_mergeplanes_2 @ 00000000005a5620] Setting 'format' to value 'yuv444p16le'
Parsing a group of options: output file yuv444p16le.png.
Applying option vframes (set the number of video frames to output) with argument 1.
Successfully parsed a group of options.
Opening an output file: yuv444p16le.png.
Successfully opened the file.
[Parsed_format_0 @ 00000000005a5560] compat: called with args=[yuv444p16le]
[Parsed_format_0 @ 00000000005a5560] Setting 'pix_fmts' to value 'yuv444p16le'
[Parsed_extractplanes_1 @ 00000000005a5620] Setting 'planes' to value 'y+u+v'
[Parsed_mergeplanes_2 @ 00000000005a5700] Setting 'mapping' to value '0x001020'
[Parsed_mergeplanes_2 @ 00000000005a5700] Setting 'format' to value 'yuv444p16le'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'video_size' to value '320x240'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'pix_fmt' to value '5'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'time_base' to value '1/25'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 00000000005a57c0] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 00000000005a57c0] w:320 h:240 pixfmt:yuv444p tb:1/25 fr:25/1 sar:1/1 sws_para
m:flags=2
[format @ 00000000005a5960] compat: called with args=[rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16b
e|monob]
[format @ 00000000005a5960] Setting 'pix_fmts' to value 'rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya
16be|monob'
[auto-inserted scaler 0 @ 00000000005a5b00] w:iw h:ih flags:'bilinear' interl:0
[Parsed_format_0 @ 00000000005a5560] auto-inserting filter 'auto-inserted scaler 0' between the filter 'graph
0 input from stream 0:0' and the filter 'Parsed_format_0'
[auto-inserted scaler 1 @ 00000000005a5be0] w:iw h:ih flags:'bilinear' interl:0
[format @ 00000000005a5960] auto-inserting filter 'auto-inserted scaler 1' between the filter 'Parsed_mergepla
nes_2' and the filter 'format'
[AVFilterGraph @ 000000000058f560] query_formats: 6 queried, 5 merged, 2 already done, 0 delayed
[auto-inserted scaler 1 @ 00000000005a5be0] picking rgb48be out of 9 ref:yuv444p16le alpha:0
[auto-inserted scaler 0 @ 00000000005a5b00] w:320 h:240 fmt:yuv444p sar:1/1 -> w:320 h:240 fmt:yuv444p16le sar
:1/1 flags:0x2
[Parsed_mergeplanes_2 @ 00000000005a5700] [framesync @ 00000000005b04c8] Selected 1/25 time base
[Parsed_mergeplanes_2 @ 00000000005a5700] [framesync @ 00000000005b04c8] Sync level 1
[swscaler @ 0000000003a01d80] Forcing full internal H chroma due to input having non subsampled chroma
[auto-inserted scaler 1 @ 00000000005a5be0] w:320 h:240 fmt:yuv444p16le sar:1/1 -> w:320 h:240 fmt:rgb48be sar
:1/1 flags:0x2
Output #0, image2, to 'yuv444p16le.png':
  Metadata:
    encoder         : Lavf57.57.100
    Stream #0:0, 0, 1/25: Video: png, 1 reference frame, rgb48be, 320x240 [SAR 1:1 DAR 4:3], 0/1, q=2-31, 200
kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.65.100 png
Stream mapping:
  Stream #0:0 (rawvideo) -> format
  mergeplanes -> Stream #0:0 (png)
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 000000000032f4a0] PACKET SIZE: 230400, STRIDE: 960
[swscaler @ 0000000003bdf0c0] Forcing full internal H chroma due to input having non subsampled chroma
[auto-inserted scaler 1 @ 00000000005a5be0] w:320 h:240 fmt:yuv444p16le sar:0/1 -> w:320 h:240 fmt:rgb48be sar
:0/1 flags:0x2
Clipping frame in rate conversion by 0.000008
No more output streams to write to, finishing.
[file @ 0000000000599a60] Setting default whitelist 'file,crypto'
[AVIOContext @ 00000000005a91a0] Statistics: 0 seeks, 1 writeouts
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.981x
video:4kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (yuvtestsrc):
  Input stream #0:0 (video): 1 packets read (230400 bytes); 1 frames decoded;
  Total: 1 packets (230400 bytes) demuxed
Output file #0 (yuv444p16le.png):
  Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (3901 bytes);
  Total: 1 packets (3901 bytes) muxed
1 frames successfully decoded, 0 decoding errors
ffmpeg version N-82143-gbf14393
built on ... Zeranoe

Change History (2)

comment:2 Changed 23 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.