Changeset 1a522e5 in mainline


Ignore:
Timestamp:
2015-08-22T03:46:48Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9cfbf2f
Parents:
2133e02
Message:

use a better FOURCC_COMPACT encoding that can be actually decoded back to ASCII

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/fourcc.h

    r2133e02 r1a522e5  
    4141
    4242#define CC_COMPACT(a) \
    43         ((((UINT32_T) (a)) & 0x7c) >> 2)
     43        ((UINT32_T) (a) & 0x7f)
    4444
    4545#define FOURCC_COMPACT(a, b, c, d) \
    46         ((CC_COMPACT(a) << 12) | (CC_COMPACT(b) << 17) | \
    47             (CC_COMPACT(c) << 22) | (CC_COMPACT(d) << 27))
     46        ((CC_COMPACT(a) << 4) | (CC_COMPACT(b) << 11) | \
     47            (CC_COMPACT(c) << 18) | (CC_COMPACT(d) << 25))
    4848
    4949#endif
Note: See TracChangeset for help on using the changeset viewer.