1. 16 Mar, 2012 1 commit
    • Yunqing Wang's avatar
      Add motion search skipping in first pass · 6a819ce4
      Yunqing Wang authored
      This change added a motion search skipping mechanism similar
      to what we did in second pass. For a macroblock that is very
      similar to the macroblock at same location on last frame,
      we can set its mv to be zero, and skip motion search. This
      improves first-pass performance for slide shows and video
      conferencing clips with a slight PSNR loss.
      Change-Id: Ic73f9ef5604270ddd6d433170091d20361dfe229
  2. 14 Mar, 2012 1 commit
    • John Koleszar's avatar
      fix potential use of uninitialized rate_y · 20cd3e6b
      John Koleszar authored
      This issue likely doesn't appear in the unmodified encoder, but
      sufficient hacking on the mode selection loop can expose it.
      Change-Id: I8a35831e8f08b549806d0c2c6900d42af883f78f
  3. 13 Mar, 2012 1 commit
  4. 12 Mar, 2012 1 commit
  5. 08 Mar, 2012 1 commit
    • Scott LaVarnway's avatar
      threading.c refactoring · 9ed87471
      Scott LaVarnway authored
      Added recon above/left to MACROBLOCKD
      Reworked decode_macroblock
      Change-Id: I9c26870af75797134f410acbd02942065b3495c1
  6. 06 Mar, 2012 2 commits
  7. 05 Mar, 2012 1 commit
    • Jim Bankoski's avatar
      vp8e - fix coefficient costing · 88869909
      Jim Bankoski authored
      Coefficient costing failed to take account of the first branch
      being skipped ( 0 vs eob) if the previous token is 0.
      Fixed rd to account for slightly increased token cost & cleaned up
      warning message
      Change-Id: I56140635d9f48a28dded5a816964e973a53975ef
  8. 01 Mar, 2012 2 commits
  9. 29 Feb, 2012 3 commits
    • Attila Nagy's avatar
      Packing bitstream on-the-fly with delayed context updates · 52cf4dca
      Attila Nagy authored
      Produce the token partitions on-the-fly, while processing each MB.
      Context is updated at the beginning of each frame based on the
      previoud frame's counters. Optimally encoder outputs partitions in
      separate buffers. For frame based output, partitions are concatenated
          - enabled just in combination with realtime-only mode
          - number of encoding threads has to be equal or less than the
          number of token partitions. For this reason, by default the encoder
          will do 8 token partitions.
          - vpxenc supports partition output (-P) just in combination with
          IVF output format (--ivf)
          - Realtime encoder can be up to 13% faster (ARM) depending on the number
          of threads and bitrate settings. Constant gain over the 5-16 speed
          - Token buffer reduced from one frame to 8 MBs
          - quality is affected by the delayed context updates. This again
          dependents on input material, speed and bitrate settings. For VC
          style input the loss seen is up to 0.2dB. If error-resilient=2
          mode is used than the effect of this change is negligible.
      ./configure --enable-realtime-only --enable-onthefly-bitpacking
      ./vpxenc --rt --end-usage=1 --fps=30000/1000 -w 640 -h 480
      --target-bitrate=1000 --token-parts=3 --static-thresh=2000
      --ivf -P -t 4 -o strm.ivf tanya_640x480.yuv
      Change-Id: I127295cb85b835fc287e1c0201a67e378d025d76
    • Jim Bankoski's avatar
      vp8e - attempt to lessen blockiness · b8fa2839
      Jim Bankoski authored
      applies a penalty to intra blocks in order to cut down on blockiness in
      easy sections.
      Change-Id: Ia9e5df16328b0bf01bf0f2e6e61abcb687316c12
    • Scott LaVarnway's avatar
      Decoder loops refactoring · 2578b767
      Scott LaVarnway authored
      Eliminated some mb branches along with other code cleanups.
      This is part of an ongoing effort to remove cut/paste
      code in the decoder.
      Change-Id: Ifabb0f67cafa6922b5a0e89a0d03a9b34e9e5752
  10. 28 Feb, 2012 3 commits
    • Scott LaVarnway's avatar
      Eliminated reconintra_mt.c · bcba86e2
      Scott LaVarnway authored
      Reworked the code to use vp8_build_intra_predictors_mby_s,
      vp8_intra_prediction_down_copy, and vp8_intra4x4_predict_d_c
      functions instead.  vp8_intra4x4_predict_d_c is a decoder-only
      version of vp8_intra4x4_predict.  Future commits will fix this
      code duplication.
      Change-Id: Ifb4507103b7c83f8b94a872345191c49240154f5
    • Scott LaVarnway's avatar
      Removed duplicate code in threading.c · 9a4052a4
      Scott LaVarnway authored
      Change-Id: Id7e44950ceda67b280e410e541510106ef02f1da
    • Yunqing Wang's avatar
      Only do uv intra-mode evaluation when intra mode is checked · 019384f2
      Yunqing Wang authored
      When we encode slide-show clips, for the majority of the time,
      only ZEROMV mode is checked, and all other modes are skipped.
      This change delayed uv intra-mode evaluation until intra mode is
      actually checked. This gave big performance gain for slide-show
      video encoding (2nd pass gain: 18% to 28%). But, this change
      doesn't help other types of videos.
      Also, zbin_mode_boost is adjusted in mode-checking loop, which
      causes bitstream mismatch before/after this change when --best
      or --good with --cpu-used=0 are used.
      Change-Id: I582b3e69fd384039994360e870e6e059c36a64cc
  11. 27 Feb, 2012 2 commits
    • James Berry's avatar
      bugfix: use oxcf width/height for reinit check · e2c6b05f
      James Berry authored
      use oxcf instead of common in check to Reinit the
      lookahead buffer if the frame size changes
      prior behavior would cause assertion fail/crash
      first observed in:
      support changing resolution with vpx_codec_enc_config_set
      Change-Id: Ib669916ca9b4f206d4cc3caab5107e49d39a36aa
    • Yunqing Wang's avatar
      Fix skippable evaluation in mode decision · 84be08b0
      Yunqing Wang authored
      Yaowu fixed the skippable evaluation by correcting 2nd order
      block's eob.
      Change-Id: Id47930cbc74a90a046c0c0e324efb03477639ee0
  12. 22 Feb, 2012 1 commit
    • Marco Paniconi's avatar
      Remove the frame rate factor for key frame size. · 507ee87e
      Marco Paniconi authored
      When temporal layers is used (i.e., number_of_layers > 1),
      we don't use the frame rate boost for setting the key
      frame target size. The factor was forcing the target size to be
      always at its minimum (2* per_frame_bandwidth) for low frame rates
      (i.e., base layer frame rate).
      Generally we should modify or remove this frame rate factor;
      for now we turn if off for number_of_layers > 1.
      Change-Id: Ia5acf406c9b2f634d30ac2473adc7b9bf2e7e6c6
  13. 21 Feb, 2012 2 commits
  14. 17 Feb, 2012 3 commits
    • Yunqing Wang's avatar
      Fix incorrect use of uv eobs in intra modes · 04b9e0d7
      Yunqing Wang authored
      In vp8_rd_pick_inter_mode(), if total of eobs is zero, rate needs
      to be adjusted since there are no non-zero coefficients for
      transmission. The uv intra eobs calculated in
      rd_pick_intra_mbuv_mode() need to be saved before they are
      overwritten by inter-mode eobs.
      Change-Id: I41dd04fba912e8122ef95793d4d98a251bc60e58
    • Attila Nagy's avatar
      Update encoder mb_skip_coeff and prob_skip_false calculation · ce42e79a
      Attila Nagy authored
      mode_info_context->mbmi.mb_skip_coeff has to always reflect the
      existence or not of coeffs for a certain MB. The loopfilter needs this
      mb_skip_coeff is either set by the vp8_tokenize_mb or has to be set to
      1 when the MB is skipped by mode selection. This has to be done
      regardless of the mb_no_coeff_skip value.
      prob_skip_false is needed just when mb_no_coeff_skip is 1. No need to
      keep count of both skip_false and skip_true as they are complementary
      (skip_true+skip_false = total_mbs)
      Change-Id: I3c74c9a0ee37bec10de7bb796e408f3e77006813
    • Attila Nagy's avatar
      Remove redundant init of segment_counts in vp8_encode_frame · 565d0e6f
      Attila Nagy authored
      segment_counts was zero init twice in the beginning of vp8_encode_frame.
      Change-Id: Ibc29f6896dabd9aab1d0993f3941cf6876022e70
  15. 16 Feb, 2012 7 commits
    • Johann's avatar
      Clarify 'max_sad' usage · 6b151d43
      Johann authored
      Depending on implementation the optimized SAD functions may return early
      when the calculated SAD exceeds max_sad.
      Change-Id: I05ce5b2d34e6d45fb3ec2a450aa99c4f3343bf3a
    • John Koleszar's avatar
      decoder: reset segmentation map on keyframes · e8223bd2
      John Koleszar authored
      Refactoring some of the mode decoding logic introduced a bug where
      the segmentation maps would not be properly reset on keyframes.
      The text of the bug is somewhat misleading as I initially read it to
      imply the bug was present in v0.9.7-p1 (Cayuga), but note the text
      "master", which indicates this was something subsequent. This issue
      bisects back to v0.9.7-p1-84-ga99c20c0, so unfortunately it was broken
      during the Duclair release.
      Thanks to Alexei Leonenko for investigating the root cause.
      Change-Id: I9713c9f070eb37b31b3b029d9ef96be9b6ea2def
    • Makoto Kato's avatar
      Support Android x86 NDK build · 7989bb7f
      Makoto Kato authored
      On Android NDK, rand() is inlined function.  But, on our SSE optimization,
      we need symbol for rand()
      Change-Id: I42ab00e3255208ba95d7f9b9a8a3605ff58da8e1
    • Scott LaVarnway's avatar
      Simplify mb_to_x_edge calculation during mode decoding · 6776bd62
      Scott LaVarnway authored
      Change-Id: Ibcb35c32bf24c1d241090e24c5e2320e4d3ba901
    • Scott LaVarnway's avatar
      decodemv cleanup/improvements · 12ee845e
      Scott LaVarnway authored
      Removed unnecessary variables, unrolled functions, eliminated
      unnecessary mv bounds checks and branches.
      Change-Id: I02d034c70cd97b65025d59dd67c695e1db529f0b
    • Attila Nagy's avatar
      Consolidate C version of token packing functions · d02e74a0
      Attila Nagy authored
      Replace inner loops of pack_mb_row_tokens_c and
      pack_tokens_into_partitions_c with a call to pack_tokens_c.
      Change-Id: I0341554fb154a14a5dadb63f8fc78010724c2c33
    • Attila Nagy's avatar
      Multithreaded encoder, late sync loopfilter · 78071b3b
      Attila Nagy authored
      Second shot at this...
      Sync with loopfilter thread as late as possible, usually just at the
      beginning of next frame encoding. This returns control to application
      faster and allows a better multicore scaling.
      When PSNR packets are generated the final filtered frame is needed
      imediatly so we cannot delay the sync. Same has to be done when
      internal frame is previewed.
      Change-Id: I64e110c8b224dd967faefffd9c93dd8dbad4a5b5
  16. 10 Feb, 2012 2 commits
    • Johann's avatar
      Missed some variance casts · 16982342
      Johann authored
      Change-Id: I9fb510f9421fb3c317a8e32e3058cee977ddf9fa
    • Johann's avatar
      max_sad check is not always implemented · 8c50a70a
      Johann authored
      As an optimization some architectures use the max_sad argument to break
      out early from the SAD. Pass in INT_MAX instead of 0 to prevent this.
      Change-Id: I653c476834b97771578d63f231233d445388629d
  17. 09 Feb, 2012 1 commit
    • Johann's avatar
      Fix variance overflow · fea3556e
      Johann authored
      In the variance calculations the difference is summed and later squared.
      When the sum exceeds sqrt(2^31) the value is treated as a negative when
      it is shifted which gives incorrect results.
      To fix this we cast the result of the multiplication as unsigned.
      The alternative fix is to shift sum down by 4 before multiplying.
      However that will reduce precision.
      For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
      PPC change is untested.
      Change-Id: I1bad27ea0720067def6d71a6da5f789508cec265
  18. 08 Feb, 2012 2 commits
  19. 07 Feb, 2012 1 commit
    • John Koleszar's avatar
      Align internal mfqe framebuffer dimensions · 417b8529
      John Koleszar authored
      MFQE postproc crashed with stream dimensions not a multiple of 16.
      The buffer was memset unconditionally, so if the buffer allocation
      fails we end up trying to write to NULL.
      This patch traps an allocation failure with vpx_internal_error(),
      and aligns the buffer dimensions to what vp8_yv12_alloc_frame_buffer()
      Change-Id: I3915d597cd66886a24f4ef39752751ebe6425066
  20. 03 Feb, 2012 1 commit
    • Yunqing Wang's avatar
      Allow to skip highest-resolution encoding in multi-resolution encoder · fa1a9290
      Yunqing Wang authored
      Sometimes, a user doesn't have enough bandwidth to send high-resolution
      (i.e. HD) video even though the camera catches HD video. This change
      allowed users to skip highest-resolution encoding by setting that level's
      target bit rate to 0.
      To test it, modify the following line in vp8_multi_resolution_encoder.c.
          unsigned int  target_bitrate[NUM_ENCODERS]={1400, 500, 100};
      To skip the highest-resolution level, change it to
          unsigned int  target_bitrate[NUM_ENCODERS]={0, 500, 100};
      To skip the first and second highest resolution levels, change it to
          unsigned int  target_bitrate[NUM_ENCODERS]={0, 0, 100};
      This change also fixed a small problem in mapping, which slightly helped
      quality and performance.
      Change-Id: I977bae9a9fbfba85c8be4bd5af01539f2b84bc81
  21. 02 Feb, 2012 2 commits