#include "global.h"
#include "annexb.h"
#include "memalloc.h"
Go to the source code of this file.
Functions | |
void | malloc_annex_b (ImageParameters *p_Img) |
void | init_annex_b (ANNEXB_t *annex_b) |
void | free_annex_b (ImageParameters *p_Img) |
static int | getChunk (ANNEXB_t *annex_b) |
static byte | getfbyte (ANNEXB_t *annex_b) |
static int | FindStartCode (unsigned char *Buf, int zeros_in_startcode) |
int | GetAnnexbNALU (ImageParameters *p_Img, NALU_t *nalu) |
void | OpenAnnexBFile (ImageParameters *p_Img, char *fn) |
void | CloseAnnexBFile (ImageParameters *p_Img) |
Variables | |
static const unsigned int | IOBUFFERSIZE = 65536 |
Definition in file annexb.c.
void CloseAnnexBFile | ( | ImageParameters * | p_Img | ) |
static int FindStartCode | ( | unsigned char * | Buf, | |
int | zeros_in_startcode | |||
) | [inline, static] |
returns if new start code is found at byte aligned position buf. new-startcode is of form N 0x00 bytes, followed by a 0x01 byte.
Buf | pointer to byte-stream | |
zeros_in_startcode | indicates number of 0x00 bytes in start-code. |
Definition at line 102 of file annexb.c.
Referenced by GetAnnexbNALU().
int GetAnnexbNALU | ( | ImageParameters * | p_Img, | |
NALU_t * | nalu | |||
) |
Returns the size of the NALU (bits between start codes in case of Annex B. nalu->buf and nalu->len are filled. Other field in nalu-> remain uninitialized (will be taken care of by NALUtoRBSP.
GetAnnexbNALU expects start codes at byte aligned positions in the file
Definition at line 139 of file annexb.c.
References nalu_t::buf, FindStartCode(), nalu_t::forbidden_bit, getfbyte(), nalu_t::len, nalu_t::lost_packets, nalu_t::max_size, nalu_t::nal_reference_idc, nalu_t::nal_unit_type, no_mem_exit(), and nalu_t::startcodeprefix_len.
Referenced by initBitsFile().
static int getChunk | ( | ANNEXB_t * | annex_b | ) | [inline, static] |
fill IO buffer
Definition at line 53 of file annexb.c.
Referenced by getfbyte(), and OpenAnnexBFile().
static byte getfbyte | ( | ANNEXB_t * | annex_b | ) | [inline, static] |
returns a byte from IO buffer
Definition at line 74 of file annexb.c.
References getChunk().
Referenced by GetAnnexbNALU().
void OpenAnnexBFile | ( | ImageParameters * | p_Img, | |
char * | fn | |||
) |
Opens the bit stream file named fn.
Definition at line 310 of file annexb.c.
References error(), errortext, ET_SIZE, and getChunk().
Referenced by initBitsFile().