| @@ -437,7 +437,7 @@ static void x8_ac_compensation(IntraX8Context *const w, const int direction, · 436 unmodified lines |
| 437 | const int dc_level) | 437 | const int dc_level) |
| 438 | { | 438 | { |
| 439 | int t; | 439 | int t; |
| 440 | #define B(x,y) w->block[0][w->idct_permutation[(x) + (y) * 8]] | 440 | #define B(x,y) w->block[w->idct_permutation[(x) + (y) * 8]] |
| 441 | #define T(x) ((x) * dc_level + 0x8000) >> 16; | 441 | #define T(x) ((x) * dc_level + 0x8000) >> 16; |
| 442 | switch (direction) { | 442 | switch (direction) { |
| 443 | case 0: | 443 | case 0: |
| @@ -530,7 +530,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) · 86 unmodified lines |
| 530 | int sign; | 530 | int sign; |
| 531 | | 531 | |
| 532 | av_assert2(w->orient < 12); | 532 | av_assert2(w->orient < 12); |
| 533 | w->bdsp.clear_block(w->block[0]); | 533 | w->bdsp.clear_block(w->block); |
| 534 | | 534 | |
| 535 | if (chroma) | 535 | if (chroma) |
| 536 | dc_mode = 2; | 536 | dc_mode = 2; |
| @@ -591,7 +591,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) · 54 unmodified lines |
| 591 | if (use_quant_matrix) | 591 | if (use_quant_matrix) |
| 592 | level = (level * quant_table[pos]) >> 8; | 592 | level = (level * quant_table[pos]) >> 8; |
| 593 | | 593 | |
| 594 | w->block[0][scantable[pos]] = level; | 594 | w->block[scantable[pos]] = level; |
| 595 | } while (!final); | 595 | } while (!final); |
| 596 | } else { // DC only | 596 | } else { // DC only |
| 597 | if (w->flat_dc && ((unsigned) (dc_level + 1)) < 3) { // [-1; 1] | 597 | if (w->flat_dc && ((unsigned) (dc_level + 1)) < 3) { // [-1; 1] |
| @@ -613,9 +613,9 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) · 15 unmodified lines |
| 613 | zeros_only = dc_level == 0; | 613 | zeros_only = dc_level == 0; |
| 614 | } | 614 | } |
| 615 | if (!chroma) | 615 | if (!chroma) |
| 616 | w->block[0][0] = dc_level * w->quant; | 616 | w->block[0] = dc_level * w->quant; |
| 617 | else | 617 | else |
| 618 | w->block[0][0] = dc_level * w->quant_dc_chroma; | 618 | w->block[0] = dc_level * w->quant_dc_chroma; |
| 619 | | 619 | |
| 620 | // there is !zero_only check in the original, but dc_level check is enough | 620 | // there is !zero_only check in the original, but dc_level check is enough |
| 621 | if ((unsigned int) (dc_level + 1) >= 3 && (w->edges & 3) != 3) { | 621 | if ((unsigned int) (dc_level + 1) >= 3 && (w->edges & 3) != 3) { |
| @@ -624,7 +624,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) · 2 unmodified lines |
| 624 | * -> 01'10' 10'10' 00'00' 00'01' 01'11' 11'00 => 0x6A017C */ | 624 | * -> 01'10' 10'10' 00'00' 00'01' 01'11' 11'00 => 0x6A017C */ |
| 625 | direction = (0x6A017C >> (w->orient * 2)) & 3; | 625 | direction = (0x6A017C >> (w->orient * 2)) & 3; |
| 626 | if (direction != 3) { | 626 | if (direction != 3) { |
| 627 | x8_ac_compensation(w, direction, w->block[0][0]); | 627 | x8_ac_compensation(w, direction, w->block[0]); |
| 628 | } | 628 | } |
| 629 | } | 629 | } |
| 630 | | 630 | |
| @@ -639,7 +639,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) · 8 unmodified lines |
| 639 | if (!zeros_only) | 639 | if (!zeros_only) |
| 640 | w->wdsp.idct_add(w->dest[chroma], | 640 | w->wdsp.idct_add(w->dest[chroma], |
| 641 | w->frame->linesize[!!chroma], | 641 | w->frame->linesize[!!chroma], |
| 642 | w->block[0]); | 642 | w->block); |
| 643 | | 643 | |
| 644 | block_placed: | 644 | block_placed: |
| 645 | if (!chroma) | 645 | if (!chroma) |
| @@ -678,7 +678,7 @@ static void x8_init_block_index(IntraX8Context *w, AVFrame *frame) · 32 unmodified lines |
| 678 | | 678 | |
| 679 | av_cold int ff_intrax8_common_init(AVCodecContext *avctx, | 679 | av_cold int ff_intrax8_common_init(AVCodecContext *avctx, |
| 680 | IntraX8Context *w, | 680 | IntraX8Context *w, |
| 681 | int16_t (*block)[64], | 681 | int16_t block[64], |
| 682 | int mb_width, int mb_height) | 682 | int mb_width, int mb_height) |
| 683 | { | 683 | { |
| 684 | static AVOnce init_static_once = AV_ONCE_INIT; | 684 | static AVOnce init_static_once = AV_ONCE_INIT; |