comparison dv.c @ 1904:129236143f2e libavcodec

warning patrol
author mellum
date Wed, 24 Mar 2004 23:32:48 +0000
parents e5687117cc7f
children 2761950695cc
comparison
equal deleted inserted replaced
1903:c94b19667d8b 1904:129236143f2e
111 if (!dv_anchor) { 111 if (!dv_anchor) {
112 av_free(dv_vlc_map); 112 av_free(dv_vlc_map);
113 return -ENOMEM; 113 return -ENOMEM;
114 } 114 }
115 for (i=0; i<12*27; i++) 115 for (i=0; i<12*27; i++)
116 (int)dv_anchor[i] = i; 116 dv_anchor[i] = (void*)(size_t)i;
117 117
118 /* NOTE: as a trick, we use the fact the no codes are unused 118 /* NOTE: as a trick, we use the fact the no codes are unused
119 to accelerate the parsing of partial codes */ 119 to accelerate the parsing of partial codes */
120 init_vlc(&dv_vlc, TEX_VLC_BITS, NB_DV_VLC, 120 init_vlc(&dv_vlc, TEX_VLC_BITS, NB_DV_VLC,
121 dv_vlc_len, 1, 1, dv_vlc_bits, 2, 2); 121 dv_vlc_len, 1, 1, dv_vlc_bits, 2, 2);
894 } 894 }
895 895
896 static int dv_decode_mt(AVCodecContext *avctx, void* sl) 896 static int dv_decode_mt(AVCodecContext *avctx, void* sl)
897 { 897 {
898 DVVideoContext *s = avctx->priv_data; 898 DVVideoContext *s = avctx->priv_data;
899 int slice = (int)sl; 899 int slice = (size_t)sl;
900 dv_decode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80], 900 dv_decode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
901 &s->sys->video_place[slice*5]); 901 &s->sys->video_place[slice*5]);
902 return 0; 902 return 0;
903 } 903 }
904 904
905 static int dv_encode_mt(AVCodecContext *avctx, void* sl) 905 static int dv_encode_mt(AVCodecContext *avctx, void* sl)
906 { 906 {
907 DVVideoContext *s = avctx->priv_data; 907 DVVideoContext *s = avctx->priv_data;
908 int slice = (int)sl; 908 int slice = (size_t)sl;
909 dv_encode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80], 909 dv_encode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
910 &s->sys->video_place[slice*5]); 910 &s->sys->video_place[slice*5]);
911 return 0; 911 return 0;
912 } 912 }
913 913