#8404 closed defect (fixed)
“ffmpeg -i input -c:v libx264rgb output”: ffmpeg sets the color range to “tv” instead of “pc”
| Reported by: | Kdmeizk | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
ffmpeg -h encoder=libx264rgb
Encoder libx264rgb [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB]:
General capabilities: delay threads
Threading capabilities: auto
Supported pixel formats: bgr0 bgr24 rgb24
cat libavcodec/libx264.c
[…]
x4->params.vui.b_fullrange = avctx->pix_fmt == AV_PIX_FMT_YUVJ420P ||
avctx->pix_fmt == AV_PIX_FMT_YUVJ422P ||
avctx->pix_fmt == AV_PIX_FMT_YUVJ444P ||
avctx->color_range == AVCOL_RANGE_JPEG;
Change History (4)
follow-up: 2 comment:1 by , 4 years ago
comment:2 by , 4 years ago
Replying to mypopy:
Pls try the patch: https://patchwork.ffmpeg.org/patch/16446/
ignore the patch, you can change the color range like the command:
ffmpeg -i input -c:v libx264rgb -color_range pc output
comment:3 by , 4 years ago
What's the practical impact of this issue?..
I've tested some input sources with PNG and libx264rgb (without setting -color_range), all compare groups yielded a SSIM of 1.
comment:4 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
And so what? FFmpeg does not support limited rgb, it is prohibited to use it. BTW, dumb. That is #1851
all compare groups yielded a SSIM of 1.
That is again just because see above. And BTW that does not happen anymore when input is gdigrub, for example. Fixed by Jan here https://github.com/FFmpeg/FFmpeg/commit/7ca71b79f2b3256a0eef1a099b857ac9e4017e36 and for x265 here https://github.com/FFmpeg/FFmpeg/commit/dbe40478e293f78c5a5e4302eb3f38257106ee86



Pls try the patch: https://patchwork.ffmpeg.org/patch/16446/