Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3769 | Serge | 1 | /* |
2 | * Copyright (C) 2012 Intel Corporation |
||
3 | * |
||
4 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
5 | * copy of this software and associated documentation files (the |
||
6 | * "Software"), to deal in the Software without restriction, including |
||
7 | * without limitation the rights to use, copy, modify, merge, publish, |
||
8 | * distribute, sub license, and/or sell copies of the Software, and to |
||
9 | * permit persons to whom the Software is furnished to do so, subject to |
||
10 | * the following conditions: |
||
11 | * |
||
12 | * The above copyright notice and this permission notice (including the |
||
13 | * next paragraph) shall be included in all copies or substantial portions |
||
14 | * of the Software. |
||
15 | * |
||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||
17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
||
19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR |
||
20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
||
21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
||
22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||
23 | */ |
||
24 | |||
25 | #ifndef I965_DECODER_H |
||
26 | #define I965_DECODER_H |
||
27 | |||
28 | #include |
||
29 | #include |
||
30 | |||
31 | #include |
||
32 | #include |
||
33 | |||
34 | #define MAX_GEN_REFERENCE_FRAMES 16 |
||
35 | |||
36 | typedef struct gen_frame_store GenFrameStore; |
||
37 | struct gen_frame_store { |
||
38 | VASurfaceID surface_id; |
||
39 | int frame_store_id; |
||
40 | }; |
||
41 | |||
42 | typedef struct gen_buffer GenBuffer; |
||
43 | struct gen_buffer { |
||
44 | dri_bo *bo; |
||
45 | int valid; |
||
46 | }; |
||
47 | |||
48 | #if HAVE_GEN_AVC_SURFACE |
||
49 | |||
50 | //static pthread_mutex_t free_avc_surface_lock = PTHREAD_MUTEX_INITIALIZER; |
||
51 | |||
52 | typedef struct gen_avc_surface GenAvcSurface; |
||
53 | struct gen_avc_surface |
||
54 | { |
||
55 | dri_bo *dmv_top; |
||
56 | dri_bo *dmv_bottom; |
||
57 | int dmv_bottom_flag; |
||
58 | }; |
||
59 | |||
60 | static void |
||
61 | gen_free_avc_surface(void **data) |
||
62 | { |
||
63 | GenAvcSurface *avc_surface; |
||
64 | |||
65 | // pthread_mutex_lock(&free_avc_surface_lock); |
||
66 | |||
67 | avc_surface = *data; |
||
68 | |||
69 | if (!avc_surface) { |
||
70 | // pthread_mutex_unlock(&free_avc_surface_lock); |
||
71 | return; |
||
72 | } |
||
73 | |||
74 | |||
75 | dri_bo_unreference(avc_surface->dmv_top); |
||
76 | avc_surface->dmv_top = NULL; |
||
77 | dri_bo_unreference(avc_surface->dmv_bottom); |
||
78 | avc_surface->dmv_bottom = NULL; |
||
79 | |||
80 | free(avc_surface); |
||
81 | *data = NULL; |
||
82 | |||
83 | // pthread_mutex_unlock(&free_avc_surface_lock); |
||
84 | } |
||
85 | |||
86 | #endif |
||
87 | |||
88 | extern struct hw_context * |
||
89 | gen75_dec_hw_context_init(VADriverContextP ctx, VAProfile profile); |
||
90 | |||
91 | #endif /* I965_DECODER_H */ |