Commit 04d14c9b authored by Luca Barbato's avatar Luca Barbato

vc1: Split the decoder in components

Speed up the overall compilation time.
parent 7ae9791b
......@@ -390,7 +390,9 @@ OBJS-$(CONFIG_V410_ENCODER) += v410enc.o
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
OBJS-$(CONFIG_VB_DECODER) += vb.o
OBJS-$(CONFIG_VBLE_DECODER) += vble.o
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1_block.o vc1_loopfilter.o \
vc1_mc.o vc1_pred.o vc1.o vc1data.o \
vc1dsp.o \
msmpeg4dec.o msmpeg4.o msmpeg4data.o
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
OBJS-$(CONFIG_VMDAUDIO_DECODER) += vmdaudio.o
......
......@@ -400,4 +400,16 @@ void ff_vc1_init_transposed_scantables(VC1Context *v);
int ff_vc1_decode_end(AVCodecContext *avctx);
void ff_vc1_decode_blocks(VC1Context *v);
void ff_vc1_loop_filter_iblk(VC1Context *v, int pq);
void ff_vc1_loop_filter_iblk_delayed(VC1Context *v, int pq);
void ff_vc1_smooth_overlap_filter_iblk(VC1Context *v);
void ff_vc1_apply_p_loop_filter(VC1Context *v);
void ff_vc1_mc_1mv(VC1Context *v, int dir);
void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg);
void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir);
void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg);
void ff_vc1_interp_mc(VC1Context *v);
#endif /* AVCODEC_VC1_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* VC-1 and WMV3 decoder
* Copyright (c) 2006-2007 Konstantin Shishkov
* Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer
*
* This file is part of Libav.
*
* Libav 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,
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_VC1_PRED_H
#define AVCODEC_VC1_PRED_H
#include "vc1.h"
#include "vc1data.h"
void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
int mv1, int r_x, int r_y, uint8_t* is_intra,
int pred_flag, int dir);
void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
int mvn, int r_x, int r_y, uint8_t* is_intra,
int dir);
void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2],
int direct, int mvtype);
void ff_vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y,
int mv1, int *pred_flag);
static av_always_inline int scale_mv(int value, int bfrac, int inv, int qs)
{
int n = bfrac;
#if B_FRACTION_DEN==256
if (inv)
n -= 256;
if (!qs)
return 2 * ((value * n + 255) >> 9);
return (value * n + 128) >> 8;
#else
if (inv)
n -= B_FRACTION_DEN;
if (!qs)
return 2 * ((value * n + B_FRACTION_DEN - 1) / (2 * B_FRACTION_DEN));
return (value * n + B_FRACTION_DEN/2) / B_FRACTION_DEN;
#endif
}
#endif /* AVCODEC_VC1_PRED_H */
......@@ -94,8 +94,6 @@ extern VLC ff_vc1_ac_coeff_table[8];
#define VC1_IF_MBMODE_VLC_BITS 5
//@}
/* Denominator used for ff_vc1_bfraction_lut */
#define B_FRACTION_DEN 256
/* pre-computed scales for all bfractions and base=256 */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment