1. 18 Jun, 2018 1 commit
    • David Barker's avatar
      Remove 'last_layer_id' from ObuDecInputContext · a8de8819
      David Barker authored
      Previously, if we wanted to use all-layers mode, the code
      in obudec.c was responsible for carving up temporal units
      into spatial layers to feed into the decoder. Whether we were
      in this mode corresponded to whether last_layer_id is set to
      IGNORE_ENHANCEMENT_LAYERS or not.
      
      Now, the all-layers behaviour is implemented in the decoder proper,
      so we can always pass a full temporal unit at a time into the decoder.
      
      This means that the special code in obudec.c is no longer needed,
      and that all-layers mode now works correctly for "contained" streams
      (ie, annexb format, .ivf, .webm, etc.)
      
      BUG=aomedia:1941
      
      Change-Id: I38a21e560c14f822b652f8c2880f6be9f7c2e2ec
      a8de8819
  2. 31 May, 2018 1 commit
    • Wan-Teh Chang's avatar
      Simple changes to OBU header decoding code. · b7f1f0c0
      Wan-Teh Chang authored
      These changes are intended to make it easier to compare the code with
      the spec.
      
      1. Rename has_length_field to has_size_field to match the name of the
      corresponding syntax element (obu_has_size_field) in the spec.
      
      2. Reorder the OBU types in valid_obu_type() to match the order of OBU
      types in the spec.
      
      3. Require that the reserve bits be 0 per the spec.
      
      Change-Id: I617486414869b45f3e0d57027a7e5e6bc6d13386
      b7f1f0c0
  3. 29 May, 2018 1 commit
    • Imdad Sardharwalla's avatar
      Fix .obu decoding with --all-layers for S2T1 · 2af1509c
      Imdad Sardharwalla authored
      When decoding a .obu (non-annex_b) stream with scalability mode S2T1
      (or a similar mode without inter-layer dependency) and with the
      --all-layers flag set:
      
       - Temporal units are broken up into spatial layers that are
         individually passed to the decoder. For layers that are not part of
         the selected operating points, this causes the decoder to return a
         NULL image. Prior to this patch, this caused an error/warning. This
         patch ensures that in this specific scenario the decoding continues
         error-free.
      
       - The aim is for obu_ctx->last_layer_id to be incremented each time a
         layer is decoded, resetting to 0 at the start of each temporal
         unit. Prior to this patch:
      
          * This incrementation did not occur when the decoder returned a
            NULL image (the above scenario).
      
          * The resetting did not always occur because of problems with
            img->max_spatial_id (see Issue 1917).
      
          * The resetting could not have worked properly for the above
            scenario, as img->max_spatial_id does not exist for img = NULL.
      
         This patch removes the code that alters the value of
         obu_ctx->last_layer_id from aomdec.c and adds similar code to
         obudec.c (so that the updates are performed after the OBUs are
         read, rather than after the frame is decoded), which avoids all of
         these problems.
      
         As a byproduct, the member max_spatial_id of aom_image_t is
         removed entirely, as it is no longer necessary.
      
      BUG=aomedia:1917
      
      Change-Id: Ifa228d011d3097556104472ffbede9f26e96dcf0
      2af1509c
  4. 23 May, 2018 1 commit
    • Tom Finegan's avatar
      Includes clean up. · dd3e2a5f
      Tom Finegan authored
      - Remove includes of config.h wrapped by HAVE_CONFIG_H. This
        is an obsolete vestige of our libvpx ancestry.
      - Change (nearly) all remaining include sites; use proper path
        to the include relative to project root instead of ./.
      - Correct include order where appropriate.
        - Note: This part of this patch is NOT exhaustive. In an
          attempt to be conseravative about the impact of this change
          I limited ordering and grouping changes to places that
          appear extremely unlikely to cause a problem. A more exhaustive
          follow up might be appropriate, but this issue can likely be
          handled organically from here on out.
      
      Change-Id: I3b421ffd46c5da6ef78e43e7a6d3b9550cb30325
      dd3e2a5f
  5. 21 May, 2018 1 commit
    • Tom Finegan's avatar
      Tree clean up. · 7790213a
      Tom Finegan authored
      Relocate C source and include files from the root of the
      repository to more appropriate places. Helps quiet linters.
      
      - Move common app support sources and includes to common/
      - Move apps to apps/
      - Move stats support to stats/
      - Drop unnecessary includes of aom_config.h where appropriate
      - Clean up include order where appropriate
      - Change CMake build to accomodate the above
      - Fix resize_util and add it to app targets.
      
      Change-Id: I268838e93400c67eb365aba9d2ecb2891538fc07
      7790213a
  6. 15 May, 2018 1 commit
    • Soo-Chul Han's avatar
      modify scalability info according to operating point · d2f317c3
      Soo-Chul Han authored
      The way scalability-related info is set/derived has changed with
        the introduction of operating points.  This patch addresses these
        changes
      
      - enhancement layers are renamed spatial layers
      - number of temporal/spatial layers is set/derived from
        operating_point_idc
      - some code cleanup
      
      Change-Id: I698fbe751980ab3a5d4d3109a950fd8a7a8d9433
      d2f317c3
  7. 03 May, 2018 1 commit
    • Tom Finegan's avatar
      Fix OBU related MSVC and x86 build warnings. · 06c2f0a1
      Tom Finegan authored
      Some missing casts for the most part. Made a couple
      type changes where appropriate. Added range checks
      in circumstances where we must support storage of
      a potentially larger than 32-bit value in a 32-bit
      type.
      
      Change-Id: I8275dc9d65fd5d7fb95054d0ce5be61b0e558887
      06c2f0a1
  8. 02 May, 2018 1 commit
    • Wan-Teh Chang's avatar
      Make obudec_read_leb128() stricter. · f7cc5764
      Wan-Teh Chang authored
      1. Only return 0 (success) with *value_length=0 if we reach EOF in the
      very first fread(). Also set *value to 0 in this case. This improves
      the code added in
      
      https://aomedia-review.googlesource.com/c/aom/+/52822
      
      2. Pass the actual number of bytes in value_buffer (instead of
      OBU_MAX_LENGTH_FIELD_SIZE) to aom_uleb_decode().
      
      In obudec_read_obu_header_and_size(), we should subtract leb128_length
      from buffer_capacity when calling obudec_read_obu_header().
      
      Change-Id: Ie8e4afd6fbc5ed5b4a03de0a0face34970a59411
      f7cc5764
  9. 01 May, 2018 1 commit
  10. 30 Apr, 2018 1 commit
  11. 28 Apr, 2018 1 commit
  12. 26 Apr, 2018 1 commit
    • Imdad Sardharwalla's avatar
      Dynamically-sized buffer in obudec.c · 4beef21b
      Imdad Sardharwalla authored
      The buffer used to read data from .obu files is set to be
      OBU_BUFFER_SIZE = 500 KiB. Because of this, prior to this patch
      a temporal unit of > 500KiB resulted in an error (when reading a
      non-annex_b stream), causing decoding to halt.
      
      This patch dynamically increases the size of the buffer as it is
      needed.
      
      BUG=aomedia:1812
      
      Change-Id: Ie2f4a85efea37d37b9d41f182cdf31913a82e5cb
      4beef21b
  13. 24 Apr, 2018 1 commit
    • David Barker's avatar
      obudec: Allow OBU-format still-image streams · b97dd86c
      David Barker authored
      Refactor the file_is_obu() function so that it allows files
      beginning with an OBU_SEQUENCE_HEADER. This may occur for still-image
      streams, where we do not require an initial OBU_TEMPORAL_DELIMITER.
      
      In order to avoid needing a large detection buffer, we factor out
      the header + payload size parsing from obudec_read_one_obu(), so that
      we can detect an OBU_SEQUENCE_HEADER without having to read its payload.
      Then, if the file is determined to be in OBU format, we can read the
      payload at that point.
      
      BUG=aomedia:1805
      
      Change-Id: Id7a5cbc9388dd0dce9ba94e78a16c4c8456f6755
      b97dd86c
  14. 04 Apr, 2018 2 commits
  15. 31 Mar, 2018 1 commit
  16. 30 Mar, 2018 1 commit
  17. 28 Mar, 2018 1 commit
  18. 25 Mar, 2018 1 commit
  19. 23 Mar, 2018 3 commits
  20. 20 Mar, 2018 1 commit
  21. 16 Mar, 2018 1 commit
  22. 15 Mar, 2018 1 commit
  23. 11 Mar, 2018 1 commit
  24. 02 Mar, 2018 1 commit
    • Tom Finegan's avatar
      Add util function for reading OBU type. · 13ee28c8
      Tom Finegan authored
      This began as an investigation into decoder_peek_si()
      and decoder_peek_si_internal(). Both functions need
      additional changes to function correctly, but since
      existing code and tests depends on current behavior the
      changes to those functions have been deferred and the
      required updates noted in TODOs and comments within
      decoder_peek_si_internal() within av1_dx_iface.c.
      
      BUG=aomedia:1445
      
      Change-Id: I89ee3f1a7adcf7c09938645d3fb2280ab1960698
      13ee28c8
  25. 28 Feb, 2018 1 commit
  26. 24 Feb, 2018 1 commit
    • Tom Finegan's avatar
      Experiment compatibility fix: OBU_SIZING and OBU_NO_IVF. · ccb8cc4f
      Tom Finegan authored
      Make OBU_SIZING and OBU_NO_IVF work when combined. Correct the
      support for OBUs with LEB128 size fields in obudec.c.
      
      In addition: explicitly disallow pipe input of Annex B OBU without
      framing (this implementation requires seeking backwards to function).
      
      Change-Id: I331371f51cae7752a9b1fc091174fe32816ea027
      ccb8cc4f
  27. 23 Feb, 2018 1 commit
    • David Barker's avatar
      [NORMATIVE-SYNTAX, obu-sizing] Fix length field size handling · 0debbaa3
      David Barker authored
      It is possible, and reasonable from an encoder perspective, to
      encode an OBU size field using more than the minimal number of
      bytes. With the current reference decoder, such lengths are
      decoded correctly, but the data pointer is then advanced by the
      wrong number of bytes, leading to a desync.
      
      This can easily be fixed by having aom_uleb_decode() return the
      exact number of bytes read. The behaviour of returning -1 on error
      can be preserved.
      
      In addition, fix aom_uleb_encode_fixed_size(), and strengthen its
      tests - this function appears to have been padding its output
      incorrectly, but this was not caught by the test suite.
      
      The 'encode' tests also mixed big-endian and little-endian in a
      potentially confusing way (reading back the encoded bytes big-endian
      for comparison to a 32-bit hex constant). Change to using an array
      of expected bytes, to make things clearer.
      
      BUG=aomedia:1433
      
      Change-Id: Iea80a1b70299e0a26cd45e44ecb039804f8c5245
      0debbaa3
  28. 22 Feb, 2018 2 commits
    • Yaowu Xu's avatar
      Remove CONFIG_OBU macro · d29ea975
      Yaowu Xu authored
      BUG=aomedia:1416
      
      Change-Id: Ied023e2dc7026aa20c40db721b19b7e851ae24a5
      d29ea975
    • Hui Su's avatar
      SCALABILITY: handle reading error · e19c3211
      Hui Su authored
      Fix compliler warnings.
      Also fix incompatible input date type for aom_uleb_decode().
      
      Change-Id: I61442ff4a2f8c21ffbc3c8cdd827ec2abdf9be25
      e19c3211
  29. 31 Jan, 2018 1 commit
  30. 25 Jan, 2018 1 commit
    • Tom Finegan's avatar
      Add obu_sizing experiment. · 41150ad4
      Tom Finegan authored
      Writes PRE_OBU_SIZE_BYTES (currently 4) bytes padded unsigned LEB128
      encoded integers in OBU size fields when enabled:
      
      $ cmake path/to/aom -DCONFIG_OBU=1 -DCONFIG_OBU_SIZING=1 && cmake --build .
      
      Requires CONFIG_OBU.
      
      BUG=aomedia:1125
      
      Change-Id: I4d184ef0c8587d24e9c8c3e63237ea5003386c6a
      41150ad4
  31. 23 Jan, 2018 2 commits
    • Tom Finegan's avatar
      Revert "add scalability experiment" · 8695e987
      Tom Finegan authored
      This reverts commit 2eeadab1.
      
      Reason for revert: Did not address final review comments before landing.
      
      Change-Id: I29089767857bd20b3a3e42322e3887fb7027559d
      8695e987
    • Soo-Chul Han's avatar
      add scalability experiment · 2eeadab1
      Soo-Chul Han authored
      configure:  --enable-experimental --enable-scalability
      
      New applications:  scalable_encoder, scalable_decoder
      
      scalable_encoder:
        * Encodes inputs as 2-layer (same size) stream
        * Encodes as obu file (OBU_NO_IVF must be enabled)
        * Base layer encoded in IPPPP where P's reference
          only the previous (in time) base layer
        * Enhancement layer encoded using its base layer as
          sole reference frame
        * Base layer encoded with fixed high QP
        * Enhancement layer encoded with fixed low QP
      
      scalable_decoder:
        * Able to decode scalable stream generated by
          scalable_encoder
        * Able to decode any single-layer stream encoded
          by aomenc
        * Outputs base layer as out_lyr0.yuv, and enhancement
          layer (if they exist) as out_lyrN.yuv (N = 1, 2, 3, ..)
        * Able to decode N layers (more than 2)
      
      Change-Id: I8555735db71e5b9b6f900ffdf978e0ad6f6bfc00
      2eeadab1
  32. 27 Dec, 2017 1 commit
    • Tom Finegan's avatar
      Always prefix OBUs with a size field. · ff86395f
      Tom Finegan authored
      - Make the add_4bytes_obusize experiment part of the obu experiment.
      - Remove the add_4bytes_obusize experiment flags.
      - Update the encoder, decoder, and tooling sources.
      
      BUG=aomedia:1125
      
      Change-Id: Ia5c443c855e52618257b39c44ca2632703bf83fd
      ff86395f
  33. 05 Dec, 2017 1 commit