summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-11-16 15:33:49 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-11-16 15:33:49 +0000
commitec1091eb86402f83104124775fc3eb442f1369de (patch)
treeeb8710ad8f8f70c106228baecfe29418217645e1
parentfc05268e42be632cc4ab1c00b5918e2158317c10 (diff)
downloadxine-lib-ec1091eb86402f83104124775fc3eb442f1369de.tar.gz
xine-lib-ec1091eb86402f83104124775fc3eb442f1369de.tar.bz2
fix some more compiler warnings about functions xine does not use
(mostly encoder stuff) CVS patchset: 5752 CVS date: 2003/11/16 15:33:49
-rw-r--r--src/libffmpeg/libavcodec/h263.c4
-rw-r--r--src/libffmpeg/libavcodec/h264.c13
-rw-r--r--src/libffmpeg/libavcodec/huffyuv.c14
-rw-r--r--src/libffmpeg/libavcodec/msmpeg4.c6
-rw-r--r--src/libffmpeg/libavcodec/svq1.c2
-rw-r--r--src/libffmpeg/libavcodec/utils.c2
-rw-r--r--src/libffmpeg/libavcodec/vcr1.c2
-rw-r--r--src/libffmpeg/libavcodec/wmv2.c5
8 files changed, 44 insertions, 4 deletions
diff --git a/src/libffmpeg/libavcodec/h263.c b/src/libffmpeg/libavcodec/h263.c
index 018300aa6..1c18ea743 100644
--- a/src/libffmpeg/libavcodec/h263.c
+++ b/src/libffmpeg/libavcodec/h263.c
@@ -67,8 +67,8 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra, int rvlc);
-static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr);
#ifdef CONFIG_ENCODERS
+static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr);
static void mpeg4_encode_visual_object_header(MpegEncContext * s);
static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number);
#endif //CONFIG_ENCODERS
@@ -1197,7 +1197,6 @@ void h263_encode_mb(MpegEncContext * s,
}
}
}
-#endif
static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr)
{
@@ -1243,6 +1242,7 @@ static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr)
*dc_val_ptr = &dc_val[x + y * wrap];
return pred_dc;
}
+#endif
static void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n)
{
diff --git a/src/libffmpeg/libavcodec/h264.c b/src/libffmpeg/libavcodec/h264.c
index 26aeb8296..96f0925d7 100644
--- a/src/libffmpeg/libavcodec/h264.c
+++ b/src/libffmpeg/libavcodec/h264.c
@@ -1001,6 +1001,8 @@ static uint8_t *decode_nal(H264Context *h, uint8_t *src, int *dst_length, int *c
return dst;
}
+#ifdef CONFIG_ENCODERS
+
/**
* @param src the data which should be escaped
* @param dst the target buffer, dst+1 == src is allowed as a special case
@@ -1074,6 +1076,8 @@ static void encode_rbsp_trailing(PutBitContext *pb){
if(length) put_bits(pb, length, 0);
}
+#endif
+
/**
* identifies the exact end of the bitstream
* @return the length of the trailing, or 0 if damaged
@@ -1132,6 +1136,7 @@ static void h264_luma_dc_dequant_idct_c(DCTELEM *block, int qp){
}
}
+#if 0
/**
* dct tranforms the 16 dc values.
* @param qp quantization parameter ??? FIXME
@@ -1169,6 +1174,8 @@ static void h264_luma_dc_dct_c(DCTELEM *block/*, int qp*/){
block[stride*10+offset]= (z0 - z3)>>1;
}
}
+#endif
+
#undef xStride
#undef stride
@@ -1194,6 +1201,7 @@ static void chroma_dc_dequant_idct_c(DCTELEM *block, int qp){
block[stride*1 + xStride*1]= ((e-b)*qmul + 0)>>1;
}
+#if 0
static void chroma_dc_dct_c(DCTELEM *block){
const int stride= 16*2;
const int xStride= 16;
@@ -1214,6 +1222,7 @@ static void chroma_dc_dct_c(DCTELEM *block){
block[stride*1 + xStride*0]= (a-c);
block[stride*1 + xStride*1]= (e-b);
}
+#endif
/**
* gets the chroma qp.
@@ -1283,6 +1292,7 @@ static void h264_add_idct_c(uint8_t *dst, DCTELEM *block, int stride){
#endif
}
+#if 0
static void h264_diff_dct_c(DCTELEM *block, uint8_t *src1, uint8_t *src2, int stride){
int i;
//FIXME try int temp instead of block
@@ -1315,6 +1325,7 @@ static void h264_diff_dct_c(DCTELEM *block, uint8_t *src1, uint8_t *src2, int st
block[3*4 + i]= z3 - 2*z2;
}
}
+#endif
//FIXME need to check that this doesnt overflow signed 32 bit for low qp, iam not sure, its very close
//FIXME check that gcc inlines this (and optimizes intra & seperate_dc stuff away)
@@ -2332,9 +2343,11 @@ static void hl_decode_mb(H264Context *h){
}
}
+#if 0
static void decode_mb_cabac(H264Context *h){
// MpegEncContext * const s = &h->s;
}
+#endif
/**
* fills the default_ref_list.
diff --git a/src/libffmpeg/libavcodec/huffyuv.c b/src/libffmpeg/libavcodec/huffyuv.c
index e5e492b9b..7db748936 100644
--- a/src/libffmpeg/libavcodec/huffyuv.c
+++ b/src/libffmpeg/libavcodec/huffyuv.c
@@ -227,6 +227,7 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
return 0;
}
+#ifdef CONFIG_ENCODERS
static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
uint64_t counts[2*size];
int up[2*size];
@@ -282,6 +283,7 @@ static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
if(i==size) break;
}
}
+#endif
static int read_huffman_tables(HYuvContext *s, uint8_t *src, int length){
GetBitContext gb;
@@ -433,6 +435,8 @@ s->bgr32=1;
return 0;
}
+#ifdef CONFIG_ENCODERS
+
static void store_table(HYuvContext *s, uint8_t *len){
int i;
int index= s->avctx->extradata_size;
@@ -553,6 +557,8 @@ static int encode_init(AVCodecContext *avctx)
return 0;
}
+#endif
+
static void decode_422_bitstream(HYuvContext *s, int count){
int i;
@@ -577,6 +583,8 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
}
}
+#ifdef CONFIG_ENCODERS
+
static void encode_422_bitstream(HYuvContext *s, int count){
int i;
@@ -615,6 +623,8 @@ static void encode_gray_bitstream(HYuvContext *s, int count){
}
}
+#endif
+
static void decode_bgr_bitstream(HYuvContext *s, int count){
int i;
@@ -926,6 +936,8 @@ static int decode_end(AVCodecContext *avctx)
return 0;
}
+#ifdef CONFIG_ENCODERS
+
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
HYuvContext *s = avctx->priv_data;
AVFrame *pict = data;
@@ -1087,6 +1099,8 @@ static int encode_end(AVCodecContext *avctx)
return 0;
}
+#endif
+
static const AVOption huffyuv_options[] =
{
AVOPTION_CODEC_INT("prediction_method", "prediction_method", prediction_method, 0, 2, 0),
diff --git a/src/libffmpeg/libavcodec/msmpeg4.c b/src/libffmpeg/libavcodec/msmpeg4.c
index d62c572cb..dd4ce862a 100644
--- a/src/libffmpeg/libavcodec/msmpeg4.c
+++ b/src/libffmpeg/libavcodec/msmpeg4.c
@@ -64,10 +64,10 @@ static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static int msmpeg4_decode_motion(MpegEncContext * s,
int *mx_ptr, int *my_ptr);
-static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
static void init_h263_dc_for_msmpeg4(void);
static inline void msmpeg4_memsetw(short *tab, int val, int n);
#ifdef CONFIG_ENCODERS
+static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
#endif //CONFIG_ENCODERS
static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
@@ -655,6 +655,7 @@ void msmpeg4_encode_mb(MpegEncContext * s,
#endif //CONFIG_ENCODERS
+#if 0
/* old ffmpeg msmpeg4v3 mode */
static void ff_old_msmpeg4_dc_scale(MpegEncContext * s)
{
@@ -669,6 +670,7 @@ static void ff_old_msmpeg4_dc_scale(MpegEncContext * s)
s->c_dc_scale = (s->qscale + 13)>>1;
}
}
+#endif
static inline int msmpeg4v1_pred_dc(MpegEncContext * s, int n,
int32_t **dc_val_ptr)
@@ -1427,6 +1429,7 @@ static inline void msmpeg4_memsetw(short *tab, int val, int n)
tab[i] = val;
}
+#ifdef CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
{
int range, bit_size, sign, code, bits;
@@ -1459,6 +1462,7 @@ static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
}
}
}
+#endif
/* this is identical to h263 except that its range is multiplied by 2 */
static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
diff --git a/src/libffmpeg/libavcodec/svq1.c b/src/libffmpeg/libavcodec/svq1.c
index bce799639..5aa7a876e 100644
--- a/src/libffmpeg/libavcodec/svq1.c
+++ b/src/libffmpeg/libavcodec/svq1.c
@@ -556,6 +556,7 @@ static uint16_t svq1_packet_checksum (uint8_t *data, int length, int value) {
return value;
}
+#if 0
static uint16_t svq1_component_checksum (uint16_t *pixels, int pitch,
int width, int height, int value) {
int x, y;
@@ -570,6 +571,7 @@ static uint16_t svq1_component_checksum (uint16_t *pixels, int pitch,
return value;
}
+#endif
static void svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) {
uint8_t seed;
diff --git a/src/libffmpeg/libavcodec/utils.c b/src/libffmpeg/libavcodec/utils.c
index 2334de8e6..2ba3e90c3 100644
--- a/src/libffmpeg/libavcodec/utils.c
+++ b/src/libffmpeg/libavcodec/utils.c
@@ -491,6 +491,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name)
return NULL;
}
+#if 0
static AVCodec *avcodec_find(enum CodecID id)
{
AVCodec *p;
@@ -502,6 +503,7 @@ static AVCodec *avcodec_find(enum CodecID id)
}
return NULL;
}
+#endif
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
{
diff --git a/src/libffmpeg/libavcodec/vcr1.c b/src/libffmpeg/libavcodec/vcr1.c
index 4905c703f..de1688443 100644
--- a/src/libffmpeg/libavcodec/vcr1.c
+++ b/src/libffmpeg/libavcodec/vcr1.c
@@ -158,12 +158,14 @@ static int decode_init(AVCodecContext *avctx){
return 0;
}
+#ifdef CONFIG_ENCODERS
static int encode_init(AVCodecContext *avctx){
common_init(avctx);
return 0;
}
+#endif
static int decode_end(AVCodecContext *avctx){
diff --git a/src/libffmpeg/libavcodec/wmv2.c b/src/libffmpeg/libavcodec/wmv2.c
index f68664820..b403a6b17 100644
--- a/src/libffmpeg/libavcodec/wmv2.c
+++ b/src/libffmpeg/libavcodec/wmv2.c
@@ -59,6 +59,8 @@ static void wmv2_common_init(Wmv2Context * w){
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], wmv2_scantableB);
}
+#ifdef CONFIG_ENCODERS
+
static int encode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
PutBitContext pb;
@@ -84,7 +86,6 @@ static int encode_ext_header(Wmv2Context *w){
return 0;
}
-#ifdef CONFIG_ENCODERS
static int wmv2_encode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
@@ -478,8 +479,10 @@ s->picture_number++; //FIXME ?
return 0;
}
+#if 0
static void ff_wmv2_decode_init(MpegEncContext *s){
}
+#endif
static inline int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr){
MpegEncContext * const s= &w->s;