1. 20 Nov, 2017 1 commit
    • Monty Montgomery's avatar
      Add Daala TX fixed-coeff-depth capability to quantization · 60f2a229
      Monty Montgomery authored
      This patch completes the work to add fixed-depth TX domain support to
      the quantization and dequantization code.  At present, it is active but
      configured to behave identically to current AV1 master as RDO and TX
      have not yet been updated to also support this functionality.
      
      subset-1:
      monty-rest-of-stack-noshift-s1@2017-11-13T14:37:42.541Z ->
       monty-rest-of-stack-quant-s1@2017-11-13T14:38:43.774Z
      
        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
      
      objective-1-fast --limit=4:
      monty-rest-of-stack-noshift-o1f4@2017-11-13T14:37:16.992Z ->
       monty-rest-of-stack-quant-o1f4@2017-11-13T14:38:28.828Z
      
        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: I3773a1fc128136c9fea227f4b547576a8aa6efa3
      60f2a229
  2. 07 Nov, 2017 1 commit
    • Zoe Liu's avatar
      Speed up ref selection by enforcing max 6 frames · f452fdfe
      Zoe Liu authored
      A speedup feature that enforces the maximum number of reference frames
      to evaluate for each arbitrary frame to be 6, as opposed to the maximum
      syntax-allowed number of reference frames which is 7, through the
      following rules:
      
      (1) When all the possible reference frames are availble, we reduce the
          number of reference frames (7) by 1 by removing one reference
          frame;
      (2) Always retain GOLDEN_FARME/ALTEF_FRAME;
      (3) Check the earliest 2 remaining reference frames, and there are two
          options to remove one reference frame:
          (a) Remove the one with the lower quality factor; Otherwise if
          both frames have been coded at the same quality level, remove the
          earliest reference frame;
          (b) Always remove the earliest reference frame.
          Currently set option (a).
      
      This patch has demonstrated an encoder speedup of ~8.5%. It is under
      speed2 with "selective_ref_frame >= 2". (May be considered to move
      to speed1 later once the coding performance impact is evaluated
      further.)
      
      Using the following configure setups, the coding performance has been
      dropped on Google test sets (50 frames) in BDRate by ~0.2% for lowres
      and by ~0.1% for midres:
      --enable-experimental --disable-convolve-round --disable-ext-partition
      --disable-ext-partition-types --disable-txk-sel --disable-txm
      
      Change-Id: I84317bae00bfd90b2c3d301858a849f441974e6f
      f452fdfe
  3. 16 Oct, 2017 1 commit
  4. 16 Sep, 2017 1 commit
    • Debargha Mukherjee's avatar
      Add a q index based frame superres mode · 7166f22a
      Debargha Mukherjee authored
      Refactors and adds superres-mode 3 and associated
      paramters --superres-qthresh and --superres-kf-qthresh
      that are used to trigger superres mode when the qindex
      for any frame exceeds the thresholds provided for non-key
      and key-frames respenctively. The superres scale factor
      numerator is progressively reduced from 16 starting from
      that q threshold following a fixed slope.
      
      Change-Id: If1c782993667a6fbaaa01bbde77c4924008c0d28
      7166f22a
  5. 02 Sep, 2017 1 commit
  6. 08 Aug, 2017 1 commit
  7. 02 Aug, 2017 1 commit
    • Zoe Liu's avatar
      Enable flex-refs by default when altref2 is on · 438b3ae7
      Zoe Liu authored
      Compared against baseline with default enabled tools (except for
      ext-tx and global-motion for speed concern):
      
                       altref2 -> altref2 + flex-refs
      lowres: avg_psnr -0.395% -> -0.460%
      midres: avg_psnr -0.418% -> -0.478%
      
      In particular, flex-refs improves the coding performance for the
      following 3 clips while no impact on all other clips:
      
      bowing_cif.y4m:    avg_psnr  0.023% -> -1.022%
      pamphlet_cif.y4m:  avg_psnr  0.454% -> -1.111%
      snow_mnt_480p.y4m: avg_psnr -0.162% -> -1.948%
      
      Change-Id: I612c1ae5feb1f07d8bd5aaf67e21a076445e10b9
      438b3ae7
  8. 01 Aug, 2017 1 commit
    • 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
  9. 16 Jun, 2017 3 commits
    • Fergus Simpson's avatar
      frame_superres: Use calculate_scaled_size for scale check · b0157aa6
      Fergus Simpson authored
      Small change to calculate the encode size for scale checking using the
      av1_calculate_scaled_size function used elsewhere instead of calculating
      it in place. Done for constistency's sake.
      
      Change-Id: I72626b729477e28e868cf9028ea4537267a12413
      b0157aa6
    • Fergus Simpson's avatar
      scaling: Add kf numerator for resize and superres · 87cf61b1
      Fergus Simpson authored
      Adds a separate scale numerator for resize and superres scaling on
      keyframes. They will only use this factor in their respective FIXED
      modes.
      
      Change-Id: I4ef9a5760a5423ec632d644e6c7fec674bbb46f4
      87cf61b1
    • Fergus Simpson's avatar
      Unify resize and superres denominator constants · bfbf6a59
      Fergus Simpson authored
      RESIZE_SCALE_DENOMINATOR and SUPERRES_SCALE_DENOMINATOR were two
      constants with the same value that did essentially the same thing.
      
      This patch merges the two into SCALE_DENOMINATOR for simplicity's sake.
      
      Change-Id: I252a9b7f89f10d77bdb0c3cf2d67d31d337afa4b
      bfbf6a59
  10. 15 Jun, 2017 2 commits
    • Debargha Mukherjee's avatar
      Unify and clean up resize arguments · 29e40a65
      Debargha Mukherjee authored
      Unifies the command line arguments for resize and superes.
      Removes resize arguments that are currently unused.
      
      Change-Id: I1362dffceb8257cee539f92679d1e8d79df08e66
      29e40a65
    • Fergus Simpson's avatar
      frame_superres: Add aomenc argument · c4e78942
      Fergus Simpson authored
      Adds "superres-mode" and "superres-numerator" arguments to configure
      superres scaling.
      
      There are only two modes right now: SUPERRES_FIXED and SUPERRES_DYNAMIC.
      0 sets the fixed mode and 1 sets the dynamic mode.
      
      For the fixed mode superres will scale to the provided numerator where
      possible. The cumulative scale change over resizing and superres is
      limited to 1/2, so it may have to back off.
      
      For the dynamic mode, the provided numerator will be used as the initial
      numerator. Asides from that it's just random for now.
      
      Change-Id: Ibae01c77abba2599fbf51096459d09ddca458d4f
      c4e78942
  11. 13 Jun, 2017 1 commit
    • Fergus Simpson's avatar
      Make loop-restoration compatible w/ frame_superres · 9cd57cf8
      Fergus Simpson authored
      There were several places where loop_restoration used the encoded width
      and height while superres was active. This patch changes it to use the
      upscaled width and height, since loop_restoration is supposed to occur
      after superres has done its upscaling.
      
      Change-Id: I2b9bbb06b5370618758bf81d8eb63f2eef26af80
      9cd57cf8
  12. 12 Jun, 2017 1 commit
    • Fergus Simpson's avatar
      frame_superres: Post encode/decode upscaling · d2bcbb56
      Fergus Simpson authored
      This patch implements the post-encode and post-decode upscaling for the
      frame superresolution experiment to work.
      
      Upscaling happens after cdef and before loop restoration.
      
      For now, this patch forces on random-superres.
      
      The patch also cleans up some broken rate control hooks from VP9
      days, to be brought back later when the resize and superres tools
      are stable.
      
      Change-Id: If0a8f69224dfaa0f4ae7703bd429ea2af953c7a6
      d2bcbb56
  13. 09 May, 2017 1 commit
    • Fergus Simpson's avatar
      resize-refactor: Change resizing process with helpers · fecb2abc
      Fergus Simpson authored
      Adds three new helpers and changes one other. The intention of this is
      to make the triggering and function of resizing simpler. The new process
      is to resize to the next state and then update the current state to
      match. The new helpers reflect this change and make the overall flow
      simpler.
      
      resize_pending is now a helper instead of a member, so it doesn't need
      to be raised manually. A resize is pending when the numerator or
      denominator of the next resize state is different from the current one.
      resize_pending could be 1 (scale down), 0 (no change), or -1 (return to
      original resolution if 1-pass CBR), but now it can only be 1 or 0. To
      return to the original resolution just set the scale to 1:1. This
      reduces complexity with no change in functionality.
      
      resize_unscaled just returns 1 if the current numerator and denominator
      are equal. This makes some if conditions cleaner.
      
      resize_step makes the current scale equal to the next scale. This
      signifies that a resize is complete and will cause resize_pending to be
      false until the next state is changed. This is the end of the new
      resizing procedure.
      
      av1_calculate_coded_size has been changed to calculate the next size
      instead of the current size. The current state can't be updated until
      the resize is complete because if it were, the resize_pending state
      would drop and the resize wouldn't finish. This just means the next
      resolution is the target resolution until the resize is complete.
      
      Change-Id: I5d5855cc83f532d3a8b1f8853ba70a0d43221fbf
      fecb2abc
  14. 04 May, 2017 2 commits
    • Fergus Simpson's avatar
      resize-refacor: Remove changing of scale by rate control · 0757fd8f
      Fergus Simpson authored
      This patch removes resize triggering by rate control and also removes
      pending resizes causing recodes in encode_with_recode_loop. The removed
      functionality will be replaced in the future, but it is simply being
      removed for now to simplify the work to do.
      
      Change-Id: Ia4a5840dcb463faab5aab1c08f640a7bcf5e6c5a
      0757fd8f
    • Fergus Simpson's avatar
      resize-refactor: Refactor 2-pass VBR resizing · ddc846ea
      Fergus Simpson authored
      Replaces resizing's table and index approach to frame sizes with
      numerator and denominator integers in the AV1_COMP struct.
      
      This approach is more flexible and will be simpler going forward as it
      is much more similar to the 1-pass CBR approach that is also being
      refactored. The intention is to merge both approaches and this is the
      first step toward that.
      
      Change-Id: I5733c0687390f8a8e2790dcddfa09fb08ab88376
      ddc846ea
  15. 22 Apr, 2017 1 commit
    • James Zern's avatar
      {aq_variance,firstpass,ratectrl}.c: quiet -Wshorten warnings · be0bdd8c
      James Zern authored
      ported from libvpx:
      
      Added casts to remove warnings:
      
      In regards to the safety of these casts they are of two types:-
      
      - Normalized bits per (16x16) MB stored in a 32 bit int (This is safe as
        bits per MB even with << 9 normalization cant overflow 32 bits. Even
        raw 12 bits hdr source even would only be  29 bits :- (4+4+12+9) and
        the encoder imposes much stricter limits than this on max bit rate.
      
      - Cast as part of variance calculations.  There is an internal cast up
        to 64 bit for the Sum X Sum calculation, but after normalization
        dividing by the number of points the result will always be <= the SSE
        value.
      
      BUG=aomedia:445
      
      Change-Id: I4e700236ed83d6b2b1955e92e84c3b1978b9eaa0
      be0bdd8c
  16. 12 Apr, 2017 1 commit
  17. 11 Mar, 2017 1 commit
    • James Zern's avatar
      av1_rc_update_rate_correction_factors: avoid log(0) · d2c42f03
      James Zern authored
      avoids a floating point error being generated. this doesn't change
      behavior, the -HUGE_VAL return was being ignored due to the min()
      
      BUG=aomedia:388
      
      Change-Id: I698aab248c777b02b60081bb7619e0aa6f3a0ba2
      d2c42f03
  18. 20 Oct, 2016 1 commit
    • Zoe Liu's avatar
      Sync with aom branch for ext-refs · 6cfaff95
      Zoe Liu authored
      Plus a small code clean up. The experiment of EXT_REFS, compared against
      the baseline, using Overall PSNR, now obtains a gain on lowres as:
      Avg: -5.818; BDRate: -5.653
      
      Compared against the previous EXT_REFS results on lowres, a tiny gain is
      obtained as:
      Avg: -0.047, BDRate: -0.063
      
      (1) 780952 Add encoder first pass support to bi-prediction in EXT_REFS
      (2) f91498 Add pred prob handling for new references in EXT_REFS
      (3) e91472 Add decoder support for bi-direct prediction in EXT_REFS
      (4) 0dbac9 Add encoder support to new references in EXT_REFS
      (5) ad70cc Remove hard-coded number for EXT_REFS
      (6) 9c1e2f Add the use of new reference frames at encoder in EXT_REFS
      (7) 6d4fde Add the experiment flag of EXT_REFS
      
      Change-Id: I26f7ca45b9ede7579fdb9d0d6a1a91f4334599bd
      6cfaff95
  19. 19 Oct, 2016 1 commit
  20. 17 Sep, 2016 1 commit
  21. 15 Sep, 2016 1 commit
  22. 02 Sep, 2016 1 commit
  23. 01 Sep, 2016 2 commits
  24. 22 Aug, 2016 1 commit
  25. 19 Aug, 2016 1 commit
    • Wei-ting Lin's avatar
      Insert extra ARFs' in a gf group · 41d5d52d
      Wei-ting Lin authored
      Insert multiple arfs in a gf group to emulate multi-layer backward
      reference frames structure. At maximum, two extra ARF's are inserted
      in a gf group.
      
      It improves the RD performance by 0.317% in Avg in lowres dataset.
      
      Change-Id: I62c32e1b0f25b978484dd113b319bebcd959bf60
      41d5d52d
  26. 12 Aug, 2016 1 commit
  27. 11 Aug, 2016 1 commit
    • Zoe Liu's avatar
      Fix a bug in RATE_FACTOR_LEVEL definition for ext-refs · cdd4eb02
      Zoe Liu authored
      There was a bug in the original set up for RATE_FACTOR_LEVELS, which
      results that rate_factor_deltas for GF_ARF_STD is 2.00, instead of the
      intentional value of 1.75, whereas for KF_STD is 0.00, instead of the
      intentional value of 2.00.
      
      Nevertheless, if simply fixing the bug as in the first patch, the RD
      performance unexpectedly dropped by 0.143% in Avg bitrate using
      Overall PSNR, especially for following sequences in lowres:
      
      bridge_close_cif: dropped by 1.468%
      container_cif: dropped by 2.140%
      husky_cif: dropped by 0.826%
      motherdaughter_cif: dropped by 0.798%
      rasehorses_240p: dropped by 0.805%
      students_cif: dropped by 1.411%
      
      This indicates that we should boost up the value for GF_ARF_STD from
      1.75 to at least to 2.00. After doing so, while still keeps 2.00 for
      KF_STD, the new patch achieves a small gain of 0.15% for the baseline,
      and a smaller gain of 0.06% for the experiment of ext-refs. Most
      sequences keep the similar RD performance in lowres, except for the
      following ones that obtain a bigger gain:
      
      (1) Baseline:
      container_cif: 1.628%
      students_cif: 1.015%
      
      (2) ext-refs
      tennis_sif: 1.248%
      
      Change-Id: I992f8f6a3e20f1b71ec52a1ddc969af4968b78d5
      cdd4eb02
  28. 10 Aug, 2016 1 commit
  29. 23 Jul, 2016 1 commit
  30. 19 Jul, 2016 2 commits
    • Zoe Liu's avatar
      A small refactor on the rate controller · 054689b2
      Zoe Liu authored
      Change-Id: Ie39e16de2457dd201121c62967e4ddaf5a05c33a
      054689b2
    • Wei-ting Lin's avatar
      Allow OVERLAY frames to use the show_exsiting_frame flag · ccc9e7cf
      Wei-ting Lin authored
      ARF with zero strength temporal filter can be reused by setting the
      show_existing_frame = 1, and in this case, there is no need to
      refresh the reference frame buffer. However, we used the flag
      "refresh_golden_frame" as the identifier for the starting point of a gf
      group.
      
      A new flags "is_arf_filter_off" is used to record if the filter with
      strengrh zero is used.
      
      Change-Id: I25971a760f6e1638d5147fe30488c48125512b1a
      ccc9e7cf
  31. 17 Jun, 2016 1 commit
    • Zoe Liu's avatar
      Merge bi-predictive frames to EXT_REFS · 5805a14c
      Zoe Liu authored
      This patch removed the experiment of BIDIR_PRED and merged the feature
      into the experiment of EXT_REFS:
      
      (1) Each frame now has up to 6 reference frames, namely
          LAST_FRAME, LAST2_FRAME, LAST3_FRAME, GOLDEN_FRAME, (forward) and
          BWDREF_FRAME, ALTREF_FRAME (backward);
          LAST4_FRAME has been removed;
      (2) First pass still keeps the 8 updates:
          KF_UPDATE, LF_UPDATE, GF_UPDATE, ARF_UPDATE, OVERLAY_UPDATE, and
          BRF_UPDATE, LAST_BIPRED_UPDATE, BI_PRED_UPDATE;
      (3) show_existing_frame==1 is supported in the experiment of EXT_REFS;
      (4) New encoding modes are added for both single-ref and compound cases,
          through the use of the 2 extra forward references (LAST2 & LAST3)
          and the 1 extra backward reference (BWDREF).
      
      RD performance wise, using Overall PSNR: Avg/BDRate
              Bipred only      Prev EXT_REFS    Current EXT_REFS with bipred
      lowres: -3.474/-3.324    -1.748/-1.586    -4.613/-4.387
      derflr: -2.097/-1.353    -1.439/-1.215    -3.120/-2.252
      midres: -2.129/-1.901    -1.345/-1.185    -2.898/-2.636
      
      If in vp10/encoder/firstpass.h, change BFG_INTERVAL from 2 to 3, i.e. to
      use 2 bi-predictive frames than 1, a further improvement may be
      obtained:
                       Current EXT_REFS with bipred
              1 bi-predictive frame    2 bi-predictive frames
      lowres: -4.613/-4.387            -4.675/-4.465
      derflr: -3.120/-2.252            -3.333/-2.516
      midres: -2.898/-2.636            -3.406/-3.095
      
      Change-Id: Ib06fe9ea0a5cfd7418a1d79b978ee9d80bf191cb
      5805a14c
  32. 28 May, 2016 1 commit
    • Zoe Liu's avatar
      Make the bi-predictive frame group interval adjustable · e89ca180
      Zoe Liu authored
      This is for the bidir-pred experiment. Previously the length of the
      bi-predictive frame group interval is fixed at 2, i.e. one
      bi-predictive frame may be inserted every other frame. This patch
      makes the length adjustable, i.e. any positive number may be
      specified, but the use of the backward ref will be turned off if the
      bi-predictive frame group interval is larger than the golden frame
      group.
      
      Further, an additional rate factor level has been added:
      INTER_LOW
      , which applies to LAST_BIPRED_UPDATE frames that are not used as
      references.
      
      Change-Id: I5514d34a64dd486bbb5756c2d0612946f598a789
      e89ca180
  33. 24 May, 2016 1 commit
    • Zoe Liu's avatar
      Added an experiment "bidir_pred" for backward prediction · cf5083d4
      Zoe Liu authored
      Major parts have been implemented as follows:
      (1) Added BRF_UPDATE, LASTNRF_UPDATE, and NRF_UPDATE in firstpass.c;
      (2) Added the handling for the scenario of
      "cpi->common.show_existing_frame == 1" at the encoder;
      (3) Added a new reference frame of BWDREF_FRAME;
      (4) Have bwd-ref work with upsampled references.
      
      Note that when the experiment of "ext_refs" turned on, this experiment
      will be turned off automatically currently.
      
      RD performance in Overall PSNR has been improved, compared against the
      VP10 baseline:
      
      lowres: Avg -3.312; BDRate -3.154
      derflr: Avg -1.927; BDRate -1.176
      midres: Avg -2.149; BDRate -2.001
      hdres : Avg -0.567; BDRate -0.588
      
      Change-Id: I4c06ff51cc20194bffbd4d2346e57ba3dcf6b62c
      cf5083d4
  34. 22 Mar, 2016 1 commit
    • Yaowu Xu's avatar
      vp10/ -> av1/ · cfea7dd7
      Yaowu Xu authored
      Change-Id: Ia055d03656ad1580447eced8687949583fdf4089
      cfea7dd7