0

I'm a beginner to H.264 data compression standard, and i need to know where the slice header flag (slc_hdr) of the H.264 bitstream is located ? Is it for example existed in the slice header? cause i need to extract it and set it to 1.

Link of the flag

Itteh Kitteh
  • 437
  • 5
  • 6
  • The screen shot that you posted makes less sense in this context. In order to understand a received packet, to see whether it is a slice, you need to parse the NAL Header. If nal_unit_type parameter is 1 - 5, then it is a slice. There is no explicit slice_header flag as such – ARK Dec 12 '15 at 00:40
  • @ARK do you mean that this flag can't be implemented ? so, why it is listed as a flag of the h.264 bitstream ? – October Gladiolus Dec 17 '15 at 10:33
  • I know how to parse the NAL Header, but i do need to set this flag. Do you have any ideas? @ARK – October Gladiolus Dec 17 '15 at 10:35
  • As said in my earlier comment, parse the NAL header and check the nal_unit_type. If it matches to one of the values {1, 2, 3, 4 ,5}, set the slc_hdr flag. This slc_hdr flag has nothing to do with H.264 standard, it's just implementation specific – ARK Dec 17 '15 at 14:31
  • @ARK thanks i do need your replies. So, the process is the following: a MAC frame is parsed and the encapsulated RTP is extracted, if the nal_unit_type is 1-5 then i have to set the slc_hdr flag to indicate that this MAC frame is holding a slice header. SO, where can i find this flag ? what do you mean by it's just implementation specific? thanks – October Gladiolus Dec 17 '15 at 22:49
  • First of all, there is no slc-hdr flag as such in H264 bit-stream. It's like a variable in your program that you may want to set after finding the nal_unit_type. Is the screen shot, that you posted, from a tutorial? Don't take literally of the screen shot, it looks like the names used in it are jst for simple explanation – ARK Dec 17 '15 at 23:05
  • https://www.yumpu.com/en/document/view/9551921/proposed-smpte-standard-for-television-vc-1-compressed-video-/469 – October Gladiolus Dec 18 '15 at 09:31
  • @ARK this is the link where i found the flag – October Gladiolus Dec 18 '15 at 09:32
  • Your links shows to VC-1 codec, I thought you are trying to figure out in H.264 – ARK Dec 18 '15 at 16:33
  • @ARK i think you're right it's like an argument not a flag. BTW, i tried to figure it out in H264 but when i searched for it i just found it in the VC-1 codec. The VC-1 flag has the same name as the one i'm looking for, that's why i was a little bit confused. Thank bro – October Gladiolus Dec 18 '15 at 19:41
  • I summarized from above comments and wrote it as answer. If you think your question is clarified, better to close it by marking it as answered. – ARK Dec 18 '15 at 21:43

1 Answers1

0

Summarized answer from Comments:

In order to understand a received packet, to see whether it is a slice, you need to get the NAL Header from the packet. Then, parse the NAL header and check nal_unit_type. If nal_unit_type matches to one of the values {1, 2, 3, 4 ,5}, set the slc_hdr flag. This slc_hdr flag has nothing to do with H.264 standard, it's just implementation specific.

What you pointed in your screen-shot may be to deal with VC-1 codec.

ARK
  • 649
  • 3
  • 14
  • thanks so much, if you please check this question : http://stackoverflow.com/questions/34356499/what-is-the-rtp-time-stamp-of-a-video-packet – October Gladiolus Dec 18 '15 at 22:03