aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-03-13 05:56:08 +0000
committerDavid Conrad <lessen42@gmail.com>2010-03-13 05:56:08 +0000
commit703acd540e96e430c2a562d75a1672eee209f63d (patch)
tree3b3d36b82aa71de00fd9b049cd5e00c35c31047b /libavcodec/vp3.c
parentcd9c03f57f1197adb8bcd861a11a5a879eebe4e6 (diff)
downloadffmpeg-703acd540e96e430c2a562d75a1672eee209f63d.tar.gz
vp3: Use memset to clear the fragment array
Originally committed as revision 22496 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index fd2b6abc6e..f5693f485d 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -286,22 +286,6 @@ static int init_block_mapping(Vp3DecodeContext *s)
}
/*
- * This function wipes out all of the fragment data.
- */
-static void init_frame(Vp3DecodeContext *s, GetBitContext *gb)
-{
- int i;
-
- /* zero out all of the fragment information */
- for (i = 0; i < s->fragment_count; i++) {
- s->all_fragments[i].motion_x = 0;
- s->all_fragments[i].motion_y = 0;
- s->all_fragments[i].dc = 0;
- s->all_fragments[i].qpi = 0;
- }
-}
-
-/*
* This function sets up the dequantization tables used for a particular
* frame.
*/
@@ -1771,7 +1755,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
s->current_frame.qscale_table= s->qscale_table; //FIXME allocate individual tables per AVFrame
s->current_frame.qstride= 0;
- init_frame(s, &gb);
+ memset(s->all_fragments, 0, s->fragment_count * sizeof(Vp3Fragment));
if (unpack_superblocks(s, &gb)){
av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n");