nal.c File Reference

Handles the operations on converting String of Data Bits (SODB) to Raw Byte Sequence Payload (RBSP), and then onto Encapsulate Byte Sequence Payload (EBSP). More...

#include "contributors.h"
#include "global.h"
#include "enc_statistics.h"
#include "biariencode.h"

Include dependency graph for nal.c:

Go to the source code of this file.

Functions

void SODBtoRBSP (Bitstream *currStream)
int RBSPtoEBSP (byte *NaluBuffer, unsigned char *rbsp, int rbsp_size)
int addCabacZeroWords (NALU_t *nalu, StatParameters *cur_stats)


Detailed Description

Handles the operations on converting String of Data Bits (SODB) to Raw Byte Sequence Payload (RBSP), and then onto Encapsulate Byte Sequence Payload (EBSP).

nal.c

Date:
14 June 2002
Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file nal.c.


Function Documentation

int addCabacZeroWords ( NALU_t *  nalu,
StatParameters *  cur_stats 
)

This function adds cabac_zero_word syntax elements at the end of the NAL unit to.

Parameters:
nalu target NAL unit
cur_stats currently used statistics parameters
Returns:
number of added bytes

Definition at line 109 of file nal.c.

References ImageParameters::bitdepth_chroma, ImageParameters::bitdepth_luma, NALU_t::buf, ImageParameters::bytes_in_picture, NALU_t::len, ImageParameters::PicSizeInMbs, and ImageParameters::type.

Referenced by terminate_slice().

int RBSPtoEBSP ( byte *  NaluBuffer,
unsigned char *  rbsp,
int  rbsp_size 
)

This function add emulation_prevention_three_byte for all occurrences of the following byte sequences in the stream 0x000000 -> 0x00000300 0x000001 -> 0x00000301 0x000002 -> 0x00000302 0x000003 -> 0x00000303.

Parameters:
NaluBuffer pointer to target buffer
rbsp pointer to source buffer
rbsp_size Size of source
Returns:
Size target buffer after emulation prevention.

Definition at line 70 of file nal.c.

Referenced by RBSPtoNALU(), and terminate_slice().

void SODBtoRBSP ( Bitstream *  currStream  ) 

Converts String Of Data Bits (SODB) to Raw Byte Sequence Packet (RBSP).

Parameters:
currStream Bitstream which contains data bits.
Returns:
None
Note:
currStream is byte-aligned at the end of this function

Definition at line 36 of file nal.c.

References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, and Bitstream::streamBuffer.

Referenced by GeneratePic_parameter_set_rbsp(), GenerateSEImessage_rbsp(), GenerateSeq_parameter_set_rbsp(), and terminate_slice().


Documentation generated with DoxyGen