[x265] [PATCH] lowres: bug fix - move initialization from create() to init()
deepthidevaki at multicorewareinc.com
deepthidevaki at multicorewareinc.com
Mon Sep 23 12:55:00 CEST 2013
# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1379933446 -19800
# Node ID 51cf4d62c0353da39839d1bfe7d3d69785bed682
# Parent 4b794e2ffcb445d182cc611ec7538a6b1cf86cf9
lowres: bug fix - move initialization from create() to init()
lowres objects are reused, hence they should be re-initialized.
diff -r 4b794e2ffcb4 -r 51cf4d62c035 source/common/lowres.cpp
--- a/source/common/lowres.cpp Mon Sep 23 14:31:02 2013 +0530
+++ b/source/common/lowres.cpp Mon Sep 23 16:20:46 2013 +0530
@@ -76,8 +76,6 @@
lowresMvCosts[1][i] = (int*)X265_MALLOC(int, cuCount);
}
- for(int i = 0; i < X265_BFRAME_MAX + 2; i++)
- intraMbs[i] = 0;
}
void Lowres::destroy(int bframes)
@@ -129,6 +127,8 @@
lowresMvs[0][i][0].x = 0x7FFF;
lowresMvs[1][i][0].x = 0x7FFF;
}
+ for(int i = 0; i < X265_BFRAME_MAX + 2; i++)
+ intraMbs[i] = 0;
int y, extWidth = (orig->getWidth() + X265_LOWRES_CU_SIZE - 1);
int srcStride = orig->getStride();
More information about the x265-devel
mailing list