---
 libavcodec/arm/mpegvideo_iwmmxt.c |   20 -----
 libavcodec/cabac.h                |   58 -------------
 libavcodec/dsputil.c              |  166 -------------------------------------
 libavcodec/dvbsubdec.c            |   58 -------------
 libavcodec/h264.c                 |   81 ------------------
 libavcodec/motion_est.c           |   24 ------
 libavcodec/motion_est_template.c  |   70 ----------------
 libavcodec/mpegaudiodec.c         |   47 -----------
 libavcodec/qdm2.c                 |   49 -----------
 libavcodec/tta.c                  |   18 ----
 libavcodec/x86/dsputil_mmx.c      |    4 -
 libavcodec/x86/simple_idct_mmx.c  |  129 ----------------------------
 libavformat/flvdec.c              |   30 -------
 libavformat/gxfenc.c              |   11 ---
 libavformat/movenc.c              |   17 ----
 libavformat/mpeg.c                |   35 --------
 libavformat/mpegenc.c             |  108 ------------------------
 libavformat/rtpdec.c              |   16 ----
 18 files changed, 0 insertions(+), 941 deletions(-)

diff --git a/libavcodec/arm/mpegvideo_iwmmxt.c 
b/libavcodec/arm/mpegvideo_iwmmxt.c
index 4d5edd8..6edc4c2 100644
--- a/libavcodec/arm/mpegvideo_iwmmxt.c
+++ b/libavcodec/arm/mpegvideo_iwmmxt.c
@@ -93,29 +93,9 @@ static void dct_unquantize_h263_intra_iwmmxt(MpegEncContext 
*s,
     block_orig[0] = level;
 }
 
-#if 0
-static void dct_unquantize_h263_inter_iwmmxt(MpegEncContext *s,
-                                             DCTELEM *block, int n, int qscale)
-{
-    int nCoeffs;
-
-    assert(s->block_last_index[n]>=0);
-
-    if(s->ac_pred)
-        nCoeffs=63;
-    else
-        nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
-
-    ippiQuantInvInter_Compact_H263_16s_I(block, nCoeffs+1, qscale);
-}
-#endif
-
 void MPV_common_init_iwmmxt(MpegEncContext *s)
 {
     if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return;
 
     s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt;
-#if 0
-    s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_iwmmxt;
-#endif
 }
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index 4708563..52c723c 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -697,62 +697,4 @@ static int av_unused get_cabac_terminate(CABACContext *c){
     }
 }
 
