Revision 35c621e7 libavcodec/roqvideo.c

View differences:

libavcodec/roqvideo.c
43 43
    unsigned char *bptr;
44 44
    int boffs,stride;
45 45

  
46
    stride = ri->y_stride;
46
    stride = ri->current_frame->linesize[0];
47 47
    boffs = (y * stride) + x;
48 48

  
49 49
    bptr = ri->current_frame->data[0] + boffs;
......
52 52
    bptr[stride  ] = cell->y[2];
53 53
    bptr[stride+1] = cell->y[3];
54 54

  
55
    stride = ri->c_stride;
55
    stride = ri->current_frame->linesize[1];
56
    boffs = y*stride + x;
57

  
56 58
    bptr = ri->current_frame->data[1] + boffs;
57 59
    bptr[0       ] =
58 60
    bptr[1       ] =
......
71 73
    unsigned char *bptr;
72 74
    int boffs,stride;
73 75

  
74
    stride = ri->y_stride;
76
    stride = ri->current_frame->linesize[0];
75 77
    boffs = (y * stride) + x;
76 78

  
77 79
    bptr = ri->current_frame->data[0] + boffs;
......
80 82
    bptr[stride*2  ] = bptr[stride*2+1] = bptr[stride*3  ] = bptr[stride*3+1] = cell->y[2];
81 83
    bptr[stride*2+2] = bptr[stride*2+3] = bptr[stride*3+2] = bptr[stride*3+3] = cell->y[3];
82 84

  
83
    stride = ri->c_stride;
85
    stride = ri->current_frame->linesize[1];
86
    boffs = y*stride + x;
87

  
84 88
    bptr = ri->current_frame->data[1] + boffs;
85 89
    bptr[         0] = bptr[         1] = bptr[stride    ] = bptr[stride  +1] =
86 90
    bptr[         2] = bptr[         3] = bptr[stride  +2] = bptr[stride  +3] =
......
112 116
    }
113 117

  
114 118
    for(cp = 0; cp < 3; cp++) {
115
        int stride = ri->current_frame->linesize[cp];
116
        block_copy(ri->current_frame->data[cp] + (y*stride) + x,
117
                   ri->last_frame->data[cp] + (my*stride) + mx,
118
                   stride, stride, sz);
119
        int outstride = ri->current_frame->linesize[cp];
120
        int instride  = ri->last_frame   ->linesize[cp];
121
        block_copy(ri->current_frame->data[cp] + (y*outstride) + x,
122
                   ri->last_frame->data[cp] + (my*instride) + mx,
123
                   outstride, instride, sz);
119 124
    }
120

  
121 125
}
122 126

  
123 127

  

Also available in: Unified diff