1. 28 Oct, 2014 1 commit
  2. 27 Oct, 2014 1 commit
  3. 24 Oct, 2014 1 commit
    • Jingning Han's avatar
      Tile based adaptive mode search in RD loop · eee201c2
      Jingning Han authored
      Make the spatially adaptive mode search in rate-distortion
      optimization loop inter tile independent. Experiments suggest that
      this does not significantly change the coding staticstics.
      
      Single tile, speed 3:
      pedestrian_area 1080p 1500 kbps
      59192 b/f, 40.611 dB, 101689 ms
      
      blue_sky 1080p 1500 kbps
      58505 b/f, 36.347 dB, 62458 ms
      
      mobile_cal 720p 1000 kbps
      13335 b/f, 35.646 dB, 45655 ms
      
      as compared to 4 column tiles, speed 3:
      pedestrian_area 1080p 1500 kbps
      59329 b/f, 40.597 dB, 101917 ms
      
      blue_sky 1080p 1500 kbps
      58712 b/f, 36.320 dB, 62693 ms
      
      mobile_cal 720p 1000 kbps
      13191 b/f, 35.485 dB, 45319 ms
      
      Change-Id: I35c6e1e0a859fece8f4145dec28623cbc6a12325
      eee201c2
  4. 22 Oct, 2014 1 commit
  5. 21 Oct, 2014 4 commits
  6. 20 Oct, 2014 2 commits
    • Jingning Han's avatar
      Hybrid partition search for rtc coding mode · 9f128b3e
      Jingning Han authored
      This commit re-designs the recursive partition search scheme in
      rtc speed -5. It first checks if the current block is under cyclic
      refresh mode. If so, apply recursive partition search. Otherwise,
      perform sub-sampled pixel based partition selection. When the
      pre-selection finds the partition size should be 32x32 or above,
      use the partition size directly. Otherwise, apply partition search
      at nearby levels around the preset partition size.
      
      It is enabled in speed -5. The compression performance of rtc
      speed -5 is improved by 9.4%. Speed wise, the run-time goes slower
      from 1% to 10%.
      
      nik_720p, 1000 kbps
      33220 b/f, 38.977 dB, 10109 ms -> 33200 b/f, 39.119 dB, 10210 ms
      
      vidyo1_720p, 1000 kbps
      16536 b/f, 40.495 dB, 10119 ms -> 16536 b/f, 40.827 dB, 11287 ms
      
      Change-Id: I65adba352e3adc03bae50854ddaea1b421653c6c
      9f128b3e
    • Paul Wilkins's avatar
      Resolve compiler warning. · 9626a0cb
      Paul Wilkins authored
      conversion from 'const int64_t' to 'int', possible loss of data.
      
      Change-Id: I471a73bba5d448d9be0ef9cbf1590fa73aa74be1
      9626a0cb
  7. 18 Oct, 2014 1 commit
  8. 17 Oct, 2014 2 commits
    • Yunqing Wang's avatar
      Remove the dependency in token storing locations · 7c4992c4
      Yunqing Wang authored
      Currently, the tokens for a tile are stored immediately after its
      preceding tile, which causes a dependency. This is unnecessary
      since we always allocate enough memory for tokens. Removing
      the dependency allows token writing done in parallel. This patch
      doesn't change encoding result.
      
      Change-Id: I7365a6e5e2c2833eb14377c37e1503c9d0f26543
      7c4992c4
    • Jingning Han's avatar
      Remove unused VAR_BASED_FIXED_PARTITION flag · e1111fba
      Jingning Han authored
      Change-Id: I4ce19b7cb1c45fed86e81ee785e787630020fb4f
      e1111fba
  9. 15 Oct, 2014 4 commits
    • Jingning Han's avatar
      Add init and reset functions for RD_COST struct · e2612fbd
      Jingning Han authored
      Change-Id: I2902de7051a883fd22e27a655209233733969cfd
      e2612fbd
    • Jingning Han's avatar
      Use rate/distortion thresholds to control non-RD partition search · 5e766cce
      Jingning Han authored
      Compare the estimated rate and distortion to the thresholds scaled
      according to the operating block size and determine if further
      split partition search will be run. The compression performance of
      speed -5 is changed by -0.074%. The encoding speed is 10% - 15%
      faster.
      
      vidyo1 720p
      16545 b/f, 40.492 dB, 11475 ms -> 16535 b/f, 40.486 dB, 10100 ms
      
      nik720p
      16624 b/f, 36.310 dB, 10071 ms -> 16617 b/f, 36.313 dB, 8346 ms
      
      Change-Id: Ic9197ab5761279ae55d2fb7813b2af0e0db497b8
      5e766cce
    • Marco's avatar
      Some updates for Speed 6/VAR_BASED_PARTITION. · 09ea74f1
      Marco authored
      Reduce the intra_cost_penalty for non-rd mode,
      and some updates to VAR_BASED_PARTITION.
      
      Visual tests show some improvement at Speed 6, for RTC clips.
      
      Change-Id: If9090daf7aed14906a32d931a538ab544bbca606
      09ea74f1
    • Jingning Han's avatar
      Replace copy_partitioning use case with choose_partitioning · 89b8c7a5
      Jingning Han authored
      This commit replaces the use of copy_partitioning with
      choose_partitioning based on the sse of subsamped pixels, which
      provides significantly better coding performance and runs at
      similar speed, as compared to copy_partitioning. It improves rtc
      speed 5 coding performance by 3%.
      
      Change-Id: I52d3682a12dce0147f5e52383a594fc242ca3228
      89b8c7a5
  10. 13 Oct, 2014 1 commit
    • Jingning Han's avatar
      Refactor rate distortion cost structure · 811cef97
      Jingning Han authored
      This commit makes a struct that contains rate value, distortion
      value, and the rate-distortion cost. The goal is to provide a
      better interface for rate-distortion related operation. It is
      first used in rd_pick_partition and saves a few RDCOST calculations.
      
      Change-Id: I1a6ab7b35282d3c80195af59b6810e577544691f
      811cef97
  11. 10 Oct, 2014 1 commit
  12. 09 Oct, 2014 3 commits
  13. 07 Oct, 2014 3 commits
    • Jim Bankoski's avatar
      experimental : partition using 1/8 x 1/8 image · 0ce51d82
      Jim Bankoski authored
      The concept:
      
      There's too much noise in source pixels for variance and at low bitrate
      the reconstructed looks nothing like the source so we have problems
      getting good partitionings with either.   This skirts the issue by using
      a box blur scaled down version for variance calculations.  To compare
      against source_var_ moved keyframe to be rd based like source_var.
      
      Change-Id: Ie3babdbfadae324b7b5a76bea192893af27f0624
      0ce51d82
    • Jingning Han's avatar
      Replace mi_width_log2() with mi_width_log2_lookup table · 7ee58985
      Jingning Han authored
      Change-Id: If0ea98aa139d14d40cd924114e18396aff36b5a5
      7ee58985
    • Jingning Han's avatar
      Take out repeated block width/height lookup functions · b66f7016
      Jingning Han authored
      The functions b_width_log2 and b_height_log2 only do direct
      table fetch. This commit unifies such use cases by using the
      table directly and removes these functions.
      
      Change-Id: I3103fc6ba959c1182886a2799d21b8b77c8a7b6b
      b66f7016
  14. 06 Oct, 2014 1 commit
    • Paul Wilkins's avatar
      Improve two pass VBR accuracy. · 0e1068a4
      Paul Wilkins authored
      Adjustments to the GF interval choice and minimum boost.
      Adjustment to the calculation of 2 pass worst q.
      Compared to 09/29 head there is metrics hit on derf of
      (-0.123%,-0.191%)
      
      Compared to the September 29 head and a baseline on
      September 18 baseline the accuracy of the VBR rate control
      measured on the derf set is as follows:-
      
      Mean error %  / Mean abs(error %)
      Sept 18 baseline (-7.0% / 14.76%)
      Sept 29 head (-15.7%, 19.8%)
      This check in (-1.5% / 14.4%)
      
      The mean undershoot is reduced slightly but the
      worst case overshoot on e.g. harbour/highway is
      increased. This will be addressed in a later patch.
      
      Change-Id: Iffd9b0ab7432a131c98fbaaa82d1e5b40be72b58
      0e1068a4
  15. 03 Oct, 2014 3 commits
    • Yaowu Xu's avatar
      Properly initialize segmentID in nonrd coding path · 0065b734
      Yaowu Xu authored
      This commit adds proper initialization of segment id for variance AQ
      mode in non-rd coding path. It fixes the enc/dec mismatch issue of
      rt=7 with --aq-mode=1, as reported in issue #816
      
      Change-Id: I02fa41b96345bf2e66077d5ea553f85ba800f7bb
      0065b734
    • Jingning Han's avatar
      Fix indent in encode_rd_sb_row · ef622333
      Jingning Han authored
      Change-Id: Icbcfe7b56d88474f4398b4c5b52f6719d551ab4a
      ef622333
    • Jingning Han's avatar
      Rework partition search skip scheme · bb260d90
      Jingning Han authored
      This commit enables the encoder to skip split partition search if
      the bigger block size has all non-zero quantized coefficients in low
      frequency area and the total rate cost is below a certain threshold.
      It logarithmatically scales the rate threshold according to the
      current block size. For speed 3, the compression performance loss:
      derf  -0.093%
      stdhd -0.066%
      
      Local experiments show 4% - 20% encoding speed-up for speed 3.
      blue_sky_1080p, 1500 kbps
      51051 b/f, 35.891 dB, 67236 ms ->
      50554 b/f, 35.857 dB, 59270 ms (12% speed-up)
      
      old_town_cross_720p, 1500 kbps
      14431 b/f, 36.249 dB, 57687 ms ->
      14108 b/f, 36.172 dB, 46586 ms (19% speed-up)
      
      pedestrian_area_1080p, 1500 kbps
      50812 b/f, 40.124 dB, 100439 ms ->
      50755 b/f, 40.118 dB,  96549 ms (4% speed-up)
      
      mobile_calendar_720p, 1000 kbps
      10352 b/f, 35.055 dB, 51837 ms ->
      10172 b/f, 35.003 dB, 44076 ms (15% speed-up)
      
      Change-Id: I412e34db49060775b3b89ba1738522317c3239c8
      bb260d90
  16. 26 Sep, 2014 1 commit
    • Yunqing Wang's avatar
      Skip the partition search for still frames · 1fcbf6ed
      Yunqing Wang authored
      This patch re-enabled the feature in Pengchong's patch
      (commit 12861260). Originally, it
      was turned on while use_lastframe_partitioning > 0(not used anymore).
      Now it was added as a feature, and turned on while speed >= 2.
      As described in the original patch, this feature helps speed up the
      slideshows in YouTube.
      
      Change-Id: I1b0f18d65da1ee1c8d1e117dabba910c5207c471
      1fcbf6ed
  17. 25 Sep, 2014 1 commit
  18. 24 Sep, 2014 1 commit
    • Yunqing Wang's avatar
      Refactor encode_rd_sb_row function · 14ee2805
      Yunqing Wang authored
      Simplified the code and removed some code that was not used anymore.
      This patch didn't change encoding result.
      
      Change-Id: I7e54a74c8f35a6726dfc8a1c55b337448b7ea124
      14ee2805
  19. 20 Sep, 2014 1 commit
    • hkuang's avatar
      Remove mi_grid_* structures. · c70cea97
      hkuang authored
      mi_grid_* are arrays of pointer to pointer. They save the pointers that point
      to the MIs in cm->mi. But they are unnecessary and complicated. The original
      goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer
      inside MODE_INFO_t, same goal could be achieved.
      
      This commit totally removes the mi_grid_* structures. But there are still
      many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit
      will do on-demand MODE_INFO_t allocation in order to save these memories.
      
      Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
      c70cea97
  20. 12 Sep, 2014 1 commit
  21. 09 Sep, 2014 1 commit
    • Yunqing Wang's avatar
      Remove the use of use_lastframe_partitioning at speed 4 · f10d7eed
      Yunqing Wang authored
      The use of use_lastframe_partitioning is totally removed in good-
      quality encoding. Its usage in real-time encoding needs to be
      evaluated to see if it can be removed too.
      
      The Borg tests at speed 4 showed:
      stdhd set: 0.220% psnr gain, 0.166% ssim gain;
      derf set:  0.329% psnr gain, 0.476% ssim gain.
      
      Speed test on selected clips showed 1.54% speedup.(Worst case:
      pedestrian_area_1080p25.y4m, speed loss: 1.5%)
      
      Change-Id: I1c844d329b0b5678558439b887297c1be7ddab00
      f10d7eed
  22. 03 Sep, 2014 1 commit
    • Yaowu Xu's avatar
      select_tx_mode(): remove special case for key frame · c1058e5b
      Yaowu Xu authored
      This commit removes the special case for key frame, as transform size
      decision is controlled by the appropriate speed feature for all lossy
      coding modes: tx_size_search_method.
      
      Change-Id: I9677171e3f2432ec23705f7c5ea8170dd4562fae
      c1058e5b
  23. 28 Aug, 2014 1 commit
    • Yunqing Wang's avatar
      Early termination in encoding partition search · 4d2c3769
      Yunqing Wang authored
      In the partition search, the encoder checks all possible
      partitionings in the superblock's partition search tree.
      This patch proposed a set of criteria for partition search
      early termination, which effectively decided whether or
      not to terminate the search in current branch based on the
      "skippable" result of the quantized transform coefficients.
      The "skippable" information was gathered during the
      partition mode search, and no overhead calculations were
      introduced.
      
      This patch gives significant encoding speed gains without
      sacrificing the quality.
      
      Borg test results:
      1. At speed 1,
         stdhd set: psnr: +0.074%, ssim: +0.093%;
         derf set:  psnr: -0.024%, ssim: +0.011%;
      2. At speed 2,
         stdhd set: psnr: +0.033%, ssim: +0.100%;
         derf set:  psnr: -0.062%, ssim: +0.003%;
      3. At speed 3,
         stdhd set: psnr: +0.060%, ssim: +0.190%;
         derf set:  psnr: -0.064%, ssim: -0.002%;
      4. At speed 4,
         stdhd set: psnr: +0.070%, ssim: +0.143%;
         derf set:  psnr: -0.104%, ssim: +0.039%;
      
      The speedup ranges from several percent to 60+%.
                       speed1    speed2    speed3    speed4
      (1080p, 100f):
      old_town_cross:  48.2%     23.9%     20.8%     16.5%
      park_joy:        11.4%     17.8%     29.4%     18.2%
      pedestrian_area: 10.7%      4.0%      4.2%      2.4%
      (720p, 200f):
      mobcal:          68.1%     36.3%     34.4%     17.7%
      parkrun:         15.8%     24.2%     37.1%     16.8%
      shields:         45.1%     32.8%     30.1%      9.6%
      (cif, 300f)
      bus:              3.7%     10.4%     14.0%      7.9%
      deadline:        13.6%     14.8%     12.6%     10.9%
      mobile:           5.3%     11.5%     14.7%     10.7%
      
      Change-Id: I246c38fb952ad762ce5e365711235b605f470a66
      4d2c3769
  24. 25 Aug, 2014 2 commits
  25. 15 Aug, 2014 1 commit
    • Pengchong Jin's avatar
      Add a speed feature to give the tighter search range · eca93642
      Pengchong Jin authored
      Add a speed feature to give the tighter partition search
      range. Before partition search, calculate the histogram
      of the partition sizes of the left, above and previous
      co-located blocks of the current block. If the variance of
      observed partition sizes is small enough, adjust the search
      range around the mean partition size, which will be tigher.
      
      The feature is currently turned on at speed 2. Experiments on
      sample youtube clips show on average the runtime is reduced
      by 3-7%.
      
      For hard stdhd clips:
      park_joy_1080p @ 15000kbps:       509251 ms -> 491953 ms (3.3%)
      pedestrian_area_1080p @ 2000kbps: 223941 ms -> 214226 ms (4.3%)
      
      The PSNR performance is changed:
      derf: -0.112%
      yt:   -0.099%
      hd:   -0.090%
      stdhd:-0.102%
      
      Change-Id: Ie205ec5325bf92ec5676c243e30ba9d0adca10f2
      eca93642