comparison imgconvert.c @ 9011:90c99bda19f5 libavcodec

Approved hunks for VAAPI / our new shiny hwaccel API by Gwenole Beauchesne gbeauchesne splitted desktop com
author michael
date Mon, 23 Feb 2009 13:35:52 +0000
parents 043574c5c153
children d041d818f35c
comparison
equal deleted inserted replaced
9010:b6a47d0b6b63 9011:90c99bda19f5
55 const char *name; 55 const char *name;
56 uint8_t nb_channels; /**< number of channels (including alpha) */ 56 uint8_t nb_channels; /**< number of channels (including alpha) */
57 uint8_t color_type; /**< color type (see FF_COLOR_xxx constants) */ 57 uint8_t color_type; /**< color type (see FF_COLOR_xxx constants) */
58 uint8_t pixel_type; /**< pixel storage type (see FF_PIXEL_xxx constants) */ 58 uint8_t pixel_type; /**< pixel storage type (see FF_PIXEL_xxx constants) */
59 uint8_t is_alpha : 1; /**< true if alpha can be specified */ 59 uint8_t is_alpha : 1; /**< true if alpha can be specified */
60 uint8_t is_hwaccel : 1; /**< true if this is an HW accelerated format */
60 uint8_t x_chroma_shift; /**< X chroma subsampling factor is 2 ^ shift */ 61 uint8_t x_chroma_shift; /**< X chroma subsampling factor is 2 ^ shift */
61 uint8_t y_chroma_shift; /**< Y chroma subsampling factor is 2 ^ shift */ 62 uint8_t y_chroma_shift; /**< Y chroma subsampling factor is 2 ^ shift */
62 uint8_t depth; /**< bit depth of the color components */ 63 uint8_t depth; /**< bit depth of the color components */
63 } PixFmtInfo; 64 } PixFmtInfo;
64 65
277 .pixel_type = FF_PIXEL_PALETTE, 278 .pixel_type = FF_PIXEL_PALETTE,
278 .depth = 8, 279 .depth = 8,
279 }, 280 },
280 [PIX_FMT_XVMC_MPEG2_MC] = { 281 [PIX_FMT_XVMC_MPEG2_MC] = {
281 .name = "xvmcmc", 282 .name = "xvmcmc",
283 .is_hwaccel = 1,
282 }, 284 },
283 [PIX_FMT_XVMC_MPEG2_IDCT] = { 285 [PIX_FMT_XVMC_MPEG2_IDCT] = {
284 .name = "xvmcidct", 286 .name = "xvmcidct",
287 .is_hwaccel = 1,
285 }, 288 },
286 [PIX_FMT_VDPAU_MPEG1] = { 289 [PIX_FMT_VDPAU_MPEG1] = {
287 .name = "vdpau_mpeg1", 290 .name = "vdpau_mpeg1",
291 .is_hwaccel = 1,
288 }, 292 },
289 [PIX_FMT_VDPAU_MPEG2] = { 293 [PIX_FMT_VDPAU_MPEG2] = {
290 .name = "vdpau_mpeg2", 294 .name = "vdpau_mpeg2",
295 .is_hwaccel = 1,
291 }, 296 },
292 [PIX_FMT_VDPAU_H264] = { 297 [PIX_FMT_VDPAU_H264] = {
293 .name = "vdpau_h264", 298 .name = "vdpau_h264",
299 .is_hwaccel = 1,
294 }, 300 },
295 [PIX_FMT_VDPAU_WMV3] = { 301 [PIX_FMT_VDPAU_WMV3] = {
296 .name = "vdpau_wmv3", 302 .name = "vdpau_wmv3",
303 .is_hwaccel = 1,
297 }, 304 },
298 [PIX_FMT_VDPAU_VC1] = { 305 [PIX_FMT_VDPAU_VC1] = {
299 .name = "vdpau_vc1", 306 .name = "vdpau_vc1",
307 .is_hwaccel = 1,
300 }, 308 },
301 [PIX_FMT_UYYVYY411] = { 309 [PIX_FMT_UYYVYY411] = {
302 .name = "uyyvyy411", 310 .name = "uyyvyy411",
303 .nb_channels = 1, 311 .nb_channels = 1,
304 .color_type = FF_COLOR_YUV, 312 .color_type = FF_COLOR_YUV,
455 info.nb_channels, 463 info.nb_channels,
456 info.depth, 464 info.depth,
457 is_alpha_char 465 is_alpha_char
458 ); 466 );
459 } 467 }
468 }
469
470 int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt)
471 {
472 return pix_fmt_info[pix_fmt].is_hwaccel;
460 } 473 }
461 474
462 int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){ 475 int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){
463 int i; 476 int i;
464 477