yes, unbelieveable oversight. Thanks alot Mark .. I was concentrating so much on what I don't know, when the mistake was somewhere else ... part of what I _should_ know about.
will check out other way as well though.
Many thanks.


Mark Heath writes:

I'm pretty sure the following lines should read:
for (y=0; y < 300; y++) {
for (x=0; x < 420; x++) {
 for(int k=0;k<3;k++) {
   if(k==0)
tmp_frame->data[0][y*tmp_frame->linesize[0] + 3*x +k]= ((gdim- >tpixels[y][x] >> 16) & 0xff);
    else if(k==1)
tmp_frame->data[0][y*tmp_frame->linesize[0] + 3*x +k]= ((gdim- >tpixels[y][x] >> 8) & 0xff);
        else
tmp_frame->data[0][y*tmp_frame->linesize[0] + 3*x +k]= (gdim- >tpixels[y][x] & 0xff);
        }
} There is probably a quicker and easier way of copying the buffers. Although I've never used GD so don't know how it stores it's image. You might be able to use an RGB32 buffer and do a straight memcpy() per line. Mark On 26/05/2009, at 8:32 AM, bad sta wrote:
for (y=0; y < 300; y++) {
for (x=0; x < 420; x++) {
 for(int k=0;k<3;k++) {
   if(k==0)
tmp_frame->data[0][y*tmp_frame->linesize[0] + k*x +k]= ((gdim- >tpixels[y][x] >> 16) & 0xff);
    else if(k==1)
tmp_frame->data[0][y*tmp_frame->linesize[0] + k*x +k]= ((gdim- >tpixels[y][x] >> 8) & 0xff);
        else
tmp_frame->data[0][y*tmp_frame->linesize[0] + k*x +k]= (gdim- >tpixels[y][x] & 0xff);
        }
}

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to