1. 25 Jun, 2019 8 commits
    • Alfred E. Heggestad's avatar
    • Zhong Li's avatar
      lavf/qsv_scale: add scaling modes support · dd662bbd
      Zhong Li authored
      low_power mode will use a fixed HW engine (SFC), thus can offload EU usage.
      high quality mode will take EU usage (AVS sampler).
      
      Performance and EU usage (Render usage) comparsion on Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz:
      
      High quality mode : ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
      -vf scale_qsv=w=1280:h=736:mode=hq -f null -
      fps=389
      RENDER usage: 28.10 (provided by MSDK metrics_monitor)
      
      Low Power mode: ffmpeg -hwaccel qsv -c:v h264_qsv -i ~/bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
      -vf scale_qsv=w=1280:h=736:mode=low_power -f null -
      fps=343
      RENDER usage: 0.00
      
      Low power mode (SFC) may be disabled if not supported by
      MSDK/Driver/HW, and replaced by AVS mode interanlly.
      Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
      dd662bbd
    • Andreas Rheinhardt's avatar
      movsub_bsf: Fix mov2textsub regression · 800f618a
      Andreas Rheinhardt authored
      The mov flavour of timed text uses the first two bytes of the packet as
      a length field. And up until 11bef2fe said length field has been read
      correctly in the mov2textsub bsf. But since then the next two bytes are
      read as if they were the length field. This is fixed in this commit.
      Reviewed-by: 's avatarPhilip Langdale <philipl@overt.org>
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
      800f618a
    • Jun Zhao's avatar
      lavf/flvenc: add automatic bitstream filtering · 053d33b4
      Jun Zhao authored
      add automatic bitstream filtering when mux AAC
      
      Reported-by: Yabo Wei weiyabogeijing@gmail.com
      Reviewed-by: Steven Liu<lq@onvideo.cn>
      Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
      053d33b4
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Improve error/EOF checks III · ff5ea59f
      Andreas Rheinhardt authored
      Up until now, when an element was skipped, it was relied upon
      ffio_limit to make sure that there is enough data available to skip.
      ffio_limit itself relies upon the availability of the file's size. As
      this needn't be available, the check has been refined: First one byte
      less than intended is skipped, then another byte is read, followed by a
      check of the error flags.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      ff5ea59f
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Improve read error/EOF checks II · a569a7b3
      Andreas Rheinhardt authored
      This commit fixes a number of bugs:
      
      1. There was no check that no read error/EOF occured during
      ebml_read_uint, ebml_read_sint and ebml_read_float.
      2. ebml_read_ascii and ebml_read_binary did sometimes not forward
      error codes; instead they simply returned AVERROR(EIO).
      3. In particular, AVERROR_EOF hasn't been used and no dedicated error
      message for it existed. This has been changed.
      
      In order to reduce code duplication, the new error code NEEDS_CHECKING
      has been introduced which makes ebml_parse check the AVIOContext's
      status for errors.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      a569a7b3
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Improve read error/EOF checks I · 239c7369
      Andreas Rheinhardt authored
      ebml_read_num had a number of flaws:
      
      1. The check for read errors/EOF was totally wrong. E.g. an EBML number
      beginning with the invalid 0x00 would be considered a read error,
      although it is just invalid data.
      2. The check for read errors/EOF was done just once, after reading the
      first byte of the EBML number. But errors/EOF can happen inbetween, of
      course, and this wasn't checked.
      3. There was no way to distinguish when EOF should be an error (because
      the data has to be there) for which an error message should be emitted
      and when it is not necessarily an error (namely during parsing of EBML
      IDs). Such a possibility has been added and used.
      
      All this was fixed; furthermore, the error messages for invalid EBML
      numbers were improved and useless initializations were removed.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      239c7369
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Properly check return values · a27e5398
      Andreas Rheinhardt authored
      Up until now, webm_dash_manifest_cues used the return values of
      ebml_read_num and ebml_read_length without checking for errors,
      i.e. return values < 0. This has been changed.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      a27e5398
  2. 24 Jun, 2019 3 commits
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Don't zero unnecessarily · 1215b3a5
      Andreas Rheinhardt authored
      It is only necessary to zero the initial allocated memory used to store
      the size of laced frames if the block used Xiph lacing. Otherwise no
      unintialized data was ever used, so use av_malloc instead of av_mallocz.
      
      Also use the correct type for the allocations.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      1215b3a5
    • Alexander Strasser's avatar
      configure: print_in_columns: Replace pr with awk · 99147312
      Alexander Strasser authored
      Get rid of pr dependency and write the columns strictly
      alphabetical without page size considerations (POSIX
      specifies 66 lines as default).
      
      Setting the page size via pr's -l option was considered,
      but as there is issue #5680 which wants to avoid pr
      mainly because it's not in busybox, we chose to replace
      pr instead.
      
      Before pr would attempt to write pages, thus if a page
      boundary was reached, the output looked confusing as one
      couldn't see there was a new page and the alphabetical
      order was disrupted when scanning down one of the columns.
      
      This change is based on a shell implementation submitted
      before by Yejun.
      
      Possible differences to the current version using pr:
      1. pr implementations should truncate items to not overflow columns;
         depending on how it's done not truncating shall be better IMHO.
      2. pr implementations might balance columns differently;
         we use minimum number of lines and might end up not
         using all columns or might have lesser entries in the
         last column(s)
      3. we use spaces only for padding the columns; at least the GNU pr
         version on my system also by default stuffs in tabs in addition
         to a single space in between columns. I don't see that this
         behaviour is demanded by POSIX, though I might be very well
         overlooking things. Anyway for our use case I can't see a need
         for having the additional tabs, or why it would be better compared
         to padding with spaces only.
      
      Fixes output for sizes with width < column width, too.
      
      Fixes remaining part of ticket #5680
      
      Contributor: Guo, Yejun <yejun.guo@intel.com>
      99147312
    • Bela Bodecs's avatar
      avformat/hlsenc: better error log message for var_stream_map content · 2045dd00
      Bela Bodecs authored
      When multiple variant streams are specified by var_stream_map option,
      %v is expected either in the filename or in the last sub-directory name,
      but only in one of them. When both of them contains %v string, current
      error message only states half of the truth.
      And even %v may appears several times inside the last sub-directory name
      or in filename pattern.
      This patch clarifies this in the log message and in the doc also.
      Signed-off-by: 's avatarBela Bodecs <bodecsb@vivanet.hu>
      2045dd00
  3. 23 Jun, 2019 11 commits
  4. 22 Jun, 2019 1 commit
  5. 21 Jun, 2019 12 commits
  6. 20 Jun, 2019 3 commits
  7. 19 Jun, 2019 1 commit
    • Bodecs Bela's avatar
      av_format/hlsenc: fix %v handling by format_name function · 09a48539
      Bodecs Bela authored
      Hi All,
      
      When multiple variant streams are specified by var_stream_map option, %v
      placeholder in various names ensures that each variant has its unique
      names. Most of %v handlng is done in format_name function. Currently
      in this function the result buffer is the same as the
      input pattern buffer, so you must allocate it before calling format_name
      function. It also means, that it is silently assumed that the result
      string will NOT be
      longer that the pattern string. It is true most of the time, because %v
      may appear only once in the pattern string and number of variant streams
      is less than 100 in practical cases. But theoretically it will fail if
      specified number of variant streams is greater than 100 (i.e. longer
      than 2 digits).
      This patch fixes this behaviour by altering format_name function to
      allocate the
      result buffer and return it to the caller.
      
      Please, review this patch.
      
      best,
      
      Bela
      >From 6377ebee8a106a9684d41b270c7d6c8e57cd3e7b Mon Sep 17 00:00:00 2001
      From: Bela Bodecs <bodecsb@vivanet.hu>
      Date: Mon, 17 Jun 2019 14:31:36 +0200
      Subject: [PATCH] av_format/hlsenc: fix %v handling by format_name function
      
      When multiple variant streams are specified by var_stream_map option, %v
      placeholder in various names ensures that each variant has its unique
      names. Most of %v handlng is done in format_name function. Currently
      in this function the result buffer is the same as the input pattern
      buffer, so you must allocate it before calling format_name function. It
      also means, that it is silently assumed that the result string will NOT
      be longer that the pattern string. It is true most of the time, because
      %v may appear only once in the pattern string and number of variant
      streams is less than 100 in practical cases. But theoretically it will
      fail if specified number of variant streams is greater than 100. This
      patch fixes this behaviour by altering format_name function to allocate
      the result buffer and return it to the caller.
      Signed-off-by: 's avatarBela Bodecs <bodecsb@vivanet.hu>
      09a48539
  8. 18 Jun, 2019 1 commit