Mercurial > libavcodec.hg
changeset 11471:623074220038 libavcodec
vp3: Use memset to clear the fragment array
author | conrad |
---|---|
date | Sat, 13 Mar 2010 05:56:08 +0000 |
parents | 8ef47a02b516 |
children | 258d773b8feb |
files | vp3.c |
diffstat | 1 files changed, 1 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/vp3.c Sat Mar 13 05:56:05 2010 +0000 +++ b/vp3.c Sat Mar 13 05:56:08 2010 +0000 @@ -286,22 +286,6 @@ } /* - * 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 @@ 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");