Mercurial > libavcodec.hg
comparison dsputil.c @ 2259:12e75af1d44c libavcodec
1/8 resolution decoding
author | michael |
---|---|
date | Sun, 26 Sep 2004 10:01:40 +0000 |
parents | 5f64a30339e5 |
children | cd43603c46f9 |
comparison
equal
deleted
inserted
replaced
2258:7096bf7c3434 | 2259:12e75af1d44c |
---|---|
3380 { | 3380 { |
3381 j_rev_dct2 (block); | 3381 j_rev_dct2 (block); |
3382 add_pixels_clamped2_c(block, dest, line_size); | 3382 add_pixels_clamped2_c(block, dest, line_size); |
3383 } | 3383 } |
3384 | 3384 |
3385 static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block) | |
3386 { | |
3387 uint8_t *cm = cropTbl + MAX_NEG_CROP; | |
3388 | |
3389 dest[0] = cm[(block[0] + 4)>>3]; | |
3390 } | |
3391 static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block) | |
3392 { | |
3393 uint8_t *cm = cropTbl + MAX_NEG_CROP; | |
3394 | |
3395 dest[0] = cm[dest[0] + ((block[0] + 4)>>3)]; | |
3396 } | |
3397 | |
3385 /* init static data */ | 3398 /* init static data */ |
3386 void dsputil_static_init(void) | 3399 void dsputil_static_init(void) |
3387 { | 3400 { |
3388 int i; | 3401 int i; |
3389 | 3402 |
3427 c->idct_permutation_type= FF_NO_IDCT_PERM; | 3440 c->idct_permutation_type= FF_NO_IDCT_PERM; |
3428 }else if(avctx->lowres==2){ | 3441 }else if(avctx->lowres==2){ |
3429 c->idct_put= ff_jref_idct2_put; | 3442 c->idct_put= ff_jref_idct2_put; |
3430 c->idct_add= ff_jref_idct2_add; | 3443 c->idct_add= ff_jref_idct2_add; |
3431 c->idct = j_rev_dct2; | 3444 c->idct = j_rev_dct2; |
3445 c->idct_permutation_type= FF_NO_IDCT_PERM; | |
3446 }else if(avctx->lowres==3){ | |
3447 c->idct_put= ff_jref_idct1_put; | |
3448 c->idct_add= ff_jref_idct1_add; | |
3449 c->idct = j_rev_dct1; | |
3432 c->idct_permutation_type= FF_NO_IDCT_PERM; | 3450 c->idct_permutation_type= FF_NO_IDCT_PERM; |
3433 }else{ | 3451 }else{ |
3434 if(avctx->idct_algo==FF_IDCT_INT){ | 3452 if(avctx->idct_algo==FF_IDCT_INT){ |
3435 c->idct_put= ff_jref_idct_put; | 3453 c->idct_put= ff_jref_idct_put; |
3436 c->idct_add= ff_jref_idct_add; | 3454 c->idct_add= ff_jref_idct_add; |