theora_parser.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: LGPL-2.1 OR BSD-3-Clause */
  2. //--=========================================================================--
  3. // This file is a part of BlackBird Video Codec Modeling project
  4. //-----------------------------------------------------------------------------
  5. //
  6. // This confidential and proprietary software may be used only
  7. // as authorized by a licensing agreement from Chips&Media Inc.
  8. // In the event of publication, the following notice is applicable:
  9. //
  10. // (C) COPYRIGHT 2010 CHIPS&MEDIA INC.
  11. // ALL RIGHTS RESERVED
  12. //
  13. // The entire notice above must be reproduced on all authorized
  14. // copies.
  15. //
  16. //-----------------------------------------------------------------------------
  17. //--=========================================================================--
  18. #ifndef _THO_PARSER_H_
  19. #define _THO_PARSER_H_
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. typedef struct tho_parser_t tho_parser_t;
  24. struct tho_parser_t {
  25. char *type;
  26. int32_t (*open)(void *handle, unsigned char *buf, int32_t size, int32_t *scaleInfo);
  27. int32_t (*read_frame)(void *codec_handle, unsigned char * chunkData, int32_t chunkSize);
  28. int32_t (*close)(void *handle);
  29. void * handle;
  30. };
  31. /**
  32. * THEORA DECODER Parser
  33. * Parsing the syntax and semantics of theora stream.
  34. * This process include below process items
  35. *
  36. * 1. buffering quantization matrices
  37. * 2. process of parsing bitstream
  38. * 3. packing data on an MB basis
  39. *
  40. */
  41. int32_t theora_parser_init(void **parser);
  42. /* refer to 6.2.3.2 Macroblock order Matching,
  43. 6.2.3.3 Macroblock Packing in Program User Guide */
  44. int32_t theora_make_stream(void *handle, unsigned char *stream, int32_t run_cmd);
  45. /* refer to 6.2.2 Quantization Matrices Buffering in Program User Guide */
  46. //THEORA_PARSER_API int32_t theora_get_pic_info(void *handle, void *info, uint8_t *qmat);
  47. void* theora_get_codec_info();
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif //_THO_PARSER_H_