Disable zeroblock forcing for lossless coding mode
This to make sure that prediction residue always get coded in lossless mode. This commit also fixed lossless unit test Change-Id: I537726ee55328d4e4cf0a0196393a67e12bfcde1
This commit is contained in:
@@ -35,7 +35,7 @@ class LossLessTest : public ::libvpx_test::EncoderTest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||||
psnr_ = 0.0;
|
psnr_ = kMaxPsnr;
|
||||||
nframes_ = 0;
|
nframes_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,9 +65,9 @@ TEST_P(LossLessTest, TestLossLessEncoding) {
|
|||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
|
||||||
// intentionally changed the dimension for better testing coverage
|
// intentionally changed the dimension for better testing coverage
|
||||||
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 356, 284,
|
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
timebase.den, timebase.num, 0, 30);
|
timebase.den, timebase.num, 0, 30);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
const double psnr_lossless = GetMinPsnr();
|
const double psnr_lossless = GetMinPsnr();
|
||||||
EXPECT_GE(psnr_lossless, kMaxPsnr);
|
EXPECT_GE(psnr_lossless, kMaxPsnr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ static void block_yrd_txfm(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
|
|
||||||
// TODO(jingning): temporarily enabled only for luma component
|
// TODO(jingning): temporarily enabled only for luma component
|
||||||
rd = MIN(rd1, rd2);
|
rd = MIN(rd1, rd2);
|
||||||
if (plane == 0)
|
if (!xd->lossless && plane == 0)
|
||||||
x->zcoeff_blk[tx_size][block] = rd1 > rd2 || !xd->plane[plane].eobs[block];
|
x->zcoeff_blk[tx_size][block] = rd1 > rd2 || !xd->plane[plane].eobs[block];
|
||||||
|
|
||||||
args->this_rate += args->rate;
|
args->this_rate += args->rate;
|
||||||
|
|||||||
Reference in New Issue
Block a user