Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-03-04 13:26:56 +0300
committerAurelien Jacobs <aurel@gnuage.org>2008-03-04 13:26:56 +0300
commit4c79b95c32ec9d44af48a5a52c7390b84c52928c (patch)
tree8e49f50e35eb1b8f934ab9ab462067d493846c35 /libavcodec/dsputil.c
parent675b8390f61e17ea076811324719f6b135c295ab (diff)
move ff_init_scantable() into dsputil
Originally committed as revision 12311 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r--libavcodec/dsputil.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index af6341a729..9e69bf7ae3 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -152,6 +152,30 @@ static const uint8_t simple_mmx_permutation[64]={
0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
};
+void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable){
+ int i;
+ int end;
+
+ st->scantable= src_scantable;
+
+ for(i=0; i<64; i++){
+ int j;
+ j = src_scantable[i];
+ st->permutated[i] = permutation[j];
+#ifdef ARCH_POWERPC
+ st->inverse[j] = i;
+#endif
+ }
+
+ end=-1;
+ for(i=0; i<64; i++){
+ int j;
+ j = st->permutated[i];
+ if(j>end) end=j;
+ st->raster_end[i]= end;
+ }
+}
+
static int pix_sum_c(uint8_t * pix, int line_size)
{
int s, i, j;