]> granicus.if.org Git - libvpx/commitdiff
Add loop filtering for UV plane
authorYaowu Xu <yaowu@google.com>
Fri, 11 Jan 2013 23:53:32 +0000 (15:53 -0800)
committerYaowu Xu <yaowu@google.com>
Sat, 12 Jan 2013 00:32:06 +0000 (16:32 -0800)
On block boundary within a MB when 8x8 block boundary only is filtered
for Y.

Change-Id: Ie1c804c877d199e78e2fecd8c2d3f1e114ce9ec1

vp9/common/vp9_loopfilter_filters.c
vp9/common/x86/vp9_loopfilter_x86.c

index 18f0fea139391b6d370d0b9e1cc10e25e9d50071..adb10750e7bd0bb263909e7950d77612512c7034 100644 (file)
@@ -439,6 +439,14 @@ void vp9_loop_filter_bh8x8_c(uint8_t *y_ptr, uint8_t *u_ptr,
                              struct loop_filter_info *lfi) {
   vp9_mbloop_filter_horizontal_edge_c(
     y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
+
+  if (u_ptr)
+    vp9_loop_filter_horizontal_edge_c(u_ptr + 4 * uv_stride, uv_stride,
+                                      lfi->blim, lfi->lim, lfi->hev_thr, 1);
+
+  if (v_ptr)
+    vp9_loop_filter_horizontal_edge_c(v_ptr + 4 * uv_stride, uv_stride,
+                                      lfi->blim, lfi->lim, lfi->hev_thr, 1);
 }
 
 void vp9_loop_filter_bhs_c(uint8_t *y_ptr, int y_stride,
@@ -456,6 +464,14 @@ void vp9_loop_filter_bv8x8_c(uint8_t *y_ptr, uint8_t *u_ptr,
                              struct loop_filter_info *lfi) {
   vp9_mbloop_filter_vertical_edge_c(
     y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
+
+  if (u_ptr)
+    vp9_loop_filter_vertical_edge_c(u_ptr + 4, uv_stride,
+                                    lfi->blim, lfi->lim, lfi->hev_thr, 1);
+
+  if (v_ptr)
+    vp9_loop_filter_vertical_edge_c(v_ptr + 4, uv_stride,
+                                    lfi->blim, lfi->lim, lfi->hev_thr, 1);
 }
 
 void vp9_loop_filter_bvs_c(uint8_t *y_ptr, int y_stride,
index 61b1c77da1ec8fd27f2c16c6f559dccac2e68586..1ec7d5c488a838588d54d04032e8fc15a6888bdd 100644 (file)
@@ -609,6 +609,11 @@ void vp9_loop_filter_bh8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
                              struct loop_filter_info *lfi) {
   vp9_mbloop_filter_horizontal_edge_sse2(
     y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr);
+
+  if (u_ptr)
+    vp9_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride,
+                                            lfi->blim, lfi->lim, lfi->hev_thr,
+                                            v_ptr + 4 * uv_stride);
 }
 
 /* Vertical MB Filtering */
@@ -629,6 +634,11 @@ void vp9_loop_filter_bv8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
                              struct loop_filter_info *lfi) {
   vp9_mbloop_filter_vertical_edge_sse2(
     y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr);
+
+  if (u_ptr)
+    vp9_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride,
+                                          lfi->blim, lfi->lim, lfi->hev_thr,
+                                          v_ptr + 4);
 }
 
 /* Horizontal B Filtering */