annotate vaapi_internal.h @ 12200:b768afb88d1a libavcodec

Add some braces to silence the warning: libavcodec/vp8.c:892: warning: suggest explicit braces to avoid ambiguous `else'
author diego
date Tue, 20 Jul 2010 17:45:54 +0000
parents de8d07d87c45
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9225
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
1 /*
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
2 * Video Acceleration API (video decoding)
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
3 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
4 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
6 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
7 * This file is part of FFmpeg.
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
8 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
13 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
17 * Lesser General Public License for more details.
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
18 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
22 */
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
23
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
24 #ifndef AVCODEC_VAAPI_INTERNAL_H
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
25 #define AVCODEC_VAAPI_INTERNAL_H
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
26
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
27 #include <va/va.h>
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
28 #include "vaapi.h"
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
29 #include "avcodec.h"
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
30 #include "mpegvideo.h"
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
31
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
32 /**
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
33 * \addtogroup VAAPI_Decoding
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
34 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
35 * @{
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
36 */
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
37
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
38 /** Extract VASurfaceID from a Picture */
10723
3f08c340020f Rename ff_vaapi_get_surface() to ff_vaapi_get_surface_id().
gb
parents: 9292
diff changeset
39 static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
9225
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
40 {
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
41 return (uintptr_t)pic->data[3];
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
42 }
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
43
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
44 /** Common AVHWAccel.end_frame() implementation */
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
45 int ff_vaapi_common_end_frame(MpegEncContext *s);
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
46
9292
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
47 /** Allocate a new picture parameter buffer */
10724
de8d07d87c45 Rename ff_vaapi_alloc_picture() to ff_vaapi_alloc_pic_param().
gb
parents: 10723
diff changeset
48 void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size);
9292
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
49
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
50 /** Allocate a new IQ matrix buffer */
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
51 void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size);
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
52
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
53 /** Allocate a new bit-plane buffer */
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
54 uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size);
f0732d44f655 Improve VA API buffers allocation logic. This also reduces struct vaapi_context
gb
parents: 9225
diff changeset
55
9225
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
56 /**
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
57 * Allocate a new slice descriptor for the input slice.
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
58 *
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
59 * @param vactx the VA API context
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
60 * @param buffer the slice data buffer base
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
61 * @param size the size of the slice in bytes
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
62 * @return the newly allocated slice parameter
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
63 */
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
64 VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size);
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
65
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
66 /* @} */
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
67
85c7a028316d Add common VA API data structures and helpers.
gb
parents:
diff changeset
68 #endif /* AVCODEC_VAAPI_INTERNAL_H */