1. 21 Oct, 2016 4 commits
    • Yaowu Xu's avatar
      Remove duplicate code · 68cb657e
      Yaowu Xu authored
      The duplicate breaks build.
      
      Change-Id: I0f16761c4bcb8563402a664013429403b883c2e1
      68cb657e
    • 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
    • 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
    • Yaowu Xu's avatar
      decodeframe.c: aom_read_tree_cdf->aom_read_symbol · f2581a3a
      Yaowu Xu authored
      This was a missed replacement from cherry-pick of:
      9ac7a9dc
      
      Change-Id: I9e01d9d7a39bed397500a293bf68dca2746aa917
      f2581a3a
    • 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
    • Angie Chiang's avatar
      Add adapt_scan APIs and some helping functions · 648aeb0b
      Angie Chiang authored
      av1_init_scan_order
      initialize data structures related to adaptive scan order
      
      av1_update_scan_prob
      update nonzero probabilities from nonzero counts
      
      av1_augment_prob
      embed r + c and coeff_idx info with nonzero probabilities.
      When sorting the nonzero probabilities, if there is a tie,
      the coefficient with smaller r + c will be scanned first
      
      av1_update_sort_order
      apply quick sort on nonzero probabilities to obtain a sort order
      
      av1_update_scan_order
      apply topological sort on the nonzero probabilities sorting order to
      guarantee each to-be-scanned coefficient's upper and left coefficient
      will be scanned before the to-be-scanned coefficient.
      
      av1_update_neighbors
      For each coeff_idx in scan[], update its above and left neighbors in
      neighbors[] accordingly.
      
      Change-Id: I64c4938057daf8e30e48609a00ecc08d2e3062f4
      648aeb0b
    • 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
    • Angie Chiang's avatar
      Add data structure of adpat_scan experiment · 37fb8edd
      Angie Chiang authored
      Change-Id: I163874ee64b9c348de2c7cc8e7b2852308734b0e
      37fb8edd
    • hui su's avatar
      Renaming in filter-intra sse4 code · 9ff4134f
      hui su authored
      Change-Id: Iff1786a92d164e6b9cfaf4a59ece79819494276f
      9ff4134f
    • hui su's avatar
      Remove av1/common/intra_filters.h · 344b643d
      hui su authored
      Use a single header reconintra.h for all intra prediction
      related codes.
      
      Change-Id: Ib869447f8c482b534c890eab673e81ff830e8d85
      344b643d
    • 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 21 commits
    • Jingning Han's avatar
      Offset speed feature setting index · 775d99f0
      Jingning Han authored
      Change-Id: If201cbd4175842f68e6dcfb0414ff16ca07e0881
      775d99f0
    • hui su's avatar
      Add matching brace in aomenc.c · 251e151c
      hui su authored
      Change-Id: Iccb75d5204f0f52f2c7d6e18d1f8223ce10f68ba
      251e151c
    • 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
    • Steinar Midtskogen's avatar
      Move clpf_sse4_1.c to clpf_sse4.c in agreement with convention · f250e20d
      Steinar Midtskogen authored
      Change-Id: Ia9adc46b8a4d08c5b8e0089ea1a1526df4f1e1dc
      f250e20d
    • Jingning Han's avatar
      Add tx_size to pixel number map · 02935f5f
      Jingning Han authored
      Change-Id: I789fa11638f155f1092a1e9260d26c7855d18e37
      02935f5f
    • Jingning Han's avatar
      Fix decodeframe.c format · 8f6eb189
      Jingning Han authored
      Change-Id: I2228a3d1778917ac760582fbec3c868be5d9ba1c
      8f6eb189
    • 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
    • Yaowu Xu's avatar
      Reorder includes · caf2023a
      Yaowu Xu authored
      Change-Id: I97487bf353471bf9d245cd620780adfb1d3fc2b1
      caf2023a
    • Michael Bebenita's avatar
      Bit accounting. · 6048d052
      Michael Bebenita authored
      This patch adds bit account infrastructure to the bit reader API.
      When configured with --enable-accounting, every bit reader API
      function records the number of bits necessary to decoding a symbol.
      Accounting symbol entries are collected in global accounting data
      structure, that can be used to understand exactly where bits are
      spent (http://aomanalyzer.org). The data structure is cleared and
      reused each frame to reduce memory usage. When configured without
      --enable-accounting, bit accounting does not incur any runtime
      overhead.
      
      All aom_read_xxx functions now have an additional string parameter
      that specifies the symbol name. By default, the ACCT_STR macro is
      used (which expands to __func__). For more precise accounting,
      these should be replaced with more descriptive names.
      
      Change-Id: Ia2e1343cb842c9391b12b77272587dfbe307a56d
      6048d052
    • Jingning Han's avatar
      Fix format in set_offsets() · 97d85483
      Jingning Han authored
      Change-Id: I371297e6ee000e6dc01ba1544763cbed429b0e5a
      97d85483
    • Brennan Shacklett's avatar
      Temporary fix for 4X8 block intra prediction. · 7523a7ec
      Brennan Shacklett authored
      Currently the RD loop traverses 4X8 blocks in inverted N order while
      the bitstream stores blocks smaller than 8x8 in Z order. This causes a
      discrepancy where the RD loop reads uninitialized data while
      performing intra prediction.  As a temporary fix simply disable the
      use of the extended right edge for 4X8 blocks, until the bitstream can
      be changed to match the logical structure of the blocks.
      
      Change-Id: I44a9e4fc1a15cd551a7b38c3c1227bc5dac77e9a
      7523a7ec
    • 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 6 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
    • Angie Chiang's avatar
      Add av1_fdct64_new and av1_idct64_new · 792519bd
      Angie Chiang authored
      Change-Id: If497816d7f6ee094d40872a2f988c91e90b78d7b
      792519bd
    • 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