I could try and work on these changes myself once I had enough time, unless
someone were inclined to do them sooner. The thread didn't start out with
an idea for a patch, and it sort of evolved into one ☺

Do you think the default quality value should be reduced? 90? 75?
I would hate for someone to get mad that they automatically get reduced
quality jpegs as a result of this patch. But then again, if the default
subsampling is 4:2:0 anyways, then it probably isn't inline with needing a
98 quality, right?
I'm not exactly sure what the impact is, in changing it, but maybe 75 is
more realistic.

If someone is concerned with quality, then I would assume they would be
specifying their settings explicitly anyways.
 On 18/10/2014 6:32 AM, "Larry Gritz" <[email protected]> wrote:

> That's another possibility I would entertain -- automatically upgrading
> the subsampling when a sufficiently high quality is requested.
>
> So, just to be explicit, are you proposing making these changes yourself
> and submitting a patch? I'm basically on board with this general design
> idea.
>
> I set the default quality for jpeg output (if no "quality" attribute is
> found) quite high, 98. I'm also happy to revisit whether that's too much. I
> can't say it was a principled reason for that particular value.
>
>
>
> On Oct 16, 2014, at 6:39 PM, Justin Israel <[email protected]> wrote:
>
> 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
>
>
> --
> 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