Mercurial > libavcodec.hg
annotate vaapi_internal.h @ 12197:fbf4d5b1b664 libavcodec
Remove FF_MM_SSE2/3 flags for CPUs where this is generally not faster than
regular MMX code. Examples of this are the Core1 CPU. Instead, set a new flag,
FF_MM_SSE2/3SLOW, which can be checked for particular SSE2/3 functions that
have been checked specifically on such CPUs and are actually faster than
their MMX counterparts.
In addition, use this flag to enable particular VP8 and LPC SSE2 functions
that are faster than their MMX counterparts.
Based on a patch by Loren Merritt <lorenm AT u washington edu>.
author | rbultje |
---|---|
date | Mon, 19 Jul 2010 22:38:23 +0000 |
parents | de8d07d87c45 |
children |
rev | line source |
---|---|
9225 | 1 /* |
2 * Video Acceleration API (video decoding) | |
3 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 | |
4 * | |
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems | |
6 * | |
7 * This file is part of FFmpeg. | |
8 * | |
9 * FFmpeg is free software; you can redistribute it and/or | |
10 * modify it under the terms of the GNU Lesser General Public | |
11 * License as published by the Free Software Foundation; either | |
12 * version 2.1 of the License, or (at your option) any later version. | |
13 * | |
14 * FFmpeg is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * Lesser General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU Lesser General Public | |
20 * License along with FFmpeg; if not, write to the Free Software | |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
22 */ | |
23 | |
24 #ifndef AVCODEC_VAAPI_INTERNAL_H | |
25 #define AVCODEC_VAAPI_INTERNAL_H | |
26 | |
27 #include <va/va.h> | |
28 #include "vaapi.h" | |
29 #include "avcodec.h" | |
30 #include "mpegvideo.h" | |
31 | |
32 /** | |
33 * \addtogroup VAAPI_Decoding | |
34 * | |
35 * @{ | |
36 */ | |
37 | |
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 | 40 { |
41 return (uintptr_t)pic->data[3]; | |
42 } | |
43 | |
44 /** Common AVHWAccel.end_frame() implementation */ | |
45 int ff_vaapi_common_end_frame(MpegEncContext *s); | |
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 | 56 /** |
57 * Allocate a new slice descriptor for the input slice. | |
58 * | |
59 * @param vactx the VA API context | |
60 * @param buffer the slice data buffer base | |
61 * @param size the size of the slice in bytes | |
62 * @return the newly allocated slice parameter | |
63 */ | |
64 VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size); | |
65 | |
66 /* @} */ | |
67 | |
68 #endif /* AVCODEC_VAAPI_INTERNAL_H */ |