Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Connor Worley):

 The vf_scale filter you linked is automatically added to the filtergraph
 depending on the input format:
 
https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavfilter/avfiltergraph.c;h=e4f59f56e2b102372178c693d8439059565d207f;hb=HEAD#l467
 -- this is not always necessary, so it does not always happen.

 Both this and the vf_scale filter are unrelated to the lack of a warning
 in swscale.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Balling):

 The warning does work, just not everywhere. Why I dunno, known bug. Try
 this file (please download it, ffplay the url will not work)
 
https://web.archive.org/web/20210329043315/http://files.1f0.de/samples/bunny_444_YCgCo.mkv
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Connor Worley):

 I am aware the colorspace is broken in swscale and not in mpv. If the
 difficulties in fixing it in swscale are insurmountable, I believe it
 would be better to add a warning or deprecate and remove it rather than
 leaving it silently broken.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Balling):

 Oh, I suppose you do not get it how to enable it in MPV. So the software
 decoder does not support YCgCo, of course. Use:

 mpv.com  --target-colorspace-hint=yes -vo=gpu-next -gpu-api=d3d11
 -hwdec=d3d11va dice_ycg6.mov

 That is for Windows.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Balling):

 See my comment in https://trac.ffmpeg.org/ticket/9132#comment:2


 >Identity (and YCgCo) are very different matrices, as the order of
 operations are different (MatrixCoefficients 0 (Identity) or 8 (YCgCo) not
 only use different equations for the full-to-limited range adjustment but
 also perform the full-to-limited range adjustment before applying the
 transfer matrix).


 There is no point in implementing that, Chrome/Chromium implemented it and
 so did Nvidia. See https://github.com/mpv-player/mpv/issues/4340


 Mpv has much better code for this that just works. Ffplay uses SDL, that
 cannot support it, see #8862
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Connor Worley):

 That is not true of the swscale code path. The attached file does not
 display a warning:


 {{{
 ffplay started on 2024-01-31 at 16:01:17
 Report written to "ffplay-20240131-160117.log"
 Log level: 48
 Command line:
 ffplay /Users/cworley/Downloads/dice_ycg6.mov -report -autoexit
 ffplay version 6.1.1 Copyright (c) 2003-2023 the FFmpeg developers
   built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
   configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_2 --enable-
 shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
 --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-
 gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-
 libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame
 --enable-libopus --enable-librav1e --enable-librist --enable-librubberband
 --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1
 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
 libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
 libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
 libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr
 --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
 --enable-videotoolbox --enable-audiotoo  libavutil  58. 29.100 / 58.
 29.100
   libavcodec 60. 31.102 / 60. 31.102
   libavformat60. 16.100 / 60. 16.100
   libavdevice60.  3.100 / 60.  3.100
   libavfilter 9. 12.100 /  9. 12.100
   libswscale  7.  5.100 /  7.  5.100
   libswresample   4. 12.100 /  4. 12.100
   libpostproc57.  3.100 / 57.  3.100
 Initialized metal renderer.
 [AVFormatContext @ 0x151b35420] Opening
 '/Users/cworley/Downloads/dice_ycg6.mov' for reading
 [file @ 0x62e98c60] Setting default whitelist 'file,crypto,data'
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] Format mov,mp4,m4a,3gp,3g2,mj2
 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] ISO: File Type Major Brand: qt
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] Unknown dref type 0x206c7275 size
 12
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] Processing st: 0, edit list 0 -
 media time: 0, duration: 522
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] Before avformat_find_stream_info()
 pos: 103588 bytes read:33443 seeks:1 nb_streams:1
 [dxv @ 0x14200bc00] YOCOCG6 compression with YCG6 texture (version 3.0)
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x151b35420] After avformat_find_stream_info()
 pos: 102913 bytes read:136320 seeks:2 frames:1
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/cworley/Downloads/dice_ycg6.mov':
   Metadata:
 major_brand : qt
 minor_version   : 512
 compatible_brands: qt
 encoder : Resolume
   Duration: 00:00:00.03, start: 0.00, bitrate: 24861 kb/s
   Stream #0:0[0x1], 1, 1/15360: Video: dxv (DXD3 / 0x33445844),
 yuv420p(ycgco/unknown/unknown), 800x600, 24690 kb/s, 30 fps, 30 tbr, 15360
 tbn (default)
 Metadata:
   handler_name: VideoHandler
   vendor_id   : FFMP
 detected 12 logical cores
 [dxv @ 0x14200bfb0] YOCOCG6 compression with YCG6 texture (version 3.0)
 Video frame changed from size:0x0 format:none serial:-1 to size:800x600
 format:yuv420p serial:1
 [ffplay_buffer @ 0x62b94420] Setting 'video_size' to value '800x600'
 [ffplay_buffer @ 0x62b94420] Setting 'pix_fmt' to value '0'
 [ffplay_buffer @ 0x62b94420] Setting 'time_base' to value '1/15360'
 [ffplay_buffer @ 0x62b94420] Setting 'pixel_aspect' to value '0/1'
 [ffplay_buffer @ 0x62b94420] Setting 'frame_rate' to value '30/1'
 [ffplay_buffer @ 0x62b94420] w:800 h:600 pixfmt:yuv420p tb:1/15360
 fr:30/1 sar:0/1
 [AVFilterGraph @ 0x63899a40] query_formats: 2 queried, 1 merged, 0
 already done, 0 delayed
 Created 800x600 texture with SDL_PIXELFORMAT_IYUV.
0.01 M-V:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0
 [AVIOContext @ 0x151a1fb20] Statistics: 136320 bytes read, 2 seeks

 }}}
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracke

Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Balling):

 I have YCgCo samples. You do not have to attach them
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Changes (by Connor Worley):

 * Attachment "dice_ycg6.mov" added.

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Balling):

 We do.
 
https://github.com/FFmpeg/FFmpeg/blob/fa469545ba0782a9245474ecca873aa8984f506e/libavfilter/vf_scale.c#L775
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Comment (by Connor Worley):

 >We do not support YCoCg. Use mpv instead.

 I suggest adding some user-facing warning when AVCOL_SPC_YCOCG is used in
 places where it is intentionally unsupported.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10839(swscale:closed): incorrect YCoCg to RGB conversion in swscale

2024-01-31 Thread FFmpeg
#10839: incorrect YCoCg to RGB conversion in swscale
---+---
 Reporter:  Connor Worley  |Owner:  (none)
 Type:  defect |   Status:  closed
 Priority:  wish   |Component:  swscale
  Version:  unspecified|   Resolution:  wontfix
 Keywords: |   Blocked By:
 Blocking: |  Reproduced by developer:  0
Analyzed by developer:  0  |
---+---
Changes (by Balling):

 * status:  new => closed
 * resolution:   => wontfix

Comment:

 ?YCbCr matrix is selected for AVCOL_SPC_YCOCG, and incorrect color is
 produced.

 We do not support YCoCg. Use mpv instead.


 >A more accurate term for how color is stored in digital video would be
 ​YCbCr.

 Not that simple. YUV refers to pixel format used that is called
 AV_PIX_FMT_YUV*. The correct name is indeed AV_PIX_FMT_YUV*, not
 AV_PIX_FMT_YCBCR*. On the other hand the matrices used here
 
https://github.com/FFmpeg/FFmpeg/blob/fa469545ba0782a9245474ecca873aa8984f506e/libavutil/pixfmt.h#L608

 are indeed YCbCr, we do not support BT.407 analog TV's YUV.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".