What I was thinking was that somewhere around line 214 of jpeginput.cpp, right 
after the ImageSpec has been created, you would add

        m_spec.attribute ("jpeg:subsampling", ...);

where the string value you set is based on data from the jpeg compressor 
(m_cinfo) that reveals the subsampling rates.



On Oct 18, 2014, at 1:37 AM, Justin Israel <[email protected]> wrote:

> I figured I would jump onto this while I have your attention on the topic :-)
> https://github.com/OpenImageIO/oiio/pull/978
> 
> I've kept it at YCrCb across the board, per suggestion. 
> 
> Can you point me at where the extra work should be added to the reader, to 
> support the copy() functionality you mentioned? This is my first time digging 
> into the plugin code, so I am not too familiar with where I should add that 
> bit. 
> 
> Thanks!
> - Justin
> 
> 
> 
> On Sat, Oct 18, 2014 at 9:12 AM, Larry Gritz <[email protected]> wrote:
> Fine by me. 
> 
> 
> On Oct 17, 2014, at 12:10 PM, Jonathan Gibbs <[email protected]> wrote:
> 
>> On Fri, Oct 17, 2014 at 10:26 AM, Larry Gritz <[email protected]> wrote:
>> That's another possibility I would entertain -- automatically upgrading the 
>> subsampling when a sufficiently high quality is requested.
>> 
>> This seems too magical to me. Those who are setting subsampling levels are 
>> probably expert users and probably thus want what they are asking for 
>> explicitly.
>> 
>> 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.
>> 
>> Back when we used 8-bit jpegs in production, they were quality 98, and we 
>> moved over time from 4:2:0 to 4:4:4. When we used "16-bit" jpegs (actually 
>> 12-bits internally) we used 4:4:4 and quality of 75. Some tests determined 
>> that quality of 75 in 16/12-bit looked as good as 98 in 8-bit.
>> 
>> Anyway, just data points using jpeg images in animation production. 
>> 
>> I'd vote the default to be 4:2:0 since that's what most devices write. Those 
>> who want 4:4:4 are more likely to understand these settings.
>> 
>> --jono
>> 
>> 
> 
> --
> 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

Reply via email to