Opened 16 months ago
Last modified 16 months ago
#10532 new defect
Color changes at w => 1280, h >= 578 with libplacebo filter on rgb source
Reported by: | nicol | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug: Up scale, down scale or not scale, color changes with resolution through libplacebo.
rgb24(testsrc), colorchart(gbrp), rgbtestsrc(rgba) are changed,
yuv420p(smptebars) is not changed.
How to reproduce:
% ffmpeg -f lavfi -i colorchart=d=2 -vf scale=w=1278:h=576:flags=lanczos,setsar=1 -crf 18 -pix_fmt yuv420p colorchart_scale.mp4 -y % ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf hwupload,libplacebo=inputs=1:w=1278:h=576:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p colorchart_libplacebo.mp4 -y Color doesn't change. % ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf hwupload,libplacebo=inputs=1:w=1280:h=576:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p colorchart_libplacebo_w1280.mp4 -y % ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf hwupload,libplacebo=inputs=1:w=1278:h=578:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p colorchart_libplacebo_h578.mp4 -y Color changes. ffmpeg version N-111792-gf0b1cab538-20230821 built on ... BtbN Auto-Build 2023-08-22 12:49
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Attachments (6)
Change History (9)
by , 16 months ago
Attachment: | colorchart_scale.mp4 added |
---|
by , 16 months ago
Attachment: | colorchart_libplacebo.mp4 added |
---|
by , 16 months ago
Attachment: | colorchart_libplacebo_w1280.mp4 added |
---|
by , 16 months ago
Attachment: | colorchart_libplacebo_h578.mp4 added |
---|
comment:1 by , 16 months ago
comment:3 by , 16 months ago
Adding itrc=srgb and fast=1 in the colorspace filter first gave the same look as resized with the scale filter.
% ffmpeg -f lavfi -i colorchart=d=2 -vf scale=w=1280:h=576:flags=lanczos,setsar=1 -crf 18 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -color_range tv colorchart_scale_w1280.mp4
% ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf hwupload,libplacebo=inputs=1:w=1280:h=576:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -color_range tv colorchart_libplacebo_w1280.mp4
% ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf colorspace=all=bt709:iprimaries=bt709:itrc=srgb:ispace=bt709:fast=1,hwupload,libplacebo=inputs=1:w=1280:h=576:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -color_range tv colorchart_colorspace_libplacebo_w1280.mp4
Looks same chrome, edge and firefox.
by , 16 months ago
Attachment: | colorchart_scale_w1280.mp4 added |
---|
by , 16 months ago
Attachment: | colorchart_colorspace_libplacebo_w1280.mp4 added |
---|
Adding
-color_primaries bt709 -color_trc bt709 -colorspace bt709 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -color_range tv
chrome, Windows edge display color looks same, but only firefox looks different.% ffmpeg -hwaccel_output_format vulkan -init_hw_device vulkan=vk -filter_hw_device vk -f lavfi -i colorchart=d=2 -vf hwupload,libplacebo=inputs=1:w=1280:h=576:upscaler=lanczos:format=yuv420p:range=tv,hwdownload,format=yuv420p -crf 18 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -color_range tv colorchart_libplacebo_w1280_opt2.mp4 -y