[cvs] / xvidcore / src / utils / mem_align.c Repository:
ViewVC logotype

Diff of /xvidcore/src/utils/mem_align.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7, Thu Jun 13 22:05:09 2002 UTC revision 1.10, Sat Oct 19 11:41:11 2002 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Aligned memory allocator -   *  - Aligned memory allocator -
5   *   *
6     *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>
7     *               2002 Edouard Gomez
8     *
9   *  This program is an implementation of a part of one or more MPEG-4   *  This program is an implementation of a part of one or more MPEG-4
10   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending
11   *  to use this software module in hardware or software products are   *  to use this software module in hardware or software products are
# Line 26  Line 29 
29   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
30   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
31   *   *
  ****************************************************************************/  
 /*****************************************************************************  
  *  
  *  History  
  *  
  *  - Thu Jun 13 23:50:07 2002 Added legal header  
  *  
32   *  $Id$   *  $Id$
33   *   *
34   ****************************************************************************/   ****************************************************************************/
35    
   
36  #include <stdlib.h>  #include <stdlib.h>
37  #include <stdio.h>  #include <stdio.h>
38  #include "mem_align.h"  #include "mem_align.h"
# Line 90  Line 85 
85    
86                          /* Align the tmp pointer */                          /* Align the tmp pointer */
87                          mem_ptr =                          mem_ptr =
88                                  (uint8_t *) ((uint32_t) (tmp + alignment - 1) &                                  (uint8_t *) ((ptr_t) (tmp + alignment - 1) &
89                                                           (~(uint32_t) (alignment - 1)));                                                           (~(ptr_t) (alignment - 1)));
90    
91                          /*                          /*
92                           * Special case where malloc have already satisfied the alignment                           * Special case where malloc have already satisfied the alignment

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.10

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4