Diego Biurrun <[email protected]> writes:
> ---
> libavcodec/dwt.c | 4 ++
> libavcodec/rv34.c | 20 --------
> libavcodec/snow.c | 134
> --------------------------------------------------
> libavcodec/vc1dec.c | 1 -
> libavformat/asfdec.c | 6 +-
> libavutil/des.c | 2 +
> libswscale/swscale.c | 11 ----
> 7 files changed, 9 insertions(+), 169 deletions(-)
>
> diff --git a/libavcodec/dwt.c b/libavcodec/dwt.c
> index 2c5b56c..cae061f 100644
> --- a/libavcodec/dwt.c
> +++ b/libavcodec/dwt.c
> @@ -130,6 +130,7 @@ lift(DWTELEM *dst, DWTELEM *src, DWTELEM *ref,
> }
> }
>
> +#if 0
> static av_always_inline void
> inv_lift(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
> int dst_step, int src_step, int ref_step,
> @@ -161,6 +162,7 @@ inv_lift(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
> inverse);
> }
> }
> +#endif
>
> #ifndef liftS
> static av_always_inline void
> @@ -196,6 +198,7 @@ liftS(DWTELEM *dst, DWTELEM *src, DWTELEM *ref,
> LIFTS(src[w*src_step], mul*2*ref[w*ref_step]+add, inverse);
> }
> }
> +#if 0
> static av_always_inline void
> inv_liftS(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
> int dst_step, int src_step, int ref_step,
> @@ -229,6 +232,7 @@ inv_liftS(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
> LIFTS(src[w*src_step], mul*2*ref[w*ref_step]+add, inverse);
> }
> }
> +#endif
> #endif /* ! liftS */
>
> static void horizontal_decompose53i(DWTELEM *b, int width){
Adding #if 0? WTF??
> diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
> index c5dcfdc..98607ea 100644
> --- a/libavcodec/rv34.c
> +++ b/libavcodec/rv34.c
> @@ -424,17 +424,6 @@ static inline RV34VLC* choose_vlc_set(int quant, int
> mod, int type)
> }
>
> /**
> - * Decode quantizer difference and return modified quantizer.
> - */
> -static inline int rv34_decode_dquant(GetBitContext *gb, int quant)
> -{
> - if(get_bits1(gb))
> - return rv34_dquant_tab[get_bits1(gb)][quant];
> - else
> - return get_bits(gb, 5);
> -}
> -
> -/**
> * Decode macroblock header and return CBP in case of success, -1 otherwise.
> */
> static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types)
> @@ -1255,15 +1244,6 @@ static int check_slice_end(RV34DecContext *r,
> MpegEncContext *s)
> return 0;
> }
>
> -static inline int slice_compare(SliceInfo *si1, SliceInfo *si2)
> -{
> - return si1->type != si2->type ||
> - si1->start >= si2->start ||
> - si1->width != si2->width ||
> - si1->height != si2->height||
> - si1->pts != si2->pts;
> -}
> -
> static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf,
> int buf_size)
> {
> MpegEncContext *s = &r->s;
Looks OK, but check with Kostya that these aren't to be used for some
yet unimplemented feature. IIRC these decoders are still missing a
thing or two.
> diff --git a/libavcodec/snow.c b/libavcodec/snow.c
> index 28f04f1..8917a9e 100644
> --- a/libavcodec/snow.c
> +++ b/libavcodec/snow.c
> @@ -33,42 +33,6 @@
> #undef NDEBUG
> #include <assert.h>
>
> -static const int8_t quant3[256]={
> - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> --1,-1,-1,-1,-1,-1,-1,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, 6, 6, 6, 6, 6, 6, 6, 6, 6,
> - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
> --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
> --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
> --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
> --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
> --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5,
> --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
> --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
> --4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-1,
> -};
>
> #if 0 //64*cubic
> static const uint8_t obmc32[1024]={
> @@ -789,14 +663,6 @@ static int alloc_blocks(SnowContext *s){
> return 0;
> }
>
> -static inline void copy_rac_state(RangeCoder *d, RangeCoder *s){
> - uint8_t *bytestream= d->bytestream;
> - uint8_t *bytestream_start= d->bytestream_start;
> - *d= *s;
> - d->bytestream= bytestream;
> - d->bytestream_start= bytestream_start;
> -}
> -
> static inline void set_blocks(SnowContext *s, int level, int x, int y, int
> l, int cb, int cr, int mx, int my, int ref, int type){
> const int w= s->b_width << s->block_max_depth;
> const int rem_depth= s->block_max_depth - level;
OK
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index 8fca2da..cf828dd 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -45,7 +45,6 @@
> #define MB_INTRA_VLC_BITS 9
> #define DC_VLC_BITS 9
> #define AC_VLC_BITS 9
> -static const uint16_t table_mb_intra[64][2];
>
> static const uint16_t vlc_offs[] = {
OK
> diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
> index 16bba93..cba6401 100644
> --- a/libavformat/asfdec.c
> +++ b/libavformat/asfdec.c
> @@ -83,14 +83,14 @@ typedef struct {
> static const ff_asf_guid index_guid = {
> 0x90, 0x08, 0x00, 0x33, 0xb1, 0xe5, 0xcf, 0x11, 0x89, 0xf4, 0x00, 0xa0,
> 0xc9, 0x03, 0x49, 0xcb
> };
> +/**********************************/
> +/* decoding */
>
> +#ifdef DEBUG
> static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */
> 0xce, 0x75, 0xf8, 0x7b, 0x8d, 0x46, 0xd1, 0x11, 0x8d, 0x82, 0x00, 0x60,
> 0x97, 0xc9, 0xa2, 0xb2
> };
> -/**********************************/
> -/* decoding */
>
> -#ifdef DEBUG
> #define PRINT_IF_GUID(g,cmp) \
> if (!ff_guidcmp(g, &cmp)) \
> av_dlog(NULL, "(GUID: %s) ", #cmp)
This doesn't match the description.
> diff --git a/libavutil/des.c b/libavutil/des.c
> index a30ef3b..9d6f0ee 100644
> --- a/libavutil/des.c
> +++ b/libavutil/des.c
> @@ -39,6 +39,7 @@ static const uint8_t IP_shuffle[] = {
> };
> #undef T
>
> +#if defined(CONFIG_SMALL) || defined(GENTABLES)
> #define T(a, b, c, d) 32-a,32-b,32-c,32-d
> static const uint8_t P_shuffle[] = {
> T(16, 7, 20, 21),
> @@ -51,6 +52,7 @@ static const uint8_t P_shuffle[] = {
> T(22, 11, 4, 25)
> };
> #undef T
> +#endif
>
> #define T(a, b, c, d, e, f, g) 64-a,64-b,64-c,64-d,64-e,64-f,64-g
> static const uint8_t PC1_shuffle[] = {
OK
> diff --git a/libswscale/swscale.c b/libswscale/swscale.c
> index dacf40e..14807fd 100644
> --- a/libswscale/swscale.c
> +++ b/libswscale/swscale.c
> @@ -80,17 +80,6 @@ untested special converters
> #define RV ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5))
> #define RU (-(int)(0.169*224/255*(1<<RGB2YUV_SHIFT)+0.5))
>
> -static const double rgb2yuv_table[8][9]={
> - {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5},
> //ITU709
> - {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5},
> //ITU709
> - {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
> //DEFAULT / ITU601 / ITU624 / SMPTE 170M
> - {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
> //DEFAULT / ITU601 / ITU624 / SMPTE 170M
> - {0.59 , 0.11 , 0.30 , -0.331, 0.5, -0.169, -0.421, -0.079, 0.5}, //FCC
> - {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
> //DEFAULT / ITU601 / ITU624 / SMPTE 170M
> - {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
> //DEFAULT / ITU601 / ITU624 / SMPTE 170M
> - {0.701 , 0.087 , 0.212 , -0.384, 0.5, -0.116, -0.445, -0.055, 0.5},
> //SMPTE 240M
> -};
> -
> /*
> NOTES
> Special versions: fast Y 1:1 scaling (no interpolation in y direction)
OK
--
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel