[FFmpeg-trac] #11182(undetermined:closed): testyuvsrc and yuv444p->rgba->yuv444p conversion result in huge difference
FFmpeg
trac at avcodec.org
Mon Sep 9 16:32:07 EEST 2024
#11182: testyuvsrc and yuv444p->rgba->yuv444p conversion result in huge difference
-------------------------------------+-------------------------------------
Reporter: Andrew-R | Owner: (none)
Type: defect | Status: closed
Priority: normal | Component:
| undetermined
Version: unspecified | Resolution: invalid
Keywords: colorspace | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Andrew-R):
I also tried this command (bt2020 colorspace, rgba64le intermediate step)
bash-5.1$ /dev/shm/ffmpeg/ffmpeg -f lavfi -color_range 1 -i yuvtestsrc
-frames 1 -r 25 -vf
scale=out_color_matrix=bt2020:out_range=pc:in_color_matrix=bt2020:in_range=pc,format=rgba64le,scale=out_color_matrix=bt2020:out_range=pc,format=yuv444p,scale=out_color_matrix=bt2020:out_range=tv
/dev/shm/yuv-mpeg-rgba-yuv444p.y4m -debug log
ffmpeg version N-115741-g8a314e3f11 Copyright (c) 2000-2024 the FFmpeg
developers
built with gcc 11.2.0 (GCC)
configuration: --disable-debug
libavutil 59. 36.100 / 59. 36.100
libavcodec 61. 12.100 / 61. 12.100
libavformat 61. 5.101 / 61. 5.101
libavdevice 61. 2.100 / 61. 2.100
libavfilter 10. 2.102 / 10. 2.102
libswscale 8. 2.100 / 8. 2.100
libswresample 5. 2.100 / 5. 2.100
matched as AVOption 'debug' with argument 'log'.
Trailing option(s) found in the command: may be ignored.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input url yuvtestsrc.
Applying option f (force container format (auto-detected otherwise)) with
argument lavfi.
Successfully parsed a group of options.
Opening an input file: yuvtestsrc.
detected 4 logical cores
[Parsed_yuvtestsrc_0 @ 0xb4e46c0] size:320x240 rate:25/1
duration:-1.000000 sar:1/1
[AVFilterGraph @ 0xb4e3f00] query_formats: 2 queried, 3 merged, 0 already
done, 0 delayed
[lavfi @ 0xb4e3840] All info found
Input #0, lavfi, from 'yuvtestsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame,
yuv444p(tv), 320x240 [SAR 1:1 DAR 4:3], 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: output url /dev/shm/yuv-mpeg-rgba-yuv444p.y4m.
Applying option frames (set the number of frames to output) with argument
1.
Applying option r (override input framerate/convert to given output
framerate (Hz value, fraction or abbreviation)) with argument 25.
Applying option vf (alias for -filter:v (apply filters to video streams))
with argument
scale=out_color_matrix=bt2020:out_range=pc:in_color_matrix=bt2020:in_range=pc,format=rgba64le,scale=out_color_matrix=bt2020:out_range=pc,format=yuv444p,scale=out_color_matrix=bt2020:out_range=tv.
Successfully parsed a group of options.
Opening an output file: /dev/shm/yuv-mpeg-rgba-yuv444p.y4m.
[out#0/yuv4mpegpipe @ 0xb520cc0] No explicit maps, mapping streams
automatically...
[vost#0:0/wrapped_avframe @ 0xb521480] Created video stream from input
stream 0:0
[AVFilterGraph @ 0xb5226c0] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xb5226c0] Setting 'out_range' to value 'pc'
[AVFilterGraph @ 0xb5226c0] Setting 'in_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xb5226c0] Setting 'in_range' to value 'pc'
[AVFilterGraph @ 0xb5226c0] Setting 'pix_fmts' to value 'rgba64le'
[AVFilterGraph @ 0xb5226c0] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xb5226c0] Setting 'out_range' to value 'pc'
[AVFilterGraph @ 0xb5226c0] Setting 'pix_fmts' to value 'yuv444p'
[AVFilterGraph @ 0xb5226c0] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xb5226c0] Setting 'out_range' to value 'tv'
[Parsed_scale_0 @ 0xb523680] w:iw h:ih flags:'' interl:0
[Parsed_scale_2 @ 0xb51f640] w:iw h:ih flags:'' interl:0
[Parsed_scale_4 @ 0xb51fe80] w:iw h:ih flags:'' interl:0
File '/dev/shm/yuv-mpeg-rgba-yuv444p.y4m' already exists. Overwrite? [y/N]
y
[file @ 0xb51f880] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe
(native))
[vost#0:0/wrapped_avframe @ 0xb521480] Starting thread...
[vf#0:0 @ 0xb5223c0] Starting thread...
[vist#0:0/wrapped_avframe @ 0xb5205c0] [dec:wrapped_avframe @ 0xb53f900]
Starting thread...
[in#0/lavfi @ 0xb4e35c0] Starting thread...
Press [q] to stop, [?] for help
[AVFilterGraph @ 0xf4200a40] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xf4200a40] Setting 'out_range' to value 'pc'
[AVFilterGraph @ 0xf4200a40] Setting 'in_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xf4200a40] Setting 'in_range' to value 'pc'
[AVFilterGraph @ 0xf4200a40] Setting 'pix_fmts' to value 'rgba64le'
[AVFilterGraph @ 0xf4200a40] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xf4200a40] Setting 'out_range' to value 'pc'
[AVFilterGraph @ 0xf4200a40] Setting 'pix_fmts' to value 'yuv444p'
[AVFilterGraph @ 0xf4200a40] Setting 'out_color_matrix' to value 'bt2020'
[AVFilterGraph @ 0xf4200a40] Setting 'out_range' to value 'tv'
[Parsed_scale_0 @ 0xf42023c0] w:iw h:ih flags:'' interl:0
[Parsed_scale_2 @ 0xf420bcc0] w:iw h:ih flags:'' interl:0
[Parsed_scale_4 @ 0xf4215680] w:iw h:ih flags:'' interl:0
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'video_size' to
value '320x240'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'pix_fmt' to value
'5'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'time_base' to value
'1/25'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'pixel_aspect' to
value '1/1'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'colorspace' to
value '2'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'range' to value '1'
[graph -1 input from stream 0:0 @ 0xf4220580] Setting 'frame_rate' to
value '25/1'
[graph -1 input from stream 0:0 @ 0xf4220580] w:320 h:240 pixfmt:yuv444p
tb:1/25 fr:25/1 sar:1/1 csp:unknown range:tv
[AVFilterGraph @ 0xf4200a40] query_formats: 7 queried, 18 merged, 0
already done, 0 delayed
[swscaler @ 0xf4224b40] [swscaler @ 0xf422ddc0] Forcing full internal H
chroma due to input having non subsampled chroma
[swscaler @ 0xf4224b40] [swscaler @ 0xf424b180] Forcing full internal H
chroma due to input having non subsampled chroma
[swscaler @ 0xf4224b40] [swscaler @ 0xf4267d40] Forcing full internal H
chroma due to input having non subsampled chroma
[swscaler @ 0xf4224b40] [swscaler @ 0xf4284d00] Forcing full internal H
chroma due to input having non subsampled chroma
[swscaler @ 0xf4224b40] [swscaler @ 0xf42a1cc0] Forcing full internal H
chroma due to input having non subsampled chroma
[Parsed_scale_0 @ 0xf42023c0] w:320 h:240 fmt:yuv444p csp:unknown range:tv
sar:1/1 -> w:320 h:240 fmt:rgba64le csp:gbr range:pc sar:1/1
flags:0x00000004
[Parsed_scale_0 @ 0xf42023c0] [framesync @ 0xf4202494] Selected 1/25 time
base
[Parsed_scale_0 @ 0xf42023c0] [framesync @ 0xf4202494] Sync level 1
[Parsed_scale_2 @ 0xf420bcc0] w:320 h:240 fmt:rgba64le csp:gbr range:pc
sar:1/1 -> w:320 h:240 fmt:yuv444p csp:bt2020nc range:pc sar:1/1
flags:0x00000004
[Parsed_scale_2 @ 0xf420bcc0] [framesync @ 0xf420bd94] Selected 1/25 time
base
[Parsed_scale_2 @ 0xf420bcc0] [framesync @ 0xf420bd94] Sync level 1
[Parsed_scale_4 @ 0xf4215680] w:320 h:240 fmt:yuv444p csp:bt2020nc
range:pc sar:1/1 -> w:320 h:240 fmt:yuv444p csp:bt2020nc range:tv sar:1/1
flags:0x00000004
[Parsed_scale_4 @ 0xf4215680] [framesync @ 0xf4215714] Selected 1/25 time
base
[Parsed_scale_4 @ 0xf4215680] [framesync @ 0xf4215714] Sync level 1
[graph -1 input from stream 0:0 @ 0xf4220580] video frame properties
congruent with link at pts_time: 0
Output #0, yuv4mpegpipe, to '/dev/shm/yuv-mpeg-rgba-yuv444p.y4m':
Metadata:
encoder : Lavf61.5.101
Stream #0:0, 0, 1/25: Video: wrapped_avframe, 1 reference frame,
yuv444p(tv, bt2020nc/unknown/unknown, progressive), 320x240 [SAR 1:1 DAR
4:3], 0/1, q=2-31, 200 kb/s, 25 fps, 25 tbn
Metadata:
encoder : Lavc61.12.100 wrapped_avframe
[out#0/yuv4mpegpipe @ 0xb520cc0] Starting thread...
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: send 0 ts 0.04
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: 0 frames_max 1 reached
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: finish 0; head ts 0.04
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: finish queue
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: receive 0 ts 0.04 queue head 0 ts
0.04
[vf#0:0 @ 0xb5223c0] All consumers returned EOF
[vost#0:0/wrapped_avframe @ 0xb521480] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0xb521480] Terminating thread with return code
0 (success)
[out#0/yuv4mpegpipe @ 0xb520cc0] All streams finished
[out#0/yuv4mpegpipe @ 0xb520cc0] Terminating thread with return code 0
(success)
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: 0 EOF
[out#0/yuv4mpegpipe @ 0xb520cc0] sq: finish queue
[vf#0:0 @ 0xb5223c0] Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0xb5205c0] [dec:wrapped_avframe @ 0xb53f900]
Decoder returned EOF, finishing
[vist#0:0/wrapped_avframe @ 0xb5205c0] [dec:wrapped_avframe @ 0xb53f900]
Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0xb5205c0] All consumers of this stream are
done
[in#0/lavfi @ 0xb4e35c0] All consumers are done
[in#0/lavfi @ 0xb4e35c0] Terminating thread with return code 0 (success)
[AVIOContext @ 0xb540040] Statistics: 230476 bytes written, 0 seeks, 1
writeouts
[out#0/yuv4mpegpipe @ 0xb520cc0] Output file #0 (/dev/shm/yuv-mpeg-rgba-
yuv444p.y4m):
[out#0/yuv4mpegpipe @ 0xb520cc0] Output stream #0:0 (video): 1 frames
encoded; 1 packets muxed (308 bytes);
[out#0/yuv4mpegpipe @ 0xb520cc0] Total: 1 packets (308 bytes) muxed
[out#0/yuv4mpegpipe @ 0xb520cc0] video:0KiB audio:0KiB subtitle:0KiB other
streams:0KiB global headers:0KiB muxing overhead: 74729.870130%
frame= 1 fps=0.0 q=-0.0 Lsize= 225KiB time=00:00:00.04
bitrate=46095.2kbits/s speed=2.17x
[in#0/lavfi @ 0xb4e35c0] Input file #0 (yuvtestsrc):
[in#0/lavfi @ 0xb4e35c0] Input stream #0:0 (video): 19 packets read
(5852 bytes); 10 frames decoded; 0 decode errors;
[in#0/lavfi @ 0xb4e35c0] Total: 19 packets (5852 bytes) demuxed
and colorbars at their ends very much still here .. :(
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11182#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list