Awesome.
I would say it would seem natural to stick with the existing behaviour for
the default, which follows your philosophy of the reasonable defaults. And
for those in my situation where they need to control the sampling, they can
specifically apply the setting. FWIW, it appears the stated Imagemagick
behaviour is to use 4:4:4 automatically if the quality value is >= 90, and
disregard any sampling settings that were passed (or the default).

On Fri, Oct 17, 2014 at 1:17 PM, Larry Gritz <[email protected]> wrote:

> Yes, sounds reasonable. Let's set/accept an attribute called
> "jpeg:subsampling" set to one of those values for explicit control.
>
> We want to detect and set it in the reader as well, so that "copy"-like
> operations from jpeg to jpeg preserve the sampling of the original unless
> overridden.
>
> Now we just need to haggle over the proper default.
>
> http://en.wikipedia.org/wiki/Chroma_subsampling
> This states fairly clearly that 4:2:0 (what we do now) is the usual for
> JPEG/JFIF, MJPEG, DVD, BluRay, H.264, and many others. That's probably why
> the jpeg library uses this default. Maybe Nuke and ImageMagick go out of
> their way to request a somewhat higher quality? I'm tempted to argue for
> keeping the default as it is, and with the extra control, those who care
> could request 4:2:2 or 4:4:4. But I'm willing to be swayed if consensus is
> that the default should be higher quality.
>
>
>
> On Oct 16, 2014, at 2:59 PM, Justin Israel <[email protected]> wrote:
>
> So maybe the solution is to offer some constants like:
>
>    - "4:4:4" - Calls jpeg_set_colorspace() with JCS_RGB
>    - "4:2:2" - does this
>    <https://github.com/LuaDist/libjpeg/blob/master/jcparam.c#L454>, but
>    uses SET_COMP(0, 1, 2,1, 0, 0,0); for the first component instead
>    - "4:2:0" - Does exactly what it does now
>    - "4:1:1" - uses 4,1  1,1  1,1 for the 3 components
>
> Does that sound reasonable? Then you get as much control as
> Nuke/imagemagick would offer
>
>
> --
> Larry Gritz
> [email protected]
>
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to