summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-26 14:55:19 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-26 14:55:19 +0000
commita715af8ff444a7c1194f920d4425b96edec64c64 (patch)
tree7251573260dd83c7b9539c099042652fa9bff2fd /libavcodec
parentd5c30c86d0e18fe1b17118ddbfd7a90db2deaa04 (diff)
downloadffmpeg-streaming-a715af8ff444a7c1194f920d4425b96edec64c64.zip
ffmpeg-streaming-a715af8ff444a7c1194f920d4425b96edec64c64.tar.gz
Simplify left_xy content for the loop filter, this also makes it closer to
what is needed and its faster too. Originally committed as revision 21458 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 49608fb..fd1272a 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -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);
if(s->mb_y&1){
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;
if (curr_mb_field_flag) {
left_xy[1] += s->mb_stride;
@@ -772,6 +776,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
topleft_partition = 0;
left_block = left_block_options[1];
}
+ }
}
}else{
if(curr_mb_field_flag){
@@ -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);
}
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;
if (curr_mb_field_flag) {
left_xy[1] += s->mb_stride;
@@ -787,6 +796,7 @@ static av_always_inline int fill_caches(H264Context *h, int mb_type, int for_deb
} else {
left_block = left_block_options[2];
}
+ }
}
}
}
OpenPOWER on IntegriCloud