[MPlayer-cvslog] r26065 - trunk/libass/ass_render.c
eugeni
subversion at mplayerhq.hu
Fri Feb 22 20:31:50 CET 2008
Author: eugeni
Date: Fri Feb 22 20:31:49 2008
New Revision: 26065
Log:
Better handling of behind-the-camera objects.
Every point that is behind the camera is moved to the clipping plane by
orthographic projection. It is obviously incorrect, but this is a very rare
case, and proper clipping of Bezier curves is not that easy.
Modified:
trunk/libass/ass_render.c
Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c (original)
+++ trunk/libass/ass_render.c Fri Feb 22 20:31:49 2008
@@ -1623,6 +1623,7 @@ static inline void transform_point_3d(do
*/
static inline void transform_vector_3d(FT_Vector* v, double *m) {
const double camera = 2500 * frame_context.border_scale; // camera distance
+ const double cutoff_z = 10.;
double a[4], b[4];
a[0] = d6_to_double(v->x);
a[1] = d6_to_double(v->y);
@@ -1641,8 +1642,8 @@ static inline void transform_vector_3d(F
b[0] *= camera;
b[1] *= camera;
b[3] = 8 * b[2] + camera;
- if (b[3] < 0.001 && b[3] > -0.001)
- b[3] = b[3] < 0. ? -0.001 : 0.001;
+ if (b[3] < cutoff_z)
+ b[3] = cutoff_z;
v->x = double_to_d6(b[0] / b[3]);
v->y = double_to_d6(b[1] / b[3]);
}
More information about the MPlayer-cvslog
mailing list