comparison libmpeg2/idct_mlib.c @ 9852:47984e3f54ce

Importing libmpeg2 from mpeg2dec-0.3.1
author arpi
date Sun, 06 Apr 2003 16:36:02 +0000
parents 846535ace7a2
children 2c0b6ec77d39
comparison
equal deleted inserted replaced
9851:6a348d3ed626 9852:47984e3f54ce
1 /* 1 /*
2 * idct_mlib.c 2 * idct_mlib.c
3 * Copyright (C) 1999-2001 Håkan Hjort <d95hjort@dtek.chalmers.se> 3 * Copyright (C) 1999-2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
4 * 4 *
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. 5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
6 * See http://libmpeg2.sourceforge.net/ for updates.
6 * 7 *
7 * mpeg2dec is free software; you can redistribute it and/or modify 8 * mpeg2dec is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version. 11 * (at your option) any later version.
21 22
22 #include "config.h" 23 #include "config.h"
23 24
24 #ifdef LIBMPEG2_MLIB 25 #ifdef LIBMPEG2_MLIB
25 26
26 #include <inttypes.h>
27 #include <mlib_types.h> 27 #include <mlib_types.h>
28 #include <mlib_status.h> 28 #include <mlib_status.h>
29 #include <mlib_sys.h> 29 #include <mlib_sys.h>
30 #include <mlib_video.h> 30 #include <mlib_video.h>
31 #include <string.h>
32 #include <inttypes.h>
31 33
34 #include "mpeg2.h"
32 #include "mpeg2_internal.h" 35 #include "mpeg2_internal.h"
33 36
34 void idct_block_copy_mlib (int16_t * block, uint8_t * dest, int stride) 37 void mpeg2_idct_add_mlib (const int last, int16_t * const block,
38 uint8_t * const dest, const int stride)
39 {
40 mlib_VideoIDCT_IEEE_S16_S16 (block, block);
41 mlib_VideoAddBlock_U8_S16 (dest, block, stride);
42 memset (block, 0, 64 * sizeof (uint16_t));
43 }
44
45 void mpeg2_idct_copy_mlib_non_ieee (int16_t * const block,
46 uint8_t * const dest, const int stride)
35 { 47 {
36 mlib_VideoIDCT8x8_U8_S16 (dest, block, stride); 48 mlib_VideoIDCT8x8_U8_S16 (dest, block, stride);
49 memset (block, 0, 64 * sizeof (uint16_t));
37 } 50 }
38 51
39 void idct_block_add_mlib (int16_t * block, uint8_t * dest, int stride) 52 void mpeg2_idct_add_mlib_non_ieee (const int last, int16_t * const block,
53 uint8_t * const dest, const int stride)
40 { 54 {
41 /* Should we use mlib_VideoIDCT_IEEE_S16_S16 here ?? */
42 /* it's ~30% slower. */
43 mlib_VideoIDCT8x8_S16_S16 (block, block); 55 mlib_VideoIDCT8x8_S16_S16 (block, block);
44 mlib_VideoAddBlock_U8_S16 (dest, block, stride); 56 mlib_VideoAddBlock_U8_S16 (dest, block, stride);
57 memset (block, 0, 64 * sizeof (uint16_t));
45 } 58 }
46 59
47 #endif 60 #endif