<div dir="ltr">Hello guys,<div><br></div><div>I try to find pixels value for a given macroblock in a frame.</div><div>What I did is the following :</div><div><br></div><div>//for all macroblock in this frame</div><div>for(int mby=0; y<mb_height;y++)</div><div>{</div><div>  Â  Â  Â  Â for(int mbx=0; x<mb_width;x++)</div><div>  Â  Â  Â  Â {</div><div>  Â  Â  Â  Â  Â  Â int xy =  mby*mb_stride+mbx;</div><div>  Â  Â  Â  Â  Â  Â //Now for this 16x16 macroblock</div><div>  Â  Â  Â  Â  Â  for(int y=0; y<16;y++)</div><div>  Â  Â  Â  Â  Â  {</div><div>  Â  Â  Â  Â  Â  Â  Â for(int x=0; x<16;x++)</div><div>  Â  Â  Â  Â  Â  Â  Â {</div><div>  Â  Â  Â  Â  Â  Â  Â  Â //All pixels YUV value for this macroblock</div><div>  Â  Â  Â  Â  Â  Â  Â  Â y = data[0][linesize[0]*y+x];</div><div>  Â  Â  Â  Â  Â  Â  Â  Â u = data[1][linesize[1]*(y/2)+x/2]</div><div>  Â  Â  Â  Â  Â  Â  Â  Â v = data[2][linesize[2]*(y/2)+x/2]</div><div>  Â  Â  Â  Â  Â  Â }</div><div>}</div><div>//Let's in an other macroblock</div><div>}</div><div>}</div><div>The problem is that for all macroblocks, I have the same Y, u and v value. That's is true because I only use the same width and height for every macroblock.</div><div><br></div><div>My question is to know how can I put difference in the above code to find pixels yuv value for each macroblock in this frame.</div><div>I need your help, please.</div><div><br></div><div>Regards</div></div>