diff svq1.c @ 853:eacc2dd8fd9d libavcodec

* using DSPContext - so each codec could use its local (sub)set of CPU extension
author kabi
date Mon, 11 Nov 2002 09:40:17 +0000
parents d4cc92144266
children 058194d7ade6
line wrap: on
line diff
--- a/svq1.c	Mon Nov 11 09:37:40 2002 +0000
+++ b/svq1.c	Mon Nov 11 09:40:17 2002 +0000
@@ -804,7 +804,7 @@
   }
 }
 
-static int svq1_motion_inter_block (bit_buffer_t *bitbuf,
+static int svq1_motion_inter_block (MpegEncContext *s, bit_buffer_t *bitbuf,
 			       uint8_t *current, uint8_t *previous, int pitch,
 			       svq1_pmv_t *motion, int x, int y) {
   uint8_t    *src;
@@ -839,12 +839,12 @@
   src = &previous[(x + (mv.x >> 1)) + (y + (mv.y >> 1))*pitch];
   dst = current;
 
-  put_pixels_tab[0][((mv.y & 1) << 1) | (mv.x & 1)](dst,src,pitch,16);
+  s->dsp.put_pixels_tab[0][((mv.y & 1) << 1) | (mv.x & 1)](dst,src,pitch,16);
 
   return 0;
 }
 
-static int svq1_motion_inter_4v_block (bit_buffer_t *bitbuf,
+static int svq1_motion_inter_4v_block (MpegEncContext *s, bit_buffer_t *bitbuf,
 				  uint8_t *current, uint8_t *previous, int pitch,
 				  svq1_pmv_t *motion,int x, int y) {
   uint8_t    *src;
@@ -906,7 +906,7 @@
     src = &previous[(x + (pmv[i]->x >> 1)) + (y + (pmv[i]->y >> 1))*pitch];
     dst = current;
 
-    put_pixels_tab[1][((pmv[i]->y & 1) << 1) | (pmv[i]->x & 1)](dst,src,pitch,8);
+    s->dsp.put_pixels_tab[1][((pmv[i]->y & 1) << 1) | (pmv[i]->x & 1)](dst,src,pitch,8);
 
     /* select next block */
     if (i & 1) {
@@ -921,7 +921,7 @@
   return 0;
 }
 
-static int svq1_decode_delta_block (bit_buffer_t *bitbuf,
+static int svq1_decode_delta_block (MpegEncContext *s, bit_buffer_t *bitbuf,
 			uint8_t *current, uint8_t *previous, int pitch,
 			svq1_pmv_t *motion, int x, int y) {
   uint32_t bit_cache;
@@ -951,7 +951,7 @@
     break;
 
   case SVQ1_BLOCK_INTER:
-    result = svq1_motion_inter_block (bitbuf, current, previous, pitch, motion, x, y);
+    result = svq1_motion_inter_block (s, bitbuf, current, previous, pitch, motion, x, y);
 
     if (result != 0)
     {
@@ -964,7 +964,7 @@
     break;
 
   case SVQ1_BLOCK_INTER_4V:
-    result = svq1_motion_inter_4v_block (bitbuf, current, previous, pitch, motion, x, y);
+    result = svq1_motion_inter_4v_block (s, bitbuf, current, previous, pitch, motion, x, y);
 
     if (result != 0)
     {
@@ -1142,8 +1142,8 @@
 
       for (y=0; y < height; y+=16) {
 	for (x=0; x < width; x+=16) {
-	  result = svq1_decode_delta_block (&s->gb, &current[x], previous,
-				       linesize, pmv, x, y);
+	  result = svq1_decode_delta_block (s, &s->gb, &current[x], previous,
+					    linesize, pmv, x, y);
 	  if (result != 0)
 	  {
 #ifdef DEBUG_SVQ1