-#if 0
-/**
- * Get (truncated) unary binarization.
- */
-static int get_cabac_u(CABACContext *c, uint8_t * state, int max, int 
max_index, int truncated){
-    int i;
-
-    for(i=0; i<max; i++){
-        if(get_cabac(c, state)==0)
-            return i;
-
-        if(i< max_index) state++;
-    }
-
-    return truncated ? max : -1;
-}
-
-/**
- * get unary exp golomb k-th order binarization.
- */
-static int get_cabac_ueg(CABACContext *c, uint8_t * state, int max, int 
is_signed, int k, int max_index){
-    int i, v;
-    int m= 1<<k;
-
-    if(get_cabac(c, state)==0)
-        return 0;
-
-    if(0 < max_index) state++;
-
-    for(i=1; i<max; i++){
-        if(get_cabac(c, state)==0){
-            if(is_signed && get_cabac_bypass(c)){
-                return -i;
-            }else
-                return i;
-        }
-
-        if(i < max_index) state++;
-    }
-
-    while(get_cabac_bypass(c)){
-        i+= m;
-        m+= m;
-    }
-
-    v=0;
-    while(m>>=1){
-        v+= v + get_cabac_bypass(c);
-    }
-    i += v;
-
-    if(is_signed && get_cabac_bypass(c)){
-        return -i;
-    }else
-        return i;
-}
-#endif /* 0 */
-
 #endif /* AVCODEC_CABAC_H */
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 32472b1..fcaea9c 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -665,150 +665,6 @@ static void scale_block_c(const uint8_t src[64]/*align 
8*/, uint8_t *dst/*align
     }
 }
 
-#if 0
-
-#define PIXOP2(OPNAME, OP) \
-static void OPNAME ## _pixels(uint8_t *block, const uint8_t *pixels, int 
line_size, int h)\
-{\
-    int i;\
-    for(i=0; i<h; i++){\
-        OP(*((uint64_t*)block), AV_RN64(pixels));\
-        pixels+=line_size;\
-        block +=line_size;\
-    }\
-}\
-\
-static void OPNAME ## _no_rnd_pixels_x2_c(uint8_t *block, const uint8_t 
*pixels, int line_size, int h)\
-{\
-    int i;\
-    for(i=0; i<h; i++){\
-        const uint64_t a= AV_RN64(pixels  );\
-        const uint64_t b= AV_RN64(pixels+1);\
-        OP(*((uint64_t*)block), (a&b) + (((a^b)&0xFEFEFEFEFEFEFEFEULL)>>1));\
-        pixels+=line_size;\
-        block +=line_size;\
-    }\
-}\
-\
-static void OPNAME ## _pixels_x2_c(uint8_t *block, const uint8_t *pixels, int 
line_size, int h)\
-{\
-    int i;\
-    for(i=0; i<h; i++){\
-        const uint64_t a= AV_RN64(pixels  );\
-        const uint64_t b= AV_RN64(pixels+1);\
-        OP(*((uint64_t*)block), (a|b) - (((a^b)&0xFEFEFEFEFEFEFEFEULL)>>1));\
-        pixels+=line_size;\
-        block +=line_size;\
-    }\
-}\
-\
-static void OPNAME ## _no_rnd_pixels_y2_c(uint8_t *block, const uint8_t 
*pixels, int line_size, int h)\
-{\
-    int i;\
-    for(i=0; i<h; i++){\
-        const uint64_t a= AV_RN64(pixels          );\
-        const uint64_t b= AV_RN64(pixels+line_size);\
-        OP(*((uint64_t*)block), (a&b) + (((a^b)&0xFEFEFEFEFEFEFEFEULL)>>1));\
-        pixels+=line_size;\
-        block +=line_size;\
-    }\
-}\
-\
-static void OPNAME ## _pixels_y2_c(uint8_t *block, const uint8_t *pixels, int 
line_size, int h)\
-{\
-    int i;\
-    for(i=0; i<h; i++){\
-        const uint64_t a= AV_RN64(pixels          );\
-        const uint64_t b= AV_RN64(pixels+line_size);\
-        OP(*((uint64_t*)block), (a|b) - (((a^b)&0xFEFEFEFEFEFEFEFEULL)>>1));\
-        pixels+=line_size;\
-        block +=line_size;\
-    }\
-}\
-\
-static void OPNAME ## _pixels_xy2_c(uint8_t *block, const uint8_t *pixels, int 
line_size, int h)\
-{\
-        int i;\
-        const uint64_t a= AV_RN64(pixels  );\
-        const uint64_t b= AV_RN64(pixels+1);\
-        uint64_t l0=  (a&0x0303030303030303ULL)\
-                    + (b&0x0303030303030303ULL)\
-                    + 0x0202020202020202ULL;\
-        uint64_t h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-                   + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-        uint64_t l1,h1;\
-\
-        pixels+=line_size;\
-        for(i=0; i<h; i+=2){\
-            uint64_t a= AV_RN64(pixels  );\
-            uint64_t b= AV_RN64(pixels+1);\
-            l1=  (a&0x0303030303030303ULL)\
-               + (b&0x0303030303030303ULL);\
-            h1= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-              + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-            OP(*((uint64_t*)block), 
h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\
-            pixels+=line_size;\
-            block +=line_size;\
-            a= AV_RN64(pixels  );\
-            b= AV_RN64(pixels+1);\
-            l0=  (a&0x0303030303030303ULL)\
-               + (b&0x0303030303030303ULL)\
-               + 0x0202020202020202ULL;\
-            h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-              + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-            OP(*((uint64_t*)block), 
h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\
-            pixels+=line_size;\
-            block +=line_size;\
-        }\
-}\
-\
-static void OPNAME ## _no_rnd_pixels_xy2_c(uint8_t *block, const uint8_t 
*pixels, int line_size, int h)\
-{\
-        int i;\
-        const uint64_t a= AV_RN64(pixels  );\
-        const uint64_t b= AV_RN64(pixels+1);\
-        uint64_t l0=  (a&0x0303030303030303ULL)\
-                    + (b&0x0303030303030303ULL)\
-                    + 0x0101010101010101ULL;\
-        uint64_t h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-                   + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-        uint64_t l1,h1;\
-\
-        pixels+=line_size;\
-        for(i=0; i<h; i+=2){\
-            uint64_t a= AV_RN64(pixels  );\
-            uint64_t b= AV_RN64(pixels+1);\
-            l1=  (a&0x0303030303030303ULL)\
-               + (b&0x0303030303030303ULL);\
-            h1= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-              + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-            OP(*((uint64_t*)block), 
h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\
-            pixels+=line_size;\
-            block +=line_size;\
-            a= AV_RN64(pixels  );\
-            b= AV_RN64(pixels+1);\
-            l0=  (a&0x0303030303030303ULL)\
-               + (b&0x0303030303030303ULL)\
-               + 0x0101010101010101ULL;\
-            h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\
-              + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\
-            OP(*((uint64_t*)block), 
h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\
-            pixels+=line_size;\
-            block +=line_size;\
-        }\
-}\
-\
-CALL_2X_PIXELS(OPNAME ## _pixels16_c    , OPNAME ## _pixels_c    , 8)\
-CALL_2X_PIXELS(OPNAME ## _pixels16_x2_c , OPNAME ## _pixels_x2_c , 8)\
-CALL_2X_PIXELS(OPNAME ## _pixels16_y2_c , OPNAME ## _pixels_y2_c , 8)\
-CALL_2X_PIXELS(OPNAME ## _pixels16_xy2_c, OPNAME ## _pixels_xy2_c, 8)\
-CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_x2_c , OPNAME ## _no_rnd_pixels_x2_c 
, 8)\
-CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME ## _no_rnd_pixels_y2_c 
, 8)\
-CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## 
_no_rnd_pixels_xy2_c, 8)
-
-#define op_avg(a, b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEFEFEFEFEULL)>>1) )
-#else // 64 bit variant
-
 #define PIXOP2(OPNAME, OP) \
 static void OPNAME ## _pixels2_c(uint8_t *block, const uint8_t *pixels, int 
line_size, int h){\
     int i;\
@@ -1176,7 +1032,6 @@ CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME 
## _no_rnd_pixels8_y2_c
 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## 
_no_rnd_pixels8_xy2_c, 8)\
 
 #define op_avg(a, b) a = rnd_avg32(a, b)
-#endif
 #define op_put(a, b) a = b
 
 PIXOP2(avg, op_avg)
@@ -1472,27 +1327,6 @@ static inline void avg_tpel_pixels_mc22_c(uint8_t *dst, 
const uint8_t *src, int
       dst += stride;
     }
 }
-#if 0
-#define TPEL_WIDTH(width)\
-static void put_tpel_pixels ## width ## _mc00_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc00_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc10_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc10_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc20_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc20_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc01_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc01_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc11_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc11_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc21_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc21_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc02_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc02_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc12_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc12_c(dst, src, stride, width, height);}\
-static void put_tpel_pixels ## width ## _mc22_c(uint8_t *dst, const uint8_t 
*src, int stride, int height){\
-    void put_tpel_pixels_mc22_c(dst, src, stride, width, height);}
-#endif
 
 #define H264_CHROMA_MC(OPNAME, OP)\
 static void OPNAME ## h264_chroma_mc2_c(uint8_t *dst/*align 8*/, uint8_t 
*src/*align 1*/, int stride, int h, int x, int y){\
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 2c27f6b..b3eae3a 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -39,64 +39,6 @@
 
 #ifdef DEBUG_SAVE_IMAGES
 #undef fprintf
-#if 0
-static void png_save(const char *filename, uint8_t *bitmap, int w, int h,
-                     uint32_t *rgba_palette)
-{
-    int x, y, v;
-    FILE *f;
-    char fname[40], fname2[40];
-    char command[1024];
-
-    snprintf(fname, 40, "%s.ppm", filename);
-
-    f = fopen(fname, "w");
-    if (!f) {
-        perror(fname);
-        exit(1);
-    }
-    fprintf(f, "P6\n"
-            "%d %d\n"
-            "%d\n",
-            w, h, 255);
-    for(y = 0; y < h; y++) {
-        for(x = 0; x < w; x++) {
-            v = rgba_palette[bitmap[y * w + x]];
-            putc((v >> 16) & 0xff, f);
-            putc((v >> 8) & 0xff, f);
-            putc((v >> 0) & 0xff, f);
-        }
-    }
-    fclose(f);
-
-
-    snprintf(fname2, 40, "%s-a.pgm", filename);
-
-    f = fopen(fname2, "w");
-    if (!f) {
-        perror(fname2);
-        exit(1);
-    }
-    fprintf(f, "P5\n"
-            "%d %d\n"
-            "%d\n",
-            w, h, 255);
-    for(y = 0; y < h; y++) {
-        for(x = 0; x < w; x++) {
-            v = rgba_palette[bitmap[y * w + x]];
-            putc((v >> 24) & 0xff, f);
-        }
-    }
-    fclose(f);
-
-    snprintf(command, 1024, "pnmtopng -alpha %s %s > %s.png 2> /dev/null", 
fname2, fname, filename);
-    system(command);
-
-    snprintf(command, 1024, "rm %s %s", fname, fname2);
-    system(command);
-}
-#endif
-
 static void png_save2(const char *filename, uint32_t *bitmap, int w, int h)
 {
     int x, y, v;
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a59f121..d4ec675 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -245,46 +245,6 @@ static int ff_h264_decode_rbsp_trailing(H264Context *h, 
const uint8_t *src){
     return 0;
 }
 
-#if 0
-/**
- * DCT transforms the 16 dc values.
- * @param qp quantization parameter ??? FIXME
- */
-static void h264_luma_dc_dct_c(DCTELEM *block/*, int qp*/){
-//    const int qmul= dequant_coeff[qp][0];
-    int i;
-    int temp[16]; //FIXME check if this is a good idea
-    static const int x_offset[4]={0, 1*stride, 4* stride,  5*stride};
-    static const int y_offset[4]={0, 2*stride, 8* stride, 10*stride};
-
-    for(i=0; i<4; i++){
-        const int offset= y_offset[i];
-        const int z0= block[offset+stride*0] + block[offset+stride*4];
-        const int z1= block[offset+stride*0] - block[offset+stride*4];
-        const int z2= block[offset+stride*1] - block[offset+stride*5];
-        const int z3= block[offset+stride*1] + block[offset+stride*5];
-
-        temp[4*i+0]= z0+z3;
-        temp[4*i+1]= z1+z2;
-        temp[4*i+2]= z1-z2;
-        temp[4*i+3]= z0-z3;
-    }
-
-    for(i=0; i<4; i++){
-        const int offset= x_offset[i];
-        const int z0= temp[4*0+i] + temp[4*2+i];
-        const int z1= temp[4*0+i] - temp[4*2+i];
-        const int z2= temp[4*1+i] - temp[4*3+i];
-        const int z3= temp[4*1+i] + temp[4*3+i];
-
-        block[stride*0 +offset]= (z0 + z3)>>1;
-        block[stride*2 +offset]= (z1 + z2)>>1;
-        block[stride*8 +offset]= (z1 - z2)>>1;
-        block[stride*10+offset]= (z0 - z3)>>1;
-    }
-}
-#endif
-
 #undef xStride
 #undef stride
 
@@ -309,29 +269,6 @@ static void chroma_dc_dequant_idct_c(DCTELEM *block, int 
qmul){
     block[stride*1 + xStride*1]= ((e-b)*qmul) >> 7;
 }
 
-#if 0
-static void chroma_dc_dct_c(DCTELEM *block){
-    const int stride= 16*2;
-    const int xStride= 16;
-    int a,b,c,d,e;
-
-    a= block[stride*0 + xStride*0];
-    b= block[stride*0 + xStride*1];
-    c= block[stride*1 + xStride*0];
-    d= block[stride*1 + xStride*1];
-
-    e= a-b;
-    a= a+b;
-    b= c-d;
-    c= c+d;
-
-    block[stride*0 + xStride*0]= (a+c);
-    block[stride*0 + xStride*1]= (e+b);
-    block[stride*1 + xStride*0]= (a-c);
-    block[stride*1 + xStride*1]= (e-b);
-}
-#endif
-
 static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int 
square, int chroma_height, int delta, int list,
                            uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
                            int src_x_offset, int src_y_offset,
@@ -3153,25 +3090,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     return get_consumed_bytes(s, buf_index, buf_size);
 }
-#if 0
-static inline void fill_mb_avail(H264Context *h){
-    MpegEncContext * const s = &h->s;
-    const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
 
-    if(s->mb_y){
-        h->mb_avail[0]= s->mb_x                 && h->slice_table[mb_xy - 
s->mb_stride - 1] == h->slice_num;
-        h->mb_avail[1]=                            h->slice_table[mb_xy - 
s->mb_stride    ] == h->slice_num;
-        h->mb_avail[2]= s->mb_x+1 < s->mb_width && h->slice_table[mb_xy - 
s->mb_stride + 1] == h->slice_num;
-    }else{
-        h->mb_avail[0]=
-        h->mb_avail[1]=
-        h->mb_avail[2]= 0;
-    }
-    h->mb_avail[3]= s->mb_x && h->slice_table[mb_xy - 1] == h->slice_num;
-    h->mb_avail[4]= 1; //FIXME move out
-    h->mb_avail[5]= 0; //FIXME move out
-}
-#endif
 
 #ifdef TEST
 #undef printf
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index c8f40b4..e86802d 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -374,30 +374,6 @@ int ff_init_me(MpegEncContext *s){
     return 0;
 }
 
-#if 0
-static int pix_dev(uint8_t * pix, int line_size, int mean)
-{
-    int s, i, j;
-
-    s = 0;
-    for (i = 0; i < 16; i++) {
-        for (j = 0; j < 16; j += 8) {
-            s += FFABS(pix[0]-mean);
-            s += FFABS(pix[1]-mean);
-            s += FFABS(pix[2]-mean);
-            s += FFABS(pix[3]-mean);
-            s += FFABS(pix[4]-mean);
-            s += FFABS(pix[5]-mean);
-            s += FFABS(pix[6]-mean);
-            s += FFABS(pix[7]-mean);
-            pix += 8;
-        }
-        pix += line_size - 16;
-    }
-    return s;
-}
-#endif
-
 static inline void no_motion_search(MpegEncContext * s,
                                     int *mx_ptr, int *my_ptr)
 {
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 45e87a0..11bc5c4 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -44,75 +44,6 @@
     COPY3_IF_LT(dmin, d, bx, hx, by, hy)\
 }
 
-#if 0
-static int hpel_motion_search)(MpegEncContext * s,
-                                  int *mx_ptr, int *my_ptr, int dmin,
-                                  uint8_t *ref_data[3],
-                                  int size)
-{
-    const int xx = 16 * s->mb_x + 8*(n&1);
-    const int yy = 16 * s->mb_y + 8*(n>>1);
-    const int mx = *mx_ptr;
-    const int my = *my_ptr;
-    const int penalty_factor= c->sub_penalty_factor;
-
-    LOAD_COMMON
-
- //   INIT;
- //FIXME factorize
-    me_cmp_func cmp, chroma_cmp, cmp_sub, chroma_cmp_sub;
-
-    if(s->no_rounding /*FIXME b_type*/){
-        hpel_put= &s->dsp.put_no_rnd_pixels_tab[size];
-        chroma_hpel_put= &s->dsp.put_no_rnd_pixels_tab[size+1];
-    }else{
-        hpel_put=& s->dsp.put_pixels_tab[size];
-        chroma_hpel_put= &s->dsp.put_pixels_tab[size+1];
-    }
-    cmpf= s->dsp.me_cmp[size];
-    chroma_cmpf= s->dsp.me_cmp[size+1];
-    cmp_sub= s->dsp.me_sub_cmp[size];
-    chroma_cmp_sub= s->dsp.me_sub_cmp[size+1];
-
-    if(c->skip){ //FIXME somehow move up (benchmark)
-        *mx_ptr = 0;
-        *my_ptr = 0;
-        return dmin;
-    }
-
-    if(c->avctx->me_cmp != c->avctx->me_sub_cmp){
-        CMP_HPEL(dmin, 0, 0, mx, my, size);
-        if(mx || my)
-            dmin += (mv_penalty[2*mx - pred_x] + mv_penalty[2*my - 
pred_y])*penalty_factor;
-    }
-
-    if (mx > xmin && mx < xmax &&
-        my > ymin && my < ymax) {
-        int bx=2*mx, by=2*my;
-        int d= dmin;
-
-        CHECK_HALF_MV(1, 1, mx-1, my-1)
-        CHECK_HALF_MV(0, 1, mx  , my-1)
-        CHECK_HALF_MV(1, 1, mx  , my-1)
-        CHECK_HALF_MV(1, 0, mx-1, my  )
-        CHECK_HALF_MV(1, 0, mx  , my  )
-        CHECK_HALF_MV(1, 1, mx-1, my  )
-        CHECK_HALF_MV(0, 1, mx  , my  )
-        CHECK_HALF_MV(1, 1, mx  , my  )
-
-        assert(bx >= xmin*2 || bx <= xmax*2 || by >= ymin*2 || by <= ymax*2);
-
-        *mx_ptr = bx;
-        *my_ptr = by;
-    }else{
-        *mx_ptr =2*mx;
-        *my_ptr =2*my;
-    }
-
-    return dmin;
-}
-
-#else
 static int hpel_motion_search(MpegEncContext * s,
                                   int *mx_ptr, int *my_ptr, int dmin,
                                   int src_index, int ref_index,
@@ -218,7 +149,6 @@ static int hpel_motion_search(MpegEncContext * s,
 
     return dmin;
 }
-#endif
 
 static int no_sub_motion_search(MpegEncContext * s,
           int *mx_ptr, int *my_ptr, int dmin,
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 024d618..df71f6e 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -267,53 +267,6 @@ static av_cold void int_pow_init(void)
     }
 }
 
