History

hevc_mvs: set candidate availabilities

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>

Christophe Gisquet committed 12 years ago

Commit 84bc4581 parent 43654a21 file · +11 −9Browse files

Unified · Split

libavcodec/hevc_mvs.c+11−9
@@ -677,6 +677,17 @@ b_candidates: · 676 unmodified lines
677677 xB0 < s->sps->width &&
678678 PRED_BLOCK_AVAILABLE(B0);
679679
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
680691 if (is_available_b0) {
681692 if (MP_MX(B0, pred_flag_index_l0, mxB)) {
682693 goto scalef;
@@ -687,11 +698,6 @@ b_candidates: · 4 unmodified lines
687698 }
688699
689700 // above spatial merge candidate
690− xB1 = x0 + nPbW - 1;
691− yB1 = y0 - 1;
692−
693− is_available_b1 = AVAILABLE(cand_up, B1);
694−
695701 if (is_available_b1) {
696702 if (MP_MX(B1, pred_flag_index_l0, mxB)) {
697703 goto scalef;
@@ -702,10 +708,6 @@ b_candidates: · 4 unmodified lines
702708 }
703709
704710 // above left spatial merge candidate
705− xB2 = x0 - 1;
706− yB2 = y0 - 1;
707− is_available_b2 = AVAILABLE(cand_up_left, B2);
708−
709711 if (is_available_b2) {
710712 if (MP_MX(B2, pred_flag_index_l0, mxB)) {
711713 goto scalef;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t