summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-02-27 08:12:41 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2009-02-27 08:12:41 +0000
commitf06ce1ce89dd3bb16a0e66d7bc86ab68e311b4c5 (patch)
tree1d7479afcb5bb8d6e2079deeeec0c9bc275ad8bb
parent044f0296a4a6b57d6bc3e9e8da5f27c10e7ebb34 (diff)
Add VA API pixel formats.
Patch by Gwenole Beauchesne. Originally committed as revision 17634 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/imgconvert.c14
-rw-r--r--libavutil/pixfmt.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 84e1bee8ac..9f5db68191 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -419,6 +419,20 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
.depth = 8,
.x_chroma_shift = 0, .y_chroma_shift = 0,
},
+
+ /* VA API formats */
+ [PIX_FMT_VAAPI_MOCO] = {
+ .name = "vaapi_moco",
+ .is_hwaccel = 1,
+ },
+ [PIX_FMT_VAAPI_IDCT] = {
+ .name = "vaapi_idct",
+ .is_hwaccel = 1,
+ },
+ [PIX_FMT_VAAPI_VLD] = {
+ .name = "vaapi_vld",
+ .is_hwaccel = 1,
+ },
};
void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift)
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 1a9d4bd2f5..a682d2166d 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -106,6 +106,9 @@ enum PixelFormat {
PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, big-endian
PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, little-endian
+ PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[0] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers
+ PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[0] contains a vaapi_render_state struct which contains fields extracted from headers
+ PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[0] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
};