On May 30, 2012, at 8:02 PM, ashika umanga wrote:
>
> for(y=0;y<encoder.getVideoParams().height ;y++){
> for(x=0;x< encoder.getVideoParams().width;x++){
>
>
> targetFrame->data0[index][(y* width)+x]=(x%255); //R
> targetFrame->data0[index][(y* width)+x+1]=0; //G
> targetFrame->data0[index][(y* width)+x+2]=0; //B
>
>
> }
> }
>
You're drawing a greyscale image, that's why. I think you mean to be doing X =
X + 3, so you jump pixels. You're actually setting every single byte, then
setting the next two bytes, then overwriting them.
I don't know about the pixel/byte layout of RGB24, by the way. But that mistake
seems clear.
BRuce
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user