diff options
Diffstat (limited to 'libavcodec/vp5.c')
-rw-r--r-- | libavcodec/vp5.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index 807309f603..50bd868b51 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -1,26 +1,28 @@ -/** - * @file - * VP5 compatible video decoder - * +/* * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 compatible video decoder + */ + #include <stdlib.h> #include <string.h> @@ -116,7 +118,7 @@ static void vp5_parse_vector_models(VP56Context *s) model->vector_pdv[comp][node] = vp56_rac_gets_nn(c, 7); } -static void vp5_parse_coeff_models(VP56Context *s) +static int vp5_parse_coeff_models(VP56Context *s) { VP56RangeCoder *c = &s->c; VP56Model *model = s->modelp; @@ -160,6 +162,7 @@ static void vp5_parse_coeff_models(VP56Context *s) for (ctx=0; ctx<6; ctx++) for (node=0; node<5; node++) model->coeff_acct[pt][ct][cg][ctx][node] = av_clip(((model->coeff_ract[pt][ct][cg][node] * vp5_ract_lc[ct][cg][node][ctx][0] + 128) >> 8) + vp5_ract_lc[ct][cg][node][ctx][1], 1, 254); + return 0; } static void vp5_parse_coeff(VP56Context *s) @@ -267,14 +270,13 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) } AVCodec ff_vp5_decoder = { - "vp5", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP5, - sizeof(VP56Context), - vp5_decode_init, - NULL, - ff_vp56_free, - ff_vp56_decode_frame, - CODEC_CAP_DR1, + .name = "vp5", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP5, + .priv_data_size = sizeof(VP56Context), + .init = vp5_decode_init, + .close = ff_vp56_free, + .decode = ff_vp56_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"), }; |