diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-02-23 16:35:52 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-02-23 16:35:52 +0300 |
commit | c269cf68a0d1579f41e082288072e3f182ef2b5f (patch) | |
tree | e853fde01f405ae55d75f11c3dd422181f5ba0d9 /libavcodec/imgconvert.c | |
parent | 1d14361dec7d6fcfaf1ed579ae9a5e8f9d84abab (diff) |
Approved hunks for VAAPI / our new shiny hwaccel API
by Gwenole Beauchesne gbeauchesne splitted desktop com
Originally committed as revision 17539 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imgconvert.c')
-rw-r--r-- | libavcodec/imgconvert.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 824153b03c..84e1bee8ac 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -57,6 +57,7 @@ typedef struct PixFmtInfo { uint8_t color_type; /**< color type (see FF_COLOR_xxx constants) */ uint8_t pixel_type; /**< pixel storage type (see FF_PIXEL_xxx constants) */ uint8_t is_alpha : 1; /**< true if alpha can be specified */ + uint8_t is_hwaccel : 1; /**< true if this is an HW accelerated format */ uint8_t x_chroma_shift; /**< X chroma subsampling factor is 2 ^ shift */ uint8_t y_chroma_shift; /**< Y chroma subsampling factor is 2 ^ shift */ uint8_t depth; /**< bit depth of the color components */ @@ -279,24 +280,31 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { }, [PIX_FMT_XVMC_MPEG2_MC] = { .name = "xvmcmc", + .is_hwaccel = 1, }, [PIX_FMT_XVMC_MPEG2_IDCT] = { .name = "xvmcidct", + .is_hwaccel = 1, }, [PIX_FMT_VDPAU_MPEG1] = { .name = "vdpau_mpeg1", + .is_hwaccel = 1, }, [PIX_FMT_VDPAU_MPEG2] = { .name = "vdpau_mpeg2", + .is_hwaccel = 1, }, [PIX_FMT_VDPAU_H264] = { .name = "vdpau_h264", + .is_hwaccel = 1, }, [PIX_FMT_VDPAU_WMV3] = { .name = "vdpau_wmv3", + .is_hwaccel = 1, }, [PIX_FMT_VDPAU_VC1] = { .name = "vdpau_vc1", + .is_hwaccel = 1, }, [PIX_FMT_UYYVYY411] = { .name = "uyyvyy411", @@ -459,6 +467,11 @@ void avcodec_pix_fmt_string (char *buf, int buf_size, int pix_fmt) } } +int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt) +{ + return pix_fmt_info[pix_fmt].is_hwaccel; +} + int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){ int i; |