[Mp4-tech] B-frame detection?
Wesley De Neve
Wesley.DeNeve ugent.be
Tue Oct 5 22:44:52 EDT 2004
Hi,
Vasudeva, Harish wrote:
> oh, sorry that i forgot to mention that i needed this at the VOL
> level. I found that i could use the low_delay param to detect the
> presence of B-Frames. But, next I needed to find the consecutive
> numbers of B-Frames.
>
> From the usermanual.doc (in the reference decoder) I found that the
> number of Bs within Ps should be only 2. Further, I checked out some
> other streams that DO NOT have P-Frames (just Is & Bs). In these the
> number of B-Frames between I-Frames was 9 (in all streams). So, I
> concluded that :
>
> 1. If PVOPs are present, then the number of consecutive BVOPS will be
> 2.
> 2. If PVOPs are absent (with only IVOPs), then the number of
> consecutive BVOPS will be 9.
>
> Is that a correct assumption?
The low_delay parameter is indeed a good approach for detecting the
presence of B-VOPs. You could also have a look at the profile level
information in the VOSH in case you are eager to perform an early detection:
the Simple Profile in MPEG-4 Visual does not allow the presence of B-VOPs,
while the Advanced Simple Profile does allow them (the profiles in question
are the ones most used in current implementations of MPEG-4 Visual).
With respect to finding the consecutive number of B-VOPs: I think your
assumption is pretty dangerous in case you're looking for a generic
solution. MPEG-4 Visual does not fix the GOP structure. As quoted from the
spec: "When a video object layer contains coded B-VOPs, the number of
consecutive coded B-VOP is variable and unbounded."
For instance, don't forget to have a look at the following parameters
for the reference encoder (microsoft-v2.4-030710-NTU):
Motion.PBetweenICount
The number of predicted P-VOPs between each I-VOP. If this value is
less than zero, then there will be one I-VOP at the start of the sequence
and then all successive frames will be predicted.
Motion.BBetweenPCount
The number of B-VOPs between each P-VOP. This value is 2 for an
IBBPBBPBBP sequence.
So, as far as *I* know you will have to look after the value of the
vop_encoding_type syntax element in order to be sure about the number of
consecutive B-VOPs in case they are present (unless you already have some a
priori knowledge about the GOP structure used by the encoder...).
Hope this helps,
-Wesley
More information about the Mp4-tech
mailing list