[FFmpeg-cvslog] Do not update buffers in case no speed change is necessary
Mashiat Sarker Shakkhar
git at videolan.org
Sat Dec 24 02:03:02 CET 2011
ffmpeg | branch: master | Mashiat Sarker Shakkhar <shahriman_ams at yahoo.com> | Fri Dec 9 01:43:34 2011 +0600| [4fa3f1c50718622ca04298d2d01b5a4c7d319cbf] | committer: Mashiat Sarker Shakkhar
Do not update buffers in case no speed change is necessary
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fa3f1c50718622ca04298d2d01b5a4c7d319cbf
---
libavcodec/wmalosslessdec.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 4c6df06..c61e396 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -948,9 +948,10 @@ static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int input, int resi
static void use_high_update_speed(WmallDecodeCtx *s, int ich)
{
int ilms, recent, icoef;
- s->update_speed[ich] = 16;
for (ilms = s->cdlms_ttl[ich] - 1; ilms >= 0; ilms--) {
recent = s->cdlms[ich][ilms].recent;
+ if (s->update_speed[ich] == 16)
+ continue;
if (s->bV3RTM) {
for (icoef = 0; icoef < s->cdlms[ich][ilms].order; icoef++)
s->cdlms[ich][ilms].lms_updates[icoef + recent] *= 2;
@@ -959,14 +960,16 @@ static void use_high_update_speed(WmallDecodeCtx *s, int ich)
s->cdlms[ich][ilms].lms_updates[icoef] *= 2;
}
}
+ s->update_speed[ich] = 16;
}
static void use_normal_update_speed(WmallDecodeCtx *s, int ich)
{
int ilms, recent, icoef;
- s->update_speed[ich] = 8;
for (ilms = s->cdlms_ttl[ich] - 1; ilms >= 0; ilms--) {
recent = s->cdlms[ich][ilms].recent;
+ if (s->update_speed[ich] == 8)
+ continue;
if (s->bV3RTM) {
for (icoef = 0; icoef < s->cdlms[ich][ilms].order; icoef++)
s->cdlms[ich][ilms].lms_updates[icoef + recent] /= 2;
@@ -975,6 +978,7 @@ static void use_normal_update_speed(WmallDecodeCtx *s, int ich)
s->cdlms[ich][ilms].lms_updates[icoef] /= 2;
}
}
+ s->update_speed[ich] = 8;
}
static void revert_cdlms(WmallDecodeCtx *s, int ch, int coef_begin, int coef_end)
More information about the ffmpeg-cvslog
mailing list