[FFmpeg-soc] [soc]: r860 - dirac/libavcodec/dirac.c
Marco Gerards
mgerards at xs4all.nl
Thu Aug 16 17:32:34 CEST 2007
Aurelien Jacobs <aurel at gnuage.org> writes:
[...]
>> /* Calculate the chroma dimensions. */
>> - s->chroma_hratio = 1 + (s->sequence.chroma_format > 1);
>> - s->chroma_vratio = 1 + (s->sequence.chroma_format > 0);
>> - s->sequence.chroma_width = s->sequence.luma_width / s->chroma_hratio;
>> - s->sequence.chroma_height = s->sequence.luma_height / s->chroma_vratio;
>> + s->chroma_hshift = (s->sequence.chroma_format == 0 ? 0 : 1);
>> + s->chroma_vshift = (s->sequence.chroma_format <= 1 ? 0 : 1);
>
> No need for ?0:1
> instead you could keep the original form:
>
> s->chroma_hshift = s->sequence.chroma_format > 0;
> s->chroma_vshift = s->sequence.chroma_format > 1;
You are right, this is better. I fixed this.
Thanks,
Marco
More information about the FFmpeg-soc
mailing list