Mercurial > libavcodec.hg
comparison mpeg12.c @ 3776:1843a85123b7 libavcodec
fix some signedness warnings
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:47:39 +0000 |
parents | d60dc0a7dee6 |
children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
3775:8e1ed8300165 | 3776:1843a85123b7 |
---|---|
2693 int mb_y= s->start_mb_y; | 2693 int mb_y= s->start_mb_y; |
2694 | 2694 |
2695 s->error_count= 3*(s->end_mb_y - s->start_mb_y)*s->mb_width; | 2695 s->error_count= 3*(s->end_mb_y - s->start_mb_y)*s->mb_width; |
2696 | 2696 |
2697 for(;;){ | 2697 for(;;){ |
2698 int start_code, ret; | 2698 uint32_t start_code; |
2699 int ret; | |
2699 | 2700 |
2700 ret= mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf); | 2701 ret= mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf); |
2701 emms_c(); | 2702 emms_c(); |
2702 //av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", | 2703 //av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", |
2703 //ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count); | 2704 //ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count); |
3031 uint8_t *buf, int buf_size) | 3032 uint8_t *buf, int buf_size) |
3032 { | 3033 { |
3033 Mpeg1Context *s = avctx->priv_data; | 3034 Mpeg1Context *s = avctx->priv_data; |
3034 const uint8_t *buf_end; | 3035 const uint8_t *buf_end; |
3035 const uint8_t *buf_ptr; | 3036 const uint8_t *buf_ptr; |
3036 int ret, start_code, input_size; | 3037 uint32_t start_code; |
3038 int ret, input_size; | |
3037 AVFrame *picture = data; | 3039 AVFrame *picture = data; |
3038 MpegEncContext *s2 = &s->mpeg_enc_ctx; | 3040 MpegEncContext *s2 = &s->mpeg_enc_ctx; |
3039 dprintf("fill_buffer\n"); | 3041 dprintf("fill_buffer\n"); |
3040 | 3042 |
3041 if (buf_size == 0) { | 3043 if (buf_size == 0) { |
3078 | 3080 |
3079 for(;;) { | 3081 for(;;) { |
3080 /* find start next code */ | 3082 /* find start next code */ |
3081 start_code = -1; | 3083 start_code = -1; |
3082 buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code); | 3084 buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code); |
3083 if (start_code < 0){ | 3085 if (start_code > 0x1ff){ |
3084 if(s2->pict_type != B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){ | 3086 if(s2->pict_type != B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){ |
3085 if(avctx->thread_count > 1){ | 3087 if(avctx->thread_count > 1){ |
3086 int i; | 3088 int i; |
3087 | 3089 |
3088 avctx->execute(avctx, slice_decode_thread, (void**)&(s2->thread_context[0]), NULL, s->slice_count); | 3090 avctx->execute(avctx, slice_decode_thread, (void**)&(s2->thread_context[0]), NULL, s->slice_count); |