changeset 4085:bba314600ed0 stable

lowres: bug fix - move initialization from create() to init() lowres objects are reused, hence they should be re-initialized.
author Deepthi Devaki <deepthidevaki@multicorewareinc.com>
date Mon, 23 Sep 2013 16:20:46 +0530
parents 1311936ef9cf
children 90be63021e7d
files source/common/lowres.cpp
diffstat 1 files changed, 2 insertions(+-), 2 deletions(-) [+]
line wrap: on
line diff
--- a/source/common/lowres.cpp	Fri Sep 20 12:56:50 2013 +0530
+++ b/source/common/lowres.cpp	Mon Sep 23 16:20:46 2013 +0530
@@ -73,8 +73,6 @@ void Lowres::create(TComPic *pic, int bf
         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)
@@ -126,6 +124,8 @@ void Lowres::init(TComPicYuv *orig, int 
         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;
 
     /* downscale and generate 4 HPEL planes for lookahead */
     primitives.frame_init_lowres_core(orig->getLumaAddr(),