Commit 65280cc9 authored by michael's avatar michael

Simplify left_xy content for the loop filter, this also makes it closer to

what is needed and its faster too.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21458 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36c89388
...@@ -762,6 +762,10 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb ...@@ -762,6 +762,10 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
const int curr_mb_field_flag = IS_INTERLACED(mb_type); const int curr_mb_field_flag = IS_INTERLACED(mb_type);
if(s->mb_y&1){ if(s->mb_y&1){
if (left_mb_field_flag != curr_mb_field_flag) { if (left_mb_field_flag != curr_mb_field_flag) {
if(for_deblock){
left_xy[0] = mb_xy - s->mb_stride - 1;
left_xy[1] = mb_xy - 1;
}else{
left_xy[1] = left_xy[0] = mb_xy - s->mb_stride - 1; left_xy[1] = left_xy[0] = mb_xy - s->mb_stride - 1;
if (curr_mb_field_flag) { if (curr_mb_field_flag) {
left_xy[1] += s->mb_stride; left_xy[1] += s->mb_stride;
...@@ -773,6 +777,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb ...@@ -773,6 +777,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
left_block = left_block_options[1]; left_block = left_block_options[1];
} }
} }
}
}else{ }else{
if(curr_mb_field_flag){ if(curr_mb_field_flag){
topleft_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy - 1]>>7)&1)-1); topleft_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy - 1]>>7)&1)-1);
...@@ -780,6 +785,10 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb ...@@ -780,6 +785,10 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1); top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1);
} }
if (left_mb_field_flag != curr_mb_field_flag) { if (left_mb_field_flag != curr_mb_field_flag) {
if(for_deblock){
left_xy[0] = mb_xy - 1;
left_xy[1] = mb_xy + s->mb_stride - 1;
}else{
left_xy[1] = left_xy[0] = mb_xy - 1; left_xy[1] = left_xy[0] = mb_xy - 1;
if (curr_mb_field_flag) { if (curr_mb_field_flag) {
left_xy[1] += s->mb_stride; left_xy[1] += s->mb_stride;
...@@ -790,6 +799,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb ...@@ -790,6 +799,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
} }
} }
} }
}
h->top_mb_xy = top_xy; h->top_mb_xy = top_xy;
h->left_mb_xy[0] = left_xy[0]; h->left_mb_xy[0] = left_xy[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment