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. |
30th August 2012, 14:01 | #1 | Link |
Registered User
Join Date: Dec 2008
Posts: 2
|
Weird last bit in Slice NAL Unit ...
Hi,
i'm devolopping a transcoder using an encoder / decoder source code, it's work fine on several stream, but i found several .h264 file in which i found slices with a really strange bit. At the end of each slice, the last bit of the last byte is always set to 1 and i don't see any reason for that! It looks like this bit is never parsed and doesn't contribute in the decoding processing i see the last MB cabac data, the slice terminating bit, and the end cabac, some stuffing bit (0) and always a 1..... Have you an idea of what this 1 is ? |
31st August 2012, 07:14 | #3 | Link | |
Registered User
Join Date: Jun 2004
Location: Salzburg, Austria
Posts: 219
|
If you have an Annex B stream, it is very likely that this is part of the trailing bits at the end of the NALU (so that it ends at a whole byte position). If present, it consists of a one bit, followed by as many zero bits as needed to reach a whole byte position. For further information, see 7.4.1, syntax element "rbsp_byte[ i ]", the paragraphs belonging to "rbsp_trailing_bits( )", especially:
Quote:
Dust Signs
__________________
The number you dialed is imaginary. Please turn your phone by 90° and try again |
|
31st August 2012, 08:58 | #4 | Link |
Registered User
Join Date: Dec 2008
Posts: 2
|
A Sample...
Hi,
i put a sample in https://docs.google.com/open?id=0BxpKFXPCGGNNNWZWSkR2dlpyaDA at 0x599 in that file you should see "34 21 00 00 00 01 01" The end of a nalu/slice and the start code of the next nalu. When i transcode this sample, the encoder rewrite everything bit-exact except the 0x21.... it look like the 0x20 (100000) is the correct value to finish the slice encoding .... the 1 is the end-of-cabac bit ! all others 0 are stuffing. So why the original stream contain 100001 ? |
Tags |
h264, nalu, slice, syntax |
Thread Tools | Search this Thread |
Display Modes | |
|
|