PageRenderTime 28ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/Show/avc/avcdec_int.h

http://github.com/mbebenita/Broadway
C Header | 88 lines | 33 code | 13 blank | 42 comment | 0 complexity | 7ac023d23baef57d40415e96bc0b9f80 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. /* ------------------------------------------------------------------
  2. * Copyright (C) 1998-2009 PacketVideo
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied.
  14. * See the License for the specific language governing permissions
  15. * and limitations under the License.
  16. * -------------------------------------------------------------------
  17. */
  18. /**
  19. This file contains application function interfaces to the AVC decoder library
  20. and necessary type defitionitions and enumerations.
  21. Naming convention for variables:
  22. lower_case_with_under_line is syntax element in subclause 7.2 and 7.3
  23. noUnderLine or NoUnderLine is derived variables defined somewhere else in the draft
  24. or introduced by this decoder library.
  25. @publishedAll
  26. */
  27. #ifndef _AVCDEC_INT_H_
  28. #define _AVCDEC_INT_H_
  29. #include "avcint_common.h"
  30. #include "avcdec_api.h"
  31. /**
  32. Bitstream structure contains bitstream related parameters such as the pointer
  33. to the buffer, the current byte position and bit position.
  34. @publishedAll
  35. */
  36. typedef struct tagDecBitstream
  37. {
  38. uint8 *bitstreamBuffer; /* pointer to buffer memory */
  39. int nal_size; /* size of the current NAL unit */
  40. int data_end_pos; /* bitstreamBuffer size in bytes */
  41. int read_pos; /* next position to read from bitstreamBuffer */
  42. uint curr_word; /* byte-swapped (MSB left) current word read from buffer */
  43. int bit_left; /* number of bit left in current_word */
  44. uint next_word; /* in case for old data in previous buffer hasn't been flushed. */
  45. int incnt; /* bit left in the prev_word */
  46. int incnt_next;
  47. int bitcnt;
  48. void *userData;
  49. } AVCDecBitstream;
  50. /**
  51. This structure is the main object for AVC decoder library providing access to all
  52. global variables. It is allocated at PVAVCInitDecoder and freed at PVAVCCleanUpDecoder.
  53. @publishedAll
  54. */
  55. typedef struct tagDecObject
  56. {
  57. AVCCommonObj *common;
  58. AVCDecBitstream *bitstream; /* for current NAL */
  59. /* sequence parameter set */
  60. AVCSeqParamSet *seqParams[32]; /* Array of pointers, get allocated at arrival of new seq_id */
  61. /* picture parameter set */
  62. AVCPicParamSet *picParams[256]; /* Array of pointers to picture param set structures */
  63. /* For internal operation, scratch memory for MV, prediction, transform, etc.*/
  64. uint ref_idx_l0[4]; /* [mbPartIdx], te(v) */
  65. uint ref_idx_l1[4];
  66. /* function pointers */
  67. AVCDec_Status(*residual_block)(struct tagDecObject*, int, int,
  68. int *, int *, int *);
  69. /* Application control data */
  70. AVCHandle *avcHandle;
  71. void (*AVC_DebugLog)(AVCLogType type, char *string1, char *string2);
  72. /*bool*/
  73. uint debugEnable;
  74. } AVCDecObject;
  75. #endif /* _AVCDEC_INT_H_ */