Mercurial > mplayer.hg
comparison libvo/vo_vesa.c @ 2537:28d30f50d89c
memalign 64
author | nick |
---|---|
date | Mon, 29 Oct 2001 18:25:07 +0000 |
parents | 6f3fa9bc3b27 |
children | db0d4caf5e47 |
comparison
equal
deleted
inserted
replaced
2536:6426007cad63 | 2537:28d30f50d89c |
---|---|
22 #include <limits.h> | 22 #include <limits.h> |
23 | 23 |
24 #include "config.h" | 24 #include "config.h" |
25 #include "video_out.h" | 25 #include "video_out.h" |
26 #include "video_out_internal.h" | 26 #include "video_out_internal.h" |
27 | |
28 #ifdef HAVE_MEMALIGN | |
29 #include <malloc.h> | |
30 #endif | |
27 | 31 |
28 #include "fastmemcpy.h" | 32 #include "fastmemcpy.h" |
29 #include "yuv2rgb.h" | 33 #include "yuv2rgb.h" |
30 #include "sub.h" | 34 #include "sub.h" |
31 #include "linux/vbelib.h" | 35 #include "linux/vbelib.h" |
620 ,image_width,image_height | 624 ,image_width,image_height |
621 ,video_mode_info.XResolution,video_mode_info.YResolution | 625 ,video_mode_info.XResolution,video_mode_info.YResolution |
622 ,x_offset,y_offset); | 626 ,x_offset,y_offset); |
623 if(yuv_fmt || rgb2rgb_fnc) | 627 if(yuv_fmt || rgb2rgb_fnc) |
624 { | 628 { |
629 #ifdef HAVE_MEMALIGN | |
630 if(!(yuv_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel))) | |
631 #else | |
625 if(!(yuv_buffer = malloc(video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel))) | 632 if(!(yuv_buffer = malloc(video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel))) |
633 #endif | |
626 { | 634 { |
627 printf("vo_vesa: Can't allocate temporary buffer\n"); | 635 printf("vo_vesa: Can't allocate temporary buffer\n"); |
628 return -1; | 636 return -1; |
629 } | 637 } |
630 if(verbose) printf("vo_vesa: yuv_buffer was allocated = %p\n",yuv_buffer); | 638 if(verbose) printf("vo_vesa: yuv_buffer was allocated = %p\n",yuv_buffer); |