Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Trudeau <ltrudeau@twoorioles.com>2019-05-17 19:44:23 +0300
committerLuc Trudeau <ltrudeau@twoorioles.com>2019-05-17 19:44:23 +0300
commitaf0375ca35ea4b6142364613bdc6a4afb60de665 (patch)
treefea9b553119ae131f96b7a2162c13c37d23d523a /src/intra_edge.c
parentfc3777b44c0449180073665eb78070d388b11738 (diff)
small code cleaning in intra_edge init_mode
Diffstat (limited to 'src/intra_edge.c')
-rw-r--r--src/intra_edge.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intra_edge.c b/src/intra_edge.c
index 1dea295..4cac7cd 100644
--- a/src/intra_edge.c
+++ b/src/intra_edge.c
@@ -112,13 +112,11 @@ static void init_mode_node(EdgeBranch *const nwc,
const int top_has_right,
const int left_has_bottom)
{
- int n;
-
init_edges(&nwc->node, bl,
(top_has_right ? ALL_FL(TOP_HAS_RIGHT) : 0) |
(left_has_bottom ? ALL_FL(LEFT_HAS_BOTTOM) : 0));
if (bl == BL_16X16) {
- for (n = 0; n < 4; n++) {
+ for (int n = 0; n < 4; n++) {
EdgeTip *const nt = mem->nt++;
nwc->split[n] = &nt->node;
init_edges(&nt->node, bl + 1,
@@ -128,7 +126,7 @@ static void init_mode_node(EdgeBranch *const nwc,
ALL_FL(LEFT_HAS_BOTTOM)));
}
} else {
- for (n = 0; n < 4; n++) {
+ for (int n = 0; n < 4; n++) {
EdgeBranch *const nwc_child = mem->nwc[bl]++;
nwc->split[n] = &nwc_child->node;
init_mode_node(nwc_child, bl + 1, mem,
@@ -143,12 +141,12 @@ void dav1d_init_mode_tree(EdgeNode *const root_node, EdgeTip *const nt,
{
EdgeBranch *const root = (EdgeBranch *) root_node;
struct ModeSelMem mem;
+ mem.nt = nt;
if (allow_sb128) {
mem.nwc[BL_128X128] = &root[1];
mem.nwc[BL_64X64] = &root[1 + 4];
mem.nwc[BL_32X32] = &root[1 + 4 + 16];
- mem.nt = nt;
init_mode_node(root, BL_128X128, &mem, 1, 0);
assert(mem.nwc[BL_128X128] == &root[1 + 4]);
assert(mem.nwc[BL_64X64] == &root[1 + 4 + 16]);
@@ -158,7 +156,6 @@ void dav1d_init_mode_tree(EdgeNode *const root_node, EdgeTip *const nt,
mem.nwc[BL_128X128] = NULL;
mem.nwc[BL_64X64] = &root[1];
mem.nwc[BL_32X32] = &root[1 + 4];
- mem.nt = nt;
init_mode_node(root, BL_64X64, &mem, 1, 0);
assert(mem.nwc[BL_64X64] == &root[1 + 4]);
assert(mem.nwc[BL_32X32] == &root[1 + 4 + 16]);