/*! ************************************************************************************* * \brief * ue_v, reads an ue(v) syntax element, the length in bits is stored in * the global UsedBits variable * * \param tracestring * the string for the trace file * * \param bitstream * the stream to be read from * * \return * the value of the coded syntax element * ************************************************************************************* */ int ue_v (char *tracestring, Bitstream *bitstream) { SyntaxElement symbol, *sym=&symbol; assert (bitstream->streamBuffer != NULL); sym->type = SE_HEADER; sym->mapping = linfo_ue; // Mapping rule SYMTRACESTRING(tracestring); readSyntaxElement_VLC (sym, bitstream); UsedBits+=sym->len; return sym->value1; }
/*! ************************************************************************************* * \brief * ue_v, reads an se(v) syntax element, the length in bits is stored in * the global UsedBits variable * * \param tracestring * the string for the trace file * * \param bitstream * the stream to be read from * * \return * the value of the coded syntax element * ************************************************************************************* */ int se_v (char *tracestring, Bitstream *bitstream) { SyntaxElement symbol; assert (bitstream->streamBuffer != NULL); symbol.type = SE_HEADER; symbol.mapping = linfo_se; // Mapping rule: signed integer SYMTRACESTRING(tracestring); readSyntaxElement_VLC (&symbol, bitstream); UsedBits+=symbol.len; return symbol.value1; }
/*! ************************************************************************************* * \brief * read_ue_v, reads an ue(v) syntax element, the length in bits is stored in * the global p_Dec->UsedBits variable * * \param tracestring * the string for the trace file * * \param bitstream * the stream to be read from * * \return * the value of the coded syntax element * ************************************************************************************* */ int read_ue_v (char *tracestring, Bitstream *bitstream, int *used_bits) { SyntaxElement symbol; //assert (bitstream->streamBuffer != NULL); symbol.type = SE_HEADER; symbol.mapping = linfo_ue; // Mapping rule //SYMTRACESTRING(tracestring); readSyntaxElement_VLC (&symbol, bitstream); *used_bits+=symbol.len; return symbol.value1; }
int read_se_v (char *tracestring, Bitstream *bitstream, int *used_bits) { SyntaxElement symbol; //assert (bitstream->streamBuffer != NULL); // symbol.type = SE_HEADER; symbol.mapping = linfo_se; // Mapping rule: signed integer readSyntaxElement_VLC (&symbol, bitstream); *used_bits+=symbol.len; #if TRACE printf("%s=%d\n",tracestring,symbol.value1); #endif return symbol.value1; }
/*! ************************************************************************ * \brief * read next UVLC codeword from UVLC-partition and * map it to the corresponding syntax element ************************************************************************ */ int readSyntaxElement_UVLC(SyntaxElement *sym, struct img_par *img, struct inp_par *inp, struct datapartition *dP) { Bitstream *currStream = dP->bitstream; return (readSyntaxElement_VLC(sym, currStream)); }