On 09/24/2011 02:28 AM, Jean First wrote:

> On Sat Sep 24 2011 01:45:44 GMT+0200 (CEST), Justin Ruggles wrote:
>> On 09/23/2011 07:22 PM, Jean First wrote:
>>> -    if(s->invert){
>>> -        uint8_t *src;
>>> -        int j;
>>> -
>>> -        src = s->picture.data[0];
>>> -        for(j = 0; j<  s->height; j++){
>>> -            for(i = 0; i<  s->picture.linesize[0]; i++)
>>> -                src[i] = 255 - src[i];
>>> -            src += s->picture.linesize[0];
>>> +    if (s->invert){
>>> +        dst = s->picture.data[0];
>>> +        for (i = 0; i<  s->height; i++) {
>>> +            for (j = 0; j<  s->picture.linesize[0]; j++)
>>> +                dst[j] = 255 - dst[j];
>>> +            dst += s->picture.linesize[0];
>>
>> has this been tested with 16-bit white-is-zero grayscale? the 255 seems
>> wrong. or is this just clean-up?
> 
> This is just cleanup.
> The Invert flag is called "Photometric Interpolation" in the spec - and 
> for RGB Images this has to be set to 2.
> But I think for GREY16 this would matter. Also the PAL8 is not covered 
> by this.


That's fine. We just require that cosmetic/cleanup changes be done
separately from functional changes. So a patch for just this part would
be ok by itself.

Thanks,
Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to