[FFmpeg-devel] [PATCH] Add DPX decoder rev-20
Jimmy Christensen
jimmy
Thu Jun 4 23:07:30 CEST 2009
On 2009-06-04 18:33, Vitor Sessak wrote:
> Jimmy Christensen wrote:
> [....]
> you can replace
>
>> + case 16:
>> + for (x = 0; x < avctx->height; x++) {
>> + uint16_t *dst = ptr;
>> + for (y = 0; y < avctx->width; y++) {
>> + *dst++ = read16(&buf, endian);
>> + *dst++ = read16(&buf, endian);
>> + *dst++ = read16(&buf, endian);
>> + }
>> + ptr += stride;
>> + }
>> + break;
>
> by just
>
> case 16:
> for (x = 0; x < avctx->height; x++) {
> memcpy(ptr, buf, 6*avctx->width);
> ptr += stride;
> }
> break;
>
Hmm.. I'm not so sure it's a good idea. First of all I think the idea of
the pix_fmt is to have it as the systems native endian. Also in my test
case it didn't make any difference performance wise, probably bacause
the rgb48 > yuv has to do endian conversion anyway. This will also be
the case when/if I have to do log/lin conversion.
More information about the ffmpeg-devel
mailing list