comparison rv10.c @ 6250:a56227a0b738 libavcodec

const
author michael
date Fri, 01 Feb 2008 14:08:35 +0000
parents ad72b1e8934a
children 493dc59d469a
comparison
equal deleted inserted replaced
6249:f9d2ca73e3b6 6250:a56227a0b738
595 MPV_common_end(s); 595 MPV_common_end(s);
596 return 0; 596 return 0;
597 } 597 }
598 598
599 static int rv10_decode_packet(AVCodecContext *avctx, 599 static int rv10_decode_packet(AVCodecContext *avctx,
600 uint8_t *buf, int buf_size) 600 const uint8_t *buf, int buf_size)
601 { 601 {
602 MpegEncContext *s = avctx->priv_data; 602 MpegEncContext *s = avctx->priv_data;
603 int mb_count, mb_pos, left, start_mb_x; 603 int mb_count, mb_pos, left, start_mb_x;
604 604
605 init_get_bits(&s->gb, buf, buf_size*8); 605 init_get_bits(&s->gb, buf, buf_size*8);
709 ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); 709 ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END);
710 710
711 return buf_size; 711 return buf_size;
712 } 712 }
713 713
714 static int get_slice_offset(AVCodecContext *avctx, uint8_t *buf, int n) 714 static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)
715 { 715 {
716 if(avctx->slice_count) return avctx->slice_offset[n]; 716 if(avctx->slice_count) return avctx->slice_offset[n];
717 else return AV_RL32(buf + n*8); 717 else return AV_RL32(buf + n*8);
718 } 718 }
719 719
720 static int rv10_decode_frame(AVCodecContext *avctx, 720 static int rv10_decode_frame(AVCodecContext *avctx,
721 void *data, int *data_size, 721 void *data, int *data_size,
722 uint8_t *buf, int buf_size) 722 const uint8_t *buf, int buf_size)
723 { 723 {
724 MpegEncContext *s = avctx->priv_data; 724 MpegEncContext *s = avctx->priv_data;
725 int i; 725 int i;
726 AVFrame *pict = data; 726 AVFrame *pict = data;
727 int slice_count; 727 int slice_count;
728 uint8_t *slices_hdr = NULL; 728 const uint8_t *slices_hdr = NULL;
729 729
730 #ifdef DEBUG 730 #ifdef DEBUG
731 av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size); 731 av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
732 #endif 732 #endif
733 733