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