They might be left uninitialized otherwise since 3ad04608. Fixes ticket #3840. Found-by: Carl Eugen Hoyos <ce@hoyos.ws> Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Unified · Split
| @@ -677,6 +677,17 @@ b_candidates: · 676 unmodified lines | |||
| 677 | xB0 < s->sps->width && | 677 | xB0 < s->sps->width && |
| 678 | PRED_BLOCK_AVAILABLE(B0); | 678 | PRED_BLOCK_AVAILABLE(B0); |
| 679 | 679 | ||
| 680 | // above spatial merge candidate | ||
| 681 | xB1 = x0 + nPbW - 1; | ||
| 682 | yB1 = y0 - 1; | ||
| 683 | is_available_b1 = AVAILABLE(cand_up, B1); | ||
| 684 | |||
| 685 | // above left spatial merge candidate | ||
| 686 | xB2 = x0 - 1; | ||
| 687 | yB2 = y0 - 1; | ||
| 688 | is_available_b2 = AVAILABLE(cand_up_left, B2); | ||
| 689 | |||
| 690 | // above right spatial merge candidate | ||
| 680 | if (is_available_b0) { | 691 | if (is_available_b0) { |
| 681 | if (MP_MX(B0, pred_flag_index_l0, mxB)) { | 692 | if (MP_MX(B0, pred_flag_index_l0, mxB)) { |
| 682 | goto scalef; | 693 | goto scalef; |
| @@ -687,11 +698,6 @@ b_candidates: · 4 unmodified lines | |||
| 687 | } | 698 | } |
| 688 | 699 | ||
| 689 | // above spatial merge candidate | 700 | // above spatial merge candidate |
| 690 | xB1 = x0 + nPbW - 1; | ||
| 691 | yB1 = y0 - 1; | ||
| 692 | |||
| 693 | is_available_b1 = AVAILABLE(cand_up, B1); | ||
| 694 | |||
| 695 | if (is_available_b1) { | 701 | if (is_available_b1) { |
| 696 | if (MP_MX(B1, pred_flag_index_l0, mxB)) { | 702 | if (MP_MX(B1, pred_flag_index_l0, mxB)) { |
| 697 | goto scalef; | 703 | goto scalef; |
| @@ -702,10 +708,6 @@ b_candidates: · 4 unmodified lines | |||
| 702 | } | 708 | } |
| 703 | 709 | ||
| 704 | // above left spatial merge candidate | 710 | // above left spatial merge candidate |
| 705 | xB2 = x0 - 1; | ||
| 706 | yB2 = y0 - 1; | ||
| 707 | is_available_b2 = AVAILABLE(cand_up_left, B2); | ||
| 708 | |||
| 709 | if (is_available_b2) { | 711 | if (is_available_b2) { |
| 710 | if (MP_MX(B2, pred_flag_index_l0, mxB)) { | 712 | if (MP_MX(B2, pred_flag_index_l0, mxB)) { |
| 711 | goto scalef; | 713 | goto scalef; |