1. 21 Jul, 2019 6 commits
  2. 20 Jul, 2019 8 commits
  3. 19 Jul, 2019 8 commits
  4. 18 Jul, 2019 4 commits
    • Shiyou Yin's avatar
      avutil/mips: refactor msa load and store macros. · 153c6075
      Shiyou Yin authored
      Replace STnxm_UB and LDnxm_SH with new macros ST_{H/W/D}{1/2/4/8}.
      The old macros are difficult to use because they don't follow the same parameter passing rules.
      Changing details as following:
      1. remove LD4x4_SH.
      2. replace ST2x4_UB with ST_H4.
      3. replace ST4x2_UB with ST_W2.
      4. replace ST4x4_UB with ST_W4.
      5. replace ST4x8_UB with ST_W8.
      6. replace ST6x4_UB with ST_W2 and ST_H2.
      7. replace ST8x1_UB with ST_D1.
      8. replace ST8x2_UB with ST_D2.
      9. replace ST8x4_UB with ST_D4.
      10. replace ST8x8_UB with ST_D8.
      11. replace ST12x4_UB with ST_D4 and ST_W4.
      
      Examples of new macro: ST_H4(in, idx0, idx1, idx2, idx3, pdst, stride)
      ST_H4 store four half-word elements in vector 'in' to pdst with stride.
      About the macro name:
      1) 'ST' means store operation.
      2) 'H/W/D' means type of vector element is 'half-word/word/double-word'.
      3) Number '1/2/4/8' means how many elements will be stored.
      About the macro parameter:
      1) 'in0, in1...' 128-bits vector.
      2) 'idx0, idx1...' elements index.
      3) 'pdst' destination pointer to store to
      4) 'stride' stride of each store operation.
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      153c6075
    • Michael Niedermayer's avatar
      avformat/ifv: Check for EOF in read_index() · 00ed04d6
      Michael Niedermayer authored
      Fixes: Timeout
      Fixes: 15567/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5758451487080448
      
      Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: 's avatarPeter Ross <pross@xvid.org>
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      00ed04d6
    • Andreas Rheinhardt's avatar
      matroskadec: Remove redundant const · 9869e217
      Andreas Rheinhardt authored
      The typedef used to define EbmlSyntax already includes a const qualifier
      so that it is unnecessary to include another const qualifier in future
      definitions and declarations. Given that MSVC warns about this, this
      commit removes these redundant const qualifiers.
      Suggested-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      9869e217
    • Andreas Rheinhardt's avatar
      matroskadec: Add sizes to forward declarations · ab4795a0
      Andreas Rheinhardt authored
      Unknown-length elements end when an element not allowed in them, but
      allowed at a higher level is encountered. In order to check for this,
      c1abd95a added a pointer to every syntax level's parent to each
      EbmlSyntax. Given that the parent must of course also reference the
      child in order to be able to enter said child level, one needs to use
      forward declarations.
      These forward declarations constitute tentative definitions and tentative
      definitions with internal linkage (like our syntaxes) must not be an
      incomplete type. Yet they were an incomplete type and while GCC and
      Clang did not even warn about this (on default warning levels), it
      broke compilation with MSVC. Therefore this commit adds the sizes.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      ab4795a0
  5. 17 Jul, 2019 9 commits
  6. 16 Jul, 2019 5 commits
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Improve check for level 1 duplicates · 806ac7da
      Andreas Rheinhardt authored
      If a file uses unknown-length level 1 elements besides clusters and such
      elements are after the first cluster, then these elements will usually
      be parsed twice: Once during parsing of the file header and once when
      reading the file reaches the position where these elements are located.
      The second time the element is parsed leads to a "Duplicate element"
      error message. Known-length elements are not affected by this as they
      are skipped except during parsing the header.
      
      This commit fixes this by explicitly adding a check for whether the
      position of the element to be parsed is the same as the position of the
      already known level 1 element.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      806ac7da
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Use file offsets for level 1 elements · 730ac1ae
      Andreas Rheinhardt authored
      This commit converts the MatroskaLevel1Element struct to use file-based
      offsets, as opposed to the current practice of using offsets relative to
      the beginning of the segment in it. This also includes a change from
      uint64_t to int64_t.
      
      This is in preparation to another patch that improves the check for
      duplicate level 1 elements.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      730ac1ae
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Reindent after previous commit · 6854127a
      Andreas Rheinhardt authored
      Also use the smallest scope possible for a loop variable.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      6854127a
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Accept more unknown-length elements II · 71c90881
      Andreas Rheinhardt authored
      Up until now, one last kind of unknown-length element hasn't been
      properly handled: Unknown-length elements that are supposed to be
      skipped, i.e. the level 1 elements that might reside after the
      clusters.
      
      This commit changes this. To do this, ebml_parse got a mode that
      essentially tries to skip everything except when parsing is needed
      (namely for unknown-length elements for which parsing is necessary
      as they can't be skipped). This mode is selected by using a NULL
      as destination where the parsed data should be written to.
      It is used to parse the level 1 elements in matroska_parse_cluster.
      
      The syntax list used for parsing must of course include links to
      the syntax of all the master elements that might need to be parsed.
      In other words: Instead of matroska_clusters (which contained every
      level 1 element except clusters as EBML_NONE elements designated to
      be skipped) matroska_segment is needed and used; matroska_clusters has
      been removed.
      
      Furthermore, matroska_segment has been reordered so that clusters are at
      the front as this is now the most common case for this list.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      71c90881
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Fix probing of unknown-length headers · 9c6d14ab
      Andreas Rheinhardt authored
      matroska_probe did not support the case of an unknown-length EBML header
      at all; given that libavformat's Matroska muxer used to produce such
      files in the streaming case, support for them has been added.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      9c6d14ab