RGB32 vs. RGB24

Locked
User avatar
rubyeye
Joined: Wed Sep 05, 2001 1:45 pm
Org Profile

RGB32 vs. RGB24

Post by rubyeye » Tue Jan 18, 2005 7:08 pm

Ok, I know RGB32 is basically RGB24+Alpha Channel. But in addition to a bigger file size (over RGB24), is there any real neccessity or situation where having the extra 8-bits help?

Both Premiere(6) and After Effects(5.5) can import/export my files perfectly fine. And I haven't seen any problems with encoders like TMPEGEnc and XviD.

Do I really need an alpha channel, for simple editing? I seem to recall a passage in the guide about using effects regarding that, but I can't find it.

User avatar
AbsoluteDestiny
Joined: Wed Aug 15, 2001 1:56 pm
Location: Oxford, UK
Contact:
Org Profile

Post by AbsoluteDestiny » Tue Jan 18, 2005 7:12 pm

You don't need it, but technically 32bits is quicker to process than 24bits. (it is in avisynth at least). For your requirements it makes little real difference.

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Tue Jan 18, 2005 7:46 pm

AbsoluteDestiny wrote:You don't need it, but technically 32bits is quicker to process than 24bits. (it is in avisynth at least). For your requirements it makes little real difference.
just a quick tack-on --

RGB32 is better in just about every application on 32-bit machines, because the size of a word on 32-bit machines is 32 bits. Therefore you can retrieve one pixel with relatively little effort. With RGB24 you have either space wastage (by reading in 8 bits of garbage) or speed wastage incurred by some additional bit-shifting (if you don't want to waste space).

User avatar
Sir_Lagsalot
Joined: Mon Jun 23, 2003 6:42 pm
Org Profile

Post by Sir_Lagsalot » Tue Jan 18, 2005 9:24 pm

trythil wrote: RGB32 is better in just about every application on 32-bit machines, because the size of a word on 32-bit machines is 32 bits. Therefore you can retrieve one pixel with relatively little effort. With RGB24 you have either space wastage (by reading in 8 bits of garbage) or speed wastage incurred by some additional bit-shifting (if you don't want to waste space).
The trouble isn't the size, its the alignment in memory. x86 machines (which are pretty much every PC besides Mac) can read just about anything from just about any byte alignment. However, if the data is not naturally aligned (ie 4 byte values should start on addresses that are multiples of 4, 8 byte values on multiples of 8, etc.), there is a speed penalty in reading the value. For stuff like MMX and SSE2, accessing unaligned values can be prohibitivly expensive in terms of time, and MMX/SSE2 are your best friend when it comes to optimizing video processing. With 24 bit video, any time you read in a whole pixel, odds are the value is not going to be aligned. 32 bit video is naturally aligned for 32 bit reads, and if the video width is even, then it is aligned for 64 bit reads too, which makes MMX happy.
Lagarith: Best lossless codec ever in my completely objective opinion.

User avatar
rubyeye
Joined: Wed Sep 05, 2001 1:45 pm
Org Profile

Post by rubyeye » Wed Jan 19, 2005 12:44 am

trythil wrote:
AbsoluteDestiny wrote:You don't need it, but technically 32bits is quicker to process than 24bits. (it is in avisynth at least). For your requirements it makes little real difference.
just a quick tack-on --

RGB32 is better in just about every application on 32-bit machines, because the size of a word on 32-bit machines is 32 bits. Therefore you can retrieve one pixel with relatively little effort. With RGB24 you have either space wastage (by reading in 8 bits of garbage) or speed wastage incurred by some additional bit-shifting (if you don't want to waste space).
That's all good to know. I'm sure my computer could handle it, but calculating the extra "space" I would have needed - my harddrive would have suffocated. Next time I'll try RGB32. Thanks for the info, guys. :)

Locked

Return to “Video & Audio Help”