Framework Components Application Programming Interface (API)  fc-v07
ires_hdvicp2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 - 2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
48 #ifndef ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
49 #define ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
50 
53 
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <ti/xdais/xdas.h>
60 #include <ti/xdais/ires_common.h>
61 #include <ti/xdais/ires.h>
62 
66 #define IRES_HDVICP2_PROTOCOLNAME "ti.sdo.fc.ires.hdvicp.hdvicp2"
67 
79 #define HDVICP2_MODNAME "ti.sdo.fc.ires.hdvicp2"
80 
81 
87 #define IRES_HDVICP2_ID_ANY -2
88 
95 #define IRES_HDVICP2_ID_LATE_ACQUIRE -1
96 
103 #define IRES_HDVICP2_INVALID_ADDR 0xFFFFFFFF
104 
111 #define IRES_HDVICP2_TIMEOUTFOREVER ((UInt)(-1))
112 
123 #define IRES_HDVICP2_UNKNOWNLATEACQUIREARG (-1)
124 
125 /*
126  * Note, we wrap the PROTOCOLVERSION in an ifdef so the
127  * resource managers and algs get this version data placed in their object
128  * files. Apps, which include rman.h, will have this 'NOPROTOCOLREV' defined.
129  */
130 #ifndef ti_sdo_fc_ires_NOPROTOCOLREV
131 
135 static IRES_ProtocolRevision IRES_HDVICP2_PROTOCOLREVISION = {1, 0, 0};
136 
137 #endif
138 
143 
144 
149 extern unsigned int ti_sdo_fc_ires_hdvicp_HDVICP2_timeoutVal;
150 
155  (Int scratchId);
156 
162  IRES_YieldArgs args);
163 
164 
165 
170 
179 
184 typedef void (*IRES_HDVICP2_CallbackFxn)(IALG_Handle handle, Void * args);
185 
194 typedef enum IRES_HDVICP2_Status {
195  SAMECODEC = 0,
200 
201 
207 typedef struct IRES_HDVICP2_Obj {
208 
210  Void *info;
257  struct IRES_HDVICP2_Obj * hdvicpHandle,
258  IRES_YieldContext * yieldCtxt, XDAS_UInt32 * hdvicp2Status,
259  XDAS_UInt32 *configurationId, XDAS_Int32 lateAcquireArg);
260 
267  struct IRES_HDVICP2_Obj * hdvicpHandle);
268 
279  struct IRES_HDVICP2_Obj * hdvicpHandle);
280 
291  struct IRES_HDVICP2_Obj * hdvicpHandle,
292  IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void * cbArgs);
293 
308  struct IRES_HDVICP2_Obj *hdvicpHandle,
309  IRES_YieldContext * yieldCtxt);
310 
320  XDAS_Void (*done) (IALG_Handle algHandle,
321  struct IRES_HDVICP2_Obj *hdvicpHandle);
335  struct IRES_HDVICP2_Obj *hdvicpHandle);
336 
338 
339 
344 
345  int size;
346  /* TBD */
348 
352 typedef struct IRES_HDVICP2_Properties {
353 
354  int size;
355  IRES_HDVICP2_RegisterLayer *globalRegs; /* Register layer of HDVICP2 */
357 
359  (XDAS_Int32 *Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
360 
362  (XDAS_Int32 Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
363 
364 #ifdef __cplusplus
365 }
366 #endif /* extern "C" */
367 
370 #endif
XDAS_UInt32(* reacquireIfOwner)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle)
Reacquire the HDVICP2 resource recent released.
Definition: ires_hdvicp2.h:278
struct IRES_HDVICP2_RegisterLayer IRES_HDVICP2_RegisterLayer
HDVICP2 Register Layout.
XDAS_Void(* release)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle)
Release the HDVICP2 resource.
Definition: ires_hdvicp2.h:266
XDAS_UInt32(* reset)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle)
Reset the HDVICP2.
Definition: ires_hdvicp2.h:334
IRES_Status
IRES_Status defines the standard error and success codes returned by IRES APIs.
Definition: ires_common.h:57
int size
Definition: ires_hdvicp2.h:354
XDAS_Void * registerBaseAddress
Definition: ires_hdvicp2.h:216
IRES_Status(* ti_sdo_fc_ires_hdvicp_HDVICP2_FreeHdvicp2Fxn)(XDAS_Int32 Id, IALG_Handle alg, IRES_HDVICP2_Handle handle)
Definition: ires_hdvicp2.h:362
Abstract Protocol Arguments structure definition. Actual arguments passed by the algorithm to request...
Definition: ires_common.h:110
Protocol revision type. Used to ensure the given 'protocol' revision can be validated.
Definition: ires_common.h:73
XDAS_UInt32(* wait)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle, IRES_YieldContext *yieldCtxt)
Wait until the HDVICP2 is done processing and then return.
Definition: ires_hdvicp2.h:307
Algorithm instance object definition.
Definition: ialg.h:159
IRES Resource Protocol Definitions - IRES Resource.
IRES_HDVICP2_Status
Describes the status/history of the HDVICP2 unit that is returned by the acquire call. This information can be used by the codec to avoid reloading the data memory or the program memory in the HDVICP2.
Definition: ires_hdvicp2.h:194
Int32 XDAS_Int32
Definition: xdas.h:68
IRES_YieldArgs(* ti_sdo_fc_ires_hdvicp_HDVICP2_GetYieldArgsFxn)(Int scratchId)
Definition: ires_hdvicp2.h:155
XDAS_Void(* acquire)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle, IRES_YieldContext *yieldCtxt, XDAS_UInt32 *hdvicp2Status, XDAS_UInt32 *configurationId, XDAS_Int32 lateAcquireArg)
Acquire the HDVICP2 resource.
Definition: ires_hdvicp2.h:256
This header defines all types and constants used in the XDAS interfaces.
Void(* ti_sdo_fc_ires_hdvicp_HDVICP2_YieldFxn)(IRES_YieldResourceType resource, IRES_YieldContextHandle ctxt, IRES_YieldArgs args)
Definition: ires_hdvicp2.h:161
unsigned int ti_sdo_fc_ires_hdvicp_HDVICP2_timeoutVal
Timeout value to be used by implementation of IRES_HDVICP2_Handle:wait function.
IRES_ProtocolArgs base
Definition: ires_hdvicp2.h:171
Void XDAS_Void
Definition: xdas.h:60
Definition: ires_hdvicp2.h:195
IRES_Obj holds the private state associated with each logical resource.
Definition: ires_common.h:176
IRES Interface Definitions - Allows algorithms to request and receive handles representing private lo...
void(* IRES_HDVICP2_CallbackFxn)(IALG_Handle handle, Void *args)
Callback function signature, used by the IRES_HDVICP2_ Handle's configure function.
Definition: ires_hdvicp2.h:184
IRES_Status(* ti_sdo_fc_ires_hdvicp_HDVICP2_GetHdvicp2Fxn)(XDAS_Int32 *Id, IALG_Handle alg, IRES_HDVICP2_Handle handle)
Definition: ires_hdvicp2.h:359
HDVICP2 Register Layout.
Definition: ires_hdvicp2.h:343
struct IRES_HDVICP2_Obj * IRES_HDVICP2_Handle
Handle to "logical" resource.
Definition: ires_hdvicp2.h:142
Void * info
Definition: ires_hdvicp2.h:210
int size
Definition: ires_hdvicp2.h:345
XDAS_Int32 id
Definition: ires_hdvicp2.h:211
XDAS_Void * memoryBaseAddress
Definition: ires_hdvicp2.h:219
XDAS_Void * resetControlAddress
Definition: ires_hdvicp2.h:222
Definition: ires_hdvicp2.h:198
struct IRES_HDVICP2_ProtocolArgs IRES_HDVICP2_ProtocolArgs
HDVICP2 Protocol Arguments definition.
IRES_Obj ires
Definition: ires_hdvicp2.h:209
Static Resource Properties.
Definition: ires_hdvicp2.h:352
Definition: ires_hdvicp2.h:196
struct IRES_HDVICP2_Properties IRES_HDVICP2_Properties
Static Resource Properties.
XDAS_Int32 id
Definition: ires_hdvicp2.h:172
Specifies the algorithm specific handles and context save & restore function pointers and arguments t...
Definition: ires.h:84
struct IRES_HDVICP2_Obj IRES_HDVICP2_Obj
IRES_HDVICP2_Obj extends the generic IRES_Obj structure that is returned back to the algorithm reques...
Void * IRES_YieldArgs
Definition: ires.h:140
XDAS_Void(* configure)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle, IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void *cbArgs)
Register a callback function with a HDVICP2 instance.
Definition: ires_hdvicp2.h:290
IRES_HDVICP2_RegisterLayer * globalRegs
Definition: ires_hdvicp2.h:355
IRES_HDVICP2_Obj extends the generic IRES_Obj structure that is returned back to the algorithm reques...
Definition: ires_hdvicp2.h:207
XDAS_Void(* done)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *hdvicpHandle)
Processing has completed.
Definition: ires_hdvicp2.h:320
Uint32 XDAS_UInt32
Definition: xdas.h:69
HDVICP2 Protocol Arguments definition.
Definition: ires_hdvicp2.h:169
IRES_YieldResourceType
Definition: ires.h:60
Copyright 2016, Texas Instruments Incorporated