<p>Greetings all,</p><p>I am trying to fill sample data for a AVFrame initialized with RGB24 format.<br>I use following code snippet to populate RGB data.<br>But in the encoded video,I can only see grayscale strip covering only 1/3 of the videoframe.<br>
This code snippet suppose to fill only Red color.<br>Any tips what Im doing wrong here ?</p><p> </p><p><br>AVFrame *targetFrame=.....<br>int height=imageHeight();<br>int width=imageWidth();</p><p><br> for(y=0;y<encoder.getVideoParams().height ;y++){ <br>
for(x=0;x< encoder.getVideoParams().width;x++){</p><p><br> targetFrame->data0[index][(y* width)+x]=(x%255); //R <br> targetFrame->data0[index][(y* width)+x+1]=0; //G<br> targetFrame->data0[index][(y* width)+x+2]=0; //B<br>
<br> <br> }<br> }<br></p>