[Scummvm-git-logs] scummvm master -> 32bd7cf446dd897b5a0893dd31c7c244390d60ef

lephilousophe noreply at scummvm.org
Sun Sep 18 10:15:03 UTC 2022


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
208cf8bd40 AUDIO: Initialize Cryo APC fields
5e2c6720a7 IMAGE: Cleanup HNM6 decoder
32bd7cf446 IMAGE: Add missing initializer to HNM6 decoder


Commit: 208cf8bd405ccfe5120596c0ea417dfda5aabd07
    https://github.com/scummvm/scummvm/commit/208cf8bd405ccfe5120596c0ea417dfda5aabd07
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T12:00:02+02:00

Commit Message:
AUDIO: Initialize Cryo APC fields

Changed paths:
    audio/decoders/apc.cpp


diff --git a/audio/decoders/apc.cpp b/audio/decoders/apc.cpp
index 646bd92b718..5429e03feee 100644
--- a/audio/decoders/apc.cpp
+++ b/audio/decoders/apc.cpp
@@ -67,6 +67,7 @@ private:
 
 APCStreamImpl::APCStreamImpl(uint32 sampleRate, byte stereo) :
 	_sampleRate(sampleRate), _stereo(stereo) {
+	memset(_status, 0, sizeof(_status));
 	if (_sampleRate != uint32(-1) && _stereo != byte(-1)) {
 		_audStream.reset(makeQueuingAudioStream(_sampleRate, _stereo));
 	}


Commit: 5e2c6720a7651420db1ab3866d6309ed8bafa27c
    https://github.com/scummvm/scummvm/commit/5e2c6720a7651420db1ab3866d6309ed8bafa27c
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T12:11:44+02:00

Commit Message:
IMAGE: Cleanup HNM6 decoder

Changed paths:
    image/codecs/hnm.cpp


diff --git a/image/codecs/hnm.cpp b/image/codecs/hnm.cpp
index 95aa707c368..b58e36ea630 100644
--- a/image/codecs/hnm.cpp
+++ b/image/codecs/hnm.cpp
@@ -564,17 +564,13 @@ public:
 
 	const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
 
-#ifdef HNM_DEBUG
-	uint32 _frameNr;
-#endif
-
 private:
 	uint32 _bufferSize;
 	byte *_buffer;
 	Graphics::Surface _surface;
 	Graphics::Surface _surfaceOld;
 
-	bool keyframe;
+	bool _keyframe;
 	HNM6::BitBuffer _bitbuf;
 	HNM6::MotionBuffer _motion;
 	HNM6::ShortMotionBuffer _shortmo;
@@ -637,7 +633,6 @@ private:
 	template<int sx, int sy>
 	FORCEINLINE void renderIXifShortmo(Graphics::Surface &current, Graphics::Surface &previous,
 	                                   uint x, uint y);
-
 };
 
 void DecoderImpl::reset(byte *buffer, uint32 bit_start, uint32 motion_start,
@@ -649,7 +644,7 @@ void DecoderImpl::reset(byte *buffer, uint32 bit_start, uint32 motion_start,
 	_jpeg.reset(buffer + jpeg_start, end - jpeg_start);
 
 	assert(!_warpMode || quality > 0);
-	keyframe = quality < 0;
+	_keyframe = quality < 0;
 
 	quality = ABS(quality);
 	quality = CLIP<int32>(quality, 1, 100);
@@ -679,7 +674,7 @@ void DecoderImpl::decode(Graphics::Surface &current, Graphics::Surface &old) {
 	assert((current.w & 0x7) == 0 && (current.h & 0x7) == 0);
 	if (_warpMode) {
 		decodeIWkf(current);
-	} else if (keyframe) {
+	} else if (_keyframe) {
 		decodeIXkf(current);
 	} else {
 		assert((old.w & 0x7) == 0 && (old.h & 0x7) == 0);


Commit: 32bd7cf446dd897b5a0893dd31c7c244390d60ef
    https://github.com/scummvm/scummvm/commit/32bd7cf446dd897b5a0893dd31c7c244390d60ef
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T12:12:02+02:00

Commit Message:
IMAGE: Add missing initializer to HNM6 decoder

This clears static analysis error

Changed paths:
    image/codecs/hnm.cpp


diff --git a/image/codecs/hnm.cpp b/image/codecs/hnm.cpp
index b58e36ea630..35bd61eef03 100644
--- a/image/codecs/hnm.cpp
+++ b/image/codecs/hnm.cpp
@@ -1330,7 +1330,7 @@ void DecoderImpl::renderIXifShortmo(Graphics::Surface &current, Graphics::Surfac
 
 DecoderImpl::DecoderImpl(uint16 width, uint16 height, const Graphics::PixelFormat &format,
                          uint32 bufferSize, bool videoMode) :
-	HNM6Decoder(width, height, format, videoMode), _bufferSize(bufferSize) {
+	HNM6Decoder(width, height, format, videoMode), _bufferSize(bufferSize), _keyframe(false) {
 	if (format.bytesPerPixel != 2 && format.bytesPerPixel != 4) {
 		error("Unsupported bpp");
 	}




More information about the Scummvm-git-logs mailing list