#include "vpx/vpx_codec.h"
#include "vpx_ports/bitops.h"
+namespace svc_test {
namespace {
-class DatarateOnePassCbrSvc : public ::svc_test::OnePassCbrSvc {
+class DatarateOnePassCbrSvc : public OnePassCbrSvc {
public:
explicit DatarateOnePassCbrSvc(const ::libvpx_test::CodecFactory *codec)
: OnePassCbrSvc(codec) {
}
unsigned int GetMismatchFrames() { return mismatch_nframes_; }
+ unsigned int GetNonRefFrames() { return num_nonref_frames_; }
vpx_codec_pts_t last_pts_;
double timebase_;
double file_datarate_[VPX_MAX_LAYERS];
size_t bits_in_last_frame_;
double mismatch_psnr_;
- int mismatch_nframes_;
int denoiser_on_;
int tune_content_;
int spatial_layer_id_;
int middle_bitrate_;
int top_bitrate_;
int key_frame_spacing_;
- unsigned int num_nonref_frames_;
int layer_framedrop_;
int force_key_;
int force_key_test_;
cfg_.temporal_layering_mode = 0;
}
}
+
+ unsigned int num_nonref_frames_;
+ unsigned int mismatch_nframes_;
};
// Params: speed setting.
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#endif
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvcSmallKF, ::testing::Range(5, 10),
::testing::Range(32, 36));
} // namespace
+} // namespace svc_test
#include "vpx/vpx_codec.h"
#include "vpx_ports/bitops.h"
+namespace svc_test {
namespace {
class ScalePartitionOnePassCbrSvc
- : public ::svc_test::OnePassCbrSvc,
+ : public OnePassCbrSvc,
public ::testing::TestWithParam<const ::libvpx_test::CodecFactory *> {
public:
ScalePartitionOnePassCbrSvc()
virtual void SetConfig(int /* num_temporal_layer*/) {}
unsigned int GetMismatchFrames() const { return mismatch_nframes_; }
+ unsigned int GetNonRefFrames() const { return num_nonref_frames_; }
+ private:
unsigned int mismatch_nframes_;
unsigned int num_nonref_frames_;
};
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
// Params: Inter layer prediction modes.
-class SyncFrameOnePassCbrSvc : public ::svc_test::OnePassCbrSvc,
+class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
public ::libvpx_test::CodecTestWithParam<int> {
public:
SyncFrameOnePassCbrSvc()
: OnePassCbrSvc(GET_PARAM(0)), current_video_frame_(0),
- frame_to_start_decode_(0), frame_to_sync_(0), mismatch_nframes_(0),
- num_nonref_frames_(0), inter_layer_pred_mode_(GET_PARAM(1)),
- decode_to_layer_before_sync_(-1), decode_to_layer_after_sync_(-1),
- denoiser_on_(0), intra_only_test_(false) {
+ frame_to_start_decode_(0), frame_to_sync_(0),
+ inter_layer_pred_mode_(GET_PARAM(1)), decode_to_layer_before_sync_(-1),
+ decode_to_layer_after_sync_(-1), denoiser_on_(0),
+ intra_only_test_(false), mismatch_nframes_(0), num_nonref_frames_(0) {
SetMode(::libvpx_test::kRealTime);
memset(&svc_layer_sync_, 0, sizeof(svc_layer_sync_));
}
}
unsigned int GetMismatchFrames() const { return mismatch_nframes_; }
+ unsigned int GetNonRefFrames() const { return num_nonref_frames_; }
unsigned int current_video_frame_;
unsigned int frame_to_start_decode_;
unsigned int frame_to_sync_;
- unsigned int mismatch_nframes_;
- unsigned int num_nonref_frames_;
int inter_layer_pred_mode_;
int decode_to_layer_before_sync_;
int decode_to_layer_after_sync_;
cfg_.temporal_layering_mode = 1;
}
}
+
+ unsigned int mismatch_nframes_;
+ unsigned int num_nonref_frames_;
};
// Test for sync layer for 1 pass CBR SVC: 3 spatial layers and
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#endif
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
#if CONFIG_VP9_DECODER
// The non-reference frames are expected to be mismatched frames as the
// encoder will avoid loopfilter on these frames.
- EXPECT_EQ(num_nonref_frames_, GetMismatchFrames());
+ EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)));
} // namespace
+} // namespace svc_test