|
Last change
on this file since 2 was
2,
checked in by phkim, 11 years ago
|
|
1.phkim
- revision copy newcon3sk r27
|
-
Property svn:executable set to
*
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: $ |
|---|
| 11 | * $brcm_Revision: $ |
|---|
| 12 | * $brcm_Date: $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: $ |
|---|
| 19 | * |
|---|
| 20 | * |
|---|
| 21 | ***************************************************************************/ |
|---|
| 22 | #if !defined(__GETBITS_H__) |
|---|
| 23 | #define __GETBITS_H__ |
|---|
| 24 | |
|---|
| 25 | #include "bapp_types.h" |
|---|
| 26 | |
|---|
| 27 | struct bit_state_t { |
|---|
| 28 | unsigned char * data; /* data start pointer */ |
|---|
| 29 | size_t bindex; /* bit index */ |
|---|
| 30 | }; |
|---|
| 31 | /* |
|---|
| 32 | Return bit_count of bits from the bitstream. bit_count can be anywhere |
|---|
| 33 | from 0 to 16. The bit_state_t structure has to be reset after 536870911 |
|---|
| 34 | bytes as bindex is 32 bit value. This is not a practical limitation. |
|---|
| 35 | */ |
|---|
| 36 | unsigned int get_bits(size_t bit_count, struct bit_state_t * bs); |
|---|
| 37 | |
|---|
| 38 | /* Return bit_count of bits from bitstream. bit_count can be anywhere from 0 |
|---|
| 39 | to 32. This function can be called only when bit field to be returned is |
|---|
| 40 | aligned on a byte boundary. Most new standards follow this rule. |
|---|
| 41 | */ |
|---|
| 42 | unsigned int get_bits_aligned(size_t bit_count, struct bit_state_t * bs); |
|---|
| 43 | |
|---|
| 44 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.