Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 99) sorted by relevance

1234

/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DBitwiseInputStream.java74 public int read(int bits) throws AccessException { in read() argument
76 int offset = 16 - (mPos & 0x07) - bits; // &7==%8 in read()
77 if ((bits < 0) || (bits > 8) || ((mPos + bits) > mEnd)) { in read()
79 "illegal read (pos " + mPos + ", end " + mEnd + ", bits " + bits + ")"); in read()
84 data &= (-1 >>> (32 - bits)); in read()
85 mPos += bits; in read()
95 public byte[] readByteArray(int bits) throws AccessException { in readByteArray() argument
96 int bytes = (bits >>> 3) + ((bits & 0x07) > 0 ? 1 : 0); // &7==%8 in readByteArray()
99 int increment = Math.min(8, bits - (i << 3)); in readByteArray()
110 public void skip(int bits) throws AccessException { in skip() argument
[all …]
/packages/modules/Bluetooth/system/embdrv/sbc/decoder/srce/
Dbitalloc.c143 OI_INT bits = scale_factor[sb]; in computeBitneed() local
144 if (bits > maxBits) { in computeBitneed()
145 maxBits = bits; in computeBitneed()
147 bitneeds[sb] = bits; in computeBitneed()
149 bitcount += bits; in computeBitneed()
151 prefBits += 2 + bits; in computeBitneed()
161 OI_INT bits = scale_factor[sb]; in computeBitneed() local
162 if (bits > maxBits) { in computeBitneed()
163 maxBits = bits; in computeBitneed()
165 prefBits += 2 + bits; in computeBitneed()
[all …]
Ddequant.c182 INLINE float dequant_float(uint32_t raw, OI_UINT scale_factor, OI_UINT bits) { in dequant_float() argument
184 ((raw * 2.0f + 1.0f) / ((1 << bits) - 1.0f) - 1.0f); in dequant_float()
201 OI_UINT bits) { in OI_SBC_Dequant() argument
206 OI_ASSERT(bits <= 16); in OI_SBC_Dequant()
208 if (bits <= 1) { in OI_SBC_Dequant()
213 d *= dequant_long_scaled[bits]; in OI_SBC_Dequant()
221 float_result = dequant_float(raw, scale_factor, bits); in OI_SBC_Dequant()
240 OI_UINT bits) { in OI_SBC_Dequant_Unscaled() argument
245 OI_ASSERT(bits <= 16); in OI_SBC_Dequant_Unscaled()
247 if (bits <= 1) { in OI_SBC_Dequant_Unscaled()
[all …]
Dbitalloc-sbc.c73 excess = allocAdjustedBits(&common->bits.uint8[sbL], in stereoBitAllocation()
76 excess = allocAdjustedBits(&common->bits.uint8[sbR], in stereoBitAllocation()
83 excess = allocExcessBits(&common->bits.uint8[sbL], excess); in stereoBitAllocation()
88 excess = allocExcessBits(&common->bits.uint8[sbR], excess); in stereoBitAllocation()
134 uint16_t bits; in OI_CODEC_SBC_CalculateBitpool() local
148 bits = 8 * (frameLen - SBC_HEADER_LEN) - hdr; in OI_CODEC_SBC_CalculateBitpool()
149 return DIVIDE(bits, nrof_blocks); in OI_CODEC_SBC_CalculateBitpool()
Dreadsamplesjoint.inc70 uint8_t *bits_array = &common->bits.uint8[0];
80 uint8_t bits = *bits_array++;
83 OI_BITSTREAM_READUINT(raw, bits, ptr, value, bitPtr);
84 dequant = OI_SBC_Dequant(raw, sf, bits);
94 uint8_t bits = *bits_array++;
97 OI_BITSTREAM_READUINT(raw, bits, ptr, value, bitPtr);
98 dequant = OI_SBC_Dequant(raw, sf, bits);
Ddecoder-private.c191 OI_UINT bits = common->bits.uint8[n]; in OI_SBC_ReadSamples() local
193 if (bits) { in OI_SBC_ReadSamples()
195 OI_BITSTREAM_READUINT(raw, bits, ptr, value, bitPtr); in OI_SBC_ReadSamples()
196 dequant = OI_SBC_Dequant(raw, sf, bits); in OI_SBC_ReadSamples()
/packages/modules/Bluetooth/system/embdrv/sbc/decoder/include/
Doi_bitstream.h47 INLINE uint32_t OI_BITSTREAM_ReadUINT(OI_BITSTREAM* bs, OI_UINT bits);
54 OI_UINT bits);
78 #define OI_BITSTREAM_READUINT(result, bits, ptr, value, bitPtr) \ argument
80 OI_ASSERT((bits) <= 16); \
84 while ((bitPtr + bits) > 32) { \
90 (result) >>= 32 - (bits); \
92 (bitPtr) += (bits); \
93 OI_ASSERT(((bits) == 0) || ((result) < (1u << (bits)))); \
96 #define OI_BITSTREAM_WRITEUINT(ptr, value, bitPtr, datum, bits) \ argument
98 (bitPtr) -= (bits); \
/packages/apps/DeskClock/src/com/android/deskclock/data/
DWeekdays.kt32 class Weekdays private constructor(bits: Int) {
80 fun fromBits(bits: Int): Weekdays { in fromBits()
81 return Weekdays(bits) in fromBits()
99 var bits = 0 in fromCalendarDays() variable
103 bits = bits or bit in fromCalendarDays()
106 return Weekdays(bits) in fromCalendarDays()
111 val bits: Int = ALL_DAYS and bits constant
129 return Weekdays(if (on) bits or bit else bits and bit.inv()) in setBit()
148 return bits and bit > 0 in isBitOn()
155 get() = bits != 0
[all …]
/packages/modules/Bluetooth/system/gd/packet/parser/fields/
Dscalar_field.cc57 num_leading_bits = start_offset.bits() % 8; in GenBounds()
60 num_leading_bits = GetShiftBits(end_offset.bits() + size.bits()); in GenBounds()
61 Size byte_offset = Size(num_leading_bits + size.bits()) + end_offset; in GenBounds()
74 std::string extract_type = util::GetTypeForSize(size.bits() + num_leading_bits); in GenExtractor()
82 if (util::RoundSizeUp(size.bits()) != size.bits()) { in GenExtractor()
84 for (int i = 0; i < size.bits(); i++) { in GenExtractor()
116 return util::RoundSizeUp(GetSize().bits()) != GetSize().bits(); in HasParameterValidator()
120 s << "ASSERT(" << GetName() << " < (static_cast<uint64_t>(1) << " << GetSize().bits() << "));"; in GenParameterValidator()
124 if (GetSize().bits() == 8) { in GenInserter()
127 s << "insert(" << GetName() << "_, i," << GetSize().bits() << ");"; in GenInserter()
Dvector_field.cc38 if (!element_size_.empty() && element_size_.bits() % 8 != 0) { in VectorField()
63 std::to_string(element_size_.bits()) + ")"; in GetSize()
71 … "(static_cast<size_t>(" + GetName() + "_.size()) * " + std::to_string(element_size_.bits()) + ")"; in GetBuilderSize()
100 std::to_string(element_size_.bits()) + ")"; in GetStructSize()
Dreserved_field.cc63 …(static_cast<" << util::GetTypeForSize(GetSize().bits()) << ">(0) /* Reserved */, i, " << GetSize(… in GenInserter()
/packages/modules/Bluetooth/floss/pandora/floss/
Dsox_utils.py18 def _raw_format_args(channels, bits, rate): argument
30 args += _format_args(channels, bits, rate)
34 def _format_args(channels, bits, rate): argument
45 return ['-c', str(channels), '-b', str(bits), '-r', str(rate)]
50 bits=16, argument
74 args += _raw_format_args(channels, bits, rate)
76 args += _format_args(channels, bits, rate)
Daudio_utils.py125 bits = sample_format['size_bytes'] * 8
129 bits=bits,
/packages/modules/Bluetooth/system/gd/packet/parser/
Dsize.h28 Size(int bits) { in Size() argument
30 bits_ = bits; in Size()
38 Size(int bits, std::string dynamic) { in Size() argument
40 bits_ = bits; in Size()
77 int bits() const { in bits() function
Dutil.h56 inline uint64_t GetMaxValueForBits(int bits) { in GetMaxValueForBits() argument
57 if (bits > 64) { in GetMaxValueForBits()
58 ERROR() << __func__ << ": Cannot use a type larger than 64 bits. (" << bits << ")\n"; in GetMaxValueForBits()
62 return ~(static_cast<uint64_t>(0)) >> (64 - bits); in GetMaxValueForBits()
Dparent_def.cc144 if (offset.bits() % 8 != 0) { in GetSize()
147 if (offset.has_bits()) custom_field_size << " + " << offset.bits() / 8; in GetSize()
403 … s << "ASSERT(payload_bytes < (static_cast<size_t>(1) << " << field->GetSize().bits() << "));"; in GenSerialize()
404 …static_cast<" << field->GetDataType() << ">(payload_bytes), i," << field->GetSize().bits() << ");"; in GenSerialize()
409 …s << "ASSERT((size() - local_size) < (static_cast<size_t>(1) << " << field->GetSize().bits() << ")… in GenSerialize()
410 …rt(static_cast<" << field->GetDataType() << ">(size() - local_size), i," << field->GetSize().bits() in GenSerialize()
431 s << "ASSERT(" << vector_name + "bytes < (1 << " << field->GetSize().bits() << "));"; in GenSerialize()
433 s << field->GetSize().bits() << ");"; in GenSerialize()
454 s << "insert(" << vector_name << ".size(), i, " << field->GetSize().bits() << ");"; in GenSerialize()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DBitUtils.java51 public static long packBitList(int... bits) { in packBitList() argument
52 return packBits(bits); in packBitList()
64 public static long packBits(int[] bits) { in packBits() argument
66 for (int b : bits) { in packBits()
/packages/modules/Virtualization/authfs/src/file/
Dattr.rs30 Mode::from_bits_truncate(Mode::S_IRUSR.bits() | Mode::S_IWUSR.bits());
64 self.mode.bits() in mode()
82 self.service.chmod(self.remote_fd, new_mode.bits() as i32).map_err(|e| { in set_mode()
/packages/modules/Bluetooth/system/stack/a2dp/
Da2dp_sbc_up_sample.cc36 uint8_t bits; /* number of bits per pcm sample */ member
59 void a2dp_sbc_init_up_sample(uint32_t src_sps, uint32_t dst_sps, uint8_t bits, in a2dp_sbc_init_up_sample() argument
64 a2dp_sbc_ups_cb.bits = bits; in a2dp_sbc_init_up_sample()
69 if (bits == 8) { in a2dp_sbc_init_up_sample()
78 if (bits == 8) { in a2dp_sbc_init_up_sample()
/packages/apps/DeskClock/src/com/android/deskclock/
DNotificationUtils.kt113 val bits = properties[2] in createChannel() constant
114 channel.enableLights(bits and ENABLE_LIGHTS != 0) in createChannel()
115 channel.enableVibration(bits and ENABLE_VIBRATION != 0) in createChannel()
116 if (bits and PLAY_SOUND == 0) { in createChannel()
/packages/modules/Bluetooth/system/stack/test/hci/
Dstack_hci_test.cc51 preamble.bits.handle = 0xfff; in TEST_F()
52 preamble.bits.boundary = 0x3; in TEST_F()
53 preamble.bits.broadcast = 0x1; in TEST_F()
54 preamble.bits.unused15 = 0x0; in TEST_F()
55 preamble.bits.length = 0xffff; in TEST_F()
/packages/modules/GeoTZ/tzs2storage/
DREADME.md41 table. Then they contain one or more fixed length `{key}`/`{value}` records of `{R}` bits sorted by
74 stored using only a subset of the bits needed to store a full S2 cell ID.
92 The `{prefix}` is computed by extracting the first `{X}` bits of the S2 cell ID. The `{prefix}` is
102 The `{suffix}`, the final `{Y}` bits of the search S2 cell ID, is used to seek for a record
130 It is important to keep the number of bits used in each suffix table entry to a
187 As with any packed table, each record in the packed table has a fixed width of `{R}` bits. The first
188 `{M}` bits of every record are used to store the (ordered) `{key}`.
190 The `{key}` for an entry contains only the `{suffix}` bits from the `{start S2 cell ID
194 The remaining (`{R-M}`) bits are used to store the ``{value}``. The ``{value}`` is further
202 bits from the S2 cell ID can be extracted. Since all data in the table is held at a single S2 level,
[all …]
/packages/services/Car/car_product/properties/
Dbluetooth.prop10 # *NOT* correspond to a field. Instead, class of device is stored internally as 24 bits,
15 # (11 bits) (5 bits) (6 bits) 0b00
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DBitUtilsTests.kt41 fun runBitPackingTestCase(packedBits: Long, bits: IntArray) { in <lambda>()
42 assertEquals(packedBits, packBits(bits)) in <lambda>()
43 assertTrue(bits contentEquals unpackBits(packedBits)) in <lambda>()
/packages/modules/Bluetooth/system/gd/rust/topshim/src/profiles/
Da2dp.rs114 val <= A2dpCodecSampleRate::all().bits() in validate_bits()
121 Ok(self.bits()) in try_into()
144 val <= A2dpCodecBitsPerSample::all().bits() in validate_bits()
151 Ok(self.bits()) in try_into()
173 val <= A2dpCodecChannelMode::all().bits() in validate_bits()
180 Ok(self.bits()) in try_into()

1234