Remove vestigial VP8 token partition support.

Change-Id: Icae4b721cd07ab3385d2b3095903c873823f060a
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 7b41e2e..0894ca9 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -54,13 +54,6 @@
  */
 #define AOM_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */
 
-/*! Can output one partition at a time. Each partition is returned in its
- *  own AOM_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for
- *  every partition but the last. In this mode all frames are always
- *  returned partition by partition.
- */
-#define AOM_CODEC_CAP_OUTPUT_PARTITION 0x20000
-
 /*! Can support input images at greater than 8 bitdepth.
  */
 #define AOM_CODEC_CAP_HIGHBITDEPTH 0x40000
@@ -74,7 +67,6 @@
  */
 #define AOM_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */
 /*!\brief Make the encoder output one  partition at a time. */
-#define AOM_CODEC_USE_OUTPUT_PARTITION 0x20000
 #define AOM_CODEC_USE_HIGHBITDEPTH 0x40000 /**< Use high bitdepth */
 
 /*!\brief Generic fixed size buffer structure
@@ -119,11 +111,6 @@
 typedef uint32_t aom_codec_er_flags_t;
 /*!\brief Improve resiliency against losses of whole frames */
 #define AOM_ERROR_RESILIENT_DEFAULT 0x1
-/*!\brief The frame partitions are independently decodable by the bool decoder,
- * meaning that partitions can be decoded even though earlier partitions have
- * been lost. Note that intra prediction is still done over the partition
- * boundary. */
-#define AOM_ERROR_RESILIENT_PARTITIONS 0x2
 
 /*!\brief Encoder output packet variants
  *
diff --git a/aom/src/aom_encoder.c b/aom/src/aom_encoder.c
index 37b9495..523f40b 100644
--- a/aom/src/aom_encoder.c
+++ b/aom/src/aom_encoder.c
@@ -48,9 +48,6 @@
     res = AOM_CODEC_INCAPABLE;
   else if ((flags & AOM_CODEC_USE_PSNR) && !(iface->caps & AOM_CODEC_CAP_PSNR))
     res = AOM_CODEC_INCAPABLE;
-  else if ((flags & AOM_CODEC_USE_OUTPUT_PARTITION) &&
-           !(iface->caps & AOM_CODEC_CAP_OUTPUT_PARTITION))
-    res = AOM_CODEC_INCAPABLE;
   else {
     ctx->iface = iface;
     ctx->name = iface->name;
@@ -83,9 +80,6 @@
     res = AOM_CODEC_INCAPABLE;
   else if ((flags & AOM_CODEC_USE_PSNR) && !(iface->caps & AOM_CODEC_CAP_PSNR))
     res = AOM_CODEC_INCAPABLE;
-  else if ((flags & AOM_CODEC_USE_OUTPUT_PARTITION) &&
-           !(iface->caps & AOM_CODEC_CAP_OUTPUT_PARTITION))
-    res = AOM_CODEC_INCAPABLE;
   else {
     int i;
     void *mem_loc = NULL;
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 4a47418..49b0d3c 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -180,9 +180,6 @@
     ARG_DEF(NULL, "webm", 0, "Output WebM (default when WebM IO is enabled)");
 static const arg_def_t use_ivf = ARG_DEF(NULL, "ivf", 0, "Output IVF");
 static const arg_def_t use_obu = ARG_DEF(NULL, "obu", 0, "Output OBU");
-static const arg_def_t out_part =
-    ARG_DEF("P", "output-partitions", 0,
-            "Makes encoder output partitions. Requires IVF output!");
 static const arg_def_t q_hist_n =
     ARG_DEF(NULL, "q-hist", 1, "Show quantizer histogram (n-buckets)");
 static const arg_def_t rate_hist_n =
@@ -228,7 +225,6 @@
                                         &use_webm,
                                         &use_ivf,
                                         &use_obu,
-                                        &out_part,
                                         &q_hist_n,
                                         &rate_hist_n,
                                         &disable_warnings,
@@ -932,9 +928,7 @@
       global->framerate = arg_parse_rational(&arg);
       validate_positive_rational(arg.name, &global->framerate);
       global->have_framerate = 1;
-    } else if (arg_match(&arg, &out_part, argi))
-      global->out_part = 1;
-    else if (arg_match(&arg, &debugmode, argi))
+    } else if (arg_match(&arg, &debugmode, argi))
       global->debug = 1;
     else if (arg_match(&arg, &q_hist_n, argi))
       global->show_q_hist_buckets = arg_parse_uint(&arg);
@@ -1545,7 +1539,6 @@
   int flags = 0;
 
   flags |= global->show_psnr ? AOM_CODEC_USE_PSNR : 0;
-  flags |= global->out_part ? AOM_CODEC_USE_OUTPUT_PARTITION : 0;
   flags |= stream->config.use_16bit_internal ? AOM_CODEC_USE_HIGHBITDEPTH : 0;
 
   /* Construct Encoder Context */
diff --git a/apps/aomenc.h b/apps/aomenc.h
index 14047fa..7c23df0 100644
--- a/apps/aomenc.h
+++ b/apps/aomenc.h
@@ -47,7 +47,6 @@
   enum TestDecodeFatality test_decode;
   int have_framerate;
   struct aom_rational framerate;
-  int out_part;
   int debug;
   int show_q_hist_buckets;
   int show_rate_hist_buckets;
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index 3590843..f3d61dc 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -205,13 +205,8 @@
 
     ASSERT_FALSE(::testing::Test::HasFatalFailure());
 
-    unsigned long dec_init_flags = 0;  // NOLINT
-    // Use fragment decoder if encoder outputs partitions.
-    // NOTE: fragment decoder and partition encoder are only supported by VP8.
-    if (init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION)
-      dec_init_flags |= AOM_CODEC_USE_INPUT_FRAGMENTS;
     testing::internal::scoped_ptr<Decoder> decoder(
-        codec_->CreateDecoder(dec_cfg, dec_init_flags));
+        codec_->CreateDecoder(dec_cfg, 0 /* flags */));
 #if CONFIG_AV1_DECODER
     if (decoder->IsAV1()) {
       // Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole
@@ -268,12 +263,6 @@
         }
       }
 
-      // Flush the decoder when there are no more fragments.
-      if ((init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) {
-        const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0);
-        if (!HandleDecodeResult(res_dec, decoder.get())) break;
-      }
-
       if (has_dxdata && has_cxdata) {
         const aom_image_t *img_enc = encoder->GetPreviewFrame();
         DxDataIterator dec_iter = decoder->GetDxData();