comparison vc1.c @ 4834:300b60dee58c libavcodec

Set C predictor to zero if unavailable (should fix B-frame border artifacts)
author kostya
date Tue, 10 Apr 2007 05:31:22 +0000
parents 7738ad31b6e2
children bc40c297ea15
comparison
equal deleted inserted replaced
4833:cad24e81a7b4 4834:300b60dee58c
2316 C = s->current_picture.motion_val[0][xy - 2]; 2316 C = s->current_picture.motion_val[0][xy - 2];
2317 A = s->current_picture.motion_val[0][xy - wrap*2]; 2317 A = s->current_picture.motion_val[0][xy - wrap*2];
2318 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2; 2318 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
2319 B = s->current_picture.motion_val[0][xy - wrap*2 + off]; 2319 B = s->current_picture.motion_val[0][xy - wrap*2 + off];
2320 2320
2321 if(!s->mb_x) C[0] = C[1] = 0;
2321 if(!s->first_slice_line) { // predictor A is not out of bounds 2322 if(!s->first_slice_line) { // predictor A is not out of bounds
2322 if(s->mb_width == 1) { 2323 if(s->mb_width == 1) {
2323 px = A[0]; 2324 px = A[0];
2324 py = A[1]; 2325 py = A[1];
2325 } else { 2326 } else {
2393 C = s->current_picture.motion_val[1][xy - 2]; 2394 C = s->current_picture.motion_val[1][xy - 2];
2394 A = s->current_picture.motion_val[1][xy - wrap*2]; 2395 A = s->current_picture.motion_val[1][xy - wrap*2];
2395 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2; 2396 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
2396 B = s->current_picture.motion_val[1][xy - wrap*2 + off]; 2397 B = s->current_picture.motion_val[1][xy - wrap*2 + off];
2397 2398
2399 if(!s->mb_x) C[0] = C[1] = 0;
2398 if(!s->first_slice_line) { // predictor A is not out of bounds 2400 if(!s->first_slice_line) { // predictor A is not out of bounds
2399 if(s->mb_width == 1) { 2401 if(s->mb_width == 1) {
2400 px = A[0]; 2402 px = A[0];
2401 py = A[1]; 2403 py = A[1];
2402 } else { 2404 } else {