int image_convert(Image *dst_img, Image *src_img) { uint8_t *src[MAX_IMAGE_PLANES]; int src_stride[MAX_IMAGE_PLANES]; uint8_t *dst[MAX_IMAGE_PLANES]; int dst_stride[MAX_IMAGE_PLANES]; D(bug("convert %s:%ux%u to %s:%ux%u\n", string_of_FOURCC(src_img->format), src_img->width, src_img->height, string_of_FOURCC(dst_img->format), dst_img->width, dst_img->height)); if (image_get_parts(src_img, src, src_stride) < 0) return -1; if (image_get_parts(dst_img, dst, dst_stride) < 0) return -1; return image_convert_1(src, src_stride, src_img->width, src_img->height, src_img->format, dst, dst_stride, dst_img->width, dst_img->height, dst_img->format); }
Renderer* GtkAggVaapiGlue::createRenderHandler() { dprintf("GtkAggVaapiGlue::createRenderHandler()\n"); VaapiGlobalContext * const gvactx = VaapiGlobalContext::get(); if (!gvactx) return NULL; std::vector<VaapiImageFormat> formats = gvactx->getSubpictureFormats(); for (unsigned int i = 0; i < formats.size(); i++) { if (vaapi_image_format_is_rgb(formats[i])) { _vaapi_image_format = formats[i]; break; } } if (_vaapi_image_format == VAAPI_IMAGE_NONE) return NULL; const char *agg_pixel_format; agg_pixel_format = find_pixel_format(_vaapi_image_format); if (!agg_pixel_format) { log_debug("GTK-AGG: Unknown RGB format %s reported by VA-API." " Please report this to the gnash-dev " "mailing list.", string_of_FOURCC(_vaapi_image_format)); return NULL; } Renderer * const renderer = create_Renderer_agg(agg_pixel_format); _agg_renderer = static_cast<Renderer_agg_base *>(renderer); return renderer; }
static inline const char *string_of_VAImageFormat(VAImageFormat *imgfmt) { return string_of_FOURCC(imgfmt->fourcc); }