comparison vc1.c @ 3664:de842f000384 libavcodec

Replace usage of put_*_vc1_qpel_pixels_tab with put_*_h264_chroma_pixels_tab
author kostya
date Sat, 02 Sep 2006 04:53:49 +0000
parents 1cc5bdadd487
children 9d4583fe8fca
comparison
equal deleted inserted replaced
3663:8e180a3276fe 3664:de842f000384
877 } 877 }
878 878
879 if(s->flags & CODEC_FLAG_GRAY) return; 879 if(s->flags & CODEC_FLAG_GRAY) return;
880 /* Chroma MC always uses qpel bilinear */ 880 /* Chroma MC always uses qpel bilinear */
881 uvdxy = ((uvmy & 3) << 2) | (uvmx & 3); 881 uvdxy = ((uvmy & 3) << 2) | (uvmx & 3);
882 dsp->put_vc1_qpel_pixels_tab[uvdxy](s->dest[1], srcU, s->uvlinesize, v->rnd); 882 uvmx = (uvmx&3)<<1;
883 dsp->put_vc1_qpel_pixels_tab[uvdxy](s->dest[2], srcV, s->uvlinesize, v->rnd); 883 uvmy = (uvmy&3)<<1;
884 if(!v->rnd){
885 dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
886 dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
887 }else{
888 dsp->put_no_rnd_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
889 dsp->put_no_rnd_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
890 }
884 } 891 }
885 892
886 /** Do motion compensation for 4-MV macroblock - luminance block 893 /** Do motion compensation for 4-MV macroblock - luminance block
887 */ 894 */
888 static void vc1_mc_4mv_luma(VC1Context *v, int n) 895 static void vc1_mc_4mv_luma(VC1Context *v, int n)
1075 uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1)); 1082 uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
1076 } 1083 }
1077 1084
1078 /* Chroma MC always uses qpel bilinear */ 1085 /* Chroma MC always uses qpel bilinear */
1079 uvdxy = ((uvmy & 3) << 2) | (uvmx & 3); 1086 uvdxy = ((uvmy & 3) << 2) | (uvmx & 3);
1080 dsp->put_vc1_qpel_pixels_tab[uvdxy](s->dest[1], srcU, s->uvlinesize, v->rnd); 1087 uvmx = (uvmx&3)<<1;
1081 dsp->put_vc1_qpel_pixels_tab[uvdxy](s->dest[2], srcV, s->uvlinesize, v->rnd); 1088 uvmy = (uvmy&3)<<1;
1089 if(!v->rnd){
1090 dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
1091 dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
1092 }else{
1093 dsp->put_no_rnd_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
1094 dsp->put_no_rnd_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
1095 }
1082 } 1096 }
1083 1097
1084 /** 1098 /**
1085 * Decode Simple/Main Profiles sequence header 1099 * Decode Simple/Main Profiles sequence header
1086 * @see Figure 7-8, p16-17 1100 * @see Figure 7-8, p16-17