-#if 0 /* unused, remove? */
-/* return the mantissa and the binary exponent */
-static int int_pow(int i, int *exp_ptr)
-{
-    int e, er, eq, j;
-    int a, a1;
-
-    /* renormalize */
-    a = i;
-    e = POW_FRAC_BITS;
-    while (a < (1 << (POW_FRAC_BITS - 1))) {
-        a = a << 1;
-        e--;
-    }
-    a -= (1 << POW_FRAC_BITS);
-    a1 = 0;
-    for(j = DEV_ORDER - 1; j >= 0; j--)
-        a1 = POW_MULL(a, dev_4_3_coefs[j] + a1);
-    a = (1 << POW_FRAC_BITS) + a1;
-    /* exponent compute (exact) */
-    e = e * 4;
-    er = e % 3;
-    eq = e / 3;
-    a = POW_MULL(a, pow_mult3[er]);
-    while (a >= 2 * POW_FRAC_ONE) {
-        a = a >> 1;
-        eq++;
-    }
-    /* convert to float */
-    while (a < POW_FRAC_ONE) {
-        a = a << 1;
-        eq--;
-    }
-    /* now POW_FRAC_ONE <= a < 2 * POW_FRAC_ONE */
-#if POW_FRAC_BITS > FRAC_BITS
-    a = (a + (1 << (POW_FRAC_BITS - FRAC_BITS - 1))) >> (POW_FRAC_BITS - 
FRAC_BITS);
-    /* correct overflow */
-    if (a >= 2 * (1 << FRAC_BITS)) {
-        a = a >> 1;
-        eq++;
-    }
-#endif
-    *exp_ptr = eq;
-    return a;
-}
-#endif
-
 static av_cold int decode_init(AVCodecContext * avctx)
 {
     MPADecodeContext *s = avctx->priv_data;
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 3ef712c..af5955e 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1655,52 +1655,6 @@ static av_cold void qdm2_init(QDM2Context *q) {
 }
 
 
-#if 0
-static void dump_context(QDM2Context *q)
-{
-    int i;
-#define PRINT(a,b) av_log(NULL,AV_LOG_DEBUG," %s = %d\n", a, b);
-    PRINT("compressed_data",q->compressed_data);
-    PRINT("compressed_size",q->compressed_size);
-    PRINT("frame_size",q->frame_size);
-    PRINT("checksum_size",q->checksum_size);
-    PRINT("channels",q->channels);
-    PRINT("nb_channels",q->nb_channels);
-    PRINT("fft_frame_size",q->fft_frame_size);
-    PRINT("fft_size",q->fft_size);
-    PRINT("sub_sampling",q->sub_sampling);
-    PRINT("fft_order",q->fft_order);
-    PRINT("group_order",q->group_order);
-    PRINT("group_size",q->group_size);
-    PRINT("sub_packet",q->sub_packet);
-    PRINT("frequency_range",q->frequency_range);
-    PRINT("has_errors",q->has_errors);
-    PRINT("fft_tone_end",q->fft_tone_end);
-    PRINT("fft_tone_start",q->fft_tone_start);
-    PRINT("fft_coefs_index",q->fft_coefs_index);
-    PRINT("coeff_per_sb_select",q->coeff_per_sb_select);
-    PRINT("cm_table_select",q->cm_table_select);
-    PRINT("noise_idx",q->noise_idx);
-
-    for (i = q->fft_tone_start; i < q->fft_tone_end; i++)
-    {
-    FFTTone *t = &q->fft_tones[i];
-
-    av_log(NULL,AV_LOG_DEBUG,"Tone (%d) dump:\n", i);
-    av_log(NULL,AV_LOG_DEBUG,"  level = %f\n", t->level);
-//  PRINT(" level", t->level);
-    PRINT(" phase", t->phase);
-    PRINT(" phase_shift", t->phase_shift);
-    PRINT(" duration", t->duration);
-    PRINT(" samples_im", t->samples_im);
-    PRINT(" samples_re", t->samples_re);
-    PRINT(" table", t->table);
-    }
-
-}
-#endif
-
-
 /**
  * Init parameters from codec extradata
  */
@@ -1868,7 +1822,6 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
 
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
 
-//    dump_context(s);
     return 0;
 }
 
