summaryrefslogtreecommitdiff
path: root/audio_codec/libraac/include/rv_backend_types.h (plain)
blob: 0655d153b1eca467ff1103026a869ba0c26e7c9b
1/* ***** BEGIN LICENSE BLOCK *****
2 * Source last modified: $Id: rv_backend_types.h,v 1.1.1.1.2.1 2005/05/04 18:20:57 hubbe Exp $
3 *
4 * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM
5 * Portions Copyright (c) 1995-2005 RealNetworks, Inc.
6 * All Rights Reserved.
7 *
8 * The contents of this file, and the files included with this file,
9 * are subject to the current version of the Real Format Source Code
10 * Porting and Optimization License, available at
11 * https://helixcommunity.org/2005/license/realformatsource (unless
12 * RealNetworks otherwise expressly agrees in writing that you are
13 * subject to a different license). You may also obtain the license
14 * terms directly from RealNetworks. You may not use this file except
15 * in compliance with the Real Format Source Code Porting and
16 * Optimization License. There are no redistribution rights for the
17 * source code of this file. Please see the Real Format Source Code
18 * Porting and Optimization License for the rights, obligations and
19 * limitations governing use of the contents of the file.
20 *
21 * RealNetworks is the developer of the Original Code and owns the
22 * copyrights in the portions it created.
23 *
24 * This file, and the files included with this file, is distributed and
25 * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND,
26 * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL
27 * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT
29 * OR NON-INFRINGEMENT.
30 *
31 * Technology Compatibility Kit Test Suite(s) Location:
32 * https://rarvcode-tck.helixcommunity.org
33 *
34 * Contributor(s):
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38#ifndef RV_BACKEND_TYPES_H
39#define RV_BACKEND_TYPES_H
40
41#include "rv_format_info.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif /* #ifdef __cplusplus */
46
47 typedef struct rv_backend_init_params_struct {
48 UINT16 usOuttype;
49 UINT16 usPels;
50 UINT16 usLines;
51 UINT16 usPadWidth; /* number of columns of padding on right to get 16 x 16 block*/
52 UINT16 usPadHeight; /* number of rows of padding on bottom to get 16 x 16 block*/
53
54 UINT16 pad_to_32; /* to keep struct member alignment independent of */
55 /* compiler options */
56 UINT32 ulInvariants;
57 /* ulInvariants specifies the invariant picture header bits */
58 INT32 bPacketization;
59 UINT32 ulStreamVersion;
60 } rv_backend_init_params;
61
62 typedef struct rv_backend_in_params_struct {
63 UINT32 dataLength;
64 INT32 bInterpolateImage;
65 UINT32 numDataSegments;
66 rv_segment *pDataSegments;
67 UINT32 flags;
68 /* 'flags' should be initialized by the front-end before each */
69 /* invocation to decompress a frame. It is not updated by the decoder. */
70 /* */
71 /* If it contains RV_DECODE_MORE_FRAMES, it informs the decoder */
72 /* that it is being called to extract the second or subsequent */
73 /* frame that the decoder is emitting for a given input frame. */
74 /* The front-end should set this only in response to seeing */
75 /* an RV_DECODE_MORE_FRAMES indication in H263DecoderOutParams. */
76 /* */
77 /* If it contains RV_DECODE_DONT_DRAW, it informs the decoder */
78 /* that it should decode the image (in order to produce a valid */
79 /* reference frame for subsequent decoding), but that no image */
80 /* should be returned. This provides a "hurry-up" mechanism. */
81 UINT32 timestamp;
82 } rv_backend_in_params;
83
84 typedef struct rv_backend_out_params_struct {
85 UINT32 numFrames;
86 UINT32 notes;
87 /* 'notes' is assigned by the transform function during each call to */
88 /* decompress a frame. If upon return the notes parameter contains */
89 /* the indication RV_DECODE_MORE_FRAMES, then the front-end */
90 /* should invoke the decoder again to decompress the same image. */
91 /* For this additional invocation, the front-end should first set */
92 /* the RV_DECODE_MORE_FRAMES bit in the 'H263DecoderInParams.flags' */
93 /* member, to indicate to the decoder that it is being invoked to */
94 /* extract the next frame. */
95 /* The front-end should continue invoking the decoder until the */
96 /* RV_DECODE_MORE_FRAMES bit is not set in the 'notes' member. */
97 /* For each invocation to decompress a frame in the same "MORE_FRAMES" */
98 /* loop, the front-end should send in the same input image. */
99 /* */
100 /* If the decoder has no frames to return for display, 'numFrames' will */
101 /* be set to zero. To avoid redundancy, the decoder does *not* set */
102 /* the RV_DECODE_DONT_DRAW bit in 'notes' in this case. */
103
104
105 UINT32 timestamp;
106 /* The 'temporal_offset' parameter is used in conjunction with the */
107 /* RV_DECODE_MORE_FRAMES note, to assist the front-end in */
108 /* determining when to display each returned frame. */
109 /* If the decoder sets this to T upon return, the front-end should */
110 /* attempt to display the returned image T milliseconds relative to */
111 /* the front-end's idea of the presentation time corresponding to */
112 /* the input image. */
113 /* Be aware that this is a signed value, and will typically be */
114 /* negative. */
115
116 UINT32 width;
117 UINT32 height;
118 /* Width and height of the returned frame. */
119 /* This is the width and the height as signalled in the bitstream. */
120
121 } rv_backend_out_params;
122
123
124 /* definitions for output parameter notes */
125
126#define RV_DECODE_MORE_FRAMES 0x00000001
127#define RV_DECODE_DONT_DRAW 0x00000002
128#define RV_DECODE_KEY_FRAME 0x00000004
129 /* Indicates that the decompressed image is a key frame. */
130 /* Note that enhancement layer EI frames are not key frames, in the */
131 /* traditional sense, because they have dependencies on lower layer */
132 /* frames. */
133
134#define RV_DECODE_B_FRAME 0x00000008
135 /* Indicates that the decompressed image is a B frame. */
136 /* At most one of PIA_DDN_KEY_FRAME and PIA_DDN_B_FRAME will be set. */
137
138#define RV_DECODE_DEBLOCKING_FILTER 0x00000010
139 /* Indicates that the returned frame has gone through the */
140 /* deblocking filter. */
141
142#define RV_DECODE_FRU_FRAME 0x00000020
143 /* Indicates that the decompressed image is a B frame. */
144 /* At most one of PIA_DDN_KEY_FRAME and PIA_DDN_B_FRAME will be set. */
145
146#define RV_DECODE_SCRAMBLED_BUFFER 0x00000040
147 /* Indicates that the input buffer is scrambled for security */
148 /* decoder should de-scramble the buffer before use it */
149
150#define RV_DECODE_LAST_FRAME 0x00000200
151 /* Indicates that the accompanying input frame is the last in the */
152 /* current sequence. If input frame is a dummy frame, the decoder */
153 /* flushes the latency frame to the output. */
154
155 /* definitions for decoding opaque data in bitstream header */
156 /* Defines match ilvcmsg.h so that ulSPOExtra == rv10init.invariants */
157#define RV40_SPO_FLAG_UNRESTRICTEDMV 0x00000001 /* ANNEX D */
158#define RV40_SPO_FLAG_EXTENDMVRANGE 0x00000002 /* IMPLIES NEW VLC TABLES */
159#define RV40_SPO_FLAG_ADVMOTIONPRED 0x00000004 /* ANNEX F */
160#define RV40_SPO_FLAG_ADVINTRA 0x00000008 /* ANNEX I */
161#define RV40_SPO_FLAG_INLOOPDEBLOCK 0x00000010 /* ANNEX J */
162#define RV40_SPO_FLAG_SLICEMODE 0x00000020 /* ANNEX K */
163#define RV40_SPO_FLAG_SLICESHAPE 0x00000040 /* 0: free running; 1: rect */
164#define RV40_SPO_FLAG_SLICEORDER 0x00000080 /* 0: sequential; 1: arbitrary */
165#define RV40_SPO_FLAG_REFPICTSELECTION 0x00000100 /* ANNEX N */
166#define RV40_SPO_FLAG_INDEPENDSEGMENT 0x00000200 /* ANNEX R */
167#define RV40_SPO_FLAG_ALTVLCTAB 0x00000400 /* ANNEX S */
168#define RV40_SPO_FLAG_MODCHROMAQUANT 0x00000800 /* ANNEX T */
169#define RV40_SPO_FLAG_BFRAMES 0x00001000 /* SETS DECODE PHASE */
170#define RV40_SPO_BITS_DEBLOCK_STRENGTH 0x0000e000 /* deblocking strength */
171#define RV40_SPO_BITS_NUMRESAMPLE_IMAGES 0x00070000 /* max of 8 RPR images sizes */
172#define RV40_SPO_FLAG_FRUFLAG 0x00080000 /* FRU BOOL: if 1 then OFF; */
173#define RV40_SPO_FLAG_FLIP_FLIP_INTL 0x00100000 /* FLIP-FLOP interlacing; */
174#define RV40_SPO_FLAG_INTERLACE 0x00200000 /* de-interlacing prefilter has been applied; */
175#define RV40_SPO_FLAG_MULTIPASS 0x00400000 /* encoded with multipass; */
176#define RV40_SPO_FLAG_INV_TELECINE 0x00800000 /* inverse-telecine prefilter has been applied; */
177#define RV40_SPO_FLAG_VBR_ENCODE 0x01000000 /* encoded using VBR; */
178#define RV40_SPO_BITS_DEBLOCK_SHIFT 13
179#define RV40_SPO_BITS_NUMRESAMPLE_IMAGES_SHIFT 16
180
181#define OUT_OF_DATE_DECODER 0x00000001
182#define OK_VERSION 0x00000000
183
184#define CORRUPTED_BITSTREAM 0x00
185#define OK_DECODE 0x0f
186#define INCOMPLETE_FRAME 0xffff
187#define MALLOC_FAILURE 0x1111
188
189#define RV10_DITHER_PARAMS 0x00001001
190#define RV10_POSTFILTER_PARAMS 0x00001002
191#define RV10_ADVANCED_MP_PARAMS 0x0001003
192#define RV10_TEMPORALINTERP_PARAMS 0x00001004
193
194#ifdef __cplusplus
195}
196#endif /* #ifdef __cplusplus */
197
198#endif /* RV_BACKEND_TYPES_H */
199