Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2016, 20:05   #1  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
IDR vs I frame

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.
mushahidh is offline   Reply With Quote
Old 20th April 2016, 20:18   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,896
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.
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 20th April 2016 at 20:30.
LoRd_MuldeR is offline   Reply With Quote
Old 21st April 2016, 08:57   #3  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Quote:
Originally Posted by LoRd_MuldeR View Post
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.
mushahidh is offline   Reply With Quote
Old 21st April 2016, 09:08   #4  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,274
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)
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 21st April 2016 at 14:35.
nevcairiel is offline   Reply With Quote
Old 21st April 2016, 15:55   #5  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Quote:
Originally Posted by nevcairiel View Post
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 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?
mushahidh is offline   Reply With Quote
Old 21st April 2016, 19:08   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,896
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
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 21st April 2016, 19:23   #7  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,274
nal unit type is 5 bits, i think. 0x1f mask of the first byte after the start code.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 21st April 2016 at 19:27.
nevcairiel is offline   Reply With Quote
Reply

Tags
h.264, i-frame, idr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.