Revision ab475795

View differences:

libavcodec/vc1.c
821 821
    uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
822 822
    uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
823 823

  
824
if(v->profile != PROFILE_ADVANCED){
824 825
    src_x   = av_clip(  src_x, -16, s->mb_width  * 16);
825 826
    src_y   = av_clip(  src_y, -16, s->mb_height * 16);
826 827
    uvsrc_x = av_clip(uvsrc_x,  -8, s->mb_width  *  8);
827 828
    uvsrc_y = av_clip(uvsrc_y,  -8, s->mb_height *  8);
829
}else{
830
    src_x   = av_clip(  src_x, -17, s->avctx->coded_width);
831
    src_y   = av_clip(  src_y, -18, s->avctx->coded_height + 1);
832
    uvsrc_x = av_clip(uvsrc_x,  -8, s->avctx->coded_width  >> 1);
833
    uvsrc_y = av_clip(uvsrc_y,  -8, s->avctx->coded_height >> 1);
834
}
828 835

  
829 836
    srcY += src_y * s->linesize + src_x;
830 837
    srcU += uvsrc_y * s->uvlinesize + uvsrc_x;
......
944 951
    src_x = s->mb_x * 16 + (n&1) * 8 + (mx >> 2);
945 952
    src_y = s->mb_y * 16 + (n&2) * 4 + (my >> 2);
946 953

  
954
if(v->profile != PROFILE_ADVANCED){
947 955
    src_x   = av_clip(  src_x, -16, s->mb_width  * 16);
948 956
    src_y   = av_clip(  src_y, -16, s->mb_height * 16);
957
}else{
958
    src_x   = av_clip(  src_x, -17, s->avctx->coded_width);
959
    src_y   = av_clip(  src_y, -18, s->avctx->coded_height + 1);
960
}
949 961

  
950 962
    srcY += src_y * s->linesize + src_x;
951 963

  
......
1071 1083
    uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
1072 1084
    uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
1073 1085

  
1086
if(v->profile != PROFILE_ADVANCED){
1074 1087
    uvsrc_x = av_clip(uvsrc_x,  -8, s->mb_width  *  8);
1075 1088
    uvsrc_y = av_clip(uvsrc_y,  -8, s->mb_height *  8);
1089
}else{
1090
    uvsrc_x = av_clip(uvsrc_x,  -8, s->avctx->coded_width  >> 1);
1091
    uvsrc_y = av_clip(uvsrc_y,  -8, s->avctx->coded_height >> 1);
1092
}
1093

  
1076 1094
    srcU = s->last_picture.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x;
1077 1095
    srcV = s->last_picture.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x;
1078 1096
    if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP)
......
1285 1303
    v->finterpflag = get_bits1(gb);
1286 1304
    get_bits1(gb); // reserved
1287 1305

  
1306
    v->s.h_edge_pos = v->s.avctx->coded_width;
1307
    v->s.v_edge_pos = v->s.avctx->coded_height;
1308

  
1288 1309
    av_log(v->s.avctx, AV_LOG_DEBUG,
1289 1310
               "Advanced Profile level %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"
1290 1311
               "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n"
......
2118 2139
    uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
2119 2140
    uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
2120 2141

  
2142
if(v->profile != PROFILE_ADVANCED){
2121 2143
    src_x   = av_clip(  src_x, -16, s->mb_width  * 16);
2122 2144
    src_y   = av_clip(  src_y, -16, s->mb_height * 16);
2123 2145
    uvsrc_x = av_clip(uvsrc_x,  -8, s->mb_width  *  8);
2124 2146
    uvsrc_y = av_clip(uvsrc_y,  -8, s->mb_height *  8);
2147
}else{
2148
    src_x   = av_clip(  src_x, -17, s->avctx->coded_width);
2149
    src_y   = av_clip(  src_y, -18, s->avctx->coded_height + 1);
2150
    uvsrc_x = av_clip(uvsrc_x,  -8, s->avctx->coded_width  >> 1);
2151
    uvsrc_y = av_clip(uvsrc_y,  -8, s->avctx->coded_height >> 1);
2152
}
2125 2153

  
2126 2154
    srcY += src_y * s->linesize + src_x;
2127 2155
    srcU += uvsrc_y * s->uvlinesize + uvsrc_x;

Also available in: Unified diff