]> granicus.if.org Git - libvpx/commitdiff
Unify coding order of MC filters between blocks and frame header.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 3 Sep 2015 16:08:03 +0000 (12:08 -0400)
committerYaowu Xu <yaowu@google.com>
Thu, 3 Sep 2015 16:34:55 +0000 (09:34 -0700)
In VP9, the order for frame header was: [0] smooth, [1] regular, [2]
sharp, [3] bilinear. Per-block, the order was [0] regular, [1] smooth
and [2] sharp. For VP10, swap smooth/regular in the frame header so
that the block ordering and frame header ordering are interchangeable.

See issue #1046.

Change-Id: Ic9ec5964874375e40cd59bef50b489a76cbe4365

vp10/decoder/decodeframe.c
vp10/encoder/bitstream.c

index 1efede2b9a977a8dd3f803d306a6b1bf0c6622ee..518dec01750c8f77af5dfd80e1aae384aa7bd2d2 100644 (file)
@@ -1139,12 +1139,7 @@ static void setup_segmentation_dequant(VP10_COMMON *const cm) {
 }
 
 static INTERP_FILTER read_interp_filter(struct vpx_read_bit_buffer *rb) {
-  const INTERP_FILTER literal_to_filter[] = { EIGHTTAP_SMOOTH,
-                                              EIGHTTAP,
-                                              EIGHTTAP_SHARP,
-                                              BILINEAR };
-  return vpx_rb_read_bit(rb) ? SWITCHABLE
-                             : literal_to_filter[vpx_rb_read_literal(rb, 2)];
+  return vpx_rb_read_bit(rb) ? SWITCHABLE : vpx_rb_read_literal(rb, 2);
 }
 
 static void setup_display_size(VP10_COMMON *cm,
index 4ce353159b9fc166d4cd2ec143bc9d3dc2777ddf..356bc16f74ec941e7773fab7674a251c8dcf9804 100644 (file)
@@ -852,11 +852,9 @@ static void encode_txfm_probs(VP10_COMMON *cm, vpx_writer *w,
 
 static void write_interp_filter(INTERP_FILTER filter,
                                 struct vpx_write_bit_buffer *wb) {
-  const int filter_to_literal[] = { 1, 0, 2, 3 };
-
   vpx_wb_write_bit(wb, filter == SWITCHABLE);
   if (filter != SWITCHABLE)
-    vpx_wb_write_literal(wb, filter_to_literal[filter], 2);
+    vpx_wb_write_literal(wb, filter, 2);
 }
 
 static void fix_interp_filter(VP10_COMMON *cm, FRAME_COUNTS *counts) {