Pictures' format before display
Posted: 31 Mar 2005 16:17
Hello,
I'm trying to understand how datas are stored in the picture_t structure...
For instance, I try to read datas of a 128*128 image, with the following loop :
for (i=0; i< p_pic->p_heap->i_width * p_pic->p_heap->i_height; i++)
{
coeff = p_pic->p_data;
fprintf (pFile, "%d:%d ", i, coeff);
}
I obtain the values corresponding to the Y coefficient (128*128 values)... (I checked it)
But I don't know how to get U and V values : I tried to read next values, it seems to be U and V but the number of values is incorrect (only 4096 values), so I don't understand how data pictures are stored.
It would be great if someone could help me
Thanks
I'm trying to understand how datas are stored in the picture_t structure...
For instance, I try to read datas of a 128*128 image, with the following loop :
for (i=0; i< p_pic->p_heap->i_width * p_pic->p_heap->i_height; i++)
{
coeff = p_pic->p_data;
fprintf (pFile, "%d:%d ", i, coeff);
}
I obtain the values corresponding to the Y coefficient (128*128 values)... (I checked it)
But I don't know how to get U and V values : I tried to read next values, it seems to be U and V but the number of values is incorrect (only 4096 values), so I don't understand how data pictures are stored.
It would be great if someone could help me

Thanks
