Searched refs:num_bits (Results 1 - 25 of 80) sorted by relevance

1234

/external/chromium_org/media/filters/
H A Dh264_bitstream_buffer_unittest.cc21 uint64 num_bits = GetParam(); local
23 ASSERT_LE(num_bits, 64u);
24 uint64 num_bytes = (num_bits + 7) / 8;
26 b.AppendBits(num_bits, kTestPattern);
35 if (num_bits < 64)
36 expected &= ((1ull << num_bits) - 1);
38 while (num_bits > 8) {
40 num_bits -= 8;
41 got <<= (num_bits > 8 ? 8 : num_bits);
[all...]
H A Dh264_bitstream_buffer.h32 // Append |num_bits| bits to the stream from |val|.
35 void AppendBits(size_t num_bits, T val) { argument
36 AppendU64(num_bits, static_cast<uint64>(val));
39 void AppendBits(size_t num_bits, bool val) { argument
40 DCHECK_EQ(num_bits, 1ul);
80 // Append |num_bits| bits from U64 value |val| (in host endianness).
81 void AppendU64(size_t num_bits, uint64 val);
H A Dh264_bit_reader.cc64 // Read |num_bits| (1 to 31 inclusive) from the stream and return them
66 // (|num_bits| - 1).
67 bool H264BitReader::ReadBits(int num_bits, int* out) { argument
68 int bits_left = num_bits;
70 DCHECK(num_bits <= 31);
82 *out &= ((1 << num_bits) - 1);
H A Dh264_bitstream_buffer.cc63 void H264BitstreamBuffer::AppendU64(size_t num_bits, uint64 val) { argument
64 CHECK_LE(num_bits, kRegBitSize);
66 while (num_bits > 0) {
71 num_bits > bits_left_in_reg_ ? bits_left_in_reg_ : num_bits;
72 uint64 val_to_write = (val >> (num_bits - bits_to_write));
77 num_bits -= bits_to_write;
H A Dh264_bit_reader.h33 // Read |num_bits| next bits from stream and return in |*out|, first bit
34 // from the stream starting at |num_bits| position in |*out|.
35 // |num_bits| may be 1-32, inclusive.
38 bool ReadBits(int num_bits, int* out);
/external/chromium_org/media/base/
H A Dbit_reader_core.cc45 int BitReaderCore::PeekBitsMsbAligned(int num_bits, uint64* out) { argument
46 // Try to have at least |num_bits| in the bit register.
47 if (nbits_ < num_bits)
48 Refill(num_bits);
54 bool BitReaderCore::SkipBitsSmall(int num_bits) { argument
55 DCHECK_GE(num_bits, 0);
57 while (num_bits >= kRegWidthInBits) {
60 num_bits -= kRegWidthInBits;
62 return ReadBitsInternal(num_bits, &dummy);
65 bool BitReaderCore::SkipBits(int num_bits) { argument
102 ReadBitsInternal(int num_bits, uint64* out) argument
130 reg_ <<= num_bits; local
[all...]
H A Dbit_reader_core.h37 bool ReadBits(int num_bits, bool* out) { argument
38 DCHECK_EQ(num_bits, 1);
42 // Read |num_bits| next bits from stream and return in |*out|, first bit
43 // from the stream starting at |num_bits| position in |*out|,
44 // bits of |*out| whose position is strictly greater than |num_bits|
47 // - |num_bits| cannot be larger than the bits the type can hold.
53 // return false unless |num_bits| is 0. The type |T| has to be a primitive
55 template<typename T> bool ReadBits(int num_bits, T* out) { argument
56 DCHECK_LE(num_bits, static_cast<int>(sizeof(T) * 8));
58 bool ret = ReadBitsInternal(num_bits,
[all...]
H A Dbit_reader.h24 template<typename T> bool ReadBits(int num_bits, T* out) { argument
25 return bit_reader_core_.ReadBits(num_bits, out);
32 bool SkipBits(int num_bits) { argument
33 return bit_reader_core_.SkipBits(num_bits);
/external/chromium_org/third_party/libwebp/utils/
H A Drandom.h36 // Returns a centered pseudo-random number with 'num_bits' amplitude.
39 static WEBP_INLINE int VP8RandomBits2(VP8Random* const rg, int num_bits, argument
42 assert(num_bits + VP8_RANDOM_DITHER_FIX <= 31);
49 diff = (int)((uint32_t)diff << 1) >> (32 - num_bits);
51 diff += 1 << (num_bits - 1); // shift back to 0.5-center
55 static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) { argument
56 return VP8RandomBits2(rg, num_bits, rg->amp_);
H A Dbit_reader.h88 // return the next value made of 'num_bits' bits
89 uint32_t VP8GetValue(VP8BitReader* const br, int num_bits);
95 int32_t VP8GetSignedValue(VP8BitReader* const br, int num_bits);
/external/webp/src/utils/
H A Drandom.h36 // Returns a centered pseudo-random number with 'num_bits' amplitude.
39 static WEBP_INLINE int VP8RandomBits2(VP8Random* const rg, int num_bits, argument
42 assert(num_bits + VP8_RANDOM_DITHER_FIX <= 31);
49 diff = (int)((uint32_t)diff << 1) >> (32 - num_bits);
51 diff += 1 << (num_bits - 1); // shift back to 0.5-center
55 static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) { argument
56 return VP8RandomBits2(rg, num_bits, rg->amp_);
H A Dbit_reader.h88 // return the next value made of 'num_bits' bits
89 uint32_t VP8GetValue(VP8BitReader* const br, int num_bits);
95 int32_t VP8GetSignedValue(VP8BitReader* const br, int num_bits);
/external/valgrind/main/memcheck/tests/vbit-test/
H A Dunary.c13 unsigned num_bits = result->vbits.num_bits; local
19 expected_vbits = undefined_vbits(num_bits);
27 expected_vbits = truncate_vbits(opnd->vbits, num_bits);
31 expected_vbits = left_vbits(opnd->vbits, num_bits);
35 assert(num_bits * 2 == opnd->vbits.num_bits);
40 expected_vbits = sextend_vbits(opnd->vbits, num_bits);
44 expected_vbits = zextend_vbits(opnd->vbits, num_bits);
H A Dvbits.h14 unsigned num_bits; member in struct:__anon33078
40 vbits_t undefined_vbits(unsigned num_bits);
41 vbits_t defined_vbits(unsigned num_bits);
43 vbits_t truncate_vbits(vbits_t, unsigned num_bits);
44 vbits_t left_vbits(vbits_t, unsigned num_bits);
49 vbits_t sextend_vbits(vbits_t, unsigned num_bits);
50 vbits_t zextend_vbits(vbits_t, unsigned num_bits);
51 vbits_t onehot_vbits(unsigned bitno, unsigned num_bits);
H A Dvbits.c22 switch (v.num_bits) {
39 switch (v.num_bits) {
75 undefined_vbits(unsigned num_bits) argument
77 vbits_t new = { .num_bits = num_bits };
79 switch (num_bits) {
102 defined_vbits(unsigned num_bits) argument
104 vbits_t new = { .num_bits = num_bits };
106 switch (num_bits) {
153 truncate_vbits(vbits_t v, unsigned num_bits) argument
219 left_vbits(vbits_t v, unsigned num_bits) argument
480 zextend_vbits(vbits_t v, unsigned num_bits) argument
547 sextend_vbits(vbits_t v, unsigned num_bits) argument
570 onehot_vbits(unsigned bitno, unsigned num_bits) argument
[all...]
H A Dbinary.c13 assert(v1.num_bits == v2.num_bits);
15 vbits_t new = { .num_bits = v2.num_bits };
18 switch (v2.num_bits) {
28 switch (v2.num_bits) {
59 expected_vbits = defined_vbits(result->vbits.num_bits);
63 expected_vbits = undefined_vbits(result->vbits.num_bits);
69 result->vbits.num_bits);
73 assert(opnd1->vbits.num_bits
223 all_bits_zero_value(unsigned num_bits) argument
240 all_bits_one_value(unsigned num_bits) argument
[all...]
H A Dvalgrind.c50 vbits_t actual = { .num_bits = opnd->vbits.num_bits };
66 opnd->vbits.num_bits = bitsof_irtype(opnd->type);
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/vl/
H A Dvl_vlc.h213 * get num_bits from bit buffer without removing them
216 vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) argument
218 assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end);
219 return vlc->buffer >> (64 - num_bits);
223 * remove num_bits from bit buffer
226 vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) argument
228 assert(vl_vlc_valid_bits(vlc) >= num_bits);
230 vlc->buffer <<= num_bits;
231 vlc->invalid_bits += num_bits;
235 * get num_bits fro
238 vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) argument
254 vl_vlc_get_simsbf(struct vl_vlc *vlc, unsigned num_bits) argument
270 vl_vlc_get_vlclbf(struct vl_vlc *vlc, const struct vl_vlc_entry *tbl, unsigned num_bits) argument
[all...]
/external/mesa3d/src/gallium/auxiliary/vl/
H A Dvl_vlc.h213 * get num_bits from bit buffer without removing them
216 vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) argument
218 assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end);
219 return vlc->buffer >> (64 - num_bits);
223 * remove num_bits from bit buffer
226 vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) argument
228 assert(vl_vlc_valid_bits(vlc) >= num_bits);
230 vlc->buffer <<= num_bits;
231 vlc->invalid_bits += num_bits;
235 * get num_bits fro
238 vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) argument
254 vl_vlc_get_simsbf(struct vl_vlc *vlc, unsigned num_bits) argument
270 vl_vlc_get_vlclbf(struct vl_vlc *vlc, const struct vl_vlc_entry *tbl, unsigned num_bits) argument
[all...]
/external/chromium_org/net/disk_cache/blockfile/
H A Dbitmap.h20 Bitmap(int num_bits, bool clear_bits);
23 // has to be valid until this object destruction. |num_bits| is the number of
25 Bitmap(uint32* map, int num_bits, int num_words);
30 // If |num_bits| < Size(), the extra bits will be discarded.
31 // If |num_bits| > Size(), the extra bits will be filled with zeros if
34 void Resize(int num_bits, bool clear_bits);
109 // Returns number of allocated words required for a bitmap of size |num_bits|.
110 static int RequiredArraySize(int num_bits) { argument
112 if (num_bits <= kIntBits)
115 return (num_bits
[all...]
H A Dbitmap.cc43 Bitmap::Bitmap(int num_bits, bool clear_bits) argument
44 : num_bits_(num_bits),
45 array_size_(RequiredArraySize(num_bits)),
54 Bitmap::Bitmap(uint32* map, int num_bits, int num_words) argument
56 num_bits_(num_bits),
59 array_size_(std::min(RequiredArraySize(num_bits), num_words)),
68 void Bitmap::Resize(int num_bits, bool clear_bits) { argument
72 array_size_ = RequiredArraySize(num_bits);
86 num_bits_ = num_bits;
/external/srec/srec/include/
H A Dlog_tabl.h39 void create_lookup_log(log_table_info *logtab, int num_bits);
/external/chromium_org/third_party/boringssl/src/crypto/ecdsa/
H A Decdsa_asn1.c81 size_t num_bits; local
100 num_bits = BN_num_bits(order);
101 group_order_size = (num_bits + 7) / 8;
/external/openssl/crypto/bn/
H A Dbn_recp.c67 recp->num_bits=0;
98 recp->num_bits=BN_num_bits(d);
165 j=recp->num_bits<<1;
179 if (!BN_rshift(a,m,recp->num_bits)) goto err;
181 if (!BN_rshift(d,b,i-recp->num_bits)) goto err;
/external/srec/srec/cfront/
H A Dlog_tabl.c40 /* values for default case, num_bits 12 */
45 void create_lookup_log(log_table_info *logtab, int num_bits) argument
52 logtab->size = 0x01 << num_bits;
54 for (ii = 0; ii < num_bits; ii++) /* one less than the table size in

Completed in 356 milliseconds

1234