diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-07-16 19:33:36 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-07-16 19:33:36 +0000 |
commit | a680b674071a54904157cd4573cc097fbed0ada3 (patch) | |
tree | b48706bb882ad6bd571adf9732eee2a161698a33 /src/video_out/video_out_aa.c | |
parent | ee50c49ebd1a94f1a9db19c2653b458cec26c8a7 (diff) | |
download | xine-lib-a680b674071a54904157cd4573cc097fbed0ada3.tar.gz xine-lib-a680b674071a54904157cd4573cc097fbed0ada3.tar.bz2 |
Fix unresolved symbols and replace duplicate code in video output plugins
CVS patchset: 2295
CVS date: 2002/07/16 19:33:36
Diffstat (limited to 'src/video_out/video_out_aa.c')
-rw-r--r-- | src/video_out/video_out_aa.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 48e168e38..888ed4501 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.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_aa.c,v 1.22 2002/07/15 21:42:34 esnel Exp $ + * $Id: video_out_aa.c,v 1.23 2002/07/16 19:33:37 esnel Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -42,6 +42,7 @@ #include "video_out.h" #include "xine_internal.h" +#include "xineutils.h" /* * global variables @@ -80,18 +81,6 @@ static uint32_t aa_get_capabilities (vo_driver_t *this) { return VO_CAP_YV12 | VO_CAP_YUY2; } -static void *malloc_aligned (size_t alignment, size_t size, void **mem) { - char *aligned; - - aligned = malloc (size+alignment); - *mem = aligned; - - while ((int) aligned % alignment) - aligned++; - - return aligned; -} - static void aa_dispose_frame (vo_frame_t *vo_img) { aa_frame_t *frame = (aa_frame_t *)vo_img; @@ -158,9 +147,9 @@ static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, 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] = malloc_aligned(16, frame->vo_frame.pitches[0] * height, (void**) &frame->mem[0]); - frame->vo_frame.base[1] = malloc_aligned(16, frame->vo_frame.pitches[1] * ((height+1)/2), (void**) &frame->mem[1]); - frame->vo_frame.base[2] = malloc_aligned(16, frame->vo_frame.pitches[2] * ((height+1)/2), (void**) &frame->mem[2]); + frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[0] * height, (void**) &frame->mem[0]); + frame->vo_frame.base[1] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[1] * ((height+1)/2), (void**) &frame->mem[1]); + frame->vo_frame.base[2] = xine_xmalloc_aligned(16, frame->vo_frame.pitches[2] * ((height+1)/2), (void**) &frame->mem[2]); /* printf ("allocated yuv memory for %d x %d image\n", width, height); */ |