1 /*
2 * Copyright (c) 2009-2011 Intel Corporation.  All rights reserved.
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 express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 
18 #ifndef __VA_PRIVATE_H__
19 #define __VA_PRIVATE_H__
20 #include <va/va.h>
21 #define ENABLE_PAVP_LINUX                   1
22 // Misc parameter for encoder
23 #define  VAEncMiscParameterTypePrivate     -2
24 // encryption parameters for PAVP
25 #define  VAEncryptionParameterBufferType   -3
26 
27 typedef struct _VAEncMiscParameterPrivate
28 {
29     unsigned int target_usage; // Valid values 1-7 for AVC & MPEG2.
30     unsigned int reserved[7];  // Reserved for future use.
31 } VAEncMiscParameterPrivate;
32 
33 /*VAEncrytpionParameterBuffer*/
34 typedef struct _VAEncryptionParameterBuffer
35 {
36     //Not used currently
37     unsigned int encryptionSupport;
38     //Not used currently
39     unsigned int hostEncryptMode;
40     // For IV, Counter input
41     unsigned int pavpAesCounter[2][4];
42     // not used currently
43     unsigned int pavpIndex;
44     // PAVP mode, CTR, CBC, DEDE etc
45     unsigned int pavpCounterMode;
46     unsigned int pavpEncryptionType;
47     // not used currently
48     unsigned int pavpInputSize[2];
49     // not used currently
50     unsigned int pavpBufferSize[2];
51     // not used currently
52     VABufferID   pvap_buf;
53     // set to TRUE if protected media
54     unsigned int pavpHasBeenEnabled;
55     // not used currently
56     unsigned int IntermmediatedBufReq;
57     // not used currently
58     unsigned int uiCounterIncrement;
59     // AppId: PAVP sessin Index from application
60     unsigned int app_id;
61 
62 } VAEncryptionParameterBuffer;
63 
64 #endif
65