]> granicus.if.org Git - libvpx/commitdiff
Convert inv_tile_order to control interface
authorJohn Koleszar <jkoleszar@google.com>
Wed, 27 Mar 2013 18:22:20 +0000 (11:22 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Wed, 27 Mar 2013 18:22:20 +0000 (11:22 -0700)
Restore ABI compatibility with the master branch.

Change-Id: Ie9f6fdf536662bd87dfcf114d16f003422670763

test/tile_independence_test.cc
vp9/vp9_dx_iface.c
vpx/vp8dx.h
vpx/vpx_decoder.h

index acff0fdfb84e6c7b2be780fd19bb62d7f18ebdfc..711d0bd45e82fe00a543736552147aad93f372f6 100644 (file)
@@ -32,10 +32,9 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
     cfg.w = 704;
     cfg.h = 144;
     cfg.threads = 1;
-    cfg.inv_tile_order = 0;
     fw_dec_ = codec_->CreateDecoder(cfg, 0);
-    cfg.inv_tile_order = 1;
     inv_dec_ = codec_->CreateDecoder(cfg, 0);
+    inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
   }
 
   virtual ~TileIndependenceTest() {
index 66c89b5a91f02685a9d1f198d4ce49bb0d9c7b10..d0c23f07a7d418246facb70e90f9ef97f9f829d6 100644 (file)
@@ -64,6 +64,7 @@ struct vpx_codec_alg_priv {
   vpx_image_t             img;
   int                     img_setup;
   int                     img_avail;
+  int                     invert_tile_order;
 };
 
 static unsigned long vp8_priv_sz(const vpx_codec_dec_cfg_t *si,
@@ -333,7 +334,7 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t  *ctx,
       oxcf.Version = 9;
       oxcf.postprocess = 0;
       oxcf.max_threads = ctx->cfg.threads;
-      oxcf.inv_tile_order = ctx->cfg.inv_tile_order;
+      oxcf.inv_tile_order = ctx->invert_tile_order;
       optr = vp9_create_decompressor(&oxcf);
 
       /* If postprocessing was enabled by the application and a
@@ -726,6 +727,13 @@ static vpx_codec_err_t vp8_get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
 
 }
 
+static vpx_codec_err_t set_invert_tile_order(vpx_codec_alg_priv_t *ctx,
+                                             int ctr_id,
+                                             va_list args) {
+  ctx->invert_tile_order = va_arg(args, int);
+  return VPX_CODEC_OK;
+}
+
 static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
   {VP8_SET_REFERENCE,             vp9_set_reference},
   {VP8_COPY_REFERENCE,            vp9_copy_reference},
@@ -737,6 +745,7 @@ static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
   {VP8D_GET_LAST_REF_UPDATES,     vp8_get_last_ref_updates},
   {VP8D_GET_FRAME_CORRUPTED,      vp8_get_frame_corrupted},
   {VP9_GET_REFERENCE,             get_reference},
+  {VP9_INVERT_TILE_DECODE_ORDER,  set_invert_tile_order},
   { -1, NULL},
 };
 
index ca3d63c8fc1df86a0beefe5d022a7a15239782e8..201df88fe2b646c391d28cf5e80cdf10f0aa418c 100644 (file)
@@ -69,6 +69,9 @@ enum vp8_dec_control_id {
    */
   VP8_SET_DECRYPT_KEY,
 
+  /** For testing. */
+  VP9_INVERT_TILE_DECODE_ORDER,
+
   VP8_DECODER_CTRL_ID_MAX
 };
 
@@ -85,6 +88,7 @@ VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES,   int *)
 VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED,    int *)
 VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED,      int *)
 VPX_CTRL_USE_TYPE(VP8_SET_DECRYPT_KEY,         const unsigned char *)
+VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
 
 /*! @} - end defgroup vp8_decoder */
 
index ddbc0a6d6b0584a5dbb16878e0928cbb9ac6adaa..e7701e5123411531bb7df5916914b493221540b6 100644 (file)
@@ -106,7 +106,6 @@ extern "C" {
     unsigned int threads; /**< Maximum number of threads to use, default 1 */
     unsigned int w;      /**< Width */
     unsigned int h;      /**< Height */
-    int inv_tile_order;  /**< Invert tile decoding order, default 0 */
   } vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */