Questions tagged [24-bit]

"24bit" is usually used to specify a specific attribute. It is mostly used with images and audio files.

24bit term is widely used in DSP (Digital Signal Processing).

With images, it can indicate the color depth: the number of bits used to indicate the color of a single pixel. 24-bit color is also known as "True color". In such images each pixel is represented with 3 bytes, and can store one of 16,777,216 colors.

With sound, it can indicate the audio bit depth, which represents the resolution of each audio sample. 24bits is as much as is used in DVD-Audio.

More information can be found on the "Color depth" and "Audio bit depth" articles on Wikipedia

63 questions
1
vote
1 answer

How to convert 24-bit wav to mp3 with Lame using C++

I am using the Lame library in a C++ application to encode wav files to mp3 files. It works ok for 16-bit wavs, but now I need to convert some 24-bit wavs and I cannot seem to find the way. In particular, I cannot find a function for setting the…
ACEG
  • 1,981
  • 6
  • 33
  • 61
1
vote
1 answer

RGB Color Quantization from 8bit to 6bit

I want to quantize RGB Color from 8 bit to 6 bit. I wrote java code as following: int ind = 0; for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ byte a = 0; byte r = bytes[ind]; byte g =…
xiaoting cai
  • 61
  • 2
  • 7
1
vote
0 answers

Issue in spi 24-bit read and write operation

I have interfaced a sensor to my imx6 processor which has a linux kernel. I am using spi protocol. the driver code for spi operation i am using is this_link . But my sensor registers are of 24-bits. I am trying to use the same code for reading and…
Sathya
  • 23
  • 3
1
vote
2 answers

32 bit multiplication on 24 bit ALU

I want to port a 32 by 32 bit unsigned multiplication on a 24-bit dsp (it's a Linear Congruential Generator, so I'm not allowed to truncate, also I don't want to replace yet the current LCG with a 24 bit one). The available data types are 24 and 48…
George
  • 934
  • 8
  • 23
1
vote
3 answers

Convert 4-bit color (=ConsoleColor) to RGB and back

I want to write a console-like gui for a game, and I start with a real console. So I have a class that specifies the colors. Now I want to convert consolecolor to rgb (24-bit) and the other way round. I have tried this: int d = (((int)col & 8) != 0)…
Eddynand Fuchs
  • 344
  • 1
  • 13
1
vote
3 answers

some thing wrong with downloading Image from URL

I am using following method to download image from URL private Bitmap getBitmap(String url) { File f=fileCache.getFile(url); Log.d("getBitmap", "getBitmap"+url); //from SD cache Bitmap b = decodeFile(f); …
0
votes
2 answers

Blue Color Channel on bmp 24 bit file format

I want to find blue areas on 24 bit bmp image. How can i find the blue color channel ? What is the ways of accessing the blue color channel ?
0
votes
1 answer

Read a signed integer of 24 bit on Dart

I need help to read data from an external device. In the specifications is written that every single fetched value is a 24bit signed integer, but I can't correctly read data from Dart (while I can on Java). Starting from Java (just because it…
SciFi
  • 119
  • 7
0
votes
0 answers

How to convert 24bit to 32 bit in Python?

How to convert 24bit to 32bit in Python? I have a binary file with 24i24q, meaning 24bits for each sample. They are big endian. I thought about open the file and save each sample to a Numpy array. Then taking each item from the Numpy array and…
0
votes
1 answer

24 bit graphics mode in assembly

I want to make an OS (64 bit). I made a compiler in it, input, output, I just need to have a 24 bit graphics mode to make a GUI. I tried to display all of the colors but I just get this mess: the code which ran it: (just in a test 16 bit…
Xulum12
  • 19
  • 4
0
votes
0 answers

Using a 24bit signed integer atomic

I want to use a 24bit signed integer data type lockfree with atomic. I tried, but the compiler gives me this error: boost::atomic requires T to be a trivially copyable type Visibly, the data type I'm using is not trivially copyable. const int…
0
votes
1 answer

convert 24 bit binary char array to double (reading binary wave data)

I'm trying to read 24 bit binary data which is stored in a wave file in 2's Complement. It's stored as little endian. I'm trying to reinterpret the 3 char arrays as int32_t und then convert it to double. I'm getting very close but it's not working…
D Dob
  • 1
  • 1
0
votes
1 answer

unpacking signed 24 bit little endian file to decimal

I'm trying to loop over an extremely large signed 24 bit little endian binary file to convert to decimal this is the code i'm currently using def unpack_24bit(bytes): return bytes[0] | (bytes[1] << 8) | (bytes[2] <<…
jaketomo
  • 1
  • 1
0
votes
1 answer

MATLAB fread 24 bit convert to Python

I am trying to convert some MATLAB code to Python. The code reads audio data from serial: out = fread(s,s.bytesavailable,'uint8'); % [255 205 217 255 212 60 255 207 132 255 ...] 'out' is then saved to a binary file and read back using…
cjbarker
  • 3
  • 1
0
votes
2 answers

24-Bit Sound Capture in Matlab on Linux

I have a rather different question. So I'm using Matlab on a Linux Gentoo machine. I got a few Asus Xonar STX soundcards, and I'm trying to use them as sensitive audio frequency analyzer using the PlayRec non blocking audio IO package. Now I know…
dynamphorous
  • 739
  • 1
  • 9
  • 20