[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec bmp.c, NONE, 1.1 allcodecs.c, 1.115, 1.116 Makefile, 1.212, 1.213 avcodec.h, 1.428, 1.429

Michael Niedermayer michaelni
Wed Nov 30 03:13:25 CET 2005


Hi

On Wed, Nov 30, 2005 at 02:40:52AM +0100, M?ns Rullg?rd CVS wrote:
[...]
>     switch(depth){
>     case 16:
>         for(i = 0; i < avctx->height; i++){
>             uint16_t *src = (uint16_t *) buf;
>             uint16_t *dst = (uint16_t *) ptr;
> 
>             for(j = 0; j < avctx->width; j++)
>                 *dst++ = le2me_16(*src++);
> 
>             buf += n;
>             ptr += linesize;
>         }
>         break;
>     case 32:
>         for(i = 0; i < avctx->height; i++){
>             uint8_t *src = buf;
>             uint8_t *dst = ptr;
> 
>             for(j = 0; j < avctx->width; j++){
>                 dst[0] = src[rgb[2]];
>                 dst[1] = src[rgb[1]];
>                 dst[2] = src[rgb[0]];

hmm, i love pixel format conversation code in codecs ...
please at least add a note to the source explaining that this is not the
way its supposed to be done but that instead a new PIX_FMT should be added
for each new pixel format, also please avoid the memcpy() stuff, see raw.c
on how this is possible

[...]
-- 
Michael





More information about the ffmpeg-cvslog mailing list