vp8hwd_bool.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. -
  16. - Description : ...
  17. -
  18. --------------------------------------------------------------------------------
  19. -
  20. - Version control information, please leave untouched.
  21. -
  22. - $RCSfile: vp8hwd_bool.h,v $
  23. - $Revision: 1.1 $
  24. - $Date: 2009/11/17 13:35:15 $
  25. -
  26. ------------------------------------------------------------------------------*/
  27. #ifndef __VP8_BOOL_H__
  28. #define __VP8_BOOL_H__
  29. #include "basetype.h"
  30. #define END_OF_STREAM (0xFFFFFFFF)
  31. #define CHECK_END_OF_STREAM(s) if((s)==END_OF_STREAM) return (s)
  32. typedef struct
  33. {
  34. u32 lowvalue;
  35. u32 range;
  36. u32 value;
  37. i32 count;
  38. u32 pos;
  39. u8 *buffer;
  40. u32 BitCounter;
  41. u32 streamEndPos;
  42. u32 strmError;
  43. } vpBoolCoder_t;
  44. extern void vp8hwdBoolStart(vpBoolCoder_t * bc, const u8 *buffer, u32 len);
  45. extern u32 vp8hwdDecodeBool(vpBoolCoder_t * bc, i32 probability);
  46. extern u32 vp8hwdDecodeBool128(vpBoolCoder_t * bc);
  47. extern void vp8hwdBoolStop(vpBoolCoder_t * bc);
  48. u32 vp8hwdReadBits ( vpBoolCoder_t *br, i32 bits );
  49. #endif /* __VP8_BOOL_H__ */