Commit 8356890a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

blend: strip useless private data

The RGB converter only cares about right shifts to extract component
values. No need to copy the whole enourmous video format.
parent 41e8a780
......@@ -461,15 +461,20 @@ struct convertYuv8ToRgb {
};
struct convertRgbToRgbSmall {
convertRgbToRgbSmall(const video_format_t *dst, const video_format_t *) : fmt(*dst) {}
convertRgbToRgbSmall(const video_format_t *dst, const video_format_t *)
{
rshift = 8 - vlc_popcount(dst->i_rmask);
bshift = 8 - vlc_popcount(dst->i_bmask);
gshift = 8 - vlc_popcount(dst->i_gmask);
}
void operator()(CPixel &p)
{
p.i >>= fmt.i_rrshift;
p.j >>= fmt.i_rgshift;
p.k >>= fmt.i_rbshift;
p.i >>= rshift;
p.j >>= gshift;
p.k >>= bshift;
}
private:
const video_format_t &fmt;
unsigned rshift, gshift, bshift;
};
struct convertYuvpToAny {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment