/src/openh264/codec/common/inc/golomb_common.h
Line | Count | Source (jump to first uncovered line) |
1 | | /*! |
2 | | * \copy |
3 | | * Copyright (c) 2009-2013, Cisco Systems |
4 | | * All rights reserved. |
5 | | * |
6 | | * Redistribution and use in source and binary forms, with or without |
7 | | * modification, are permitted provided that the following conditions |
8 | | * are met: |
9 | | * |
10 | | * * Redistributions of source code must retain the above copyright |
11 | | * notice, this list of conditions and the following disclaimer. |
12 | | * |
13 | | * * Redistributions in binary form must reproduce the above copyright |
14 | | * notice, this list of conditions and the following disclaimer in |
15 | | * the documentation and/or other materials provided with the |
16 | | * distribution. |
17 | | * |
18 | | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 | | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 | | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
21 | | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
22 | | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
23 | | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
24 | | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
25 | | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
26 | | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
28 | | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | | * POSSIBILITY OF SUCH DAMAGE. |
30 | | * |
31 | | * |
32 | | * \file golomb_common.h |
33 | | * |
34 | | * \brief Exponential Golomb entropy coding/decoding routine |
35 | | * |
36 | | * \date 03/12/2015 Created |
37 | | * |
38 | | ************************************************************************************* |
39 | | */ |
40 | | #ifndef EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__ |
41 | | #define EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__ |
42 | | |
43 | | #include "typedefs.h" |
44 | | |
45 | | namespace WelsCommon { |
46 | | |
47 | 0 | #define WRITE_BE_32(ptr, val) do { \ |
48 | 0 | (ptr)[0] = (val) >> 24; \ |
49 | 0 | (ptr)[1] = (val) >> 16; \ |
50 | 0 | (ptr)[2] = (val) >> 8; \ |
51 | 0 | (ptr)[3] = (val) >> 0; \ |
52 | 0 | } while (0) |
53 | | /************************************************************************/ |
54 | | /* GOLOMB CODIMG FOR WELS COMMON */ |
55 | | /************************************************************************/ |
56 | | |
57 | | |
58 | | /*! |
59 | | * \brief initialize bitstream writing |
60 | | * |
61 | | * \param pBs Bit string auxiliary pointer |
62 | | * \param pBuf bit-stream pBuffer |
63 | | * \param iSize iSize in bits for decoder; iSize in bytes for encoder |
64 | | * |
65 | | * \return iSize of pBuffer pData in byte; failed in -1 return |
66 | | */ |
67 | 0 | static inline int32_t InitBits (SBitStringAux* pBs, const uint8_t* kpBuf, const int32_t kiSize) { |
68 | 0 | uint8_t* ptr = (uint8_t*)kpBuf; |
69 | |
|
70 | 0 | pBs->pStartBuf = ptr; |
71 | 0 | pBs->pCurBuf = ptr; |
72 | 0 | pBs->pEndBuf = ptr + kiSize; |
73 | 0 | pBs->iLeftBits = 32; |
74 | 0 | pBs->uiCurBits = 0; |
75 | |
|
76 | 0 | return kiSize; |
77 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: md.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: nal_encap.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: ratectl.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: decoder.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: decoder_core.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: error_concealment.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: pic_queue.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: rec_mb.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: au_set.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: encoder.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: au_parser.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: bit_stream.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: deblocking.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: decode_slice.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: mv_pred.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::InitBits(WelsCommon::TagBitStringAux*, unsigned char const*, int) |
78 | | |
79 | 0 | static inline int32_t BsWriteBits (PBitStringAux pBitString, int32_t iLen, const uint32_t kuiValue) { |
80 | 0 | if (iLen < pBitString->iLeftBits) { |
81 | 0 | pBitString->uiCurBits = (pBitString->uiCurBits << iLen) | kuiValue; |
82 | 0 | pBitString->iLeftBits -= iLen; |
83 | 0 | } else { |
84 | 0 | iLen -= pBitString->iLeftBits; |
85 | 0 | pBitString->uiCurBits = (pBitString->uiCurBits << pBitString->iLeftBits) | (kuiValue >> iLen); |
86 | 0 | WRITE_BE_32 (pBitString->pCurBuf, pBitString->uiCurBits); |
87 | 0 | pBitString->pCurBuf += 4; |
88 | 0 | pBitString->uiCurBits = kuiValue & ((1 << iLen) - 1); |
89 | 0 | pBitString->iLeftBits = 32 - iLen; |
90 | 0 | } |
91 | 0 | return 0; |
92 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: md.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: decoder.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: au_set.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: encoder.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsWriteBits(WelsCommon::TagBitStringAux*, int, unsigned int) |
93 | | |
94 | | /* |
95 | | * Write 1 bit |
96 | | */ |
97 | 0 | static inline int32_t BsWriteOneBit (PBitStringAux pBitString, const uint32_t kuiValue) { |
98 | 0 | BsWriteBits (pBitString, 1, kuiValue); |
99 | 0 | return 0; |
100 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: md.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: au_set.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsWriteOneBit(WelsCommon::TagBitStringAux*, unsigned int) |
101 | | |
102 | 0 | static inline int32_t BsFlush (PBitStringAux pBitString) { |
103 | 0 | WRITE_BE_32 (pBitString->pCurBuf, pBitString->uiCurBits << pBitString->iLeftBits); |
104 | 0 | pBitString->pCurBuf += 4 - pBitString->iLeftBits / 8; |
105 | 0 | pBitString->iLeftBits = 32; |
106 | 0 | pBitString->uiCurBits = 0; |
107 | 0 | return 0; |
108 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: md.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: au_set.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsFlush(WelsCommon::TagBitStringAux*) |
109 | | |
110 | | /* |
111 | | * Write unsigned exp golomb codes |
112 | | */ |
113 | | |
114 | 0 | static inline int32_t BsWriteUE (PBitStringAux pBitString, const uint32_t kuiValue) { |
115 | 0 | uint32_t iTmpValue = kuiValue + 1; |
116 | 0 | if (256 > kuiValue) { |
117 | 0 | BsWriteBits (pBitString, g_kuiGolombUELength[kuiValue], kuiValue + 1); |
118 | 0 | } else { |
119 | 0 | uint32_t n = 0; |
120 | 0 | if (iTmpValue & 0xffff0000) { |
121 | 0 | iTmpValue >>= 16; |
122 | 0 | n += 16; |
123 | 0 | } |
124 | 0 | if (iTmpValue & 0xff00) { |
125 | 0 | iTmpValue >>= 8; |
126 | 0 | n += 8; |
127 | 0 | } |
128 | | |
129 | | //n += (g_kuiGolombUELength[iTmpValue] >> 1); |
130 | |
|
131 | 0 | n += (g_kuiGolombUELength[iTmpValue - 1] >> 1); |
132 | 0 | BsWriteBits (pBitString, (n << 1) + 1, kuiValue + 1); |
133 | 0 | } |
134 | 0 | return 0; |
135 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: md.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: au_set.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: encoder.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsWriteUE(WelsCommon::TagBitStringAux*, unsigned int) |
136 | | |
137 | | /* |
138 | | * Write signed exp golomb codes |
139 | | */ |
140 | 0 | static inline int32_t BsWriteSE (PBitStringAux pBitString, const int32_t kiValue) { |
141 | 0 | uint32_t iTmpValue; |
142 | 0 | if (0 == kiValue) { |
143 | 0 | BsWriteOneBit (pBitString, 1); |
144 | 0 | } else if (0 < kiValue) { |
145 | 0 | iTmpValue = (kiValue << 1) - 1; |
146 | 0 | BsWriteUE (pBitString, iTmpValue); |
147 | 0 | } else { |
148 | 0 | iTmpValue = ((-kiValue) << 1); |
149 | 0 | BsWriteUE (pBitString, iTmpValue); |
150 | 0 | } |
151 | 0 | return 0; |
152 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: md.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: decoder.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: au_set.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: encoder.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsWriteSE(WelsCommon::TagBitStringAux*, int) |
153 | | |
154 | | |
155 | | /* |
156 | | * Write RBSP trailing bits |
157 | | */ |
158 | 0 | static inline int32_t BsRbspTrailingBits (PBitStringAux pBitString) { |
159 | 0 | BsWriteOneBit (pBitString, 1); |
160 | 0 | BsFlush (pBitString); |
161 | |
|
162 | 0 | return 0; |
163 | 0 | } Unexecuted instantiation: welsDecoderExt.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder_data_tables.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder_ext.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: md.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: nal_encap.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: ratectl.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: set_mb_syn_cabac.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: slice_multi_threading.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_base_layer_md.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_encode_slice.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_set_mb_syn_cabac.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder_core.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decoder_data_tables.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: error_concealment.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: manage_dec_ref.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: memmgr_nal_unit.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: pic_queue.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: rec_mb.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: au_set.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: encoder.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: set_mb_syn_cavlc.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: svc_set_mb_syn_cavlc.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: wels_task_encoder.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: au_parser.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: bit_stream.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: deblocking.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: decode_slice.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: mv_pred.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: parse_mb_syn_cabac.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: parse_mb_syn_cavlc.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) Unexecuted instantiation: cabac_decoder.cpp:WelsCommon::BsRbspTrailingBits(WelsCommon::TagBitStringAux*) |
164 | | |
165 | | } |
166 | | #endif//EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__ |