diff mpegvideo.c @ 9003:b595a8a59967 libavcodec

Change the type of pblocks from pointers to short array into pointers to array of 64 DCTELEM, similarly to other block fields. This also get rid of some casts and fixes a warning.
author iive
date Sun, 22 Feb 2009 09:02:06 +0000
parents a24c04956930
children 043574c5c153
line wrap: on
line diff
--- a/mpegvideo.c	Sun Feb 22 00:56:55 2009 +0000
+++ b/mpegvideo.c	Sun Feb 22 09:02:06 2009 +0000
@@ -301,7 +301,7 @@
     s->block= s->blocks[0];
 
     for(i=0;i<12;i++){
-        s->pblocks[i] = (short *)(&s->block[i]);
+        s->pblocks[i] = &s->block[i];
     }
     return 0;
 fail:
@@ -357,7 +357,7 @@
     memcpy(dst, src, sizeof(MpegEncContext));
     backup_duplicate_context(dst, &bak);
     for(i=0;i<12;i++){
-        dst->pblocks[i] = (short *)(&dst->block[i]);
+        dst->pblocks[i] = &dst->block[i];
     }
 //STOP_TIMER("update_duplicate_context") //about 10k cycles / 0.01 sec for 1000frames on 1ghz with 2 threads
 }