gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Flash HD (H.264) video decoding acceleration


From: Gwenole Beauchesne
Subject: Re: [Gnash-dev] Flash HD (H.264) video decoding acceleration
Date: Wed, 23 Sep 2009 15:28:51 +0200 (CEST)
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

Hi,

Thanks for your comments.

On Wed, 23 Sep 2009, Benjamin Wolsey wrote:

Would it be feasible to use the GnashImage with a GPU 'location' to
replace the BitmapInfo class? The location of the image would be much
more transparent then. The AGG renderer merely stores the bitmap in the
same format so it could stay as a CPU-located GnashImage; no idea what
cairo does; OGL can use GPU storage possibly for all GnashImages, as
long as there is access to the bitmap data when required.

Actually, I originally had a GnashGLImage class, derived from GnashImage. It had a few accessors and new ones to automatically submit raw pixels to the texture and use such an object as a drop-in replacement. In other words, a GnashGLImage::update(pixels) would update the underlying GnashTexture object. Is this what you mean?

I even had the idea to store YV12 pixels and let the colorspace conversion be handled "late" in the renderer, e.g. with a shader program in the OGL renderer case.

My goal was to keep things transparent under a GnashImage (and derived classes) and do the necessary conversions on-demand. e.g. when data() is called, a GnashImage with pixels residing in 'GPU' would read the pixels back at this time. I finally opted for no change at all to GnashImage but the location info (to avoid RTTI). My initial GnashGLImage required to make a few other functions virtual in GnashImage and I didn't want to be that invasive.

BTW, Cairo could be complex because this could be anywhere depending on the backend needs. OpenGL and OpenVG backends are hardly used though.

+/* SIMD versions of DSPContext.float_to_int16_interleave() needs
input
+   and output buffers aligned to 16-byte boundaries */
+#define NEEDS_ALIGNED_MEMORY 1
+

Is there a problem always using av_malloc always for this?

No, but sometimes a copy was needed IIRC. The intent was to run-time check alignment too to avoid such copies. But it became overly complex and I wanted to work on video actually and skip audio crashes with this quick fix.

Regards,
Gwenole.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]