fix: swap _v/_h dispatch fn selection — naming refers to filter direction not edge direction
This commit is contained in:
@@ -105,28 +105,43 @@ static int build_mb_edges(int mb_x, int mb_y, int last_mb_x, int last_mb_y,
|
||||
(e == 0) ? 4 : (int)(1 + xs64() % 3),
|
||||
/*boundary?*/ (e == 0 && mb_y == 0));
|
||||
|
||||
/* V chroma Cb: 2 edges. */
|
||||
/* V chroma Cb: 2 edges. Read DEBLOCK_CHROMA_MODE env at runtime:
|
||||
* unset / "all" → both edges (current default test).
|
||||
* "intra_only" → only bS=4 boundary edge.
|
||||
* "none" → all chroma edges bS=0 (luma-only test).
|
||||
* Lets us bisect substrate divergence without rebuilding. */
|
||||
int chroma_intra_only = 0, chroma_none = 0;
|
||||
const char *cm = getenv("DEBLOCK_CHROMA_MODE");
|
||||
if (cm) {
|
||||
if (!strcmp(cm, "intra_only")) chroma_intra_only = 1;
|
||||
else if (!strcmp(cm, "none")) chroma_none = 1;
|
||||
}
|
||||
|
||||
for (int e = 0; e < 2; e++)
|
||||
EDGE(0, /*Cb*/1, e,
|
||||
(e == 0) ? 4 : (int)(1 + xs64() % 3),
|
||||
(chroma_none) || (chroma_intra_only && e != 0) ||
|
||||
(e == 0 && mb_x == 0));
|
||||
|
||||
/* H chroma Cb. */
|
||||
for (int e = 0; e < 2; e++)
|
||||
EDGE(1, 1, e,
|
||||
(e == 0) ? 4 : (int)(1 + xs64() % 3),
|
||||
(chroma_none) || (chroma_intra_only && e != 0) ||
|
||||
(e == 0 && mb_y == 0));
|
||||
|
||||
/* V chroma Cr. */
|
||||
for (int e = 0; e < 2; e++)
|
||||
EDGE(0, /*Cr*/2, e,
|
||||
(e == 0) ? 4 : (int)(1 + xs64() % 3),
|
||||
(chroma_none) || (chroma_intra_only && e != 0) ||
|
||||
(e == 0 && mb_x == 0));
|
||||
|
||||
/* H chroma Cr. */
|
||||
for (int e = 0; e < 2; e++)
|
||||
EDGE(1, 2, e,
|
||||
(e == 0) ? 4 : (int)(1 + xs64() % 3),
|
||||
(chroma_none) || (chroma_intra_only && e != 0) ||
|
||||
(e == 0 && mb_y == 0));
|
||||
|
||||
#undef EDGE
|
||||
|
||||
Reference in New Issue
Block a user