1. 21 Oct, 2016 11 commits
    • Nathan E. Egge's avatar
      Update inter_mode_cdf tables once per frame. · 6ec4d10d
      Nathan E. Egge authored
      Move computing the inter_mode_cdf tables per coded inter mode symbol to
       computing them only when the probabilities are updated.
      
      Change-Id: I7a7b059ee75723cb6f278ed82a20cf34c27915d8
      6ec4d10d
    • Nathan E. Egge's avatar
      Update uv_mode_cdf tables once per frame. · 380cb1a9
      Nathan E. Egge authored
      Move computing the uv_mode_cdf tables per coded intra mode symbol to
       computing them only when the probabilities are updated.
      
      Change-Id: I627b59d30726c913f5d7ba7753cb0446a12655bb
      380cb1a9
    • Nathan E. Egge's avatar
      Update y_mode_cdf tables once per frame. · 5710c722
      Nathan E. Egge authored
      Move computing the y_mode_cdf tables per coded intra mode symbol to
       computing them only when the probabilities are updated.
      
      Change-Id: I8c43d09b8ef5febe2a3ec64bd51d28bd78ea73ed
      5710c722
    • Nathan E. Egge's avatar
      Update kf_y_mode_cdf tables once per frame. · 3ef926ed
      Nathan E. Egge authored
      Move computing the kf_y_mode_cdf tables per coded intra mode symbol to
       computing them only when the probabilities are updated.
      
      Change-Id: I5999447050c2f7d5dbccde80bee05ecd1c5440ab
      3ef926ed
    • Angie Chiang's avatar
      Pass AV1_COMMON into get_scan · ff6d8905
      Angie Chiang authored
      This CL will facilitate adapt_scan experiment.
      In adapt_scan experiment, dynamic scan order will be stored in
      AV1_COMMON
      
      Change-Id: I4763ea931b5e1af54d4f173971befeb01a4db335
      ff6d8905
    • Jingning Han's avatar
      Unify set_contexts() function for encoder and decoder · a6923f7f
      Jingning Han authored
      Remove the separate implementations of set_contexts() in encoder
      and decoder.
      
      Change-Id: I9f6e9b075532faae0f74f885d9443589254258a7
      a6923f7f
    • Nathan E. Egge's avatar
      Code class0 using aom_read() / aom_write(). · 45ea963f
      Nathan E. Egge authored
      The av1_mv_class0_tree is a balanced tree with two leafs and can
       simply be coded as a boolean with probability class0[0].
      If CLASS0_SIZE is ever changed from 1, this change will need to be
       reverted.
      
      Change-Id: If294dac825a5f945371092c74aa8e3f84cd962b6
      45ea963f
    • Nathan E. Egge's avatar
      Use intra_ext_tx_cdf when coding tx_type. · 72762a28
      Nathan E. Egge authored
      When building with --enable-daala_ec, the tx_type for intra blocks can be
       coded using the CDFs that are updated once per frame.
      This patch converts a tx_type symbol to be coded with aom_write_symbol()
       and aom_read_symbol() that was missed in f3e8e267.
      
      Change-Id: I34f8fef7525f88e156bbcb78dfc48994367610ce
      72762a28
    • Yaowu Xu's avatar
      Fix typos · c287e271
      Yaowu Xu authored
      In a previous commit: 5db9743f, two
      changes that appeared to be typos are breaking build when experiments
      are enabled:
      
      ../../libvpx/configure --enable-experimental --enable-ref-mv
      --enable-ext-intra --enable-ext-refs --enable-ext-interp
      --enable-supertx --enable-var-tx --enable-entropy --enable-ext-inter
      --enable-ext-tx  --enable-motion-var --enable-dual-filter
      --enable-ext-partition --enable-ext-partition-types
      --enable-loop-restoration --enable-rect-tx --enable-palette
      --enable-aom-highbitdepth --enable-filter-intra --enable-internal-stats
      && make clean && make -j16
      
      This commit fixes the issue.
      
      Change-Id: I9ce5bbc96df326214202868cb0669bd334c86851
      c287e271
    • Yaowu Xu's avatar
      Fix encoder crash when --enable-daala-ec · e1466ad4
      Yaowu Xu authored
      Change-Id: I6855e18d92f693a9789eda7c91a3430566469bdd
      e1466ad4
    • Angie Chiang's avatar
      Pass AV1_COMMON into av1_cost_coeffs · 22ba7514
      Angie Chiang authored
      Change-Id: I2043d635e2a7f50f84a541501f28179b797ca326
      22ba7514
  2. 20 Oct, 2016 9 commits
    • Urvang Joshi's avatar
      Palette: Use inverse_color_order to find color index faster. · 967ff395
      Urvang Joshi authored
      Cherry-picked from aomedia/master: b1c3bb57
      
      Change-Id: Icfc16070160fd9763abb1dbf5545103e62b4b9ff
      967ff395
    • Nathan E. Egge's avatar
      Compute all token encodings from symbol trees. · 3c056790
      Nathan E. Egge authored
      The av1_token encodings must match the contents of the aom_tree_index
       structures so generate all encodings from the symbol trees.
      
      Change-Id: I37be9f12c86a02693ae3c3c1d24b00f2abb29bfb
      3c056790
    • Urvang Joshi's avatar
      Declare some array sizes to be constants (known at compile time). · bffc0b57
      Urvang Joshi authored
      This reduces some memcpys and callocs.
      
      Cherry-picked from aomedia/master: 40810138
      
      Change-Id: If04580af4c63892c8af8ac5b405c7d6aabe5af89
      bffc0b57
    • Urvang Joshi's avatar
      angle estimation: Some renames/tweaks to sync with aomedia code. · da70e7b0
      Urvang Joshi authored
      Change-Id: Ide91d76fafe79b2b310ffd5afb7cd5b26b681f78
      da70e7b0
    • Urvang Joshi's avatar
      Encoder/Decoder mismatch fix: need a separate copy of eob_counts. · 43e6281f
      Urvang Joshi authored
      The bug was introduced here:
      https://chromium-review.googlesource.com/#/c/399975/4/av1/encoder/bitstream.c
      In that patch, I had removed 2nd declaration of a variable of the same
      name. But it turns out that the two variables actually had a different
      type (even though the name was same).
      
      Now, we keep both variables, but rename one of them -- that fixes the
      mismatch. While we are at it, made both variables local as well.
      
      The fix can be verified as follows:
      ../../libvpx/configure --enable-experimental --enable-supertx
      --enable-var-tx --enable-entropy --enable-internal-stats && make clean
      && make -j16
      
      aomenc -o soccer_cif_1000_av1_b8.webm ../soccer_cif.y4m --codec=av1
      --limit=50 --skip=0 -p 2 --pass=1 --fpf=soccer_cif_av1.fpf --good
      --cpu-used=0 --target-bitrate=1000 --lag-in-frames=25 --min-q=0
      --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0
      --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
      --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0
      --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0
      --tile-columns=0 --profile=0 --test-decode=warn
      
      aomenc -o soccer_cif_1000_av1_b8.webm ../soccer_cif.y4m --codec=av1
      --limit=50 --skip=0 -p 2 --pass=2 --fpf=soccer_cif_av1.fpf --good
      --cpu-used=0 --target-bitrate=1000 --lag-in-frames=25 --min-q=0
      --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0
      --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
      --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0
      --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0
      --tile-columns=0 --profile=0 --test-decode=warn -v --psnr
      
      Change-Id: Ibd72dbe1f620e6de231513220ee4e190606613ae
      43e6281f
    • Sarah Parker's avatar
      Fix logical vs bitwise & bug · ea16b689
      Sarah Parker authored
      This was causing one of the global motion parameters to not
      be centered at 0.
      
      Change-Id: Ide32e3d177bed5613ab768a19b4e33b37692463a
      ea16b689
    • 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
    • Yi Luo's avatar
      Fix the overflow of av1_fht32x32() in 2D DCT_DCT · 157e45a4
      Yi Luo authored
      - Use range check function to avoid DCT_DCT overflow.
        We need to re-develop the column txfm side scaling/rounding. Now,
        we prefer to maintain the current BDRate level.
      - Encoder user level time reduction <1% owing to av1_fht32x32_avx2.
      - Add MemCheck unit test and fdct32() unit test.
      
      Change-Id: I1e67030f67bc637859798ebe2f6698afffb8531c
      157e45a4
    • hui su's avatar
      Seperate FILTER_INTRA from EXT_INTRA experiment · 5db9743f
      hui su authored
      Prepare for the av1/nextgenv2 merge.
      
      Coding gain (%):
      
                     lowres     midres
      ext-intra       0.69       0.97
      filter-intra    0.67       0.83
      both            1.05       1.48
      
      Change-Id: Ia24d6fafb3e484c4f92192e0b7eee5e39f4f4ee6
      5db9743f
  3. 19 Oct, 2016 13 commits
    • Jingning Han's avatar
      Offset speed feature setting index · 775d99f0
      Jingning Han authored
      Change-Id: If201cbd4175842f68e6dcfb0414ff16ca07e0881
      775d99f0
    • Thomas Davies's avatar
      Step size and arithmetic coding for delta quantization. · f693610a
      Thomas Davies authored
      Example performance: 1.8% bit rate savings using
      the AQ test mode aq-mode=4 :
      ./aomenc --codec=av1 --ivf --tile-columns=1 --tile-rows=1 \
                       --kf-max-dist=1000 --kf-min-dist=1000 --cpu-used=0 \
                       --passes=1 --threads=1 --lag-in-frames=0 \
                       --end-usage=q --limit=600 --cq-level=42 \
                       --aq-mode=4 --error-resilient=1 out.bits FourPeople_1280x720_60.y4m
      
      Change-Id: Iba01cf2732a57f3c27481ac2a3c8fc37bb9e5533
      f693610a
    • Arild Fuldseth's avatar
      Support for delta-q at superblock level · 07441165
      Arild Fuldseth authored
      Change-Id: I4128af44776d1f361bddc1fdffb75ed2224dbfa5
      07441165
    • Arild Fuldseth's avatar
      Always send frame size explicitly · 842e9b03
      Arild Fuldseth authored
      This commit changes to send frame size explicitly when
      error_resilient_mode=1. Purpose is to allow parsing of bitstream
      after a packet loss.
      
      Change-Id: I7d1c010a465aa18914762cc1a3e61db377304c08
      842e9b03
    • Yaowu Xu's avatar
      Fix build issues when --enable-aom-qm · 0dd04637
      Yaowu Xu authored
      Change-Id: I1a462675c06c4b2a5f8b4b347f23fec67feccdd0
      0dd04637
    • Alex Converse's avatar
      Partition the ans experiment into 'ans' and 'rans' · ec6fb649
      Alex Converse authored
      The (new) ans experiment replaces the bool coder with uABS bools. The
      'rans' experiment adds multisymbol coding.
      
      This matches the setup in aom/master.
      
      Change-Id: Ida8372ccabf1e1e9afc45fe66362cda35a491222
      ec6fb649
    • Urvang Joshi's avatar
      Fix warnings reported by -Wshadow: Part4: main directory · 4145bf05
      Urvang Joshi authored
      Now that all warnings are taken care of, add warning flag -Wshadow to
      configure.
      
      Note: Enabling this flag for C++ generates some useless warnings about
      some function parameters shadowing class member function names. So, only
      enabling this warning for C code.
      
      Cherry-picked from aomedia/master: b96cbc44
      
      Change-Id: I3922dea2e6976b16519c4aa4d1bd395c198134f1
      4145bf05
    • Peter de Rivaz's avatar
      Fix for var_tx context update · 74d0ad84
      Peter de Rivaz authored
      The tx_partition_set_contexts function changes tx_size even
      for blocks coded with a rectangular transform.
      This causes an internal rd inconsistency when using all of
      CONFIG_VAR_TX, CONFIG_RECT_TX, CONFIG_EXT_TX.
      
      Change-Id: Ia45d4a8893b0961534219bb96d9652719038c7a1
      74d0ad84
    • Urvang Joshi's avatar
      Fix warnings reported by -Wshadow: Part2b: more from av1 directory · 368fbc95
      Urvang Joshi authored
      From code only part of nextgenv2 (and not aomedia)
      
      Change-Id: I21f7478a59d525dff23747efe5238ded16b743d2
      368fbc95
    • Urvang Joshi's avatar
      Fix warnings reported by -Wshadow: Part2: av1 directory · 454280da
      Urvang Joshi authored
      While we are at it:
      - Rename some variables to more meaningful names
      - Reuse some common consts from a header instead of redefining them.
      
      Cherry-picked from aomedia/master: 863b0499
      
      Change-Id: Ida5de713156dc0126a27f90fdd36d29a398a3c88
      454280da
    • Urvang Joshi's avatar
      Fix warnings reported by -Wshadow: Part1b: scan_order struct and variable · 03f6fdcf
      Urvang Joshi authored
      - Change struct name to all caps SCAN_ORDER to be locally consistent.
      - Rename struct pointers to 'scan_order' instead of hard to read short
        names 'so' and 'sc'.
      
      Cherry-picked from aomedia/master: 30abc082
      
      Change-Id: Ib9f0eefe28fa97d23d642b77d7dc8e5f8613177d
      03f6fdcf
    • Urvang Joshi's avatar
      Move STAT_TYPE enum to source file. · b5ed3500
      Urvang Joshi authored
      In the header, all we need is number of stat types, not the names for actual
      types.
      
      Removing it avoids names like 'Y', 'U', 'V' and 'ALL' being visible
      in all files that include the encoder.h header.
      
      Change-Id: I874a73a3cfe6bcb29aedea102077a52addc49af6
      b5ed3500
    • Urvang Joshi's avatar
      Code cleanup: mainly rd_pick_partition and methods called from there. · 52648448
      Urvang Joshi authored
      - Const correctness
      - Refactoring
      - Make variables local when possible etc
      - Remove -Wcast-qual to allow explicitly casting away const.
      
      Cherry-picked from aomedia/master: c27fcccc
      And then a number of more const correctness changes to make sure other
      experiments build OK.
      
      Change-Id: I77c18d99d21218fbdc9b186d7ed3792dc401a0a0
      52648448
  4. 18 Oct, 2016 7 commits
    • Nathan E. Egge's avatar
      Update segment tree_cdf per frame. · f627e58e
      Nathan E. Egge authored
      Move computing the segmentation_probs.tree_cdf table per symbol to
       computing it only when the probabilities are updated.
      
      Change-Id: I3826418094bbaca4ded87de5ff04d4b27c85e35a
      f627e58e
    • Sarah Parker's avatar
      Add clamping to parameter search · 081783dc
      Sarah Parker authored
      This fixes mismatches due to overflowing low precision parameters.
      
      Change-Id: If34e39ca7ab0adc9688d46b0e8ed62cbb6fdaff0
      081783dc
    • Sarah Parker's avatar
      Adjust gm costing so GLOBAL_ZERO is treated as regular zeromv · ae51dd82
      Sarah Parker authored
      Change-Id: I1b41146ae844c985566f5f9fdaeb5d4a4a5927b6
      ae51dd82
    • Sarah Parker's avatar
      Fix ransac random generator seeding · efa65822
      Sarah Parker authored
      Ransac's get_rand_indices originally used rand_r seeded with the
      same value every time, producing the same random sequence at every
      iteration. This causes the global motion parameters to be slightly
      less accurate because ransac cannot improve the model fit after
      the first attempt.
      
      Change-Id: Idca2f88468ea21d19ba41ab66e5a2744ee33aade
      efa65822
    • Guillaume Martres's avatar
      Remove rd_variance_adjustment · 470efbcf
      Guillaume Martres authored
      This function is called after `super_block_yrd` and assumes that the dst
      buffer is correct but that is no longer always the case after
      daf841b4 since we don't call
      `txfm_rd_in_plane` after the RDO loop in `choose_tx_size_from_rd`.
      We could fix this by always saving and restoring the dst buffer but
      removing `rd_variance_adjustment` is a better solution:
      - Getting the dst buffer always right is tricky as demonstrated by the
        fact that it is wrong now, even if we fix it now we could break it later
        and not notice
      - Perceptual weighting is a good idea but `rd_variance_adjustment` is the
        wrong approach as it weights both the rate and the distortion:
        to get meaningful units you should only weight the distortion,
        weighting rate means that we pretend some bits cost less than other
        bits, this is not the case. The distortion weighting approach is
        implemented by Daala in `od_compute_dist` and we plan to experiment
        with this in AV1 too.
      - Removing `rd_variance_adjustment` improves coding efficiency on all
        metrics, here are the results for objective-1-fast using the Low
        Latency settings:
      
            PSNR Y:     -0.14%
           PSNRHVS:     -0.17%
              SSIM:     -0.12%
            MSSSIM:     -0.12%
         CIEDE2000:     -0.07%
      
      Change-Id: I74b26b568ee65f56521646b8f30dd53bcd29fce3
      470efbcf
    • Yushin Cho's avatar
      Remove unused PICK_MODE_CONTEXT::is_coded. · 40f1d487
      Yushin Cho authored
      Change-Id: Ibc73b4066dcdee45d32355144124762d26a16a28
      40f1d487
    • Urvang Joshi's avatar
      Remove unused array 'last_frame_seg_map_copy'. · 8a02d76a
      Urvang Joshi authored
      This array was allocated and used to save and restore segmentation map,
      however the original segmentation map was never modified between the
      calls to save and restore.
      
      Change-Id: Iaf0fbfed733c097e84cf44d2aa6b8f35d2fb456b
      8a02d76a