summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-02 21:58:56 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-02 21:58:56 +0000
commit92afdd9267027f569dea2807d7057eaa2bbdb8c9 (patch)
treea715e06f0c0c9cc2e8074255935f3f0f9665f164 /src/libffmpeg/libavcodec/dsputil.c
parent0c94a4778c29309553e86e8c39f314277f4b2ddf (diff)
downloadxine-lib-92afdd9267027f569dea2807d7057eaa2bbdb8c9.tar.gz
xine-lib-92afdd9267027f569dea2807d7057eaa2bbdb8c9.tar.bz2
update ffmpeg, pass fourcc and other stuff that might be useful
CVS patchset: 3414 CVS date: 2002/12/02 21:58:56
Diffstat (limited to 'src/libffmpeg/libavcodec/dsputil.c')
-rw-r--r--src/libffmpeg/libavcodec/dsputil.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/libffmpeg/libavcodec/dsputil.c b/src/libffmpeg/libavcodec/dsputil.c
index 5952d9246..9039d2625 100644
--- a/src/libffmpeg/libavcodec/dsputil.c
+++ b/src/libffmpeg/libavcodec/dsputil.c
@@ -144,6 +144,31 @@ static int pix_norm1_c(UINT8 * pix, int line_size)
}
+static int pix_norm_c(UINT8 * pix1, UINT8 * pix2, int line_size)
+{
+ int s, i, j;
+ UINT32 *sq = squareTbl + 256;
+
+ s = 0;
+ for (i = 0; i < 16; i++) {
+ for (j = 0; j < 16; j += 8) {
+ s += sq[pix1[0] - pix2[0]];
+ s += sq[pix1[1] - pix2[1]];
+ s += sq[pix1[2] - pix2[2]];
+ s += sq[pix1[3] - pix2[3]];
+ s += sq[pix1[4] - pix2[4]];
+ s += sq[pix1[5] - pix2[5]];
+ s += sq[pix1[6] - pix2[6]];
+ s += sq[pix1[7] - pix2[7]];
+ pix1 += 8;
+ pix2 += 8;
+ }
+ pix1 += line_size - 16;
+ pix2 += line_size - 16;
+ }
+ return s;
+}
+
static void get_pixels_c(DCTELEM *restrict block, const UINT8 *pixels, int line_size)
{
int i;
@@ -1322,7 +1347,7 @@ void ff_block_permute(INT16 *block, UINT8 *permutation, const UINT8 *scantable,
INT16 temp[64];
if(last<=0) return;
- if(permutation[1]==1) return; //FIXME its ok but not clean and might fail for some perms
+ //if(permutation[1]==1) return; //FIXME its ok but not clean and might fail for some perms
for(i=0; i<=last; i++){
const int j= scantable[i];
@@ -1404,6 +1429,7 @@ void dsputil_init(DSPContext* c, unsigned mask)
c->clear_blocks = clear_blocks_c;
c->pix_sum = pix_sum_c;
c->pix_norm1 = pix_norm1_c;
+ c->pix_norm = pix_norm_c;
/* TODO [0] 16 [1] 8 */
c->pix_abs16x16 = pix_abs16x16_c;