From H.264 spec:
7.3.1 NAL unit syntax
- forbidden_zero_bit - 1 bit - shall be equal to 0.
nal_ref_idc
- 2 bits - not equal to 0 specifies that the content of the NAL unit contains a sequence parameter set [...]nal_unit_type
- 5 bits - specifies the type of RBSP data structure contained in the NAL unit [...]
0x21
and 0x61
make it NAL unit type 1 (Coded slice of a non-IDR picture) with different values for nal_ref_idc
.
UPD. There is no one to one mapping of specific bit, esp. at fixed position from the beginning of the "frame" that says it's I/P/B frame. You will need to parse out the bitstream to read values per 7.4.3 Slice header semantics of H.264 spec (it is still doable in most cases since the value is real close to the beginning of the bitstream - check H.264 spec for details):
slice_type">