diff options
Diffstat (limited to 'src/video_out/video_out_opengl.c')
-rw-r--r-- | src/video_out/video_out_opengl.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 93d7c39d3..5a06fbac4 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_opengl.c,v 1.14 2002/07/15 21:42:34 esnel Exp $ + * $Id: video_out_opengl.c,v 1.15 2002/07/16 19:33:37 esnel Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf <mat@mshopf.de> @@ -200,25 +200,6 @@ enum { CONTEXT_BAD = 0, CONTEXT_SAME_DRAWABLE, CONTEXT_RELOAD, CONTEXT_SET }; /* - * first, some utility functions - */ - -static void *my_malloc_aligned (size_t alignment, size_t size, uint8_t **chunk) { - - uint8_t *pMem; - - pMem = xine_xmalloc (size+alignment); - - *chunk = pMem; - - while ((int) pMem % alignment) - pMem++; - - return pMem; -} - - -/* * and now, the driver functions */ @@ -361,17 +342,17 @@ static void opengl_update_frame_format (vo_driver_t *this_gen, frame->vo_frame.pitches[0] = 8*((width + 7) / 8); frame->vo_frame.pitches[1] = 8*((width + 15) / 16); frame->vo_frame.pitches[2] = 8*((width + 15) / 16); - frame->vo_frame.base[0] = my_malloc_aligned(16, frame->vo_frame.pitches[0] * height, - &frame->chunk[0]); - frame->vo_frame.base[1] = my_malloc_aligned(16, frame->vo_frame.pitches[1] * ((height+1)/2), - &frame->chunk[1]); - frame->vo_frame.base[2] = my_malloc_aligned(16, frame->vo_frame.pitches[2] * ((height+1)/2), - &frame->chunk[2]); + frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[0] * height, + &frame->chunk[0]); + frame->vo_frame.base[1] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[1] * ((height+1)/2), + &frame->chunk[1]); + frame->vo_frame.base[2] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[2] * ((height+1)/2), + &frame->chunk[2]); break; case IMGFMT_YUY2: frame->vo_frame.pitches[0] = 8*((width + 3) / 4); - frame->vo_frame.base[0] = my_malloc_aligned(16, frame->vo_frame.pitches[0] * height, - &frame->chunk[0]); + frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[0] * height, + &frame->chunk[0]); break; default: fprintf (stderr, "video_out_opengl: image format %d not supported, update video driver!\n", format); |