@@ -1892,8 +1845,6 @@ static int qdm2_decode (QDM2Context *q, const uint8_t 
*in, int16_t *out)
     q->compressed_data = in;
     q->compressed_size = q->checksum_size;
 
-//  dump_context(q);
-
     /* copy old block, clear new block of output samples */
     memmove(q->output_buffer, &q->output_buffer[frame_size], frame_size * 
sizeof(float));
     memset(&q->output_buffer[frame_size], 0, frame_size * sizeof(float));
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 57f5818..2e98afe 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -66,23 +66,6 @@ typedef struct TTAContext {
     TTAChannel *ch_ctx;
 } TTAContext;
 
-#if 0
-static inline int shift_1(int i)
-{
-    if (i < 32)
-        return 1 << i;
-    else
-        return 0x80000000; // 16 << 31
-}
-
-static inline int shift_16(int i)
-{
-    if (i < 28)
-        return 16 << i;
-    else
-        return 0x80000000; // 16 << 27
-}
-#else
 static const uint32_t shift_1[] = {
     0x00000001, 0x00000002, 0x00000004, 0x00000008,
     0x00000010, 0x00000020, 0x00000040, 0x00000080,
@@ -97,7 +80,6 @@ static const uint32_t shift_1[] = {
 };
 
 static const uint32_t * const shift_16 = shift_1 + 4;
-#endif
 
 static const int32_t ttafilter_configs[4][2] = {
     {10, 1},
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index 4d490b9..ae65d0f 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -1664,10 +1664,6 @@ QPEL_2TAP(put_,  8, 3dnow)
 QPEL_2TAP(avg_,  8, 3dnow)
 
 
-#if 0
-static void just_return(void) { return; }
-#endif
-
 #if HAVE_YASM
 typedef void emu_edge_core_func (uint8_t *buf, const uint8_t *src,
                                  x86_reg linesize, x86_reg start_y,
diff --git a/libavcodec/x86/simple_idct_mmx.c b/libavcodec/x86/simple_idct_mmx.c
index d78ae6b..8a90785 100644
--- a/libavcodec/x86/simple_idct_mmx.c
+++ b/libavcodec/x86/simple_idct_mmx.c
@@ -80,135 +80,6 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= {
  C3, -C1,  C3, -C1
 };
 
-#if 0
-static void unused_var_killer(void)
-{
-        int a= wm1010 + d40000;
-        temp[0]=a;
-}
-
-static void inline idctCol (int16_t * col, int16_t *input)
-{
-#undef C0
-#undef C1
-#undef C2
-#undef C3
-#undef C4
-#undef C5
-#undef C6
-#undef C7
-        int a0, a1, a2, a3, b0, b1, b2, b3;
-        const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C6 = 8867;  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C7 = 4520;  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-/*
-        if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | 
col[8*7])) {
-                col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] =
-                        col[8*5] = col[8*6] = col[8*7] = col[8*0]<<3;
-                return;
-        }*/
-
-col[8*0] = input[8*0 + 0];
-col[8*1] = input[8*2 + 0];
-col[8*2] = input[8*0 + 1];
-col[8*3] = input[8*2 + 1];
-col[8*4] = input[8*4 + 0];
-col[8*5] = input[8*6 + 0];
-col[8*6] = input[8*4 + 1];
-col[8*7] = input[8*6 + 1];
-
-        a0 = C4*col[8*0] + C2*col[8*2] + C4*col[8*4] + C6*col[8*6] + 
(1<<(COL_SHIFT-1));
-        a1 = C4*col[8*0] + C6*col[8*2] - C4*col[8*4] - C2*col[8*6] + 
(1<<(COL_SHIFT-1));
-        a2 = C4*col[8*0] - C6*col[8*2] - C4*col[8*4] + C2*col[8*6] + 
(1<<(COL_SHIFT-1));
-        a3 = C4*col[8*0] - C2*col[8*2] + C4*col[8*4] - C6*col[8*6] + 
(1<<(COL_SHIFT-1));
-
-        b0 = C1*col[8*1] + C3*col[8*3] + C5*col[8*5] + C7*col[8*7];
-        b1 = C3*col[8*1] - C7*col[8*3] - C1*col[8*5] - C5*col[8*7];
-        b2 = C5*col[8*1] - C1*col[8*3] + C7*col[8*5] + C3*col[8*7];
-        b3 = C7*col[8*1] - C5*col[8*3] + C3*col[8*5] - C1*col[8*7];
-
-        col[8*0] = (a0 + b0) >> COL_SHIFT;
-        col[8*1] = (a1 + b1) >> COL_SHIFT;
-        col[8*2] = (a2 + b2) >> COL_SHIFT;
-        col[8*3] = (a3 + b3) >> COL_SHIFT;
-        col[8*4] = (a3 - b3) >> COL_SHIFT;
-        col[8*5] = (a2 - b2) >> COL_SHIFT;
-        col[8*6] = (a1 - b1) >> COL_SHIFT;
-        col[8*7] = (a0 - b0) >> COL_SHIFT;
-}
-
-static void inline idctRow (int16_t * output, int16_t * input)
-{
-        int16_t row[8];
-
-        int a0, a1, a2, a3, b0, b1, b2, b3;
-        const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C6 = 8867;  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-        const int C7 = 4520;  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
-
-row[0] = input[0];
-row[2] = input[1];
-row[4] = input[4];
-row[6] = input[5];
-row[1] = input[8];
-row[3] = input[9];
-row[5] = input[12];
-row[7] = input[13];
-
-        if( !(row[1] | row[2] |row[3] |row[4] |row[5] |row[6] | row[7]) ) {
-                row[0] = row[1] = row[2] = row[3] = row[4] =
-                        row[5] = row[6] = row[7] = row[0]<<3;
-        output[0]  = row[0];
-        output[2]  = row[1];
-        output[4]  = row[2];
-        output[6]  = row[3];
-        output[8]  = row[4];
-        output[10] = row[5];
-        output[12] = row[6];
-        output[14] = row[7];
-                return;
-        }
-
-        a0 = C4*row[0] + C2*row[2] + C4*row[4] + C6*row[6] + 
(1<<(ROW_SHIFT-1));
-        a1 = C4*row[0] + C6*row[2] - C4*row[4] - C2*row[6] + 
(1<<(ROW_SHIFT-1));
-        a2 = C4*row[0] - C6*row[2] - C4*row[4] + C2*row[6] + 
(1<<(ROW_SHIFT-1));
-        a3 = C4*row[0] - C2*row[2] + C4*row[4] - C6*row[6] + 
(1<<(ROW_SHIFT-1));
-
-        b0 = C1*row[1] + C3*row[3] + C5*row[5] + C7*row[7];
-        b1 = C3*row[1] - C7*row[3] - C1*row[5] - C5*row[7];
-        b2 = C5*row[1] - C1*row[3] + C7*row[5] + C3*row[7];
-        b3 = C7*row[1] - C5*row[3] + C3*row[5] - C1*row[7];
-
-        row[0] = (a0 + b0) >> ROW_SHIFT;
-        row[1] = (a1 + b1) >> ROW_SHIFT;
-        row[2] = (a2 + b2) >> ROW_SHIFT;
-        row[3] = (a3 + b3) >> ROW_SHIFT;
-        row[4] = (a3 - b3) >> ROW_SHIFT;
-        row[5] = (a2 - b2) >> ROW_SHIFT;
-        row[6] = (a1 - b1) >> ROW_SHIFT;
-        row[7] = (a0 - b0) >> ROW_SHIFT;
-
-        output[0]  = row[0];
-        output[2]  = row[1];
-        output[4]  = row[2];
-        output[6]  = row[3];
-        output[8]  = row[4];
-        output[10] = row[5];
-        output[12] = row[6];
-        output[14] = row[7];
-}
-#endif
-
 static inline void idct(int16_t *block)
 {
         DECLARE_ALIGNED(8, int64_t, align_tmp)[16];
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e7ec0b1..78347e3 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -541,33 +541,6 @@ static int flv_read_seek(AVFormatContext *s, int 
stream_index,
     return avio_seek_time(s->pb, stream_index, ts, flags);
 }
 
-#if 0 /* don't know enough to implement this */
-static int flv_read_seek2(AVFormatContext *s, int stream_index,
-    int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
-{
-    int ret = AVERROR(ENOSYS);
-
-    if (ts - min_ts > (uint64_t)(max_ts - ts)) flags |= AVSEEK_FLAG_BACKWARD;
-
-    if (!s->pb->seekable) {
-        if (stream_index < 0) {
-            stream_index = av_find_default_stream_index(s);
-            if (stream_index < 0)
-                return -1;
-
-            /* timestamp for default must be expressed in AV_TIME_BASE units */
-            ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE,
-                flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP);
-        }
-        ret = avio_seek_time(s->pb, stream_index, ts, flags);
-    }
-
-    if (ret == AVERROR(ENOSYS))
-        ret = av_seek_frame(s, stream_index, ts, flags);
-    return ret;
-}
-#endif
-
 AVInputFormat ff_flv_demuxer = {
     "flv",
     NULL_IF_CONFIG_SMALL("FLV format"),
@@ -576,9 +549,6 @@ AVInputFormat ff_flv_demuxer = {
     flv_read_header,
     flv_read_packet,
     .read_seek = flv_read_seek,
-#if 0
-    .read_seek2 = flv_read_seek2,
-#endif
     .extensions = "flv",
     .value = CODEC_ID_FLV1,
 };
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 585e0ee..b423c67 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -515,17 +515,6 @@ static int gxf_write_umf_media_audio(AVIOContext *pb, 
GXFStreamContext *sc)
     return 32;
 }
 
-#if 0
-static int gxf_write_umf_media_mjpeg(AVIOContext *pb, GXFStreamContext *sc)
-{
-    avio_wb64(pb, 0); /* FIXME FLOAT max chroma quant level */
-    avio_wb64(pb, 0); /* FIXME FLOAT max luma quant level */
-    avio_wb64(pb, 0); /* FIXME FLOAT min chroma quant level */
-    avio_wb64(pb, 0); /* FIXME FLOAT min luma quant level */
-    return 32;
-}
-#endif
-
 static int gxf_write_umf_media_description(AVFormatContext *s)
 {
     GXFContext *gxf = s->priv_data;
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 0458844..9040859 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1359,22 +1359,6 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVTrack 
*track, AVStream *st)
     return updateSize(pb, pos);
 }
 
-#if 0
-/* TODO: Not sorted out, but not necessary either */
-static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
-{
-    avio_wb32(pb, 0x15); /* size */
-    ffio_wfourcc(pb, "iods");
-    avio_wb32(pb, 0);    /* version & flags */
-    avio_wb16(pb, 0x1007);
-    avio_w8(pb, 0);
-    avio_wb16(pb, 0x4fff);
-    avio_wb16(pb, 0xfffe);
-    avio_wb16(pb, 0x01ff);
-    return 0x15;
-}
-#endif
-
 static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
 {
     int maxTrackID = 1, i;
@@ -1781,7 +1765,6 @@ static int mov_write_moov_tag(AVIOContext *pb, 
MOVMuxContext *mov,
     }
 
     mov_write_mvhd_tag(pb, mov);
-    //mov_write_iods_tag(pb, mov);
     for (i=0; i<mov->nb_streams; i++) {
         if(mov->tracks[i].entry > 0) {
             mov_write_trak_tag(pb, &(mov->tracks[i]), i < s->nb_streams ? 
s->streams[i] : NULL);
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index af85014..61d37cd 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -161,41 +161,6 @@ static int find_next_start_code(AVIOContext *pb, int 
*size_ptr,
     return val;
 }
 
-#if 0 /* unused, remove? */
-/* XXX: optimize */
-static int find_prev_start_code(AVIOContext *pb, int *size_ptr)
-{
-    int64_t pos, pos_start;
-    int max_size, start_code;
-
-    max_size = *size_ptr;
-    pos_start = avio_tell(pb);
-
-    /* in order to go faster, we fill the buffer */
-    pos = pos_start - 16386;
-    if (pos < 0)
-        pos = 0;
-    avio_seek(pb, pos, SEEK_SET);
-    avio_r8(pb);
-
-    pos = pos_start;
-    for(;;) {
-        pos--;
-        if (pos < 0 || (pos_start - pos) >= max_size) {
-            start_code = -1;
-            goto the_end;
-        }
-        avio_seek(pb, pos, SEEK_SET);
-        start_code = avio_rb32(pb);
-        if ((start_code & 0xffffff00) == 0x100)
-            break;
-    }
- the_end:
-    *size_ptr = pos_start - pos;
-    return start_code;
-}
-#endif
-
 /**
  * Extract stream types from a program stream map
  * According to ISO/IEC 13818-1 ('MPEG-2 Systems') table 2-35
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 3d71d9d..e081dd5 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -526,92 +526,6 @@ static int get_vcd_padding_size(AVFormatContext *ctx, 
int64_t pts)
 }
 
 
-#if 0 /* unused, remove? */
-/* return the exact available payload size for the next packet for
-   stream 'stream_index'. 'pts' and 'dts' are only used to know if
-   timestamps are needed in the packet header. */
-static int get_packet_payload_size(AVFormatContext *ctx, int stream_index,
-                                   int64_t pts, int64_t dts)
-{
-    MpegMuxContext *s = ctx->priv_data;
-    int buf_index;
-    StreamInfo *stream;
-
-    stream = ctx->streams[stream_index]->priv_data;
-
-    buf_index = 0;
-    if (((s->packet_number % s->pack_header_freq) == 0)) {
-        /* pack header size */
-        if (s->is_mpeg2)
-            buf_index += 14;
-        else
-            buf_index += 12;
-
-        if (s->is_vcd) {
-            /* there is exactly one system header for each stream in a VCD 
MPEG,
-               One in the very first video packet and one in the very first
-               audio packet (see VCD standard p. IV-7 and IV-8).*/
-
-            if (stream->packet_number==0)
-                /* The system headers refer only to the stream they occur in,
-                   so they have a constant size.*/
-                buf_index += 15;
-
-        } else {
-            if ((s->packet_number % s->system_header_freq) == 0)
-                buf_index += s->system_header_size;
-        }
-    }
-
-    if ((s->is_vcd && stream->packet_number==0)
-        || (s->is_svcd && s->packet_number==0))
-        /* the first pack of each stream contains only the pack header,
-           the system header and some padding (see VCD standard p. IV-6)
-           Add the padding size, so that the actual payload becomes 0.*/
-        buf_index += s->packet_size - buf_index;
-    else {
-        /* packet header size */
-        buf_index += 6;
-        if (s->is_mpeg2) {
-            buf_index += 3;
-            if (stream->packet_number==0)
-                buf_index += 3; /* PES extension */
-            buf_index += 1;    /* obligatory stuffing byte */
-        }
-        if (pts != AV_NOPTS_VALUE) {
-            if (dts != pts)
-                buf_index += 5 + 5;
-            else
-                buf_index += 5;
-
-        } else {
-            if (!s->is_mpeg2)
-                buf_index++;
-        }
-
-        if (stream->id < 0xc0) {
-            /* AC-3/LPCM private data header */
-            buf_index += 4;
-            if (stream->id >= 0xa0) {
-                int n;
-                buf_index += 3;
-                /* NOTE: we round the payload size to an integer number of
-                   LPCM samples */
-                n = (s->packet_size - buf_index) % stream->lpcm_align;
-                if (n)
-                    buf_index += (stream->lpcm_align - n);
-            }
-        }
-
-        if (s->is_vcd && (stream->id & 0xe0) == AUDIO_ID)
-            /* The VCD standard demands that 20 zero bytes follow
-               each audio packet (see standard p. IV-8).*/
-            buf_index+=20;
-    }
-    return s->packet_size - buf_index;
-}
-#endif
-
 /* Write an MPEG padding packet header. */
 static void put_padding_packet(AVFormatContext *ctx, AVIOContext *pb,int 
packet_bytes)
 {
@@ -969,28 +883,6 @@ static void put_vcd_padding_sector(AVFormatContext *ctx)
     s->packet_number++;
 }
 
-#if 0 /* unused, remove? */
-static int64_t get_vcd_scr(AVFormatContext *ctx,int stream_index,int64_t pts)
-{
-    MpegMuxContext *s = ctx->priv_data;
-    int64_t scr;
-
-        /* Since the data delivery rate is constant, SCR is computed
-           using the formula C + i * 1200 where C is the start constant
-           and i is the pack index.
-           It is recommended that SCR 0 is at the beginning of the VCD front
-           margin (a sequence of empty Form 2 sectors on the CD).
-           It is recommended that the front margin is 30 sectors long, so
-           we use C = 30*1200 = 36000
-           (Note that even if the front margin is not 30 sectors the file
-           will still be correct according to the standard. It just won't have
-           the "recommended" value).*/
-        scr = 36000 + s->packet_number * 1200;
-
-    return scr;
-}
-#endif
-
 static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){
 //    MpegMuxContext *s = ctx->priv_data;
     int i;
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 43305a3..d0a9d80 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -220,22 +220,6 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, 
uint16_t seq)
     return 1;
 }
 
-#if 0
-/**
-* This function is currently unused; without a valid local ntp time, I don't 
see how we could calculate the
-* difference between the arrival and sent timestamp.  As a result, the jitter 
and transit statistics values
-* never change.  I left this in in case someone else can see a way. (rdm)
-*/
-static void rtcp_update_jitter(RTPStatistics *s, uint32_t sent_timestamp, 
uint32_t arrival_timestamp)
-{
-    uint32_t transit= arrival_timestamp - sent_timestamp;
-    int d;
-    s->transit= transit;
-    d= FFABS(transit - s->transit);
-    s->jitter += d - ((s->jitter + 8)>>4);
-}
-#endif
-
 int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
 {
     AVIOContext *pb;
-- 
1.7.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to