[FFmpeg-devel] [PATCH 12/24] avcodec/mjpegenc: add support for non-YUVJ formats

wm4 nfxjfg at googlemail.com
Wed May 2 21:46:17 EEST 2018


On Wed, 2 May 2018 19:37:27 +0100
Rostislav Pehlivanov <atomnuker at gmail.com> wrote:

> On 2 May 2018 at 19:16, wm4 <nfxjfg at googlemail.com> wrote:
> 
> > On Wed, 2 May 2018 19:14:21 +0100
> > Rostislav Pehlivanov <atomnuker at gmail.com> wrote:
> >  
> > > On 2 May 2018 at 19:04, Marton Balint <cus at passwd.hu> wrote:
> > >  
> > > >
> > > >
> > > > On Tue, 1 May 2018, Rostislav Pehlivanov wrote:
> > > >
> > > > On 1 May 2018 at 23:22, Paul B Mahol <onemda at gmail.com> wrote:  
> > > >>
> > > >> On 5/2/18, Michael Niedermayer <michael at niedermayer.cc> wrote:  
> > > >>> > Hi
> > > >>> >
> > > >>> > On Tue, May 01, 2018 at 09:40:01PM +0200, Paul B Mahol wrote:  
> > > >>> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > > >>> >> ---
> > > >>> >>  libavcodec/mjpegenc.c      | 5 ++++-
> > > >>> >>  libavcodec/mpegvideo_enc.c | 3 +--
> > > >>> >>  tests/lavf-regression.sh   | 2 +-
> > > >>> >>  3 files changed, 6 insertions(+), 4 deletions(-)  
> > > >>> >
> > > >>> > This doesnt work  
> > > >>>
> > > >>> It does work, if you want full range set full range as option.
> > > >>> Check visually colors.
> > > >>> This happens because rgb is still marked incorrectly as limited  
> > range,  
> > > >>> so limited is picked instead.
> > > >>>
> > > >>>  
> > > >> Shouldn't this be part of the patchset?
> > > >>  
> > > >
> > > > I thought that color_range only matters for YUV formats, for RGB it is
> > > > ignored. If it was decided to support limited RGB, then please update  
> > the  
> > > > docs of AVCOL_RANGE_JPEG/MPEG. Otherwise the color_range of an RGB  
> > format  
> > > > should not matter.
> > > >
> > > > On the other hand, if we decide to support limited RGB, then maybe a  
> > new  
> > > > member in color_range is better, this way we are able to specify more
> > > > easily that we support limited YUV and full range RGB. (like ffplay
> > > > typically does).
> > > >  
> > >
> > > Limited range RGB does NOT exist in the computer world, and I don't give  
> > a  
> > > fuck if broadcasting uses it. I've fought hard to keep it from getting  
> > into  
> > > AV1.
> > > So no, we will not be supporting limited range RGB.  
> >
> > You're very wrong. GPUs and HDMI (basically trash fire consumer
> > garbage) sometimes seem to require you to feed limited RGB.
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >  
> 
> Maybe if you took a second to read what I wrote. HDMI sometimes requires
> limited range rgb because its derived from broadcasting junk where they had
> technical limitations they weren't smart enough to overcome. GPUs can
> generate or convert RGB to limited range only for transmission, through the
> use of gamma LUTs I believe.

By that logic, aren't all mpeg style codecs (including vp9, av1, etc.)
also "broadcasting junk"? I mean, even YUV could be full range if it
weren't for broadcasting legacy.

> Either way, limited range RGB does NOT exist in computers, as in, not
> inside codecs, nor is there anything supporting such, and we will certainly
> not start doing it.

Denial of reality, I guess.


More information about the ffmpeg-devel mailing list