1. 07 Aug, 2012 2 commits
    • Yaowu Xu's avatar
      A bit of temporary relief on encoder slowness · 0b17ea6f
      Yaowu Xu authored
      The commit replaces run-time initialization of cosine constants with
      static constant values, which provides ~30% relief on slow speed. The
      real solution, however will be to implement integer versions of those
      functions that current use float/double.
      
      Change-Id: Ie3ff1793509653d78dd1aeaf88cc6737da1bc55f
      0b17ea6f
    • Jingning Han's avatar
      Refactoring hybrid transform coding · 66f440f1
      Jingning Han authored
      The forward and inverse hybrid transforms are now performed using
      single function modules, where the dimension is sent as argument.
      
      Added an inline function clip8b to clip the reconstruction pixels
      into range of 0-255.
      
      Change-Id: Id7d870b3e1aefc092721c80c0af6f641eb5f3747
      66f440f1
  2. 03 Aug, 2012 2 commits
    • Jingning Han's avatar
      Replacing the 8x8 DCT with 8x8 ADST/DCT for I8x8 · fcbff9ee
      Jingning Han authored
      Fixed the code review comments.
      
      Under the htrans8x8 experiment the 8X8 DCT in the
      I8X8 mode is replaced with a combination of 8X8 ADST and
      DCT.
      
      Overall coding gains with the htrans8x8 experiment are:
      derf:   0.486
      std-hd: 1.040
      hd:     1.063
      yt:     0.506
      
      Note that part of the gain comes from bigger transforms
      (8x8 instead of 4x4) and part comes from replacing the DCT
      wth the ADST.
      
      Change-Id: I92ca6bbfce11b4165d612b81d9adfad4d010c775
      fcbff9ee
    • Daniel Kang's avatar
      16x16 DCT blocks. · fed8a183
      Daniel Kang authored
      Set on all 16x16 intra/inter modes
      
      Features:
      - Butterfly fDCT/iDCT
      - Loop filter does not filter internal edges with 16x16
      - Optimize coefficient function
      - Update coefficient probability function
      - RD
      - Entropy stats
      - 16x16 is a config option
      
      Have not tested with experiments.
      
      hd:     2.60%
      std-hd: 2.43%
      yt:     1.32%
      derf:   0.60%
      
      Change-Id: I96fb090517c30c5da84bad4fae602c3ec0c58b1c
      fed8a183
  3. 19 Jul, 2012 2 commits
    • Yaowu Xu's avatar
      fixed a compiling issue · 6f685683
      Yaowu Xu authored
      Change-Id: I9ccbea76eaeb81ce7b833dd92216734725796e84
      6f685683
    • Jingning Han's avatar
      Adds hybrid transform · 9824230f
      Jingning Han authored
      Adds ADST/DCT hybrid transform coding for Intra4x4 mode.
      The ADST is applied to directions in which the boundary
      pixels are used for prediction, while DCT applied to
      directions without corresponding boundary prediction.
      
      Adds enum TX_TYPE in b_mode_infor to indicate the transform
      type used.
      
      Make coding style consistent with google style.
      Fixed the commented issues.
      
      Experimental results in terms of bit-rate reduction:
      derf:   0.731%
      yt:     0.982%
      std-hd: 0.459%
      hd:     0.725%
      
      Will be looking at 8x8 transforms next.
      
      Change-Id: I46dbd7b80dbb3e8856e9c34fbc58cb3764a12fcf
      9824230f
  4. 18 Jul, 2012 1 commit
    • Yaowu Xu's avatar
      removed floating point version 8x8 fdct · d632bf8c
      Yaowu Xu authored
      the integer version has very good precision, the float version is no
      longer useful. this commit also removes the experiment option from
      configure script.
      
      Change-Id: Ibb92e63c9f5083357cdf89c559d584a7deb3353f
      d632bf8c
  5. 17 Jul, 2012 1 commit
  6. 29 Jun, 2012 1 commit
    • Hui Su's avatar
      Add lossless compression mode. · e44ee38a
      Hui Su authored
      This commit adds lossless compression capability to the experimental
      branch. The lossless experiment can be enabled using --enable-lossless
      in configure. When the experiment is enabled, the encoder will use
      lossless compression mode by command line option --lossless, and the
      decoder automatically recognizes a losslessly encoded clip and decodes
      accordingly.
      
      To achieve the lossless coding, this commit has changed the following:
          1. To encode at lossless mode, encoder forces the use of unit
      quantizer, i.e, Q 0, where effective quantization is 1. Encoder also
      disables the usage of 8x8 transform and allows only 4x4 transform;
          2. At Q 0, the first order 4x4  DCT/IDCT have been switched over
      to a pair of forward and inverse Walsh-Hadamard Transform
      (http://goo.gl/EIsfy),  with proper scaling applied to match the range
      of the original 4x4 DCT/IDCT pair;
          3. At Q 0, the second order remains to use the previous
      walsh-hadamard transform pair. However, to maintain the reversibility
      in second order transform at Q 0, scaling down is applied to first
      order DC coefficients prior to forward transform, and scaling up is
      applied to the second order output prior to quantization. Symmetric
      upscaling and downscaling are added around inverse second order
      transform;
          4. At lossless mode, encoder also disables a number of minor
      features to ensure no loss is introduced, these features includes:
              a. Trellis quantization optimization
              b. Loop filtering
              c. Aggressive zero-binning, rounding and zero-bin boosting
              d. Mode based zero-bin boosting
      
      Lossless coding test was performed on all clips within the derf set,
      to verify that the commit has achieved lossless compression for all
      clips. The average compression ratio is around 2.57 to 1.
      (http://goo.gl/dEShs)
      
      Change-Id: Ia3aba7dd09df40dd590f93b9aba134defbc64e34
      e44ee38a
  7. 15 May, 2012 1 commit
    • Yaowu Xu's avatar
      Changed to use integer 8x8 dct · b22cc559
      Yaowu Xu authored
      The commit added an integer version of 8x8 forward DCT, based on the
      orginal forward DCT from VP6. The constants, roundings, and shifts
      were adjusted to improve the accuracy. The latest patch has a very
      similar accuracy in term of round trip error against the floating
      point version.
      
      It should be noted here that the purpose of the patch is to help
      encoding speed and facilitate all other experiments. There will be
      futher review in combination with inverse DCT before finalization.
      
      configure with "--enable--int_8x8fdct" to use the integer version
      
      Change-Id: I5a4f80507429f0e07cf02a13768ec81cbfddc5bc
      b22cc559
  8. 10 May, 2012 1 commit
    • Yaowu Xu's avatar
      Reversible WHT pair · 7968d29f
      Yaowu Xu authored
      This commit changed the forward and the inverse 4x4 Walsh Hadamard
      transform to a new pair, where the inverse transform can pefectly
      reconstuct the input to forward transform. It also does so without
      changing the input and output value range. Even more, it does not
      change the complexity of the transforms.
      
      While it was not expected to improve the results of our current test,
      it does improve std-hd set by 0.2% on all metrics. No change on derf.
      
      Change-Id: Ie4f23ddd3a0f3c5fbe97fb58399f860031f99337
      7968d29f
  9. 15 Mar, 2012 1 commit
    • Yaowu Xu's avatar
      WebM Experimental Codec Branch Snapshot · 6035da54
      Yaowu Xu authored
      This is a code snapshot of experimental work currently ongoing for a
      next-generation codec.
      
      The codebase has been cut down considerably from the libvpx baseline.
      For example, we are currently only supporting VBR 2-pass rate control
      and have removed most of the code relating to coding speed, threading,
      error resilience, partitions and various other features.  This is in
      part to make the codebase easier to work on and experiment with, but
      also because we want to have an open discussion about how the bitstream
      will be structured and partitioned and not have that conversation
      constrained by past work.
      
      Our basic working pattern has been to initially encapsulate experiments
      using configure options linked to #IF CONFIG_XXX statements in the
      code. Once experiments have matured and we are reasonably happy that
      they give benefit and can be merged without breaking other experiments,
      we remove the conditional compile statements and merge them in.
      
      Current changes include:
      * Temporal coding experiment for segments (though still only 4 max, it
        will likely be increased).
      * Segment feature experiment - to allow various bits of information to
        be coded at the segment level. Features tested so far include mode
        and reference frame information, limiting end of block offset and
        transform size, alongside Q and loop filter parameters, but this set
        is very fluid.
      * Support for 8x8 transform - 8x8 dct with 2nd order 2x2 haar is used
        in MBs using 16x16 prediction modes within inter frames.
      * Compound prediction (combination of signals from existing predictors
        to create a new predictor).
      * 8 tap interpolation filters and 1/8th pel motion vectors.
      * Loop filter modifications.
      * Various entropy modifications and changes to how entropy contexts and
        updates are handled.
      * Extended quantizer range matched to transform precision improvements.
      
      There are also ongoing further experiments that we hope to merge in the
      near future: For example, coding of motion and other aspects of the
      prediction signal to better support larger image formats, use of larger
      block sizes (e.g. 32x32 and up) and lossless non-transform based coding
      options (especially for key frames). It is our hope that we will be
      able to make regular updates and we will warmly welcome community
      contributions.
      
      Please be warned that, at this stage, the codebase is currently slower
      than VP8 stable branch as most new code has not been optimized, and
      even the 'C' has been deliberately written to be simple and obvious,
      not fast.
      
      The following graphs have the initial test results, numbers in the
      tables measure the compression improvement in terms of percentage. The
      build has  the following optional experiments configured:
      --enable-experimental --enable-enhanced_interp --enable-uvintra
      --enable-high_precision_mv --enable-sixteenth_subpel_uv
      
      CIF Size clips:
      http://getwebm.org/tmp/cif/
      HD size clips:
      http://getwebm.org/tmp/hd/
      (stable_20120309 represents encoding results of WebM master branch
      build as of commit#7a159071)
      
      They were encoded using the following encode parameters:
      --good --cpu-used=0 -t 0 --lag-in-frames=25 --min-q=0 --max-q=63
      --end-usage=0 --auto-alt-ref=1 -p 2 --pass=2 --kf-max-dist=9999
      --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50
      --minsection-pct=0 --maxsection-pct=800 --sharpness=0
      --arnr-maxframes=7 --arnr-strength=3(for HD,6 for CIF)
      --arnr-type=3
      
      Change-Id: I5c62ed09cfff5815a2bb34e7820d6a810c23183c
      6035da54
  10. 01 Mar, 2012 1 commit
  11. 16 Feb, 2012 2 commits
    • Yaowu Xu's avatar
      optmized rounding for transforms · efa9abd0
      Yaowu Xu authored
      the changes are still temporary, the final transforms, especially
      inverse ones should take in account both accuracy, complexity, and
      sign-bias, which should be decided at a later time.
      
      Change-Id: I116b0c70b25f5ee324ae5713d4564f5d0aa27151
      efa9abd0
    • Yaowu Xu's avatar
      re-scaled 2nd order haar transform · 62a78f03
      Yaowu Xu authored
      During the work of extend_qrange, we have rolled a factor of 2 from
      quantization/dequatnization into 2nd order walsh-hadamard transform.
      This commit does the same for the 2nd order haar transform. so they
      can share the same quantizaiton process as the 2nd order WHT.
      
      Change-Id: I734af4a20ea8149a01b5b1971a065092977dfe33
      62a78f03
  12. 09 Feb, 2012 1 commit
  13. 11 Nov, 2011 1 commit
    • Yaowu Xu's avatar
      Make 8x8 and extend_qrange to work together · 982b061d
      Yaowu Xu authored
      This commit added scaling factors to 8x8 transform, quant, dequant and
      inverse transform pipeline to make 8x8 transform to work when configed
      with enable-extend_qrange. This commit also disabled the trellis-quant
      when extend_qrange is configured.
      
      Change-Id: Icfb3192e4746f70a4bb35ad18b7b47705b657e52
      982b061d
  14. 09 Nov, 2011 1 commit
  15. 21 Jul, 2011 1 commit
    • Yaowu Xu's avatar
      fix more merge issues · 8c31484e
      Yaowu Xu authored
      With this fix, the experimental branch now builds and encodes correctly
      with the following two configure options respectively:
      --enable-experimental --enable-t8x8
      --enable-experimental
      
      Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
      8c31484e
  16. 20 Jul, 2011 1 commit
  17. 19 Jan, 2011 1 commit
    • Yaowu Xu's avatar
      experiment extending the quantizer range · 5b42ae09
      Yaowu Xu authored
      Prior to this change, VP8 min quantizer is 4, which caps the
      highest quality around 51DB. This experimental change extends
      the min quantizer to 1, removes the cap and allows the highest
      quality to be around ~73DB, consistent with the fdct/idct round trip
      error. To test this change, at configure time use options:
      
      --enable-experimental --enable-extend_qrange
      
      The following is a brief log of changes in each of the patch sets
      
      patch set 1:
      In this commit, the quantization/dequantization constants are kept
      unchanged, instead scaling factor 4 is rolled into fdct/idct.
      Fixed Q0 encoding tests on mobile:
        Before:    9560.567kbps Overall PSNR:50.255DB VPXSSIM:98.288
        Now:   18035.774kbps Overall PSNR:73.022DB VPXSSIM:99.991
      
      patch set 2:
      regenerated dc/ac quantizer lookup tables based on the scaling
      factor rolled in the fdct/idct. Also slightly extended the range
      towards the high quantizer end.
      
      patch set 3:
      slightly tweaked the quantizer tables and generated bits_per_mb
      table based on Paul's suggestions.
      
      patch set 4:
      fix a typo in idct, re-calculated tables relating active max Q
      to active min Q
      
      patch set 5:
      added rdmult lookup table based on Q
      
      patch set 6:
      fix rdmult scale: dct coefficient has scaled up by 4
      
      patch set 7:
      make transform coefficients to be within 16bits
      
      patch set 8:
      normalize 2nd order quantizers
      
      patch set 9:
      fix mis-spellings
      
      patch set 10:
      change the configure script and macros to allow experimental code
      to be enabled at configure time with --enable-extend_qrange
      
      patch set 11:
      rebase for merge
      
      Change-Id: Ib50641ddd44aba2a52ed890222c309faa31cc59c
      5b42ae09
  18. 09 Sep, 2010 1 commit
  19. 29 Jun, 2010 1 commit
    • Yaowu Xu's avatar
      Improve the accuracy of forward walsh-hadamard transform · b62d093e
      Yaowu Xu authored
      Besides the slight improvement in round trip error. This
      also fixes a sign bias in the forward transform, so the
      round trip errors are evenly distributed between +1s and
      -1s. The old bias seemed to work well with the dc sign bias
      in old fdct,  which no longer exist in the improved fdct.
      
      Change-Id: I8635e7be16c69e69a8669eca5438550d23089cef
      b62d093e
  20. 24 Jun, 2010 1 commit
    • Yaowu Xu's avatar
      Redo the forward 4x4 dct · d0dd01b8
      Yaowu Xu authored
      The new fdct lowers the round trip sum squared error for a
      4x4 block ~0.12. or ~0.008/pixel. For reference, the old
      matrix multiply version has average round trip error 1.46
      for a 4x4 block.
      
      Thanks to "derf" for his suggestions and references.
      
      Change-Id: I5559d1e81d333b319404ab16b336b739f87afc79
      d0dd01b8
  21. 18 Jun, 2010 1 commit
    • John Koleszar's avatar
      cosmetics: trim trailing whitespace · 94c52e4d
      John Koleszar authored
      When the license headers were updated, they accidentally contained
      trailing whitespace, so unfortunately we have to touch all the files
      again.
      
      Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
      94c52e4d
  22. 04 Jun, 2010 1 commit
  23. 18 May, 2010 1 commit