1. 15 Aug, 2017 2 commits
    • Debargha Mukherjee's avatar
      Miscellaneous fixes for resize/frame-superres · 17e7b081
      Debargha Mukherjee authored
      1. Fixes logic for disabling global motion w/ resize. Turns off
      conditional write/read of global parameters since it does not
      work currenlty. To be fixed later.
      2. Fixes call for av1_scale_if_required in encoder_frame_with_resize
      function
      3. Remove asserts for the scaled convolve functions
      
      Change-Id: I6a0f18b5ab5cc819bc27ef9fc2f28b0e391643a0
      17e7b081
    • Thomas Davies's avatar
      AOM_QM: enable by default · 181fc08f
      Thomas Davies authored
      No change to metrics, as quantization matrices are not used
      unless --enable-qm=1 is set on the command line.
      
      Fix no highbitdepth compilation, and fix compile errors and
      warnings for PVQ and NEW_QUANT experiments.
      
      Change-Id: I49aceb5acf6ca6790c81e760e5b208788f87086d
      181fc08f
  2. 12 Aug, 2017 1 commit
  3. 11 Aug, 2017 1 commit
    • Steinar Midtskogen's avatar
      Add experiment CONFIG_CDEF_SINGLEPASS: Make CDEF single pass · 5978212b
      Steinar Midtskogen authored
      Low latency, cpu-used=0:
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.3162 | -0.6719 | -0.6535 |   0.0089 | -0.3890 | -0.1515 |    -0.6682
      
      High latency, cpu-used=0:
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.0293 | -0.3556 | -0.5505 |   0.0684 | -0.0862 |  0.0513 |    -0.2765
      
      Low latency, cpu-used=4:
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.2248 | -0.7764 | -0.6630 |  -0.2109 | -0.3240 | -0.2532 |    -0.6980
      
      High latency, cpu-used=4:
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.1118 | -0.5841 | -0.7406 |  -0.0463 | -0.2442 | -0.1064 |    -0.4187
      
      Change-Id: I9ca8399c8f45489541a66f535fb3d771eb1d59ab
      5978212b
  4. 10 Aug, 2017 2 commits
    • Urvang Joshi's avatar
      Remove PALETTE flag · c6300aa1
      Urvang Joshi authored
      This experiment is now adopted as it was cleared by Tapas.
      
      Note: Palette use can still be controlled by command-line option
      "--tune-content=..." in 'aomenc'.
      
      Change-Id: I832f49f20f60c34bdef5b424755849c496687e87
      c6300aa1
    • Urvang Joshi's avatar
      Make palette work correctly with chroma sub8x8 blocks. · c9e71d4d
      Urvang Joshi authored
      The problem was that some functions were using scale_chroma_bsize()
      function to turn sub-8x8 'bsize' to 8x8 'bsize', and then the modified
      'bsize' was being passed to rd_pick_intra_sbuv_mode() for example.
      
      In such cases, we cannot rely on the 'bsize' value passed to the
      function; instead, we need to look at the original mbmi->sb_type
      directly.
      
      Also:
      - Added created a common function can_use_palette() to refactor this
      logic into one place.
      - Added more asserts to easily catch such coding errors in future.
      
      BUG=aomedia:688
      
      Change-Id: I2e9f20c8c5fbc4b3ff41b703a91a02758c3c632f
      c9e71d4d
  5. 09 Aug, 2017 1 commit
    • Rupert Swarbrick's avatar
      ext-partition-types: Don't allow 4:1 blocks to use palettes · 6f9cd946
      Rupert Swarbrick authored
      Since there are no CDFs set up for palettes for 4:1/1:4 blocks, we
      should make sure we don't try to use them. Without this patch,
      write_palette_mode_info gets called with a bsize of BLOCK_32X8 and
      reads (and writes) off the end of the palette_y_size_cdf array.
      
      This patch avoids calling it in this context and adds an assertion to
      make sure we don't read off the end of the array in future.
      
      The patch also adds the corresponding logic to rdopt.c.
      
      Change-Id: I4d9aea982d057e305a6b578f35457eada819d38f
      6f9cd946
  6. 08 Aug, 2017 1 commit
    • Thomas Davies's avatar
      AOM_QM: use SIMD for flat matrices and re-enable tests. · 1870382c
      Thomas Davies authored
      When AOM_QM is enabled, by default quantization matrices are
      flat unless enabled with --enable-qm=1. Re-use existing SIMD
      functions when a flat matrix is used, so that there is no
      speed deficit when AOM_QM is enabled.
      
      SIMD for the non-flat case is TBC.
      
      Change-Id: I1bb8da70d3dd5858dac15099610ddf61662e3d0d
      1870382c
  7. 07 Aug, 2017 1 commit
  8. 04 Aug, 2017 1 commit
    • Steinar Midtskogen's avatar
      CDEF cleanup · 94de0aaa
      Steinar Midtskogen authored
      Name changes and code moves to bring code more in line with the
      design doc and an upcoming single-pass patch.  No functional changes.
      
      Change-Id: I2bccd58c644e534b139f420b623390aa971fbdb0
      94de0aaa
  9. 02 Aug, 2017 1 commit
  10. 01 Aug, 2017 6 commits
    • Thomas Daede's avatar
      Frame context signaling: Remove reset symbols from the bitstream. · a6a854b1
      Thomas Daede authored
      Because frame contexts now follow reference frames, explicit resets
      are no longer necessary, but can simply happen at the same time
      as reference frame resets.
      
      Change-Id: Idbed3794e3ed52fa298346943a3014fa1ca23897
      a6a854b1
    • Zoe Liu's avatar
      Add encoder support to ALTREF2 · e9b15e2b
      Zoe Liu authored
      This CL adds the use of ALTREF2_FRAME to both single / comp reference
      prediction at the encoder side. In particular, the encoder keeps the
      distant altref as ALTREF, and uses the internal extra altrefs to
      refresh ALTREF2.
      
      Compared with the baseline (ext_tx and global_motion disabled simply
      for speed concern):
      (a) lowres: avg_psnr -0.395% ovr_psnr -0.393% ssim -0.329%
      (b) midres: avg_psnr -0.419% ovr_psnr -0.431% ssim -0.444%
      (c) AWCY High Latency:
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.6661 | -0.5988 | -0.6669 |  -0.6993 | -0.6988 | -0.7303 | -0.6051
      (d) AWCY Low Latency:
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0720 | -0.0505 |  0.1501 |   0.0670 | 0.0842 |  0.0517 |     0.0158
      
      TODO list:
      (1) To have altref2 incorporated with ext-comp-refs;
      (2) To have altref2 fully work with new-multisymbol;
      (3) To re-collect the initial default probs/cdfs;
      (4) To tune the encoder gf group structure design for altref2.
      
      Change-Id: I6ad63fd65afa903d3bba20acdb68e3b67acf7fdf
      e9b15e2b
    • 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
  11. 31 Jul, 2017 2 commits
    • 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 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
  12. 29 Jul, 2017 1 commit
    • 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
  13. 28 Jul, 2017 1 commit
    • 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
  14. 27 Jul, 2017 2 commits
    • 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
  15. 26 Jul, 2017 4 commits
    • Yue Chen's avatar
      rect_tx_ext: work with var_tx · d6bdd46b
      Yue Chen authored
      Change-Id: Ie2c34490dc50cb242bcd701308e6b55243883b15
      d6bdd46b
    • 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
    • hui su's avatar
      Palette: use CDF to encode palette size and color indices · 466ae062
      hui su authored
      Around 0.9% improvement on screen_content set (encoding 30 frames).
      
      Change-Id: Ic4c9333c9af5993bc41e513b9e766450b3a951eb
      466ae062
    • David Barker's avatar
      Avoid reading uninitialized data in decodemv.c · 0d7c4b05
      David Barker authored
      The existing code has a case where we set a variable to equal
      xd->ref_mv_stack[mbmi->ref_frame[0]][1 + mbmi->ref_mv_idx]
      even for compound blocks. However, the range of allowable
      values for mbmi->ref_mv_idx is determined by the ref_mv_count
      for the *combined* ref frame, not for the first single ref frame.
      
      This means that, if we have more ref-mv candidates for the combined
      ref frame than for the first single ref frame, then we can sometimes
      fetch uninitialized data.
      In every case where this happens, we immediately overwrite
      the destination with the correct mv, but it is still preferable
      to avoid reading uninitialized data.
      
      This patch moves the code block to avoid this bug. In addition,
      the variable (nearmv[0]) is only used when the mode equals NEARMV,
      so the condition on its assignment is changed to reflect that.
      
      Change-Id: I3bd268dc80d8065d5189999232b8a0f826d40a95
      0d7c4b05
  16. 25 Jul, 2017 1 commit
    • Luc Trudeau's avatar
      [CFL] Fix warnings when chroma_sub8x8 is disabled · 96b31516
      Luc Trudeau authored
      This change does not alter the bitstream
      
      Resuls on Subset1 (compared to 70a80a81 with cfl)
        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: I7672eb4cde3c649ebba32610f7e56500e378c062
      96b31516
  17. 24 Jul, 2017 2 commits
  18. 21 Jul, 2017 2 commits
  19. 20 Jul, 2017 7 commits
    • Zoe Liu's avatar
      Add decoder support to ALTREF2 · 043c227b
      Zoe Liu authored
      Change-Id: I11abc5448622265183abd0a58268c190b5891576
      043c227b
    • Jingning Han's avatar
      Clear unused parameters in decode_partition · ea10ad45
      Jingning Han authored
      Change-Id: Idbe1f71c49d0240e10d82081feeec9029898eecd
      ea10ad45
    • Yi Luo's avatar
      Refactor av1_update_boundary_info function · f190a165
      Yi Luo authored
      - Split av1_update_boundary_info() into two functions to avoid
        unnecessarily checking which goes through each mi block.
      - av1_setup_frame_boundary_info() sets up frame level boundary,
        i.e. non-tile case, which is called in frame level only.
      - av1_setup_across_tile_boundary_info sets up tiles boundary,
        which is called per tile, in multiple tile case.
      - Decoder running time reduction: 8.72% (1080p, 25 frames, 4Mbps).
      
      Change-Id: I2fc42d4281c77bce4a7dab5d208347308cfbe579
      f190a165
    • hui su's avatar
      Palette: remove palette_first_color_idx[] in PALETTE_MODE_INFO · 40b9e7fe
      hui su authored
      Handle the first color index in the tokenization process, along with the
      other color indeices.
      
      This patch also includes some minor refactoring changes.
      
      Test results verify that there is no implact on compression efficiency.
      
      Change-Id: I7de51c18a52f337320331b5e8d63dfea3cf510f0
      40b9e7fe
    • Yunqing Wang's avatar
      Make ext_tile compatible with reference_buffer · c2502b55
      Yunqing Wang authored
      In ext_tile experiment, when cm->large_scale_tile is 1, prev_frame_id can be
      the same as current_frame_id, which is prohibited in reference_buffer
      experiment and causes "CORRUPT_FRAME" error to be reported.
      
      In this patch, enable/disable reference_buffer according to large_scale_tile
      value, and thus make these 2 experiments compatible.
      
      Change-Id: If64943acb91e7a7b859db4e2ac62581e9b53ef85
      c2502b55
    • Jingning Han's avatar
      Make intra coding processed in 64x64 unit · 5b70174f
      Jingning Han authored
      Process the intra block coding in maximum of 64x64 block unit.
      This allows to simpilify the hardware design for 128x128 level
      block coding.
      
      Change-Id: I6ef1dd8549bdb53b2d2394c6aa7d61cea93686bf
      5b70174f
    • Jingning Han's avatar
      Make maximum transform coding unit 64x64 for inter blocks · c2b797fa
      Jingning Han authored
      This commit makes the maximum transform coefficient coding unit
      64x64 for inter coded blocks. It allows the hardware design to
      reuse the existing 64x64 coding pipeline for 128x128 level blocks.
      
      Change-Id: Ibadd59cf7e652984456cac621ec2294d48cf4507
      c2b797fa
  20. 19 Jul, 2017 1 commit
    • Jingning Han's avatar
      Rework txk_type indexing system for chroma component · 19b5c8fa
      Jingning Han authored
      Use the row and column indexes to fetch txk_type, which allows the
      chroma components to derive the tx type from the corresponding luma
      components. It improves the coding performance of txk-sel by 0.18%.
      
      Change-Id: I3f4bca5839e13ae95e51053e76cd86fe58202ac9
      19b5c8fa