Log in

View Full Version : IDR vs I frame


mushahidh
20th April 2016, 20:05
Hi experts,
Whats the difference between I and IDR frame? Either length of GOP consist of total number of frames between two IDR frames or between two I frames? This is really confusing for me.
Any help would be highly appreciated.

LoRd_MuldeR
20th April 2016, 20:18
IDR-Frame clears the reference picture buffer, i.e. no frame after IDR can reference any frame before IDR. That's not the case with "normal" I-Frame, i.e. P- or B-Frame after I-Frame can use as reference frames before I-Frame.

In other words: You are always "cleanly" start decoding at an IDR-Frame, which is not (in general) possible with a "normal" I-Frame.

mushahidh
21st April 2016, 08:57
IDR-Frame clears the reference picture buffer, i.e. no frame after IDR can reference any frame before IDR. That's not the case with "normal" I-Frame, i.e. P- or B-Frame after I-Frame can use as reference frames before I-Frame.

In other words: You are always "cleanly" start decoding at an IDR-Frame, which is not (in general) possible with a "normal" I-Frame.
so whats the difference in NAL units for I and IDR frames? both will start from 65 or is there any difference.

nevcairiel
21st April 2016, 09:08
Not sure what 65 is supposed to mean, but IDRs are nal_unit_type 5, and normal I frames just use nal_unit_type 1 (like any other frames as well)

mushahidh
21st April 2016, 15:55
Not sure what 65 is supposed to mean, but IDRs are nal_unit_type 5, and normal I frames just use nal_unit_type 1 (like any other frames as well)
i am referring to this post (http://forum.doom9.org/showthread.php?p=1494313#post1494313) where IDR frame starts from 00 00 00 01 65 but i am not sure about I frames. Do they start with the same Hex values or not?

LoRd_MuldeR
21st April 2016, 19:08
Are you sure the NAL unit type is encoded as a whole byte?

Probably you need to understand what the individual bits (flags) in this byte sequence actually mean. Then you might be able to tell whether this contains the NAL unit type - and, if so, what the NAL unit type is ;)

nevcairiel
21st April 2016, 19:23
nal unit type is 5 bits, i think. 0x1f mask of the first byte after the start code.