[Libav-user] Help : YUV value for a macroblock in a yuv240p frame
ndjoreboris at gmail.com
Tue Apr 9 16:20:07 EEST 2019
I try to find pixels value for a given macroblock in a frame.
What I did is the following :
//for all macroblock in this frame
for(int mby=0; y<mb_height;y++)
for(int mbx=0; x<mb_width;x++)
int xy = mby*mb_stride+mbx;
//Now for this 16x16 macroblock
for(int y=0; y<16;y++)
for(int x=0; x<16;x++)
//All pixels YUV value for this macroblock
y = data[linesize*y+x];
u = data[linesize*(y/2)+x/2]
v = data[linesize*(y/2)+x/2]
//Let's in an other macroblock
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
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.
I need your help, please.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user