[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [video] Alpha blending 4:2:2 sources
OK, what is the problem you are trying to solve ?
Is it perhaps something like a 4:2:2 "graphics" overlay on top of
decoded MPEG ?
Depending on the original problem, there are a couple of possible
solutions.
If the things you are blending together are both 4:2:2, and the Cb, Cr
components are in phase, then
> Pn = a * Gn + (1 - a)Vn
is a reasonable way to go.
Depending on the output requirements, you could look at converting both
blender
inputs to 4:2:2 with the same Cb, Cr phase.
Otherwise, you'll probably want to upsample to 4:4:4, as well as
converting
(if necessary) to a shared colour space such as YCbCr.
I'd probably start with 4 taps for the the upsampling/interpolation,
though some folks would go for more, and I gave seen an implementation
which just did a zeroth order hold. Depends on your system
requirements.
If your video is swizzled 4:2:0 (decoded MPEG2), you'll want line
buffers
to reconstruct the 4:4:4 that's fed to the blender.
I guess you're not bothered that
> Pn = a * Gn + (1 - a)Vn
doesn't really give the right results if [Gn] or [Vn] contains an alpha
component.
What happens after the blender ? Does the blender just feed ITU656 out
of the chip ? Dou you want to keep the 4:4:4 for a SCART DENC or some
other gadget ?
For consumer SD applications, not a lot of people are going to complain,
or even notice, if you just wack 4:4:4 blender output back down to
4:2:2.
If either of the blender inputs has energy in the Cb, Cr, or alpha
channels
above a quarter of the Y sample rate, you'll want a low-pass somewhere.
Perhaps the design already has 1D or 2D scaler blocks on one or both
inputs to the
alpha blender which could also low-pass the images on the way through.
John.
Alexander_Holland@Zarlink.Com wrote:
>
> Hi,
>
> does anyone have any details on Alpha Blending when your source data
> is Y'CbCr data in 4:2:2?
>
> Standard alpha blend algorithms such as
>
> Pn = a * Gn + (1 - a)Vn
>
> (Where P is the final pixel, and Gn is your graphics pixel and Vn is the
> video pixel)
>
> Work on pixels, when your source data is 4:2:2 you dont so much have
> individual pixels, but Colour components (or perhaps pairs of pixels).
>
> Any advice appreciated.
>
> Cheers
>
> Alexander Holland
> --
> To unsubscribe from video mailing list please visit http://www.opencores.org/mailinglists.shtml
--
To unsubscribe from video mailing list please visit http://www.opencores.org/mailinglists.shtml