History

kill a bunch of compiler warnings

Originally committed as revision 4522 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård committed 21 years ago

Commit bf4e3bd1 parent 72ce05315 files · +26 −31Browse files

Unified · Split

15 files
  1. libavcodec/dsputil.c +4 −2
  2. libavcodec/h264.c +10 −10
  3. libavcodec/i386/vp3dsp_sse2.c +0 −1
  4. libavcodec/indeo2.c +0 −1
  5. libavcodec/motion_est.c +1 −2
  6. libavcodec/mpeg12.c +0 −1
  7. libavcodec/mpegvideo.c +1 −1
  8. libavcodec/ulti.c +1 −1
  9. libavcodec/vp3.c +0 −1
  10. libavcodec/vp3dsp.c +1 −1
  11. libavformat/avidec.c +0 −2
  12. libavformat/nsvdec.c +5 −5
  13. libavformat/utils.c +1 −1
  14. libavformat/yuv4mpeg.c +1 −1
  15. libavutil/intfloat_readwrite.c +1 −1
libavcodec/dsputil.c+4−2
@@ -2988,7 +2988,8 @@ static int pix_abs8_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, · 2987 unmodified lines
2988 return s;2988 return s;
2989}2989}
2990 2990
2991static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){2991static int nsse16_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h){
2992 MpegEncContext *c = v;
2992 int score1=0;2993 int score1=0;
2993 int score2=0;2994 int score2=0;
2994 int x,y;2995 int x,y;
@@ -3013,7 +3014,8 @@ static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int · 18 unmodified lines
3013 else return score1 + ABS(score2)*8;3014 else return score1 + ABS(score2)*8;
3014}3015}
3015 3016
3016static int nsse8_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){3017static int nsse8_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h){
3018 MpegEncContext *c = v;
3017 int score1=0;3019 int score1=0;
3018 int score2=0;3020 int score2=0;
3019 int x,y;3021 int x,y;
libavcodec/h264.c+10−10
@@ -1277,9 +1277,9 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 1276 unmodified lines
1277 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref[0], 1);1277 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref[0], 1);
1278 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, ref[1], 1);1278 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, ref[1], 1);
1279 if(!IS_INTRA(mb_type_col) 1279 if(!IS_INTRA(mb_type_col)
1280 && ( l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 11280 && ( (l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 1)
1281 || l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 11281 || (l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 1
1282 && (h->x264_build>33 || !h->x264_build))){1282 && (h->x264_build>33 || !h->x264_build)))){
1283 if(ref[0] > 0)1283 if(ref[0] > 0)
1284 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4);1284 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4);
1285 else1285 else
@@ -1308,8 +1308,8 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 22 unmodified lines
1308 1308
1309 /* col_zero_flag */1309 /* col_zero_flag */
1310 if(!IS_INTRA(mb_type_col) && ( l1ref0[x8 + y8*h->b8_stride] == 0 1310 if(!IS_INTRA(mb_type_col) && ( l1ref0[x8 + y8*h->b8_stride] == 0
1311 || l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0 1311 || (l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0
1312 && (h->x264_build>33 || !h->x264_build))){1312 && (h->x264_build>33 || !h->x264_build)))){
1313 const int16_t (*l1mv)[2]= l1ref0[x8 + y8*h->b8_stride] == 0 ? l1mv0 : l1mv1;1313 const int16_t (*l1mv)[2]= l1ref0[x8 + y8*h->b8_stride] == 0 ? l1mv0 : l1mv1;
1314 for(i4=0; i4<4; i4++){1314 for(i4=0; i4<4; i4++){
1315 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*h->b_stride];1315 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*h->b_stride];
@@ -1347,7 +1347,7 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 31 unmodified lines
1347 const int x8 = i8&1;1347 const int x8 = i8&1;
1348 const int y8 = i8>>1;1348 const int y8 = i8>>1;
1349 int ref0, dist_scale_factor;1349 int ref0, dist_scale_factor;
1350 int16_t (*l1mv)[2]= l1mv0;1350 const int16_t (*l1mv)[2]= l1mv0;
1351 1351
1352 if(is_b8x8 && !IS_DIRECT(h->sub_mb_type[i8]))1352 if(is_b8x8 && !IS_DIRECT(h->sub_mb_type[i8]))
1353 continue;1353 continue;
@@ -2327,7 +2327,7 @@ static void pred8x8_plane_c(uint8_t *src, int stride){ · 973 unmodified lines
2327 const int l0 = ((has_topleft ? SRC(-1,-1) : SRC(-1,0)) \2327 const int l0 = ((has_topleft ? SRC(-1,-1) : SRC(-1,0)) \
2328 + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \2328 + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \
2329 PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \2329 PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \
2330 const int l7 = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 22330 const int l7 attribute_unused = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2
2331 2331
2332#define PT(x) \2332#define PT(x) \
2333 const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2;2333 const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2;
@@ -2335,7 +2335,7 @@ static void pred8x8_plane_c(uint8_t *src, int stride){ · 1 unmodified line
2335 const int t0 = ((has_topleft ? SRC(-1,-1) : SRC(0,-1)) \2335 const int t0 = ((has_topleft ? SRC(-1,-1) : SRC(0,-1)) \
2336 + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \2336 + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \
2337 PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \2337 PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \
2338 const int t7 = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \2338 const int t7 attribute_unused = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \
2339 + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 22339 + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 2
2340 2340
2341#define PTR(x) \2341#define PTR(x) \
@@ -6188,7 +6188,7 @@ static void filter_mb_edgev( H264Context *h, uint8_t *pix, int stride, int bS[4] · 3846 unmodified lines
6188 }6188 }
6189}6189}
6190static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {6190static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
6191 int i, d;6191 int i;
6192 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );6192 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
6193 const int alpha = alpha_table[index_a];6193 const int alpha = alpha_table[index_a];
6194 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];6194 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
@@ -6418,7 +6418,7 @@ static void filter_mb_edgeh( H264Context *h, uint8_t *pix, int stride, int bS[4] · 223 unmodified lines
6418}6418}
6419 6419
6420static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {6420static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
6421 int i, d;6421 int i;
6422 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );6422 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
6423 const int alpha = alpha_table[index_a];6423 const int alpha = alpha_table[index_a];
6424 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];6424 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
libavcodec/i386/vp3dsp_sse2.c+0−1
@@ -799,7 +799,6 @@ static const unsigned short __align16 SSE2_idct_data[7 * 8] = · 798 unmodified lines
799void ff_vp3_idct_sse2(int16_t *input_data)799void ff_vp3_idct_sse2(int16_t *input_data)
800{800{
801 unsigned char *input_bytes = (unsigned char *)input_data;801 unsigned char *input_bytes = (unsigned char *)input_data;
802 unsigned char *dequant_const_bytes = (unsigned char *)SSE2_dequant_const;
803 unsigned char *output_data_bytes = (unsigned char *)input_data;802 unsigned char *output_data_bytes = (unsigned char *)input_data;
804 unsigned char *idct_data_bytes = (unsigned char *)SSE2_idct_data;803 unsigned char *idct_data_bytes = (unsigned char *)SSE2_idct_data;
805 unsigned char *Eight = (unsigned char *)eight_data;804 unsigned char *Eight = (unsigned char *)eight_data;
libavcodec/indeo2.c+0−1
@@ -141,7 +141,6 @@ static int ir2_decode_frame(AVCodecContext *avctx, · 140 unmodified lines
141 AVFrame *picture = data;141 AVFrame *picture = data;
142 AVFrame * const p= (AVFrame*)&s->picture;142 AVFrame * const p= (AVFrame*)&s->picture;
143 int start;143 int start;
144 int i;
145 144
146 if(p->data[0])145 if(p->data[0])
147 avctx->release_buffer(avctx, p);146 avctx->release_buffer(avctx, p);
libavcodec/motion_est.c+1−2
@@ -175,7 +175,7 @@ static always_inline int cmp(MpegEncContext *s, const int x, const int y, const · 174 unmodified lines
175 }else175 }else
176 d= 256*256*256*32;176 d= 256*256*256*32;
177 }else{177 }else{
178 int uvdxy;178 int uvdxy; /* no, it might not be used uninitialized */
179 if(dxy){179 if(dxy){
180 if(qpel){180 if(qpel){
181 c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h)181 c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h)
@@ -1563,7 +1563,6 @@ static inline int check_bidir_mv(MpegEncContext * s, · 1381 unmodified lines
1563 MotionEstContext * const c= &s->me;1563 MotionEstContext * const c= &s->me;
1564 uint8_t * const mv_penalty= c->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame1564 uint8_t * const mv_penalty= c->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame
1565 int stride= c->stride;1565 int stride= c->stride;
1566 int uvstride= c->uvstride;
1567 uint8_t *dest_y = c->scratchpad;1566 uint8_t *dest_y = c->scratchpad;
1568 uint8_t *ptr;1567 uint8_t *ptr;
1569 int dxy;1568 int dxy;
libavcodec/mpeg12.c+0−1
@@ -1810,7 +1810,6 @@ static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, · 1809 unmodified lines
1810 RLTable *rl = &rl_mpeg1;1810 RLTable *rl = &rl_mpeg1;
1811 uint8_t * const scantable= s->intra_scantable.permutated;1811 uint8_t * const scantable= s->intra_scantable.permutated;
1812 const int qscale= s->qscale;1812 const int qscale= s->qscale;
1813 int v;
1814 OPEN_READER(re, &s->gb);1813 OPEN_READER(re, &s->gb);
1815 i = -1;1814 i = -1;
1816 1815
libavcodec/mpegvideo.c+1−1
@@ -887,7 +887,7 @@ void MPV_common_end(MpegEncContext *s) · 886 unmodified lines
887int MPV_encode_init(AVCodecContext *avctx)887int MPV_encode_init(AVCodecContext *avctx)
888{888{
889 MpegEncContext *s = avctx->priv_data;889 MpegEncContext *s = avctx->priv_data;
890 int i, dummy;890 int i;
891 int chroma_h_shift, chroma_v_shift;891 int chroma_h_shift, chroma_v_shift;
892 892
893 MPV_encode_defaults(s);893 MPV_encode_defaults(s);
libavcodec/ulti.c+1−1
@@ -37,7 +37,7 @@ typedef struct UltimotionDecodeContext { · 36 unmodified lines
37 AVCodecContext *avctx;37 AVCodecContext *avctx;
38 int width, height, blocks;38 int width, height, blocks;
39 AVFrame frame;39 AVFrame frame;
40 uint8_t *ulti_codebook;40 const uint8_t *ulti_codebook;
41} UltimotionDecodeContext;41} UltimotionDecodeContext;
42 42
43static int ulti_decode_init(AVCodecContext *avctx)43static int ulti_decode_init(AVCodecContext *avctx)
libavcodec/vp3.c+0−1
@@ -1725,7 +1725,6 @@ static void render_slice(Vp3DecodeContext *s, int slice) · 1724 unmodified lines
1725 int plane_height;1725 int plane_height;
1726 int slice_height;1726 int slice_height;
1727 int current_macroblock_entry = slice * s->macroblock_width * 6;1727 int current_macroblock_entry = slice * s->macroblock_width * 6;
1728 int *bounding_values= s->bounding_values_array+127;
1729 int fragment_width;1728 int fragment_width;
1730 1729
1731 if (slice >= s->macroblock_height)1730 if (slice >= s->macroblock_height)
libavcodec/vp3dsp.c+1−1
@@ -45,7 +45,7 @@ static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int typ · 44 unmodified lines
45 int _Ed, _Gd, _Add, _Bdd, _Fd, _Hd;45 int _Ed, _Gd, _Add, _Bdd, _Fd, _Hd;
46 int t1, t2;46 int t1, t2;
47 47
48 int i, j;48 int i;
49 49
50 /* Inverse DCT on the rows now */50 /* Inverse DCT on the rows now */
51 for (i = 0; i < 8; i++) {51 for (i = 0; i < 8; i++) {
libavformat/avidec.c+0−2
@@ -644,14 +644,12 @@ static int avi_read_idx1(AVFormatContext *s, int size) · 643 unmodified lines
644}644}
645 645
646static int guess_ni_flag(AVFormatContext *s){646static int guess_ni_flag(AVFormatContext *s){
647 AVIContext *avi = s->priv_data;
648 int i;647 int i;
649 int64_t last_start=0;648 int64_t last_start=0;
650 int64_t first_end= INT64_MAX;649 int64_t first_end= INT64_MAX;
651 650
652 for(i=0; i<s->nb_streams; i++){651 for(i=0; i<s->nb_streams; i++){
653 AVStream *st = s->streams[i];652 AVStream *st = s->streams[i];
654 AVIStream *ast = st->priv_data;
655 int n= st->nb_index_entries;653 int n= st->nb_index_entries;
656 654
657 if(n <= 0)655 if(n <= 0)
libavformat/nsvdec.c+5−5
@@ -297,8 +297,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap) · 296 unmodified lines
297 297
298 //s->file_size = (uint32_t)get_le32(pb);298 //s->file_size = (uint32_t)get_le32(pb);
299 file_size = (uint32_t)get_le32(pb);299 file_size = (uint32_t)get_le32(pb);
300 PRINT(("NSV NSVf chunk_size %ld\n", size));300 PRINT(("NSV NSVf chunk_size %u\n", size));
301 PRINT(("NSV NSVf file_size %Ld\n", file_size));301 PRINT(("NSV NSVf file_size %u\n", file_size));
302 302
303 nsv->duration = duration = get_le32(pb); /* in ms */303 nsv->duration = duration = get_le32(pb); /* in ms */
304 PRINT(("NSV NSVf duration %Ld ms\n", duration));304 PRINT(("NSV NSVf duration %Ld ms\n", duration));
@@ -561,7 +561,7 @@ null_chunk_retry: · 256 unmodified lines
561 asize = get_le16(pb);561 asize = get_le16(pb);
562 vsize = (vsize << 4) | (auxcount >> 4);562 vsize = (vsize << 4) | (auxcount >> 4);
563 auxcount &= 0x0f;563 auxcount &= 0x0f;
564 PRINT(("NSV CHUNK %d aux, %ld bytes video, %d bytes audio\n", auxcount, vsize, asize));564 PRINT(("NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize));
565 /* skip aux stuff */565 /* skip aux stuff */
566 for (i = 0; i < auxcount; i++) {566 for (i = 0; i < auxcount; i++) {
567 auxsize = get_le16(pb);567 auxsize = get_le16(pb);
@@ -614,7 +614,7 @@ null_chunk_retry: · 46 unmodified lines
614 channels = get_byte(pb);614 channels = get_byte(pb);
615 samplerate = get_le16(pb);615 samplerate = get_le16(pb);
616 asize-=4;616 asize-=4;
617 PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %ld\n", bps, channels, samplerate));617 PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate));
618 if (fill_header) {618 if (fill_header) {
619 st[NSV_ST_AUDIO]->need_parsing = 0; /* we know everything */619 st[NSV_ST_AUDIO]->need_parsing = 0; /* we know everything */
620 if (bps != 16) {620 if (bps != 16) {
@@ -629,7 +629,7 @@ null_chunk_retry: · 8 unmodified lines
629 st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;629 st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;
630 av_set_pts_info(st[NSV_ST_AUDIO], 64, 1, 630 av_set_pts_info(st[NSV_ST_AUDIO], 64, 1,
631 st[NSV_ST_AUDIO]->codec->sample_rate);631 st[NSV_ST_AUDIO]->codec->sample_rate);
632 PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %ld\n", bps, channels, samplerate));632 PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate));
633 }633 }
634 }634 }
635 av_get_packet(pb, pkt, asize);635 av_get_packet(pb, pkt, asize);
libavformat/utils.c+1−1
@@ -1569,7 +1569,7 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic) · 1568 unmodified lines
1569 AVPacket pkt1, *pkt = &pkt1;1569 AVPacket pkt1, *pkt = &pkt1;
1570 AVStream *st;1570 AVStream *st;
1571 int read_size, i, ret;1571 int read_size, i, ret;
1572 int64_t start_time, end_time, end_time1;1572 int64_t end_time;
1573 int64_t filesize, offset, duration;1573 int64_t filesize, offset, duration;
1574 1574
1575 /* free previous packet */1575 /* free previous packet */
libavformat/yuv4mpeg.c+1−1
@@ -336,7 +336,7 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt) · 335 unmodified lines
336{336{
337 int i;337 int i;
338 char header[MAX_FRAME_HEADER+1];338 char header[MAX_FRAME_HEADER+1];
339 int packet_size, ret, width, height;339 int packet_size, width, height;
340 AVStream *st = s->streams[0];340 AVStream *st = s->streams[0];
341 341
342 for (i=0; i<MAX_FRAME_HEADER; i++) {342 for (i=0; i<MAX_FRAME_HEADER; i++) {
libavutil/intfloat_readwrite.c+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
28double av_int2dbl(int64_t v){28double av_int2dbl(int64_t v){
29 if(v+v > 0xFFELLU<<52)29 if(v+v > 0xFFELLU<<52)
30 return 0.0/0.0;30 return 0.0/0.0;
31 return ldexp(((v&(1LL<<52)-1) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);31 return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
32}32}
33 33
34float av_int2flt(int32_t v){34float av_int2flt(int32_t v){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t