[FFmpeg-devel] Google Summer of Code participation

Thilo Borgmann thilo.borgmann
Thu Apr 9 22:21:34 CEST 2009



Michael Niedermayer schrieb:
>> +            int i,j;
>> +            int offset = 0;
>> +            uint8_t *pd = s->current_picture->data[0];
>> +            uint8_t *pd_last = s->last_picture->data[0];
>> +
>> +            for(j=0; j < s->height; j++) {
>> +                for(i=0; i < s->width * s->bpp; i++) {
>> +                    pd[offset + i] = pd[offset + i] + pd_last[offset + i];
>> +                }
>> +                offset += s->image_linesize;
>>     
>
> pd += linesize
> pd_last += linesize
> -> no more offset needed
>
>   
Wonderful.
>   
>> +            }
>> +        }
>> +    }
>> +
>> +    *picture= *s->current_picture;
>>      *data_size = sizeof(AVFrame);
>>  
>>      ret = s->bytestream - s->bytestream_start;
>> @@ -602,8 +624,11 @@ static int decode_frame(AVCodecContext *avctx,
>>  static av_cold int png_dec_init(AVCodecContext *avctx){
>>      PNGDecContext *s = avctx->priv_data;
>>  
>> -    avcodec_get_frame_defaults(&s->picture);
>> -    avctx->coded_frame= &s->picture;
>> +    s->current_picture = &s->picture1;
>> +    s->last_picture = &s->picture2;
>> +    avcodec_get_frame_defaults(&s->picture1);
>> +    avcodec_get_frame_defaults(&s->picture2);
>>     
>
>   
>> +    avctx->coded_frame= s->current_picture;
>>     
>
> unneeded
>   
>
Indeed. Has been deleted.

Revision 3 attached - really and truly.

TB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tb.CorePNG.rev3.patch
Type: text/x-patch
Size: 2253 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090409/eeaba121/attachment.bin>



More information about the ffmpeg-devel mailing list