1. 01 Aug, 2017 6 commits
    • Thomas Daede's avatar
      Add new experiment: frame_context_signaling. · da4d8b9c
      Thomas Daede authored
      This stores frame contexts alongside a reference frame, and always
      uses the frame in reference slot 0 (LAST_FRAME) as the source of
      the frame context.
      
      The encoder could then reorder reference frames as to control
      which frame context is used, however currently it does not.
      
      Low Latency AWCY result:
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.1438 |  0.4161 |     N/A |   0.0386 | -0.0281 |  0.0453 |     0.2514
      
      https://arewecompressedyet.com/?job=before-frame-context-signaling%402017-06-07T23%3A20%3A49.473Z&job=after-frame-context-signaling%402017-06-07T23%3A21%3A36.117Z
      
      Change-Id: I4f6f9b12cb403573efbf9e5c3077d62f5dedc467
      da4d8b9c
    • Rupert Swarbrick's avatar
      tempv_signaling: Simplify test for whether prev_frame works for mvs · 1f990a64
      Rupert Swarbrick authored
      For some background, see this previous change in Gerrit[0]. What's
      going on here is that we only want to use a previous frame for motion
      vector prediction if the encoded sizes match. When scaling with
      superres, this means the size before upscaling.
      
      To check this correctly, we need to check prev_frame's width/height
      and compare it with the current frame. Without superres, prev_frame's
      width/height is stored in y_crop_width/y_crop_height so we can check
      that way. With superres, those numbers are after the scaling, so can't
      be compared with cm->width and cm->height.
      
      The previous code worked around this by comparing with cm->last_width
      and cm->last_height. That works because these are the width/height for
      the last encoded and shown frame and that frame *is* prev_frame if
      last_show_frame is true. Since this is the only case when we want to
      use prev_frame, they are the numbers we need.
      
      This patch simplifies the logic by storing the width/height in
      RefCntBuffer before any scaling and then checking that they match.
      
      The check for whether we can use motion vectors from a previous frame
      is factored out into a pair of inline functions in the
      header. frame_might_use_prev_frame_mvs() is true if it's possible that
      this frame could use motion vectors from a previous frame. This
      doesn't use knowledge of what prev_frame is: it just checks we're not
      in error resilient mode and aren't a keyframe. When this is true, a
      flag is signaled in the bitstream to say whether we actually want to
      use motion vectors from the previous frame.
      
      The second function, frame_can_use_prev_frame_mvs, is true if the
      current frame / previous frame pair is suitable for sharing motion
      vectors. This is a stricter test: the previous frame needs to be
      have been shown and not to have been intra_only, and it needs to have
      the same width/height as the current frame.
      
      If the re-assignment of prev_frame (just before the calls to
      frame_can_use_prev_frame_mvs()) were removed in some way, we could
      probably combine the two functions and often save a bit per frame
      header.
      
      The other slight tidy-up in the patch is to move re-allocation of the
      mvs buffer into onyxc_int.h: the code that did the allocation was
      duplicated between the encoder and decoder.
      
      [0] https://aomedia-review.googlesource.com/c/13806
      
      BUG=aomedia:78
      
      Change-Id: If25227fa24222fc05c56529c2ac9ddf1e1c36a84
      1f990a64
    • Rupert Swarbrick's avatar
      Make inspector work with superres · 2a52f291
      Rupert Swarbrick authored
      With superres enabled, mi_rows/mi_cols might not be constant across
      frames (the scaling factor might change). This patch fills in Nathan
      Egge's todo comment to do something useful if the current
      mi_rows/mi_cols size isn't what the calling code expected.
      
      Change-Id: I7edf8c6efc25ff182fc5b6a7eff7d56e2d9e86dc
      2a52f291
    • Rupert Swarbrick's avatar
      ext_partition_types: Pass the correct CDF length for partitions · b95cf12e
      Rupert Swarbrick authored
      Each CDF for partitioning square blocks is initialised from
      an entry of default_partition_cdf in entropymode.c. These CDFs are of
      different lengths, depending on which partition types are supported by
      the block size.
      
      For example, 8x8 blocks have a CDF with only 4 entries (PARTITION_NONE
      through PARTITION_SPLIT). Blocks of a size that supports 1:4 and 4:1
      partitions have 10 entries. Currently, that's only 32x32 blocks. All
      other blocks have 8 entries.
      
      Change-Id: Ie2126b6d41afc0efedcc5b5b37fc1d0427b9a9fa
      b95cf12e
    • Sarah Parker's avatar
      Fix mistake in cdf table for mrc_tx · 964cabf5
      Sarah Parker authored
      One set of values was not monotonic and was causing a mismatch.
      
      Change-Id: Ib599bd1bdee8a85d171b71d02b70549d9916f2b5
      964cabf5
    • Yaowu Xu's avatar
      correct an assertion · c5767327
      Yaowu Xu authored
      Change-Id: I876d55790c34904a23f103ada2a99b4956cabdb4
      c5767327
  2. 31 Jul, 2017 14 commits
    • Zoe Liu's avatar
      Fix a build error when ext-tx is off · 4508d880
      Zoe Liu authored
      Change-Id: I1cf27c41749c8f66eaa0ec828a1fd5d8ef7dd94e
      4508d880
    • Zoe Liu's avatar
      Fix build warnings when global_motion is off · bc030eea
      Zoe Liu authored
      Change-Id: I69f042e6da5a4b5e4a18853c5f15532dfef0204a
      bc030eea
    • Angie Chiang's avatar
      Fix w/h of av1_make_masked_inter_predictor · 9ee82650
      Angie Chiang authored
      Change-Id: Idaeb180392d6e96fedbd39f2e1ee0e4b9dba887e
      9ee82650
    • Cheng Chen's avatar
      Refactor paralles_deblocking · 61a12ef2
      Cheng Chen authored
      1.Change mix case variable names to underscore cases following
        Google C++ coding style guide:
        https://google.github.io/styleguide/cppguide.html#Variable_Names
      
      2.Reduce number of parameters to pass. Derive these parameters
        when needed inside functions.
      
      Change-Id: I17ca8aed20be2f83f9e46275e6a1f01c8f0ec510
      61a12ef2
    • Yue Chen's avatar
      Move mode costs that can be updated inside a frame to MACROBLOCK · b23d00a0
      Yue Chen authored
      It is a refactoring patch, which aims to make the code ready for
      implementation of in-frame mode cost update in RDO.
      Also add mode cost update per sb row, but it won't affect coding
      results because cdf update in RDO is not there.
      Mode cost arrays are moved to MACROBLOCK because in multi-thread
      coding, threads share the same AV1_COMP.
      
      This patch does not have impact on coding results.
      
      Change-Id: I2e8f7d7d066b23ebfbfc998269023781f359a6ff
      b23d00a0
    • Yushin Cho's avatar
      Another fix of dangling braces for search · 127c5838
      Yushin Cho authored
      These are caused when both #if and #else has if (...) '{' but
      there is only one matching '}'.
      
      Fixed for some of decoding side files. More to come soon.
      
      Change-Id: I9e63b90ba6e739b5c7e37498458c7808e2e16d33
      127c5838
    • Rupert Swarbrick's avatar
      Fix build warning when compiling with warped motion · 3ab24050
      Rupert Swarbrick authored
      Since patch 52c5173e, update_stats() calls set_ref_ptrs on its local
      xd variable, which updates xd->block_refs. This means xd should not be
      const.
      
      Change-Id: Ia7b8e062e81497653d77f539e4aa403870c4fbb0
      3ab24050
    • Peter de Rivaz's avatar
      Unified warp_affine and warp_affine_post_round · b6a31753
      Peter de Rivaz authored
      This patch removes the need for a separate warp_affine_post_round
      function by adding the functionality to the warp_affine function.
      
      The encoded output should remain unchanged, but the encoder/decoder
      should operate faster because the sse2 and ssse3 warp implementation
      can now be used when post_rounding is being used.
      
      Change-Id: Ide52cae55de59a9da9c27c5793e17390f6d2c03e
      b6a31753
    • Yaowu Xu's avatar
      Move buffer allocation to aom_scale · 43778572
      Yaowu Xu authored
      This commit moves the allocation of the 8bit frame buffer used in
      global motion estimation to where other frame buffers are allocated.
      
      Change-Id: Id3c0a0cb33dab7225629ce6f2d7904767f647d4c
      43778572
    • Angie Chiang's avatar
      Turn on convolve_round by default · 71ef7c27
      Angie Chiang authored
      The performance on default experiment is
      lowres: 0.812%
      
      midres/hdres and AWCY tests are still running
      
      Change-Id: Id2209c79df6517732dd06c2712a7bdefde118ead
      71ef7c27
    • Rupert Swarbrick's avatar
      Fix compiler warning in bitstream.c · 223f0489
      Rupert Swarbrick authored
      The write_motion_mode function only uses its "cm" parameter if it
      needs to write out global motion information or distinguish between
      motion_var and warped_motion. When these are disabled, you get a
      compiler warning which this patch silences.
      
      Change-Id: I64d06a150751cd72cf4b50799432f3161ee87938
      223f0489
    • Rupert Swarbrick's avatar
      Fix build of encodeframe.c without motion-var or warped-motion · bf828f93
      Rupert Swarbrick authored
      This patch surrounds two uses of motion_mode_cost and motion_mode_cdf
      with preprocessor #if lines.
      
      Both uses were added by commit bdc8dab2.
      
      Change-Id: I7e4a74e97b9179e42bae6ee17e9b2094acb992f2
      bf828f93
    • Rupert Swarbrick's avatar
      Fix unused parameter warning in decodemv.c · 766c9d59
      Rupert Swarbrick authored
      This warning only comes up if none of the experiments ext-intra,
      palette and filter-intra are enabled.
      
      Change-Id: Ic58863d8d845034aa52230bf52a3c5def8d3ac0f
      766c9d59
    • Yue Chen's avatar
      motion_var: computer motion_mode_cost from cdf · bdc8dab2
      Yue Chen authored
      Initialize mode cost using frame-level cdf.
      Also in rd selection stage, cdf is updated per 64x64.
      Performance gain 0.20%
      
      Still suboptimal since in real bitstream packing, cdf is updated
      per symbol. Per symbol update in RDO is work in progress.
      
      Change-Id: I5062af91d8b00e5bf4c08abd0a7bfb0e5b27a619
      bdc8dab2
  3. 30 Jul, 2017 1 commit
    • Yaowu Xu's avatar
      Update 8-bit frame buffers for Global Motion estimation · 0006073f
      Yaowu Xu authored
      This commit makes sure that 8bit frame buffers used in global motion
      estimation are updated, so to help global motion to improve compression
      for hbd internal encoding. 
      
      On lowres 12 encoding, the improvements are: 
      Overall PSNR: .896%
      SSIM:  1.159%
      PSNR HVS: .952%
      
      Change-Id: I5d75c231407bc1e4ed564c3a216bdd1ec3919f14
      0006073f
  4. 29 Jul, 2017 2 commits
    • Monty Montgomery's avatar
      Add CONFIG_DAALA_DCT16 experiment. · cb9c1c52
      Monty Montgomery authored
      This experiment replaces the 16-point Type-II DCT and 16-point Type-IV
      DST scaling vp9 transforms with the 16-point orthonormal Daala
      transforms.  These have reduced complexity and are perfect
      reconstruction.  There is currently no net coding performance impact.
      
      subset-1:
      
        monty-square-baseline-s1-F@2017-07-23T03:43:45.042Z ->
           monty-square-dct16-s1-F@2017-07-23T03:42:29.805Z
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.0152 | -0.0028 | -0.0929 |  -0.0432 | -0.0457 | -0.0425 |    -0.0237
      
        objective-1-fast:
      
        monty-square-baseline-o1f-F@2017-07-23T03:44:19.973Z ->
           monty-square-dct16-o1f-F@2017-07-23T03:43:22.549Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0305 |  0.0926 | -0.1600 |   0.0471 | 0.0219 | -0.0075 |     0.0135
      
      Change-Id: I54fed26d65fd8450693334bb400b1fafd7e0dacb
      cb9c1c52
    • David Michael Barr's avatar
      [CFL] Uniform Q3 alpha grid with extent [-2, 2] · f6eaa159
      David Michael Barr authored
      Expand the range of alpha to [-2, 2] in Q3.
      Jointly signal the signs, including zeros.
      Use the signs to give context for each quadrant
      and half-axis. The (0, 0) point is excluded.
      Symmetry in alpha_u == alpha_v yields 6 contexts.
      
      Results on Subset1 (Compared to 9136ab7d with CFL enabled)
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.0792 | -0.7535 | -0.7574 |  -0.0639 | -0.0843 | -0.0665 |    -0.3324
      
      Change-Id: I250369692e92a91d9c8d174a203d441217d15063
      Signed-off-by: default avatarDavid Michael Barr <b@rr-dav.id.au>
      f6eaa159
  5. 28 Jul, 2017 6 commits
    • Urvang Joshi's avatar
      Fix logical errors for TX64x64. · 9136ab7d
      Urvang Joshi authored
      - Wrong function argument fix: this was not caught by compile test
      because DCT_DCT has a value of 0, which was converted to a NULL pointer.
      - Wrong prob array size.
      
      Change-Id: Iaf1747dc7fb40db1d1ab35f965fb60994d8dec95
      9136ab7d
    • Urvang Joshi's avatar
      Fix tx64x64 debug build · 2dc1c841
      Urvang Joshi authored
      Change-Id: I1b77416eaae000ae40e139d8f7fc31754f817bba
      2dc1c841
    • Yushin Cho's avatar
      Fix dist_8x8 broken with 3bce7547 · a4817a6b
      Yushin Cho authored
      The commit 3bce7547 has introduced an another early-exit based on MSE distortion
      in transform domain, which enables skipping trellis coding and
      calling av1_dist_block() in block_rd_txfm() and skipping trellis coding in av1_tx_block_rd_b().
      
      However, with dist-8x8, the early-exit for sub8x8 tx block in a partition >= 8x8 in plane 0
      is disabled because that the reference distortion metric
      (which would be non-MSE and applied to 8x8 or larger) can not be compared to
      MSE distortions of sub8x8 tx blocks.
      
      Change-Id: I46ada7c90a869d23fc0f0166a01dfdc5392af311
      a4817a6b
    • Luc Trudeau's avatar
      [CFL] New UV_PREDICTION_MODE for CFL · 6e1cd787
      Luc Trudeau authored
      CfL is now an independent mode.
      
      Results on Subset1 (Compared to 4266a7ed with CFL enabled)
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.1645 | -0.4017 |  0.2475 |  -0.1851 | -0.2179 | -0.2338 |    -0.2897
      
      Change-Id: I2e86e7ea7bfc12bb1d763e70a136ca992d57a3c5
      6e1cd787
    • Jingning Han's avatar
      Conditionally skip inverse transform in transform block RD · 1a7f0a8c
      Jingning Han authored
      When the lower bound of a transform block rate-distortion cost is
      above the current best rd cost, the only possibility that this
      particular coding mode will be chosen is to fall back to all skip
      mode. Hence there is no need to estimate the transform block rate
      cost, distortion, etc. Obtain the sum of squared distance between
      the prediction and the source would be sufficient.
      
      This speeds up the encoding process by 5% - 10%.
      
      Change-Id: I728728c3a42aafefd34641f0be69b3e2a9b9bbb2
      1a7f0a8c
    • Jonathan Matthews's avatar
      Adapt palette cdf · 7abe9db7
      Jonathan Matthews authored
      Bug introduced in change: Ic4c9333c9af5993bc41e513b9e766450b3a951eb
      
      BUG=aomedia:667
      
      Change-Id: I29ab87f32d2f940a3d1e079f734b92467d2ebea9
      7abe9db7
  6. 27 Jul, 2017 6 commits
    • Tom Finegan's avatar
      Fix CMake asm flags when CONFIG_PIC is enabled. · 7596ee16
      Tom Finegan authored
      The asm flags weren't getting updated when CONFIG_PIC
      was enabled via the command line.
      
      Change-Id: Ie4654337d2c7cba87d6902eb2b85097d1ab9e7ca
      7596ee16
    • Tom Finegan's avatar
      Sync CMake build with the configure build. · 63bd445d
      Tom Finegan authored
      Added: CONFIG_INSTALL_DOCS, CONFIG_ALTREF2, CONFIG_FLEX_REFS
             CONFIG_LPF_DIRECT.
      Changed, 0 => 1: CONFIG_RECT_INTRA_PRED
      
      Change-Id: I1e958ab7dcd0c791b33a0ac5104fdf557f2cd29c
      63bd445d
    • Cheng Chen's avatar
      Make CDEF work with EXT_PARTITION · f5bdeac2
      Cheng Chen authored
      Make CDEF select filter strength every 64x64 block when block size
      could be larger than 64x64.
      
      With/without this patch, coding performances on AWCY and Google
      test of lowres and midres are neutral.
      
      BUG=aomedia:662
      
      Change-Id: Ief82cc51be91fc08a7c6d7e87f6d13bcc4336476
      f5bdeac2
    • Cheng Chen's avatar
      Select filter level for U, V planes · e94df5cf
      Cheng Chen authored
      Previously, U, V planes share the same filter level with Y.
      Here, we search and pick the best filter level for U, V planes.
      Selected filter levels are transmitted per frame.
      This works with parallel_deblocking.
      
      Coding gain on Google test set:
      		Avg_psnr	ovr_psnr	ssim
      lowres: 	-0.116		-0.120		-0.339
      midres:		-0.218		-0.228		-0.338
      hdres:		-0.260		-0.264		-0.365
      
      Change-Id: I03d2ac47539f3eea9f3c4b08007bd6d3f4b73572
      e94df5cf
    • Monty Montgomery's avatar
      Add proper CMAKE dependencies for CONFIG_DAALA_DCT4 experiment · caca1355
      Monty Montgomery authored
      CONFIG_DAALA_DCT8 added the necessary related configuration
      enable/disable logic to the CMAKE build to be consistent with the
      Automake build system, but the earlier CONFIG_DAALA_DCT4 commits did
      not.  This brings CONFIG_DAALA_DCT4 up to date and consistent with
      DCT8.
      
      Change-Id: Iba9fda00c251f5477fdb4c35fc5cd8874050b530
      caca1355
    • Angie Chiang's avatar
      Fix convolve_round's compile error · 7346ca19
      Angie Chiang authored
      Change-Id: I63fc3f1f010e77c6dc033f37e3e91ade17a55099
      7346ca19
  7. 26 Jul, 2017 5 commits
    • Jingning Han's avatar
      Reduce best rdcost value in transform partition search · 16a9df75
      Jingning Han authored
      Adaptively reduce the best rate-distortion cost value in the
      recursive transform block partition search. For bus CIF at 1000 kbps
      this reduces the encoding time from 1864 seconds to 1756 seconds,
      about 6% speed up.
      
      Change-Id: I5433a1825c0f8b13fcc5ab7e19713a98969d53fc
      16a9df75
    • Yue Chen's avatar
      rect_tx_ext: work with var_tx · d6bdd46b
      Yue Chen authored
      Change-Id: Ie2c34490dc50cb242bcd701308e6b55243883b15
      d6bdd46b
    • Angie Chiang's avatar
      Add some todo for convolve_round exp · 748d570e
      Angie Chiang authored
      1) Integrate it with supertx
      2) Integrate it with chroma_sub8x8
      
      Change-Id: If4bb906d442d15bae3741192029ec851c48d3948
      748d570e
    • Luc Trudeau's avatar
      [CFL] UV_PREDICTION_MODE · d6d9eeeb
      Luc Trudeau authored
      A separate prediction mode struct is added to allow
      for uv-only modes (like CfL). Note: CfL will be
      added as a separate mode in an upcoming commit.
      
      Results on Subset1 (Compared to 4266a7ed with CfL enabled)
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      Change-Id: Ie80711c641c97f745daac899eadce6201ed97fcc
      d6d9eeeb
    • Sarah Parker's avatar
      Add txfm functions corresponding to MRC_DCT · 5b8e6d2d
      Sarah Parker authored
      MRC_DCT uses a mask based on the prediction signal to modify the
      residual before applying DCT_DCT. This adds all necessary functions
      to perform this transform and makes the prediction signal available
      to the 32x32 txfm functions so the mask can be created. I am still
      experimenting with different types of mask generation functions and
      so this patch contains a placeholder. This patch has no impact on
      performance.
      
      Change-Id: Ie3772f528e82103187a85c91cf00bb291dba328a
      5b8e6d2d