Reputation: 11
I'm doing a study on HEVC and very new to video compression. The first thing i want to do is see the effect of packet loss on the decoded video. I want to modify the decoder so that i can introduce packet loss on the hevc bitstream. I'll be using error patterns generated by NS2. What part of the decoder should i focus on? How can i insert the error patterns to the hevc bitstream? What specific variables determine the frame and slice number? I'm using HM 16.6. Thanks
Upvotes: 1
Views: 1111
Reputation: 95
I am posting this as an answer rather than a comment since I dont have reputations to comment. In HEVC a slice is a group of consecutive CTU (Coding Tree Unit)s within a frame. Furthermore, HEVC introduces splitting of slices into so-called slice segments, mainly for low-delay appliances . When a slice is split into multiple slice segments, only the first slice segment carries the header information required to decode the whole slice. The remaining dependant slice segments refer to the initial slice segment during the decoding. Each slice segment (or slice if no segmentation is used) maps to a single data unit called a ‘NAL (Network Abstraction Layer) unit’. A NAL unit is the video packet payload in the physical channel, and therefore a packet loss during the transmission corresponds to a NAL unit loss and consequently a slice loss. If you study the HEVC standard you will encounter another type of data unit called an Access unit. An access unit is a collection of NAL units(hence a collection of slices). During the transmission delimiters are placed between NAL units and also between Access units in order to separately identify each type. In a HEVC coded stream an access unit delimiter is defined as x00 00 00 01 whereas a NAL unit delimiter is defined as x00 00 01. So basically if you want to introduce a packet loss in a given frame, first you need to identify the correct frame by counting the access unit delimiters in the bitstream. Later delete all the bits between the desired NAL unit delimiters.
Upvotes: 0
Reputation: 19
I once developed a Python tool that hacks into the bitstream and flip bits around. What I did is that I read the bitstream file generated by the encoder linearly, and randomized the bit flipping process. Because I know the structure of the NAL units, from the standard specs, I could tell where my corrupted bit is. The best part to start manipulating is the NAL unit headers. The video, sequence, slice headers. You can tell where they are based on the packetization process parameters. It has been a long time, so I forgot the details. Headers do not tell everything about the bitstream especially the frame, slice number. It could be lice-based or tile-based or I forgot what else. But that you can tell from the headers. Now the decoder will know the frame, slice number as it decodes and follow the encoder's guidelines. So what you will need to know will be in the headers. Check the latest working draft and study the header information.
Upvotes: 2