History

vp9 svc: Allow denoising next to highest resolution.

Denoise 2 spatial layes at most. Add noise sensitivity level 2 for vp9 such that applications can control whether to denoise the second highest spatial layer. Add tests to cover this case.

Jerome Jiang committed 8 years ago

Commit c1e511f1 parent 14dbdd910 files · +210 −110Browse files

Showing the changes to test (1 of 10 files). Show all

Unified · Split

test/datarate_test.cc+21−16
@@ -1449,24 +1449,29 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TLDenoiserOn) { · 1448 unmodified lines
14491449 ::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 300);
14501450 // TODO(marpan): Check that effective_datarate for each layer hits the
14511451 // layer target_bitrate.
1452− for (int i = 600; i <= 1000; i += 200) {
1453− cfg_.rc_target_bitrate = i;
1454− ResetModel();
1455− denoiser_on_ = 1;
1456− assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
1457− cfg_.ts_number_layers, cfg_.temporal_layering_mode);
1458− ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
1459− ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
1460− << " The datarate for the file exceeds the target by too much!";
1461− ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
1462− << " The datarate for the file is lower than the target by too much!";
1452+ // For SVC, noise_sen = 1 means denoising only the top spatial layer
1453+ // noise_sen = 2 means denoising the two top spatial layers.
1454+ for (int noise_sen = 1; noise_sen <= 2; noise_sen++) {
1455+ for (int i = 600; i <= 1000; i += 200) {
1456+ cfg_.rc_target_bitrate = i;
1457+ ResetModel();
1458+ denoiser_on_ = noise_sen;
1459+ assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
1460+ cfg_.ts_number_layers, cfg_.temporal_layering_mode);
1461+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
1462+ ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
1463+ << " The datarate for the file exceeds the target by too much!";
1464+ ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
1465+ << " The datarate for the file is lower than the target by too much!";
14631466 #if CONFIG_VP9_DECODER
1464− // Number of temporal layers > 1, so half of the frames in this SVC pattern
1465− // will be non-reference frame and hence encoder will avoid loopfilter.
1466− // Since frame dropper is off, we can expcet 150 (half of the sequence)
1467− // mismatched frames.
1468− EXPECT_EQ(static_cast<unsigned int>(150), GetMismatchFrames());
1467+ // Number of temporal layers > 1, so half of the frames in this SVC
1468+ // pattern
1469+ // will be non-reference frame and hence encoder will avoid loopfilter.
1470+ // Since frame dropper is off, we can expcet 150 (half of the sequence)
1471+ // mismatched frames.
1472+ EXPECT_EQ(static_cast<unsigned int>(150), GetMismatchFrames());
14691473 #endif
1474+ }
14701475 }
14711476 }
14721477

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t