Could someone explain me the difference between the H.264 header and H.265 header? I just need to parse H265 header but I have difficult to find proper reference.
I did a first version of the parser. I need to retrieve the pic_width_in_luma_samples, pic_height_in_luma_samples, and the aspectRatioH, aspectRatioV.
my code is something like:
while (buf->Size > 0)
{
//forbidden bit
flushbits(buf, 1);
int nNALType = showbits(buf, 6);
if (nNALType == NAL_TYPE_SPS)
{
// flushbits until I retrieve desired parameter
flushbits(buf, 4); // sps_video_parameter_set_id
}
else
{
// align bits
buf->Size -= buf->BitsLeft & 0x7;
}
}
this is the correct way to do? There is a method where I can skip bits until I find a "start sequence" that indicates my desired SPS NAL TYPE?