Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst / ffmpegcolorspace / dsputil.c
1 /*
2  * DSP utils
3  * Copyright (c) 2000, 2001 Fabrice Bellard.
4  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  * gmc & q-pel & 32/64 bit based MC by Michael Niedermayer <michaelni@gmx.at>
21  */
22
23 /**
24  * @file dsputil.c
25  * DSP utils
26  */
27
28 #include "avcodec.h"
29 #include "dsputil.h"
30
31 uint8_t cropTbl[256 + 2 * MAX_NEG_CROP] = { 0, };
32
33 /* init static data */
34 void
35 dsputil_static_init (void)
36 {
37   int i;
38
39   for (i = 0; i < 256; i++)
40     cropTbl[i + MAX_NEG_CROP] = i;
41   for (i = 0; i < MAX_NEG_CROP; i++) {
42     cropTbl[i] = 0;
43     cropTbl[i + MAX_NEG_CROP + 256] = 255;
44   }
45 }