Revert "Changed argument occurences of const I420VideoFrame* to const I420VideoFrame& and non-const I420VideoFrame& to I420VideoFrame*."
This reverts commit r8731. Reason for revert: Breakes Chromium FYI bots. TBR=hbos, tommi Review URL: https://webrtc-codereview.appspot.com/40359004 Cr-Commit-Position: refs/heads/master@{#8733} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8733 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -215,7 +215,7 @@ int I420Decoder::Decode(const EncodedImage& inputImage, bool /*missingFrames*/,
|
||||
}
|
||||
_decodedImage.set_timestamp(inputImage._timeStamp);
|
||||
|
||||
_decodeCompleteCallback->Decoded(&_decodedImage);
|
||||
_decodeCompleteCallback->Decoded(_decodedImage);
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ class MockVideoEncoder : public VideoEncoder {
|
||||
class MockDecodedImageCallback : public DecodedImageCallback {
|
||||
public:
|
||||
MOCK_METHOD1(Decoded,
|
||||
int32_t(I420VideoFrame* decodedImage));
|
||||
int32_t(I420VideoFrame& decodedImage));
|
||||
MOCK_METHOD1(ReceivedDecodedReferenceFrame,
|
||||
int32_t(const uint64_t pictureId));
|
||||
MOCK_METHOD1(ReceivedDecodedFrame,
|
||||
|
||||
@ -413,8 +413,8 @@ VideoProcessorImpl::VideoProcessorEncodeCompleteCallback::Encoded(
|
||||
}
|
||||
int32_t
|
||||
VideoProcessorImpl::VideoProcessorDecodeCompleteCallback::Decoded(
|
||||
I420VideoFrame* image) {
|
||||
video_processor_->FrameDecoded(*image); // forward to parent class
|
||||
I420VideoFrame& image) {
|
||||
video_processor_->FrameDecoded(image); // forward to parent class
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ class VideoProcessorImpl : public VideoProcessor {
|
||||
explicit VideoProcessorDecodeCompleteCallback(VideoProcessorImpl* vp)
|
||||
: video_processor_(vp) {
|
||||
}
|
||||
int32_t Decoded(webrtc::I420VideoFrame* image) override;
|
||||
int32_t Decoded(webrtc::I420VideoFrame& image) override;
|
||||
|
||||
private:
|
||||
VideoProcessorImpl* video_processor_;
|
||||
|
||||
@ -124,16 +124,16 @@ class Vp8TestDecodedImageCallback : public DecodedImageCallback {
|
||||
Vp8TestDecodedImageCallback()
|
||||
: decoded_frames_(0) {
|
||||
}
|
||||
virtual int32_t Decoded(I420VideoFrame* decoded_image) {
|
||||
last_decoded_frame_.CopyFrame(*decoded_image);
|
||||
for (int i = 0; i < decoded_image->width(); ++i) {
|
||||
EXPECT_NEAR(kColorY, decoded_image->buffer(kYPlane)[i], 1);
|
||||
virtual int32_t Decoded(I420VideoFrame& decoded_image) {
|
||||
last_decoded_frame_.CopyFrame(decoded_image);
|
||||
for (int i = 0; i < decoded_image.width(); ++i) {
|
||||
EXPECT_NEAR(kColorY, decoded_image.buffer(kYPlane)[i], 1);
|
||||
}
|
||||
|
||||
// TODO(mikhal): Verify the difference between U,V and the original.
|
||||
for (int i = 0; i < ((decoded_image->width() + 1) / 2); ++i) {
|
||||
EXPECT_NEAR(kColorU, decoded_image->buffer(kUPlane)[i], 4);
|
||||
EXPECT_NEAR(kColorV, decoded_image->buffer(kVPlane)[i], 4);
|
||||
for (int i = 0; i < ((decoded_image.width() + 1) / 2); ++i) {
|
||||
EXPECT_NEAR(kColorU, decoded_image.buffer(kUPlane)[i], 4);
|
||||
EXPECT_NEAR(kColorV, decoded_image.buffer(kVPlane)[i], 4);
|
||||
}
|
||||
decoded_frames_++;
|
||||
return 0;
|
||||
|
||||
@ -78,7 +78,7 @@ class Vp8UnitTestDecodeCompleteCallback : public webrtc::DecodedImageCallback {
|
||||
public:
|
||||
explicit Vp8UnitTestDecodeCompleteCallback(I420VideoFrame* frame)
|
||||
: decoded_frame_(frame), decode_complete(false) {}
|
||||
int Decoded(webrtc::I420VideoFrame* frame);
|
||||
int Decoded(webrtc::I420VideoFrame& frame);
|
||||
bool DecodeComplete();
|
||||
|
||||
private:
|
||||
@ -94,8 +94,8 @@ bool Vp8UnitTestDecodeCompleteCallback::DecodeComplete() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int Vp8UnitTestDecodeCompleteCallback::Decoded(I420VideoFrame* image) {
|
||||
decoded_frame_->CopyFrame(*image);
|
||||
int Vp8UnitTestDecodeCompleteCallback::Decoded(I420VideoFrame& image) {
|
||||
decoded_frame_->CopyFrame(image);
|
||||
decode_complete = true;
|
||||
return 0;
|
||||
}
|
||||
@ -227,7 +227,7 @@ TEST_F(TestVp8Impl, DISABLED_ON_ANDROID(AlignedStrideEncodeDecode)) {
|
||||
decoder_->Decode(encoded_frame_, false, NULL));
|
||||
EXPECT_GT(WaitForDecodedFrame(), 0u);
|
||||
// Compute PSNR on all planes (faster than SSIM).
|
||||
EXPECT_GT(I420PSNR(input_frame_, decoded_frame_), 36);
|
||||
EXPECT_GT(I420PSNR(&input_frame_, &decoded_frame_), 36);
|
||||
EXPECT_EQ(kTestTimestamp, decoded_frame_.timestamp());
|
||||
EXPECT_EQ(kTestNtpTimeMs, decoded_frame_.ntp_time_ms());
|
||||
}
|
||||
@ -249,7 +249,7 @@ TEST_F(TestVp8Impl, DISABLED_ON_ANDROID(DecodeWithACompleteKeyFrame)) {
|
||||
encoded_frame_._frameType = kKeyFrame;
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
decoder_->Decode(encoded_frame_, false, NULL));
|
||||
EXPECT_GT(I420PSNR(input_frame_, decoded_frame_), 36);
|
||||
EXPECT_GT(I420PSNR(&input_frame_, &decoded_frame_), 36);
|
||||
}
|
||||
|
||||
TEST_F(TestVp8Impl, TestReset) {
|
||||
|
||||
@ -1343,7 +1343,7 @@ int VP8DecoderImpl::ReturnFrame(const vpx_image_t* img,
|
||||
img->stride[VPX_PLANE_V]);
|
||||
decoded_image_.set_timestamp(timestamp);
|
||||
decoded_image_.set_ntp_time_ms(ntp_time_ms);
|
||||
int ret = decode_complete_callback_->Decoded(&decoded_image_);
|
||||
int ret = decode_complete_callback_->Decoded(decoded_image_);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
|
||||
@ -68,15 +68,15 @@ class Vp8SequenceCoderDecodeCallback : public webrtc::DecodedImageCallback {
|
||||
public:
|
||||
explicit Vp8SequenceCoderDecodeCallback(FILE* decoded_file)
|
||||
: decoded_file_(decoded_file) {}
|
||||
int Decoded(webrtc::I420VideoFrame* frame);
|
||||
int Decoded(webrtc::I420VideoFrame& frame);
|
||||
bool DecodeComplete();
|
||||
|
||||
private:
|
||||
FILE* decoded_file_;
|
||||
};
|
||||
|
||||
int Vp8SequenceCoderDecodeCallback::Decoded(webrtc::I420VideoFrame* image) {
|
||||
EXPECT_EQ(0, webrtc::PrintI420VideoFrame(*image, decoded_file_));
|
||||
int Vp8SequenceCoderDecodeCallback::Decoded(webrtc::I420VideoFrame& image) {
|
||||
EXPECT_EQ(0, webrtc::PrintI420VideoFrame(image, decoded_file_));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -480,7 +480,7 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) {
|
||||
img->stride[VPX_PLANE_U],
|
||||
img->stride[VPX_PLANE_V]);
|
||||
decoded_image_.set_timestamp(timestamp);
|
||||
int ret = decode_complete_callback_->Decoded(&decoded_image_);
|
||||
int ret = decode_complete_callback_->Decoded(decoded_image_);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
|
||||
Reference in New Issue
Block a user