vo_gl: fix cscale=4 and cscale=5 doing nothing
commit9ffd1cdaf802acf71c7e4db86b650be33b7c05ba
authorwm4 <wm4@mplayer2.org>
Sun, 20 Nov 2011 19:54:13 +0000 (20 20:54 +0100)
committerUoti Urpala <uau@mplayer2.org>
Fri, 25 Nov 2011 21:59:49 +0000 (25 23:59 +0200)
treeff9c7303eaa61ed3f1e264dbb6bfbb4a8f6f31d5
parent046692d90b3282ae99c9470aec711158eb2f1c40
vo_gl: fix cscale=4 and cscale=5 doing nothing

The ARB shader code generated at the end of the shaders for scaling mode 4
and 5 was something like:
   MAD yuv.g, b.r, {0.5}, a.r;
This appears to be semantically equivalent with:
   MAD yuv.g, b.rrrr, {0.5, 0, 0, 0}, a.rrrr;
This has the consequence that the result register, yuv.g, will not contain
the value computed by the scale filter, but a.r. a.r is the unchanged
value sampled from the normal texture coordinates, so the filter did
effectively nothing and behaved as if cscale=0 was specified. The basic
mistake here is that yuv.g does not specify a single register, but it
specifies the full vector register yuv, with writing enabled on the g
channel. This means yuv.g will assigned the g channel of the the result
vector computed by the MAD instruction.
libvo/gl_common.c