[FFmpeg-cvslog] indeo4/5: remove constant parameter num_bands from wavelet recomposition
Janne Grunau
git at videolan.org
Thu Oct 11 15:50:56 CEST 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Wed Oct 10 19:16:09 2012 +0200| [6d556e8327f6275c807c6da7257f617c256fe759] | committer: Janne Grunau
indeo4/5: remove constant parameter num_bands from wavelet recomposition
Fixes bogus uninitialized value compiler and coverity warnings.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d556e8327f6275c807c6da7257f617c256fe759
---
libavcodec/ivi_common.c | 4 ++--
libavcodec/ivi_dsp.c | 5 +++--
libavcodec/ivi_dsp.h | 6 ++----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index d1a86c4..d48014c 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -808,9 +808,9 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (ctx->is_scalable) {
if (avctx->codec_id == AV_CODEC_ID_INDEO4)
- ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
+ ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
else
- ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
+ ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
} else {
ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
}
diff --git a/libavcodec/ivi_dsp.c b/libavcodec/ivi_dsp.c
index caad843..3ffe84a 100644
--- a/libavcodec/ivi_dsp.c
+++ b/libavcodec/ivi_dsp.c
@@ -33,7 +33,7 @@
#include "ivi_dsp.h"
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
- const int dst_pitch, const int num_bands)
+ const int dst_pitch)
{
int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
@@ -41,6 +41,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
int32_t pitch, back_pitch;
const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
+ const int num_bands = 4;
/* all bands should have the same pitch */
pitch = plane->bands[0].pitch;
@@ -179,7 +180,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
}
void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
- const int dst_pitch, const int num_bands)
+ const int dst_pitch)
{
int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
diff --git a/libavcodec/ivi_dsp.h b/libavcodec/ivi_dsp.h
index 0438514..c46f8b2 100644
--- a/libavcodec/ivi_dsp.h
+++ b/libavcodec/ivi_dsp.h
@@ -38,10 +38,9 @@
* @param[in] plane pointer to the descriptor of the plane being processed
* @param[out] dst pointer to the destination buffer
* @param[in] dst_pitch pitch of the destination buffer
- * @param[in] num_bands number of wavelet bands to be processed
*/
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
- const int dst_pitch, const int num_bands);
+ const int dst_pitch);
/**
* Haar wavelet recomposition filter for Indeo 4
@@ -49,10 +48,9 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
* @param[in] plane pointer to the descriptor of the plane being processed
* @param[out] dst pointer to the destination buffer
* @param[in] dst_pitch pitch of the destination buffer
- * @param[in] num_bands number of wavelet bands to be processed
*/
void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
- const int dst_pitch, const int num_bands);
+ const int dst_pitch);
/**
* two-dimensional inverse Haar 8x8 transform for Indeo 4
More information about the ffmpeg-cvslog
mailing list