Tags

Tags give the ability to mark specific points in history as being important
  • pr-ffstaging-41/brycechesternewman/add_poster_time_location_mov-v1

    libavformat/mov: Add support for exporting poster time.
    
    From: Bryce Chester Newman <bryce.newman@gettyimages.com>
    
    Export the poster_time_location if available.
    The poster_time_location is calculated using
    the poster_time / time_scale = X seconds.
    The value of poster_time_location indicates
    where in the video the poster frame is.
    
    Addresses feedback
    from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
    
    Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.41.ffstaging.FFmpeg.1664813294282.ffmpegagent@gmail.com
  • pr-ffstaging-18/softworkz/submit_subfiltering-v7

    Subtitle Filtering 2022
    
    Subtitle Filtering 2022
    =======================
    
    This is a substantial update to the earlier subtitle filtering patch series.
    A primary goal has been to address others' concerns as much as possible on
    one side and to provide more clarity and control over the way things are
    working. Clarity is is specifically important to allow for a better
    understanding of the need for a subtitle start pts value that can be
    different from the frame's pts value. This is done by refactoring the
    subtitle timing fields in AVFrame, adding a frame field to indicate repeated
    subtitle frames, and finally the full removal of the heartbeat
    functionality, replaced by a new 'subfeed' filter that provides different
    modes for arbitrating subtitle frames in a filter graph. Finally, each
    subtitle filter's documentation has been amended by a section describing the
    filter's timeline behavior (in v3 update).
    
    Subtitle Filtering Demos
    ========================
    
    I published a demonstration of subtitle filtering capabilities with OCR,
    text and bitmap subtitle manipulation involved: Demo 1: Text-Manipulation
    with Bitmap Subtitles
    [https://github.com/softworkz/SubtitleFilteringDemos/tree/master/Demo1]
    
    v7 (WIP)
    ========
    
     * Revert loglevel change
     * snull: propagate format
     * fftools/ffmpeg: ensure monotonic (frame-)pts values for subtitles
    
    v6 - Fix assertion errors
    =========================
    
     * text2graphicsub: fix null point on uninit after error
     * strim: propagate width and height
     * avfilter: add default propagation time_base from inlink to outlink
    
     * I'm glad to announce that Traian (@tcoza) has joined the project and
       contributed a new 'text2graphicsub' filter to convert text subtitles to
       graphic subtitles, which can in turn be encoded as dvd, dvb or x-subs
       (and any other encoder for graphic subs that might be added in the
       future). This filter closes the last open "gap" in subtitle processing.
     * stripstyles filter: now allows very fine-grained control over which ASS
       style codes should be preserved or stripped
     * stripstyles: do not drop dialog margin values
     * subfeed filter: eliminates duplicate frames with duplicate start times
       when 'fix_overlap' is specified
     * textmod: do not drop effect values
     * graphicsub2text: reduce font size jitter
     * ass_split: add function to selectively preserve elements when splitting
     * add strim, snull and ssink and further unify subtitle frame handling with
       audio and video
     * ffmpeg_filter: get simple filter notation working for subtitles
    
    v4 - Quality Improvements
    =========================
    
     * finally an updated version
     * includes many improvements from internal testing
     * all FATE tests passed
     * all example commands from the docs verified to work
     * can't list all the detail changes..
     * I have left out the extra commits which can be handled separately, just
       in case somebody wonders why these are missing:
       * avcodec/webvttenc: Don't encode drawing codes and empty lines
       * avcodec/webvttenc: convert hard-space tags to  
       * avutil/ass_split: Add parsing of hard-space tags (\h)
       * avutil/ass_split: Treat all content in curly braces as hidden
       * avutil/ass_split: Fix ass parsing of style codes with comments
    
    v3 - Rebase
    ===========
    
    due to merge conflicts - apologies.
    
    Changes in v2
    =============
    
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * overlaytextsubs: Make sure to request frames on the subtitle input
     * avfilter/splitcc: Start parsing cc data on key frames only
     * avcodec/webvttenc: Don't encode ass drawing codes and empty lines
     * stripstyles: fix mem leak
     * gs2t: improve color detection
     * gs2t: empty frames must not be skipped
     * subfeed: fix name
     * textmod: preserve margins
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * avcodec/dvbsubdec: Fix conditions for fallback to default resolution
     * Made changes suggested by Andreas
     * Fixed failing command line reported by Michael
    
    Changes from previous version v24:
    
    AVFrame
    =======
    
     * Removed sub_start_time The start time is now added to the subtitle
       start_pts during decoding The sub_end_time field is adjusted accordingly
     * Renamed sub_end_time to duration which it is effectively after removing
       the start_time
     * Added a sub-struct 'subtitle_timing' to av frame Contains subtitle_pts
       renamed to 'subtitle_timing.start_pts' and 'subtitle_timing.duration'
     * Change both fields to (fixed) time_base AV_TIMEBASE
     * add repeat_sub field provides a clear indication whether a subtitle frame
       is an actual subtitle event or a repeated subtitle frame in a filter
       graph
    
    Heartbeat Removal
    =================
    
     * completely removed the earlier heartbeat implementation
     * filtering arbitration is now implemented in a new filter: 'subfeed'
     * subfeed will be auto-inserted for compatiblity with sub2video command
       lines
     * the new behavior is not exactly identical to the earlier behavior, but it
       basically allows to achieve the same results
     * there's a small remainder, now named subtitle kickoff which serves to get
       things (in the filter graph) going right from the start
    
    New 'subfeed' Filter
    ====================
    
     * a versatile filter for solving all kinds of problems with subtile frame
       flow in filter graphs
     * Can be inserted at any position in a graph
     * Auto-inserted for sub2video command lines (in repeat-mode)
     * Allows duration fixup delay input frames with unknown duration and infer
       duration from start of subsequent frame
     * Provides multiple modes of operation:
       * repeat mode (default) Queues input frames Outputs frames at a fixed
         (configurable) rate Either sends a matching input frame (repeatedly) or
         empty frames otherwise
       * scatter mode similar to repeat mode, but splits input frames by
         duration into small segments with same content
       * forward mode No fixed output rate Useful in combination with duration
         fixup or overlap fixup
    
    ffmpeg Tool Changes
    ===================
    
     * delay subtitle output stream initialization (like for audio and video)
       This is needed for example when a format header depends on having
       received an initial frame to derive certain header values from
     * decoding: set subtitle frame size from decoding context
     * re-init graph when subtitle size changes
     * always insert subscale filter for sub2video command lines (to ensure
       correct scaling)
    
    Subtitle Encoding
    =================
    
     * ignore repeated frames for encoding based on repeat_sub field in AVFrame
     * support multi-area encoding for text subtitles Subtitle OCR can create
       multiple areas at different positions. Previously, the texts were always
       squashed into a single area ('subtitle rect'), which was not ideal.
       Multiple text areas are now generally supported:
       * ASS Encoder Changed to use the 'receive_packet' encoding API A single
         frame with multiple text areas will create multiple packets now
       * All other text subtitle encoders A newline is inserted between the text
         from multiple areas
    
    graphicsub2text (OCR)
    =====================
    
     * enhanced preprocessing
       * using elbg algorithm for color quantization
       * detection and removal of text outlines
       * map-based identification of colors per word (text, outline, background)
     * add option for duration fixup
     * add option to dump preprocessing bitmaps
     * Recognize formatting and apply as ASS inline styles
       * per word(!)
       * paragraph alignment
       * positioning
       * font names
       * font size
       * font style (italic, underline, bold)
       * text color, outline color
    
    Other Filter Changes
    ====================
    
     * all: Make sure to forward all link properties (time base, frame rate, w,
       h) where appropriate
     * overlaytextsubs: request frames on the subtitle input
     * overlaytextsubs: disable read-order checking
     * overlaytextsubs: improve implementation of render_latest_only
     * overlaytextsubs: ensure equal in/out video formats
     * splitcc: derive framerate from realtime_latency
     * graphicsub2video: implement caching of converted frames
     * graphicsub2video: use 1x1 output frame size as long as subtitle size is
       unknown (0x0)
    
    Plus a dozen of things I forgot..
    
    softworkz (25):
      avcodec,avutil: Move enum AVSubtitleType to avutil, add new and
        deprecate old values
      avutil/frame: Prepare AVFrame for subtitle handling
      avcodec/subtitles: Introduce new frame-based subtitle decoding API
      avcodec/libzvbi: set subtitle type
      avfilter/subtitles: Update vf_subtitles to use new decoding api
      avcodec,avutil: Move ass helper functions to avutil as avpriv_ and
        extend ass dialog parsing
      avcodec/subtitles: Replace deprecated enum values
      fftools/play,probe: Adjust for subtitle changes
      avfilter/subtitles: Add subtitles.c for subtitle frame allocation
      avfilter/avfilter: Handle subtitle frames
      avfilter/avfilter: Fix hardcoded input index
      avfilter/sbuffer: Add sbuffersrc and sbuffersink filters
      avfilter/overlaygraphicsubs: Add overlaygraphicsubs and
        graphicsub2video filters
      avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video
        filters
      avfilter/textmod: Add textmod, censor and show_speaker filters
      avfilter/stripstyles: Add stripstyles filter
      avfilter/splitcc: Add splitcc filter for closed caption handling
      avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
      avfilter/subscale: Add filter for scaling and/or re-arranging
        graphical subtitles
      avfilter/subfeed: add subtitle feed filter
      avfilter/text2graphicsub: Added text2graphicsub subtitle filter
      avfilter/snull,strim: Add snull and strim filters
      avcodec/subtitles: Migrate subtitle encoders to frame-based API
      fftools/ffmpeg: Introduce subtitle filtering and new frame-based
        subtitle encoding
      avcodec/dvbsubdec: Fix conditions for fallback to default resolution
    
     configure                                 |   10 +-
     doc/filters.texi                          |  807 ++++++++++++++
     fftools/ffmpeg.c                          |  606 +++++-----
     fftools/ffmpeg.h                          |   17 +-
     fftools/ffmpeg_filter.c                   |  270 +++--
     fftools/ffmpeg_hw.c                       |    2 +-
     fftools/ffmpeg_opt.c                      |   31 +-
     fftools/ffplay.c                          |  102 +-
     fftools/ffprobe.c                         |   47 +-
     libavcodec/Makefile                       |   56 +-
     libavcodec/ass.h                          |  151 +--
     libavcodec/ass_split.h                    |  191 ----
     libavcodec/assdec.c                       |    4 +-
     libavcodec/assenc.c                       |  191 +++-
     libavcodec/avcodec.c                      |    8 +
     libavcodec/avcodec.h                      |   34 +-
     libavcodec/ccaption_dec.c                 |   20 +-
     libavcodec/codec_internal.h               |   12 -
     libavcodec/decode.c                       |   60 +-
     libavcodec/dvbsubdec.c                    |   53 +-
     libavcodec/dvbsubenc.c                    |   96 +-
     libavcodec/dvdsubdec.c                    |    2 +-
     libavcodec/dvdsubenc.c                    |  103 +-
     libavcodec/encode.c                       |   61 +-
     libavcodec/internal.h                     |   18 +
     libavcodec/jacosubdec.c                   |    2 +-
     libavcodec/libaribb24.c                   |    2 +-
     libavcodec/libzvbi-teletextdec.c          |   17 +-
     libavcodec/microdvddec.c                  |    7 +-
     libavcodec/movtextdec.c                   |    3 +-
     libavcodec/movtextenc.c                   |  126 ++-
     libavcodec/mpl2dec.c                      |    2 +-
     libavcodec/pgssubdec.c                    |    2 +-
     libavcodec/realtextdec.c                  |    2 +-
     libavcodec/samidec.c                      |    2 +-
     libavcodec/srtdec.c                       |    2 +-
     libavcodec/srtenc.c                       |  116 +-
     libavcodec/subviewerdec.c                 |    2 +-
     libavcodec/tests/avcodec.c                |    5 +-
     libavcodec/textdec.c                      |    4 +-
     libavcodec/ttmlenc.c                      |  114 +-
     libavcodec/utils.c                        |  185 ++-
     libavcodec/webvttdec.c                    |    2 +-
     libavcodec/webvttenc.c                    |   94 +-
     libavcodec/xsubdec.c                      |    2 +-
     libavcodec/xsubenc.c                      |   88 +-
     libavfilter/Makefile                      |   18 +
     libavfilter/allfilters.c                  |   19 +
     libavfilter/avfilter.c                    |   42 +-
     libavfilter/avfilter.h                    |   11 +
     libavfilter/avfiltergraph.c               |    5 +
     libavfilter/buffersink.c                  |   54 +
     libavfilter/buffersink.h                  |    7 +
     libavfilter/buffersrc.c                   |   72 ++
     libavfilter/buffersrc.h                   |    1 +
     libavfilter/formats.c                     |   16 +
     libavfilter/formats.h                     |    3 +
     libavfilter/internal.h                    |   19 +-
     libavfilter/sf_graphicsub2text.c          | 1137 +++++++++++++++++++
     libavfilter/sf_snull.c                    |   61 +
     libavfilter/sf_splitcc.c                  |  395 +++++++
     libavfilter/sf_stripstyles.c              |  237 ++++
     libavfilter/sf_subfeed.c                  |  412 +++++++
     libavfilter/sf_subscale.c                 |  884 +++++++++++++++
     libavfilter/sf_text2graphicsub.c          |  634 +++++++++++
     libavfilter/sf_textmod.c                  |  710 ++++++++++++
     libavfilter/subtitles.c                   |   63 ++
     libavfilter/subtitles.h                   |   44 +
     libavfilter/trim.c                        |   60 +-
     libavfilter/vf_overlaygraphicsubs.c       |  765 +++++++++++++
     libavfilter/vf_overlaytextsubs.c          |  680 +++++++++++
     libavfilter/vf_subtitles.c                |   67 +-
     libavutil/Makefile                        |    4 +
     {libavcodec => libavutil}/ass.c           |  115 +-
     libavutil/ass_internal.h                  |  135 +++
     {libavcodec => libavutil}/ass_split.c     |  179 ++-
     libavutil/ass_split_internal.h            |  254 +++++
     libavutil/frame.c                         |  206 +++-
     libavutil/frame.h                         |   85 +-
     libavutil/subfmt.c                        |   45 +
     libavutil/subfmt.h                        |  115 ++
     libavutil/version.h                       |    3 +-
     tests/ref/fate/filter-overlay-dvdsub-2397 |  181 ++-
     tests/ref/fate/sub-dvb                    |  162 +--
     tests/ref/fate/sub-scc                    |    1 -
     tests/ref/fate/sub2video                  | 1092 +++++++++++++++++-
     tests/ref/fate/sub2video_basic            | 1238 +++++++++++++++++++--
     tests/ref/fate/sub2video_time_limited     |   78 +-
     88 files changed, 12443 insertions(+), 1597 deletions(-)
     delete mode 100644 libavcodec/ass_split.h
     create mode 100644 libavfilter/sf_graphicsub2text.c
     create mode 100644 libavfilter/sf_snull.c
     create mode 100644 libavfilter/sf_splitcc.c
     create mode 100644 libavfilter/sf_stripstyles.c
     create mode 100644 libavfilter/sf_subfeed.c
     create mode 100644 libavfilter/sf_subscale.c
     create mode 100644 libavfilter/sf_text2graphicsub.c
     create mode 100644 libavfilter/sf_textmod.c
     create mode 100644 libavfilter/subtitles.c
     create mode 100644 libavfilter/subtitles.h
     create mode 100644 libavfilter/vf_overlaygraphicsubs.c
     create mode 100644 libavfilter/vf_overlaytextsubs.c
     rename {libavcodec => libavutil}/ass.c (59%)
     create mode 100644 libavutil/ass_internal.h
     rename {libavcodec => libavutil}/ass_split.c (71%)
     create mode 100644 libavutil/ass_split_internal.h
     create mode 100644 libavutil/subfmt.c
     create mode 100644 libavutil/subfmt.h
    
    base-commit: b0c7352cd494c88d33f032be60b5e1c4e8b092a0
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.18.v7.ffstaging.FFmpeg.1664735360.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.ffstaging.FFmpeg.1642122813.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v2.ffstaging.FFmpeg.1642646916.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v3.ffstaging.FFmpeg.1642649134.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v4.ffstaging.FFmpeg.1653744323.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v5.ffstaging.FFmpeg.1656151077.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v6.ffstaging.FFmpeg.1656261322.ffmpegagent@gmail.com
    
  • pr-ffstaging-37/softworkz/submit_logtiming-v1

    Add option to log timing
    
    This pathcset adds two logging flags: 'timing' and 'datetiming'.
    
    Usage:
    
    ffmpeg -loglevel +timing
    
    or
    
    ffmpeg -loglevel +datetiming
    
    softworkz (3):
      avutil/log: support logging of date and timing information
      fftools/opt_common: add timing and datetiming log flags
      doc/fftools-common-opts: document log timing flags
    
     doc/APIchanges               |  3 +++
     doc/fftools-common-opts.texi |  4 ++++
     fftools/opt_common.c         | 12 ++++++++++++
     libavutil/log.c              | 32 +++++++++++++++++++++++++++++---
     libavutil/log.h              | 10 ++++++++++
     libavutil/version.h          |  4 ++--
     6 files changed, 60 insertions(+), 5 deletions(-)
    
    base-commit: 48cb2c7a8a2deca40dd2f143848dd5addc25465c
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.37.ffstaging.FFmpeg.1661369869.ffmpegagent@gmail.com
  • pr-ffstaging-25/softworkz/derive_devices-v3

    Add derive-device function which searches for existing devices in both directions
    
    This is an updated version of: [PATCH v4 1/1] avutils/hwcontext: When
    deriving a hwdevice, search for existing device in both directions
    
    There has been an objection that the earlier patchset would change API
    behavior, and that this change should be limited to ffmpeg cli.
    
    To achieve this, the API behavior is left unchanged now and a new function
    av_hwdevice_ctx_get_or_create_derived() is added and used by the hwupload
    and hwmap filters.
    
    v2: Implemented concept for "weak references" to avoid circular reference
    lockup.
    
    v3: rebased due to conflicts
    
    softworkz (4):
      avutil/buffer: add av_ref_from_buffer() function
      avutils/hwcontext: add derive-device function which searches for
        existing devices in both directions
      lavu: bump minor version and add doc/APIchanges entry for
        av_hwdevice_ctx_get_or_create_derived()
      avfilter/hwmap,hwupload: use new av_hwdevice_ctx_get_or_create_derived
        method
    
     doc/APIchanges                 |   6 ++
     libavfilter/vf_hwmap.c         |   4 +-
     libavfilter/vf_hwupload.c      |   2 +-
     libavutil/buffer.c             |  16 ++++
     libavutil/buffer.h             |   8 ++
     libavutil/hwcontext.c          | 167 +++++++++++++++++++++++++++++++--
     libavutil/hwcontext.h          |  20 ++++
     libavutil/hwcontext_internal.h |  11 +++
     libavutil/hwcontext_qsv.c      |  11 ++-
     libavutil/version.h            |   2 +-
     10 files changed, 233 insertions(+), 14 deletions(-)
    
    base-commit: f7d510b33ff33d2f5cb096017ee1c00f624cc138
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.25.v3.ffstaging.FFmpeg.1658446783.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.25.ffstaging.FFmpeg.1651349262.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.25.v2.ffstaging.FFmpeg.1653142062.ffmpegagent@gmail.com
  • pr-ffstaging-31/softworkz/submit_qsv_sei-v5

    Implement SEI parsing for QSV decoders
    
    Missing SEI information has always been a major drawback when using the QSV
    decoders. I used to think that there's no chance to get at the data without
    explicit implementation from the MSDK side (or doing something weird like
    parsing in parallel). It turned out that there's a hardly known api method
    that provides access to all SEI (h264/hevc) or user data (mpeg2video).
    
    This allows to get things like closed captions, frame packing, display
    orientation, HDR data (mastering display, content light level, etc.) without
    having to rely on those data being provided by the MSDK as extended buffers.
    
    The commit "Implement SEI parsing for QSV decoders" includes some hard-coded
    workarounds for MSDK bugs which I reported:
    https://github.com/Intel-Media-SDK/MediaSDK/issues/2597#issuecomment-1072795311
    
    But that doesn't help. Those bugs exist and I'm sharing my workarounds,
    which are empirically determined by testing a range of files. If someone is
    interested, I can provide private access to a repository where we have been
    testing this. Alternatively, I could also leave those workarounds out, and
    just skip those SEI types.
    
    In a previous version of this patchset, there was a concern that payload
    data might need to be re-ordered. Meanwhile I have researched this carefully
    and the conclusion is that this is not required.
    
    My detailed analysis can be found here:
    https://gist.github.com/softworkz/36c49586a8610813a32270ee3947a932
    
    v4
    
     * add new dependencies in makefile Now, build still works when someone uses
       configure --disable-decoder=h264 --disable-decoder=hevc
       --disable-decoder=mpegvideo --disable-decoder=mpeg1video
       --disable-decoder=mpeg2video --enable-libmfx
    
    v3
    
     * frame.h: clarify doc text for av_frame_copy_side_data()
    
    v2
    
     * qsvdec: make error handling consistent and clear
     * qsvdec: remove AV_CODEC_ID_MPEG1VIDEO constants
     * hevcdec: rename function to ff_hevc_set_side_data(), add doc text
    
    v3
    
     * qsvdec: fix c/p error
    
    softworkz (6):
      avutil/frame: Add av_frame_copy_side_data() and
        av_frame_remove_all_side_data()
      avcodec/vpp_qsv: Copy side data from input to output frame
      avcodec/mpeg12dec: make mpeg_decode_user_data() accessible
      avcodec/hevcdec: make set_side_data() accessible
      avcodec/h264dec: make h264_export_frame_props() accessible
      avcodec/qsvdec: Implement SEI parsing for QSV decoders
    
     doc/APIchanges               |   4 +
     libavcodec/Makefile          |   6 +-
     libavcodec/h264_slice.c      |  98 ++++++++-------
     libavcodec/h264dec.h         |   2 +
     libavcodec/hevcdec.c         | 117 +++++++++---------
     libavcodec/hevcdec.h         |   9 ++
     libavcodec/hevcdsp.c         |   4 +
     libavcodec/mpeg12.h          |  28 +++++
     libavcodec/mpeg12dec.c       |  40 +-----
     libavcodec/qsvdec.c          | 234 +++++++++++++++++++++++++++++++++++
     libavfilter/qsvvpp.c         |   6 +
     libavfilter/vf_overlay_qsv.c |  19 ++-
     libavutil/frame.c            |  67 ++++++----
     libavutil/frame.h            |  32 +++++
     libavutil/version.h          |   2 +-
     15 files changed, 494 insertions(+), 174 deletions(-)
    
    base-commit: 6a82412bf33108111eb3f63076fd5a51349ae114
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.31.v5.ffstaging.FFmpeg.1656708534.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.ffstaging.FFmpeg.1653552529.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v2.ffstaging.FFmpeg.1654074366.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v3.ffstaging.FFmpeg.1654106506.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v4.ffstaging.FFmpeg.1656286888.ffmpegagent@gmail.com
  • pr-ffstaging-31/softworkz/submit_qsv_sei-v4

    Implement SEI parsing for QSV decoders
    
    Missing SEI information has always been a major drawback when using the QSV
    decoders. I used to think that there's no chance to get at the data without
    explicit implementation from the MSDK side (or doing something weird like
    parsing in parallel). It turned out that there's a hardly known api method
    that provides access to all SEI (h264/hevc) or user data (mpeg2video).
    
    This allows to get things like closed captions, frame packing, display
    orientation, HDR data (mastering display, content light level, etc.) without
    having to rely on those data being provided by the MSDK as extended buffers.
    
    The commit "Implement SEI parsing for QSV decoders" includes some hard-coded
    workarounds for MSDK bugs which I reported:
    https://github.com/Intel-Media-SDK/MediaSDK/issues/2597#issuecomment-1072795311
    
    But that doesn't help. Those bugs exist and I'm sharing my workarounds,
    which are empirically determined by testing a range of files. If someone is
    interested, I can provide private access to a repository where we have been
    testing this. Alternatively, I could also leave those workarounds out, and
    just skip those SEI types.
    
    In a previous version of this patchset, there was a concern that payload
    data might need to be re-ordered. Meanwhile I have researched this carefully
    and the conclusion is that this is not required.
    
    My detailed analysis can be found here:
    https://gist.github.com/softworkz/36c49586a8610813a32270ee3947a932
    
    v3
    
     * frame.h: clarify doc text for av_frame_copy_side_data()
    
    v2
    
     * qsvdec: make error handling consistent and clear
     * qsvdec: remove AV_CODEC_ID_MPEG1VIDEO constants
     * hevcdec: rename function to ff_hevc_set_side_data(), add doc text
    
    v3
    
     * qsvdec: fix c/p error
    
    softworkz (6):
      avutil/frame: Add av_frame_copy_side_data() and
        av_frame_remove_all_side_data()
      avcodec/vpp_qsv: Copy side data from input to output frame
      avcodec/mpeg12dec: make mpeg_decode_user_data() accessible
      avcodec/hevcdec: make set_side_data() accessible
      avcodec/h264dec: make h264_export_frame_props() accessible
      avcodec/qsvdec: Implement SEI parsing for QSV decoders
    
     doc/APIchanges               |   4 +
     libavcodec/h264_slice.c      |  98 ++++++++-------
     libavcodec/h264dec.h         |   2 +
     libavcodec/hevcdec.c         | 117 +++++++++---------
     libavcodec/hevcdec.h         |   9 ++
     libavcodec/mpeg12.h          |  28 +++++
     libavcodec/mpeg12dec.c       |  40 +-----
     libavcodec/qsvdec.c          | 234 +++++++++++++++++++++++++++++++++++
     libavfilter/qsvvpp.c         |   6 +
     libavfilter/vf_overlay_qsv.c |  19 ++-
     libavutil/frame.c            |  67 ++++++----
     libavutil/frame.h            |  32 +++++
     libavutil/version.h          |   2 +-
     13 files changed, 485 insertions(+), 173 deletions(-)
    
    base-commit: 6a82412bf33108111eb3f63076fd5a51349ae114
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.31.v4.ffstaging.FFmpeg.1656286888.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.ffstaging.FFmpeg.1653552529.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v2.ffstaging.FFmpeg.1654074366.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v3.ffstaging.FFmpeg.1654106506.ffmpegagent@gmail.com
  • pr-ffstaging-18/softworkz/submit_subfiltering-v6

    Subtitle Filtering 2022
    
    Subtitle Filtering 2022
    =======================
    
    This is a substantial update to the earlier subtitle filtering patch series.
    A primary goal has been to address others' concerns as much as possible on
    one side and to provide more clarity and control over the way things are
    working. Clarity is is specifically important to allow for a better
    understanding of the need for a subtitle start pts value that can be
    different from the frame's pts value. This is done by refactoring the
    subtitle timing fields in AVFrame, adding a frame field to indicate repeated
    subtitle frames, and finally the full removal of the heartbeat
    functionality, replaced by a new 'subfeed' filter that provides different
    modes for arbitrating subtitle frames in a filter graph. Finally, each
    subtitle filter's documentation has been amended by a section describing the
    filter's timeline behavior (in v3 update).
    
    Subtitle Filtering Demos
    ========================
    
    I published a demonstration of subtitle filtering capabilities with OCR,
    text and bitmap subtitle manipulation involved: Demo 1: Text-Manipulation
    with Bitmap Subtitles
    [https://github.com/softworkz/SubtitleFilteringDemos/tree/master/Demo1]
    
    v6 - Fix assertion errors
    =========================
    
     * text2graphicsub: fix null point on uninit after error
     * strim: propagate width and height
     * avfilter: add default propagation time_base from inlink to outlink
    
    v5 - Conversion to Graphic Subtitles, and other enhancements
    ============================================================
    
     * I'm glad to announce that Traian (@tcoza) has joined the project and
       contributed a new 'text2graphicsub' filter to convert text subtitles to
       graphic subtitles, which can in turn be encoded as dvd, dvb or x-subs
       (and any other encoder for graphic subs that might be added in the
       future). This filter closes the last open "gap" in subtitle processing.
     * stripstyles filter: now allows very fine-grained control over which ASS
       style codes should be preserved or stripped
     * stripstyles: do not drop dialog margin values
     * subfeed filter: eliminates duplicate frames with duplicate start times
       when 'fix_overlap' is specified
     * textmod: do not drop effect values
     * graphicsub2text: reduce font size jitter
     * ass_split: add function to selectively preserve elements when splitting
     * add strim, snull and ssink and further unify subtitle frame handling with
       audio and video
     * ffmpeg_filter: get simple filter notation working for subtitles
    
    v4 - Quality Improvements
    =========================
    
     * finally an updated version
     * includes many improvements from internal testing
     * all FATE tests passed
     * all example commands from the docs verified to work
     * can't list all the detail changes..
     * I have left out the extra commits which can be handled separately, just
       in case somebody wonders why these are missing:
       * avcodec/webvttenc: Don't encode drawing codes and empty lines
       * avcodec/webvttenc: convert hard-space tags to  
       * avutil/ass_split: Add parsing of hard-space tags (\h)
       * avutil/ass_split: Treat all content in curly braces as hidden
       * avutil/ass_split: Fix ass parsing of style codes with comments
    
    v3 - Rebase
    ===========
    
    due to merge conflicts - apologies.
    
    Changes in v2
    =============
    
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * overlaytextsubs: Make sure to request frames on the subtitle input
     * avfilter/splitcc: Start parsing cc data on key frames only
     * avcodec/webvttenc: Don't encode ass drawing codes and empty lines
     * stripstyles: fix mem leak
     * gs2t: improve color detection
     * gs2t: empty frames must not be skipped
     * subfeed: fix name
     * textmod: preserve margins
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * avcodec/dvbsubdec: Fix conditions for fallback to default resolution
     * Made changes suggested by Andreas
     * Fixed failing command line reported by Michael
    
    Changes from previous version v24:
    
    AVFrame
    =======
    
     * Removed sub_start_time The start time is now added to the subtitle
       start_pts during decoding The sub_end_time field is adjusted accordingly
     * Renamed sub_end_time to duration which it is effectively after removing
       the start_time
     * Added a sub-struct 'subtitle_timing' to av frame Contains subtitle_pts
       renamed to 'subtitle_timing.start_pts' and 'subtitle_timing.duration'
     * Change both fields to (fixed) time_base AV_TIMEBASE
     * add repeat_sub field provides a clear indication whether a subtitle frame
       is an actual subtitle event or a repeated subtitle frame in a filter
       graph
    
    Heartbeat Removal
    =================
    
     * completely removed the earlier heartbeat implementation
     * filtering arbitration is now implemented in a new filter: 'subfeed'
     * subfeed will be auto-inserted for compatiblity with sub2video command
       lines
     * the new behavior is not exactly identical to the earlier behavior, but it
       basically allows to achieve the same results
     * there's a small remainder, now named subtitle kickoff which serves to get
       things (in the filter graph) going right from the start
    
    New 'subfeed' Filter
    ====================
    
     * a versatile filter for solving all kinds of problems with subtile frame
       flow in filter graphs
     * Can be inserted at any position in a graph
     * Auto-inserted for sub2video command lines (in repeat-mode)
     * Allows duration fixup delay input frames with unknown duration and infer
       duration from start of subsequent frame
     * Provides multiple modes of operation:
       * repeat mode (default) Queues input frames Outputs frames at a fixed
         (configurable) rate Either sends a matching input frame (repeatedly) or
         empty frames otherwise
       * scatter mode similar to repeat mode, but splits input frames by
         duration into small segments with same content
       * forward mode No fixed output rate Useful in combination with duration
         fixup or overlap fixup
    
    ffmpeg Tool Changes
    ===================
    
     * delay subtitle output stream initialization (like for audio and video)
       This is needed for example when a format header depends on having
       received an initial frame to derive certain header values from
     * decoding: set subtitle frame size from decoding context
     * re-init graph when subtitle size changes
     * always insert subscale filter for sub2video command lines (to ensure
       correct scaling)
    
    Subtitle Encoding
    =================
    
     * ignore repeated frames for encoding based on repeat_sub field in AVFrame
     * support multi-area encoding for text subtitles Subtitle OCR can create
       multiple areas at different positions. Previously, the texts were always
       squashed into a single area ('subtitle rect'), which was not ideal.
       Multiple text areas are now generally supported:
       * ASS Encoder Changed to use the 'receive_packet' encoding API A single
         frame with multiple text areas will create multiple packets now
       * All other text subtitle encoders A newline is inserted between the text
         from multiple areas
    
    graphicsub2text (OCR)
    =====================
    
     * enhanced preprocessing
       * using elbg algorithm for color quantization
       * detection and removal of text outlines
       * map-based identification of colors per word (text, outline, background)
     * add option for duration fixup
     * add option to dump preprocessing bitmaps
     * Recognize formatting and apply as ASS inline styles
       * per word(!)
       * paragraph alignment
       * positioning
       * font names
       * font size
       * font style (italic, underline, bold)
       * text color, outline color
    
    Other Filter Changes
    ====================
    
     * all: Make sure to forward all link properties (time base, frame rate, w,
       h) where appropriate
     * overlaytextsubs: request frames on the subtitle input
     * overlaytextsubs: disable read-order checking
     * overlaytextsubs: improve implementation of render_latest_only
     * overlaytextsubs: ensure equal in/out video formats
     * splitcc: derive framerate from realtime_latency
     * graphicsub2video: implement caching of converted frames
     * graphicsub2video: use 1x1 output frame size as long as subtitle size is
       unknown (0x0)
    
    Plus a dozen of things I forgot..
    
    softworkz (25):
      avcodec,avutil: Move enum AVSubtitleType to avutil, add new and
        deprecate old values
      avutil/frame: Prepare AVFrame for subtitle handling
      avcodec/subtitles: Introduce new frame-based subtitle decoding API
      avcodec/libzvbi: set subtitle type
      avfilter/subtitles: Update vf_subtitles to use new decoding api
      avcodec,avutil: Move ass helper functions to avutil as avpriv_ and
        extend ass dialog parsing
      avcodec/subtitles: Replace deprecated enum values
      fftools/play,probe: Adjust for subtitle changes
      avfilter/subtitles: Add subtitles.c for subtitle frame allocation
      avfilter/avfilter: Handle subtitle frames
      avfilter/avfilter: Fix hardcoded input index
      avfilter/sbuffer: Add sbuffersrc and sbuffersink filters
      avfilter/overlaygraphicsubs: Add overlaygraphicsubs and
        graphicsub2video filters
      avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video
        filters
      avfilter/textmod: Add textmod, censor and show_speaker filters
      avfilter/stripstyles: Add stripstyles filter
      avfilter/splitcc: Add splitcc filter for closed caption handling
      avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
      avfilter/subscale: Add filter for scaling and/or re-arranging
        graphical subtitles
      avfilter/subfeed: add subtitle feed filter
      avfilter/text2graphicsub: Added text2graphicsub subtitle filter
      avfilter/snull,strim: Add snull and strim filters
      avcodec/subtitles: Migrate subtitle encoders to frame-based API
      fftools/ffmpeg: Introduce subtitle filtering and new frame-based
        subtitle encoding
      avcodec/dvbsubdec: Fix conditions for fallback to default resolution
    
     configure                                 |   10 +-
     doc/filters.texi                          |  807 ++++++++++++++
     fftools/ffmpeg.c                          |  613 +++++-----
     fftools/ffmpeg.h                          |   17 +-
     fftools/ffmpeg_filter.c                   |  270 +++--
     fftools/ffmpeg_hw.c                       |    2 +-
     fftools/ffmpeg_opt.c                      |   28 +-
     fftools/ffplay.c                          |  102 +-
     fftools/ffprobe.c                         |   47 +-
     libavcodec/Makefile                       |   56 +-
     libavcodec/ass.h                          |  151 +--
     libavcodec/ass_split.h                    |  191 ----
     libavcodec/assdec.c                       |    4 +-
     libavcodec/assenc.c                       |  191 +++-
     libavcodec/avcodec.c                      |    8 +
     libavcodec/avcodec.h                      |   34 +-
     libavcodec/ccaption_dec.c                 |   20 +-
     libavcodec/codec_internal.h               |   12 -
     libavcodec/decode.c                       |   60 +-
     libavcodec/dvbsubdec.c                    |   53 +-
     libavcodec/dvbsubenc.c                    |   96 +-
     libavcodec/dvdsubdec.c                    |    2 +-
     libavcodec/dvdsubenc.c                    |  102 +-
     libavcodec/encode.c                       |   61 +-
     libavcodec/internal.h                     |   16 +
     libavcodec/jacosubdec.c                   |    2 +-
     libavcodec/libaribb24.c                   |    2 +-
     libavcodec/libzvbi-teletextdec.c          |   17 +-
     libavcodec/microdvddec.c                  |    7 +-
     libavcodec/movtextdec.c                   |    3 +-
     libavcodec/movtextenc.c                   |  126 ++-
     libavcodec/mpl2dec.c                      |    2 +-
     libavcodec/pgssubdec.c                    |    2 +-
     libavcodec/realtextdec.c                  |    2 +-
     libavcodec/samidec.c                      |    2 +-
     libavcodec/srtdec.c                       |    2 +-
     libavcodec/srtenc.c                       |  116 +-
     libavcodec/subviewerdec.c                 |    2 +-
     libavcodec/tests/avcodec.c                |    5 +-
     libavcodec/textdec.c                      |    4 +-
     libavcodec/ttmlenc.c                      |  114 +-
     libavcodec/utils.c                        |  185 ++-
     libavcodec/webvttdec.c                    |    2 +-
     libavcodec/webvttenc.c                    |   94 +-
     libavcodec/xsubdec.c                      |    2 +-
     libavcodec/xsubenc.c                      |   88 +-
     libavfilter/Makefile                      |   18 +
     libavfilter/allfilters.c                  |   19 +
     libavfilter/avfilter.c                    |   42 +-
     libavfilter/avfilter.h                    |   11 +
     libavfilter/avfiltergraph.c               |    5 +
     libavfilter/buffersink.c                  |   54 +
     libavfilter/buffersink.h                  |    7 +
     libavfilter/buffersrc.c                   |   72 ++
     libavfilter/buffersrc.h                   |    1 +
     libavfilter/formats.c                     |   16 +
     libavfilter/formats.h                     |    3 +
     libavfilter/internal.h                    |   19 +-
     libavfilter/sf_graphicsub2text.c          | 1137 +++++++++++++++++++
     libavfilter/sf_snull.c                    |   50 +
     libavfilter/sf_splitcc.c                  |  395 +++++++
     libavfilter/sf_stripstyles.c              |  237 ++++
     libavfilter/sf_subfeed.c                  |  412 +++++++
     libavfilter/sf_subscale.c                 |  884 +++++++++++++++
     libavfilter/sf_text2graphicsub.c          |  634 +++++++++++
     libavfilter/sf_textmod.c                  |  710 ++++++++++++
     libavfilter/subtitles.c                   |   63 ++
     libavfilter/subtitles.h                   |   44 +
     libavfilter/trim.c                        |   60 +-
     libavfilter/vf_overlaygraphicsubs.c       |  765 +++++++++++++
     libavfilter/vf_overlaytextsubs.c          |  680 +++++++++++
     libavfilter/vf_subtitles.c                |   67 +-
     libavutil/Makefile                        |    4 +
     {libavcodec => libavutil}/ass.c           |  115 +-
     libavutil/ass_internal.h                  |  135 +++
     {libavcodec => libavutil}/ass_split.c     |  179 ++-
     libavutil/ass_split_internal.h            |  254 +++++
     libavutil/frame.c                         |  206 +++-
     libavutil/frame.h                         |   85 +-
     libavutil/subfmt.c                        |   45 +
     libavutil/subfmt.h                        |  115 ++
     libavutil/version.h                       |    1 +
     tests/ref/fate/filter-overlay-dvdsub-2397 |  182 +--
     tests/ref/fate/sub-dvb                    |  162 +--
     tests/ref/fate/sub-scc                    |    1 -
     tests/ref/fate/sub2video                  | 1091 +++++++++++++++++-
     tests/ref/fate/sub2video_basic            | 1238 +++++++++++++++++++--
     tests/ref/fate/sub2video_time_limited     |   78 +-
     88 files changed, 12424 insertions(+), 1604 deletions(-)
     delete mode 100644 libavcodec/ass_split.h
     create mode 100644 libavfilter/sf_graphicsub2text.c
     create mode 100644 libavfilter/sf_snull.c
     create mode 100644 libavfilter/sf_splitcc.c
     create mode 100644 libavfilter/sf_stripstyles.c
     create mode 100644 libavfilter/sf_subfeed.c
     create mode 100644 libavfilter/sf_subscale.c
     create mode 100644 libavfilter/sf_text2graphicsub.c
     create mode 100644 libavfilter/sf_textmod.c
     create mode 100644 libavfilter/subtitles.c
     create mode 100644 libavfilter/subtitles.h
     create mode 100644 libavfilter/vf_overlaygraphicsubs.c
     create mode 100644 libavfilter/vf_overlaytextsubs.c
     rename {libavcodec => libavutil}/ass.c (59%)
     create mode 100644 libavutil/ass_internal.h
     rename {libavcodec => libavutil}/ass_split.c (71%)
     create mode 100644 libavutil/ass_split_internal.h
     create mode 100644 libavutil/subfmt.c
     create mode 100644 libavutil/subfmt.h
    
    base-commit: 6a82412bf33108111eb3f63076fd5a51349ae114
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.18.v6.ffstaging.FFmpeg.1656261322.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.ffstaging.FFmpeg.1642122813.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v2.ffstaging.FFmpeg.1642646916.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v3.ffstaging.FFmpeg.1642649134.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v4.ffstaging.FFmpeg.1653744323.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v5.ffstaging.FFmpeg.1656151077.ffmpegagent@gmail.com
    
  • pr-ffstaging-18/softworkz/submit_subfiltering-v5

    Subtitle Filtering 2022
    
    Subtitle Filtering 2022
    =======================
    
    This is a substantial update to the earlier subtitle filtering patch series.
    A primary goal has been to address others' concerns as much as possible on
    one side and to provide more clarity and control over the way things are
    working. Clarity is is specifically important to allow for a better
    understanding of the need for a subtitle start pts value that can be
    different from the frame's pts value. This is done by refactoring the
    subtitle timing fields in AVFrame, adding a frame field to indicate repeated
    subtitle frames, and finally the full removal of the heartbeat
    functionality, replaced by a new 'subfeed' filter that provides different
    modes for arbitrating subtitle frames in a filter graph. Finally, each
    subtitle filter's documentation has been amended by a section describing the
    filter's timeline behavior (in v3 update).
    
    Subtitle Filtering Demos
    ========================
    
    I published a demonstration of subtitle filtering capabilities with OCR,
    text and bitmap subtitle manipulation involved: Demo 1: Text-Manipulation
    with Bitmap Subtitles
    [https://github.com/softworkz/SubtitleFilteringDemos/tree/master/Demo1]
    
    v5 - Conversion to Graphic Subtitles, and other enhancements
    ============================================================
    
     * I'm glad to announce that Traian (@tcoza) has joined the project and
       contributed a new 'text2graphicsub' filter to convert text subtitles to
       graphic subtitles, which can in turn be encoded as dvd, dvb or x-subs
       (and any other encoder for graphic subs that might be added in the
       future). This filter closes the last open "gap" in subtitle processing.
     * stripstyles filter: now allows very fine-grained control over which ASS
       style codes should be preserved or stripped
     * stripstyles: do not drop dialog margin values
     * subfeed filter: eliminates duplicate frames with duplicate start times
       when 'fix_overlap' is specified
     * textmod: do not drop effect values
     * graphicsub2text: reduce font size jitter
     * ass_split: add function to selectively preserve elements when splitting
     * add strim, snull and ssink and further unify subtitle frame handling with
       audio and video
     * ffmpeg_filter: get simple filter notation working for subtitles
    
    v4 - Quality Improvements
    =========================
    
     * finally an updated version
     * includes many improvements from internal testing
     * all FATE tests passed
     * all example commands from the docs verified to work
     * can't list all the detail changes..
     * I have left out the extra commits which can be handled separately, just
       in case somebody wonders why these are missing:
       * avcodec/webvttenc: Don't encode drawing codes and empty lines
       * avcodec/webvttenc: convert hard-space tags to  
       * avutil/ass_split: Add parsing of hard-space tags (\h)
       * avutil/ass_split: Treat all content in curly braces as hidden
       * avutil/ass_split: Fix ass parsing of style codes with comments
    
    v3 - Rebase
    ===========
    
    due to merge conflicts - apologies.
    
    Changes in v2
    =============
    
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * overlaytextsubs: Make sure to request frames on the subtitle input
     * avfilter/splitcc: Start parsing cc data on key frames only
     * avcodec/webvttenc: Don't encode ass drawing codes and empty lines
     * stripstyles: fix mem leak
     * gs2t: improve color detection
     * gs2t: empty frames must not be skipped
     * subfeed: fix name
     * textmod: preserve margins
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * avcodec/dvbsubdec: Fix conditions for fallback to default resolution
     * Made changes suggested by Andreas
     * Fixed failing command line reported by Michael
    
    Changes from previous version v24:
    
    AVFrame
    =======
    
     * Removed sub_start_time The start time is now added to the subtitle
       start_pts during decoding The sub_end_time field is adjusted accordingly
     * Renamed sub_end_time to duration which it is effectively after removing
       the start_time
     * Added a sub-struct 'subtitle_timing' to av frame Contains subtitle_pts
       renamed to 'subtitle_timing.start_pts' and 'subtitle_timing.duration'
     * Change both fields to (fixed) time_base AV_TIMEBASE
     * add repeat_sub field provides a clear indication whether a subtitle frame
       is an actual subtitle event or a repeated subtitle frame in a filter
       graph
    
    Heartbeat Removal
    =================
    
     * completely removed the earlier heartbeat implementation
     * filtering arbitration is now implemented in a new filter: 'subfeed'
     * subfeed will be auto-inserted for compatiblity with sub2video command
       lines
     * the new behavior is not exactly identical to the earlier behavior, but it
       basically allows to achieve the same results
     * there's a small remainder, now named subtitle kickoff which serves to get
       things (in the filter graph) going right from the start
    
    New 'subfeed' Filter
    ====================
    
     * a versatile filter for solving all kinds of problems with subtile frame
       flow in filter graphs
     * Can be inserted at any position in a graph
     * Auto-inserted for sub2video command lines (in repeat-mode)
     * Allows duration fixup delay input frames with unknown duration and infer
       duration from start of subsequent frame
     * Provides multiple modes of operation:
       * repeat mode (default) Queues input frames Outputs frames at a fixed
         (configurable) rate Either sends a matching input frame (repeatedly) or
         empty frames otherwise
       * scatter mode similar to repeat mode, but splits input frames by
         duration into small segments with same content
       * forward mode No fixed output rate Useful in combination with duration
         fixup or overlap fixup
    
    ffmpeg Tool Changes
    ===================
    
     * delay subtitle output stream initialization (like for audio and video)
       This is needed for example when a format header depends on having
       received an initial frame to derive certain header values from
     * decoding: set subtitle frame size from decoding context
     * re-init graph when subtitle size changes
     * always insert subscale filter for sub2video command lines (to ensure
       correct scaling)
    
    Subtitle Encoding
    =================
    
     * ignore repeated frames for encoding based on repeat_sub field in AVFrame
     * support multi-area encoding for text subtitles Subtitle OCR can create
       multiple areas at different positions. Previously, the texts were always
       squashed into a single area ('subtitle rect'), which was not ideal.
       Multiple text areas are now generally supported:
       * ASS Encoder Changed to use the 'receive_packet' encoding API A single
         frame with multiple text areas will create multiple packets now
       * All other text subtitle encoders A newline is inserted between the text
         from multiple areas
    
    graphicsub2text (OCR)
    =====================
    
     * enhanced preprocessing
       * using elbg algorithm for color quantization
       * detection and removal of text outlines
       * map-based identification of colors per word (text, outline, background)
     * add option for duration fixup
     * add option to dump preprocessing bitmaps
     * Recognize formatting and apply as ASS inline styles
       * per word(!)
       * paragraph alignment
       * positioning
       * font names
       * font size
       * font style (italic, underline, bold)
       * text color, outline color
    
    Other Filter Changes
    ====================
    
     * all: Make sure to forward all link properties (time base, frame rate, w,
       h) where appropriate
     * overlaytextsubs: request frames on the subtitle input
     * overlaytextsubs: disable read-order checking
     * overlaytextsubs: improve implementation of render_latest_only
     * overlaytextsubs: ensure equal in/out video formats
     * splitcc: derive framerate from realtime_latency
     * graphicsub2video: implement caching of converted frames
     * graphicsub2video: use 1x1 output frame size as long as subtitle size is
       unknown (0x0)
    
    Plus a dozen of things I forgot..
    
    softworkz (24):
      avcodec,avutil: Move enum AVSubtitleType to avutil, add new and
        deprecate old values
      avutil/frame: Prepare AVFrame for subtitle handling
      avcodec/subtitles: Introduce new frame-based subtitle decoding API
      avcodec/libzvbi: set subtitle type
      avfilter/subtitles: Update vf_subtitles to use new decoding api
      avcodec,avutil: Move ass helper functions to avutil as avpriv_ and
        extend ass dialog parsing
      avcodec/subtitles: Replace deprecated enum values
      fftools/play,probe: Adjust for subtitle changes
      avfilter/subtitles: Add subtitles.c for subtitle frame allocation
      avfilter/avfilter: Handle subtitle frames
      avfilter/avfilter: Fix hardcoded input index
      avfilter/sbuffer: Add sbuffersrc and sbuffersink filters
      avfilter/overlaygraphicsubs: Add overlaygraphicsubs and
        graphicsub2video filters
      avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video
        filters
      avfilter/textmod: Add textmod, censor and show_speaker filters
      avfilter/stripstyles: Add stripstyles filter
      avfilter/splitcc: Add splitcc filter for closed caption handling
      avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
      avfilter/subscale: Add filter for scaling and/or re-arranging
        graphical subtitles
      avfilter/subfeed: add subtitle feed filter
      avfilter/snull,strim: Add snull and strim filters
      avcodec/subtitles: Migrate subtitle encoders to frame-based API
      fftools/ffmpeg: Introduce subtitle filtering and new frame-based
        subtitle encoding
      avcodec/dvbsubdec: Fix conditions for fallback to default resolution
    
    tcoza (1):
      avfilter/text2graphicsub: Added text2graphicsub subtitle filter
    
     configure                                 |   10 +-
     doc/filters.texi                          |  807 ++++++++++++++
     fftools/ffmpeg.c                          |  613 +++++-----
     fftools/ffmpeg.h                          |   17 +-
     fftools/ffmpeg_filter.c                   |  270 +++--
     fftools/ffmpeg_hw.c                       |    2 +-
     fftools/ffmpeg_opt.c                      |   28 +-
     fftools/ffplay.c                          |  102 +-
     fftools/ffprobe.c                         |   47 +-
     libavcodec/Makefile                       |   56 +-
     libavcodec/ass.h                          |  151 +--
     libavcodec/ass_split.h                    |  191 ----
     libavcodec/assdec.c                       |    4 +-
     libavcodec/assenc.c                       |  191 +++-
     libavcodec/avcodec.c                      |    8 +
     libavcodec/avcodec.h                      |   34 +-
     libavcodec/ccaption_dec.c                 |   20 +-
     libavcodec/codec_internal.h               |   12 -
     libavcodec/decode.c                       |   60 +-
     libavcodec/dvbsubdec.c                    |   53 +-
     libavcodec/dvbsubenc.c                    |   96 +-
     libavcodec/dvdsubdec.c                    |    2 +-
     libavcodec/dvdsubenc.c                    |  102 +-
     libavcodec/encode.c                       |   61 +-
     libavcodec/internal.h                     |   16 +
     libavcodec/jacosubdec.c                   |    2 +-
     libavcodec/libaribb24.c                   |    2 +-
     libavcodec/libzvbi-teletextdec.c          |   17 +-
     libavcodec/microdvddec.c                  |    7 +-
     libavcodec/movtextdec.c                   |    3 +-
     libavcodec/movtextenc.c                   |  126 ++-
     libavcodec/mpl2dec.c                      |    2 +-
     libavcodec/pgssubdec.c                    |    2 +-
     libavcodec/realtextdec.c                  |    2 +-
     libavcodec/samidec.c                      |    2 +-
     libavcodec/srtdec.c                       |    2 +-
     libavcodec/srtenc.c                       |  116 +-
     libavcodec/subviewerdec.c                 |    2 +-
     libavcodec/tests/avcodec.c                |    5 +-
     libavcodec/textdec.c                      |    4 +-
     libavcodec/ttmlenc.c                      |  114 +-
     libavcodec/utils.c                        |  185 ++-
     libavcodec/webvttdec.c                    |    2 +-
     libavcodec/webvttenc.c                    |   94 +-
     libavcodec/xsubdec.c                      |    2 +-
     libavcodec/xsubenc.c                      |   88 +-
     libavfilter/Makefile                      |   18 +
     libavfilter/allfilters.c                  |   19 +
     libavfilter/avfilter.c                    |   34 +-
     libavfilter/avfilter.h                    |   11 +
     libavfilter/avfiltergraph.c               |    5 +
     libavfilter/buffersink.c                  |   54 +
     libavfilter/buffersink.h                  |    7 +
     libavfilter/buffersrc.c                   |   72 ++
     libavfilter/buffersrc.h                   |    1 +
     libavfilter/formats.c                     |   16 +
     libavfilter/formats.h                     |    3 +
     libavfilter/internal.h                    |   19 +-
     libavfilter/sf_graphicsub2text.c          | 1137 +++++++++++++++++++
     libavfilter/sf_snull.c                    |   50 +
     libavfilter/sf_splitcc.c                  |  395 +++++++
     libavfilter/sf_stripstyles.c              |  237 ++++
     libavfilter/sf_subfeed.c                  |  412 +++++++
     libavfilter/sf_subscale.c                 |  884 +++++++++++++++
     libavfilter/sf_text2graphicsub.c          |  630 +++++++++++
     libavfilter/sf_textmod.c                  |  710 ++++++++++++
     libavfilter/subtitles.c                   |   63 ++
     libavfilter/subtitles.h                   |   44 +
     libavfilter/trim.c                        |   46 +-
     libavfilter/vf_overlaygraphicsubs.c       |  765 +++++++++++++
     libavfilter/vf_overlaytextsubs.c          |  680 +++++++++++
     libavfilter/vf_subtitles.c                |   67 +-
     libavutil/Makefile                        |    4 +
     {libavcodec => libavutil}/ass.c           |  115 +-
     libavutil/ass_internal.h                  |  135 +++
     {libavcodec => libavutil}/ass_split.c     |  179 ++-
     libavutil/ass_split_internal.h            |  254 +++++
     libavutil/frame.c                         |  206 +++-
     libavutil/frame.h                         |   85 +-
     libavutil/subfmt.c                        |   45 +
     libavutil/subfmt.h                        |  115 ++
     libavutil/version.h                       |    1 +
     tests/ref/fate/filter-overlay-dvdsub-2397 |  182 +--
     tests/ref/fate/sub-dvb                    |  162 +--
     tests/ref/fate/sub-scc                    |    1 -
     tests/ref/fate/sub2video                  | 1091 +++++++++++++++++-
     tests/ref/fate/sub2video_basic            | 1238 +++++++++++++++++++--
     tests/ref/fate/sub2video_time_limited     |   78 +-
     88 files changed, 12398 insertions(+), 1604 deletions(-)
     delete mode 100644 libavcodec/ass_split.h
     create mode 100644 libavfilter/sf_graphicsub2text.c
     create mode 100644 libavfilter/sf_snull.c
     create mode 100644 libavfilter/sf_splitcc.c
     create mode 100644 libavfilter/sf_stripstyles.c
     create mode 100644 libavfilter/sf_subfeed.c
     create mode 100644 libavfilter/sf_subscale.c
     create mode 100644 libavfilter/sf_text2graphicsub.c
     create mode 100644 libavfilter/sf_textmod.c
     create mode 100644 libavfilter/subtitles.c
     create mode 100644 libavfilter/subtitles.h
     create mode 100644 libavfilter/vf_overlaygraphicsubs.c
     create mode 100644 libavfilter/vf_overlaytextsubs.c
     rename {libavcodec => libavutil}/ass.c (59%)
     create mode 100644 libavutil/ass_internal.h
     rename {libavcodec => libavutil}/ass_split.c (71%)
     create mode 100644 libavutil/ass_split_internal.h
     create mode 100644 libavutil/subfmt.c
     create mode 100644 libavutil/subfmt.h
    
    base-commit: 6a82412bf33108111eb3f63076fd5a51349ae114
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.18.v5.ffstaging.FFmpeg.1656151077.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.ffstaging.FFmpeg.1642122813.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v2.ffstaging.FFmpeg.1642646916.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v3.ffstaging.FFmpeg.1642649134.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v4.ffstaging.FFmpeg.1653744323.ffmpegagent@gmail.com
    
  • pr-ffstaging-36/softworkz/submit_fftools_long_paths-v1

    fftools/fopen_utf8: support long paths on Windows for fftools
    
    From: softworkz <softworkz@hotmail.com>
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.36.ffstaging.FFmpeg.1655163773842.ffmpegagent@gmail.com
  • pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v7

    libx264: Set min build version to 158
    
    From: Matt Oliver <protogonoi@gmail.com>
    
    Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS"
    
    Setting X264_API_IMPORTS only affects msvc builds and it breaks
    linking to static builds (although is required for shared builds).
    This flag is set by x264 in its pkgconfig as required since build
    158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019.
    So this patch updates configure to require a newer x264 build that
    correctly sets the imports flag.
    
    The min version requirement of 158 is applied for msvc builds only.
    
    This is also removing the check for 'libx264 without pkg-config'
    which was left for compatibility reasons about 7 years ago when
    the pkg-config check was introduced by commit
    e06263ef1e0e172b2c76070b3dc739411af08e82.
    
    Co-authored-by: softworkz <softworkz@hotmail.com>
    Signed-off-by: softworkz <softworkz@hotmail.com>
    Signed-off-by: Matt Oliver <protogonoi@gmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.30.v7.ffstaging.FFmpeg.1654817228364.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.ffstaging.FFmpeg.1653088310211.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v2.ffstaging.FFmpeg.1653471067991.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v3.ffstaging.FFmpeg.1653471298766.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v4.ffstaging.FFmpeg.1653476739751.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v5.ffstaging.FFmpeg.1653550090616.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v6.ffstaging.FFmpeg.1653568143191.ffmpegagent@gmail.com
  • pr-ffstaging-35/softworkz/submit_long_filenames2-v1

    avformat/os_support: use windows stat structs with 64bit time_t
    
    From: softworkz <softworkz@hotmail.com>
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.35.ffstaging.FFmpeg.1654816924018.ffmpegagent@gmail.com
  • pr-ffstaging-33/rcombs/drawutils-v1

    lavfi/drawutils: improve colorspace support
    
    This introduces ff_draw_init2, adding support for colorspaces other than
    BT601 and explicit full/limited range configuration.
    
    rcombs (2):
      lavfi/colorspace: add ff_matrix_mul_3x3_vec
      lavfi/drawutils: improve colorspace support
    
     libavfilter/colorspace.c                      |  11 +
     libavfilter/colorspace.h                      |   1 +
     libavfilter/drawutils.c                       |  84 +--
     libavfilter/drawutils.h                       |  26 +-
     tests/ref/fate/filter-chromashift-smear       |  10 +-
     tests/ref/fate/filter-chromashift-wrap        |  10 +-
     tests/ref/fate/filter-decimate                | 480 +++++++++---------
     tests/ref/fate/filter-fps-down                |  22 +-
     tests/ref/fate/filter-fps-down-eof-pass       |  22 +-
     tests/ref/fate/filter-fps-down-round-down     |  20 +-
     tests/ref/fate/filter-fps-down-round-up       |  22 +-
     tests/ref/fate/filter-fps-start-drop          |  12 +-
     tests/ref/fate/filter-fps-start-fill          |  12 +-
     tests/ref/fate/filter-fps-up                  |  28 +-
     tests/ref/fate/filter-fps-up-round-down       |  28 +-
     tests/ref/fate/filter-fps-up-round-up         |  28 +-
     tests/ref/fate/filter-framerate-12bit-down    | 100 ++--
     tests/ref/fate/filter-framerate-12bit-up      | 120 ++---
     tests/ref/fate/filter-framerate-down          |   2 +-
     tests/ref/fate/filter-framerate-up            |  20 +-
     .../filter-metadata-signalstats-yuv420p10     |   2 +-
     tests/ref/fate/filter-minterpolate-down       |   2 +-
     tests/ref/fate/filter-minterpolate-up         |  20 +-
     tests/ref/fate/filter-mpdecimate              |  40 +-
     tests/ref/fate/filter-overlay_yuv420p10       |   6 +-
     tests/ref/fate/filter-overlay_yuv422p10       |   6 +-
     tests/ref/fate/filter-pixfmts-pad             |  84 +--
     tests/ref/fate/filter-pixfmts-tinterlace_pad  |  22 +-
     tests/ref/fate/filter-testsrc2-yuv420p        | 140 ++---
     tests/ref/fate/filter-testsrc2-yuv444p        | 140 ++---
     tests/ref/fate/filter-tpad-add                |   4 +-
     tests/ref/fate/filter-tpad-clone              |   8 +-
     tests/ref/fate/filter-unsharp-yuv420p10       |  40 +-
     tests/ref/fate/filter-untile                  |  16 +-
     34 files changed, 819 insertions(+), 769 deletions(-)
    
    base-commit: c6364b711bad1fe2fbd90e5b2798f87080ddf5ea
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.33.ffstaging.FFmpeg.1654192626.ffmpegagent@gmail.com
  • pr-ffstaging-31/softworkz/submit_qsv_sei-v3

    Implement SEI parsing for QSV decoders
    
    Missing SEI information has always been a major drawback when using the QSV
    decoders. I used to think that there's no chance to get at the data without
    explicit implementation from the MSDK side (or doing something weird like
    parsing in parallel). It turned out that there's a hardly known api method
    that provides access to all SEI (h264/hevc) or user data (mpeg2video).
    
    This allows to get things like closed captions, frame packing, display
    orientation, HDR data (mastering display, content light level, etc.) without
    having to rely on those data being provided by the MSDK as extended buffers.
    
    The commit "Implement SEI parsing for QSV decoders" includes some hard-coded
    workarounds for MSDK bugs which I reported:
    https://github.com/Intel-Media-SDK/MediaSDK/issues/2597#issuecomment-1072795311
    
    But that doesn't help. Those bugs exist and I'm sharing my workarounds,
    which are empirically determined by testing a range of files. If someone is
    interested, I can provide private access to a repository where we have been
    testing this. Alternatively, I could also leave those workarounds out, and
    just skip those SEI types.
    
    In a previous version of this patchset, there was a concern that payload
    data might need to be re-ordered. Meanwhile I have researched this carefully
    and the conclusion is that this is not required.
    
    My detailed analysis can be found here:
    https://gist.github.com/softworkz/36c49586a8610813a32270ee3947a932
    
    v2
    
     * qsvdec: make error handling consistent and clear
     * qsvdec: remove AV_CODEC_ID_MPEG1VIDEO constants
     * hevcdec: rename function to ff_hevc_set_side_data(), add doc text
    
    v3
    
     * qsvdec: fix c/p error
    
    softworkz (6):
      avutil/frame: Add av_frame_copy_side_data() and
        av_frame_remove_all_side_data()
      avcodec/vpp_qsv: Copy side data from input to output frame
      avcodec/mpeg12dec: make mpeg_decode_user_data() accessible
      avcodec/hevcdec: make set_side_data() accessible
      avcodec/h264dec: make h264_export_frame_props() accessible
      avcodec/qsvdec: Implement SEI parsing for QSV decoders
    
     doc/APIchanges               |   4 +
     libavcodec/h264_slice.c      |  98 ++++++++-------
     libavcodec/h264dec.h         |   2 +
     libavcodec/hevcdec.c         | 117 +++++++++---------
     libavcodec/hevcdec.h         |   9 ++
     libavcodec/mpeg12.h          |  28 +++++
     libavcodec/mpeg12dec.c       |  40 +-----
     libavcodec/qsvdec.c          | 234 +++++++++++++++++++++++++++++++++++
     libavfilter/qsvvpp.c         |   6 +
     libavfilter/vf_overlay_qsv.c |  19 ++-
     libavutil/frame.c            |  67 ++++++----
     libavutil/frame.h            |  32 +++++
     libavutil/version.h          |   2 +-
     13 files changed, 485 insertions(+), 173 deletions(-)
    
    base-commit: 77b529fbd228fe30a870e3157f051885b436ad92
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.31.v3.ffstaging.FFmpeg.1654106506.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.ffstaging.FFmpeg.1653552529.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.v2.ffstaging.FFmpeg.1654074366.ffmpegagent@gmail.com
  • pr-ffstaging-31/softworkz/submit_qsv_sei-v2

    Implement SEI parsing for QSV decoders
    
    Missing SEI information has always been a major drawback when using the QSV
    decoders. I used to think that there's no chance to get at the data without
    explicit implementation from the MSDK side (or doing something weird like
    parsing in parallel). It turned out that there's a hardly known api method
    that provides access to all SEI (h264/hevc) or user data (mpeg2video).
    
    This allows to get things like closed captions, frame packing, display
    orientation, HDR data (mastering display, content light level, etc.) without
    having to rely on those data being provided by the MSDK as extended buffers.
    
    The commit "Implement SEI parsing for QSV decoders" includes some hard-coded
    workarounds for MSDK bugs which I reported:
    https://github.com/Intel-Media-SDK/MediaSDK/issues/2597#issuecomment-1072795311
    
    But that doesn't help. Those bugs exist and I'm sharing my workarounds,
    which are empirically determined by testing a range of files. If someone is
    interested, I can provide private access to a repository where we have been
    testing this. Alternatively, I could also leave those workarounds out, and
    just skip those SEI types.
    
    In a previous version of this patchset, there was a concern that payload
    data might need to be re-ordered. Meanwhile I have researched this carefully
    and the conclusion is that this is not required.
    
    My detailed analysis can be found here:
    https://gist.github.com/softworkz/36c49586a8610813a32270ee3947a932
    
    v2
    
     * qsvdec: make error handling consistent and clear
     * qsvdec: remove AV_CODEC_ID_MPEG1VIDEO constants
     * hevcdec: rename function to ff_hevc_set_side_data(), add doc text
    
    softworkz (6):
      avutil/frame: Add av_frame_copy_side_data() and
        av_frame_remove_all_side_data()
      avcodec/vpp_qsv: Copy side data from input to output frame
      avcodec/mpeg12dec: make mpeg_decode_user_data() accessible
      avcodec/hevcdec: make set_side_data() accessible
      avcodec/h264dec: make h264_export_frame_props() accessible
      avcodec/qsvdec: Implement SEI parsing for QSV decoders
    
     doc/APIchanges               |   4 +
     libavcodec/h264_slice.c      |  98 ++++++++-------
     libavcodec/h264dec.h         |   2 +
     libavcodec/hevcdec.c         | 117 +++++++++---------
     libavcodec/hevcdec.h         |   9 ++
     libavcodec/mpeg12.h          |  28 +++++
     libavcodec/mpeg12dec.c       |  40 +-----
     libavcodec/qsvdec.c          | 234 +++++++++++++++++++++++++++++++++++
     libavfilter/qsvvpp.c         |   6 +
     libavfilter/vf_overlay_qsv.c |  19 ++-
     libavutil/frame.c            |  67 ++++++----
     libavutil/frame.h            |  32 +++++
     libavutil/version.h          |   2 +-
     13 files changed, 485 insertions(+), 173 deletions(-)
    
    base-commit: b033913d1c5998a29dfd13e9906dd707ff6eff12
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.31.v2.ffstaging.FFmpeg.1654074366.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.31.ffstaging.FFmpeg.1653552529.ffmpegagent@gmail.com
  • pr-ffstaging-20/softworkz/submit_md5-v4

    libavutil/tests/md5: Remove 'volatile workaround' to avoid warnings
    
    From: softworkz <softworkz@hotmail.com>
    
    Those are always showing up on Patchwork when FATE tests are failing,
    covering some possibly more useful information.
    
    The volatile keyword was used as a workaround for an eight year old
    clang version.
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.20.v4.ffstaging.FFmpeg.1653750420780.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.20.ffstaging.FFmpeg.1642727870274.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.20.v2.ffstaging.FFmpeg.1642729284250.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.20.v3.ffstaging.FFmpeg.1642729686725.ffmpegagent@gmail.com
  • pr-ffstaging-17/softworkz/submit_dvb_subs-v3

    avcodec/dvdsubdec,dvbsubdec: remove bitmap dumping in DEBUG builds
    
    From: softworkz <softworkz@hotmail.com>
    
    It's been a regular annoyance and often undesired.
    There will be a subtitle filter which allows to dump individual
    subtitle bitmaps.
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.17.v3.ffstaging.FFmpeg.1653749538475.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.17.ffstaging.FFmpeg.1641530966.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.17.v2.ffstaging.FFmpeg.1641844533.ffmpegagent@gmail.com
  • pr-ffstaging-18/softworkz/submit_subfiltering-v4

    Subtitle Filtering 2022
    
    Subtitle Filtering 2022
    =======================
    
    This is a substantial update to the earlier subtitle filtering patch series.
    A primary goal has been to address others' concerns as much as possible on
    one side and to provide more clarity and control over the way things are
    working. Clarity is is specifically important to allow for a better
    understanding of the need for a subtitle start pts value that can be
    different from the frame's pts value. This is done by refactoring the
    subtitle timing fields in AVFrame, adding a frame field to indicate repeated
    subtitle frames, and finally the full removal of the heartbeat
    functionality, replaced by a new 'subfeed' filter that provides different
    modes for arbitrating subtitle frames in a filter graph. Finally, each
    subtitle filter's documentation has been amended by a section describing the
    filter's timeline behavior (in v3 update).
    
    The update also includes major improvements to graphicsub2text and lots of
    other details.
    
    Versioning is restarting at v1 due to the new submission procedure.
    
    v4 - Quality Improvements
    =========================
    
     * finally an updated version
     * includes many improvements from internal testing
     * all FATE tests passed
     * all example commands from the docs verified to work
     * can't list all the detail changes..
     * I have left out the extra commits which can be handled separately, just
       in case somebody wonders why these are missing:
       * avcodec/webvttenc: Don't encode drawing codes and empty lines
       * avcodec/webvttenc: convert hard-space tags to  
       * avutil/ass_split: Add parsing of hard-space tags (\h)
       * avutil/ass_split: Treat all content in curly braces as hidden
       * avutil/ass_split: Fix ass parsing of style codes with comments
    
    v3 - Rebase
    ===========
    
    due to merge conflicts - apologies.
    
    Changes in v2
    =============
    
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * overlaytextsubs: Make sure to request frames on the subtitle input
     * avfilter/splitcc: Start parsing cc data on key frames only
     * avcodec/webvttenc: Don't encode ass drawing codes and empty lines
     * stripstyles: fix mem leak
     * gs2t: improve color detection
     * gs2t: empty frames must not be skipped
     * subfeed: fix name
     * textmod: preserve margins
     * added .gitattributes file to enforce binary diffs for the test refs that
       cannot be applied when being sent via e-mail
     * perform filter graph re-init due to subtitle "frame size" change only
       when the size was unknown before and not set via -canvas_size
     * avcodec/dvbsubdec: Fix conditions for fallback to default resolution
     * Made changes suggested by Andreas
     * Fixed failing command line reported by Michael
    
    Changes from previous version v24:
    
    AVFrame
    =======
    
     * Removed sub_start_time The start time is now added to the subtitle
       start_pts during decoding The sub_end_time field is adjusted accordingly
     * Renamed sub_end_time to duration which it is effectively after removing
       the start_time
     * Added a sub-struct 'subtitle_timing' to av frame Contains subtitle_pts
       renamed to 'subtitle_timing.start_pts' and 'subtitle_timing.duration'
     * Change both fields to (fixed) time_base AV_TIMEBASE
     * add repeat_sub field provides a clear indication whether a subtitle frame
       is an actual subtitle event or a repeated subtitle frame in a filter
       graph
    
    Heartbeat Removal
    =================
    
     * completely removed the earlier heartbeat implementation
     * filtering arbitration is now implemented in a new filter: 'subfeed'
     * subfeed will be auto-inserted for compatiblity with sub2video command
       lines
     * the new behavior is not exactly identical to the earlier behavior, but it
       basically allows to achieve the same results
     * there's a small remainder, now named subtitle kickoff which serves to get
       things (in the filter graph) going right from the start
    
    New 'subfeed' Filter
    ====================
    
     * a versatile filter for solving all kinds of problems with subtile frame
       flow in filter graphs
     * Can be inserted at any position in a graph
     * Auto-inserted for sub2video command lines (in repeat-mode)
     * Allows duration fixup delay input frames with unknown duration and infer
       duration from start of subsequent frame
     * Provides multiple modes of operation:
       * repeat mode (default) Queues input frames Outputs frames at a fixed
         (configurable) rate Either sends a matching input frame (repeatedly) or
         empty frames otherwise
       * scatter mode similar to repeat mode, but splits input frames by
         duration into small segments with same content
       * forward mode No fixed output rate Useful in combination with duration
         fixup or overlap fixup
    
    ffmpeg Tool Changes
    ===================
    
     * delay subtitle output stream initialization (like for audio and video)
       This is needed for example when a format header depends on having
       received an initial frame to derive certain header values from
     * decoding: set subtitle frame size from decoding context
     * re-init graph when subtitle size changes
     * always insert subscale filter for sub2video command lines (to ensure
       correct scaling)
    
    Subtitle Encoding
    =================
    
     * ignore repeated frames for encoding based on repeat_sub field in AVFrame
     * support multi-area encoding for text subtitles Subtitle OCR can create
       multiple areas at different positions. Previously, the texts were always
       squashed into a single area ('subtitle rect'), which was not ideal.
       Multiple text areas are now generally supported:
       * ASS Encoder Changed to use the 'receive_packet' encoding API A single
         frame with multiple text areas will create multiple packets now
       * All other text subtitle encoders A newline is inserted between the text
         from multiple areas
    
    graphicsub2text (OCR)
    =====================
    
     * enhanced preprocessing
       * using elbg algorithm for color quantization
       * detection and removal of text outlines
       * map-based identification of colors per word (text, outline, background)
     * add option for duration fixup
     * add option to dump preprocessing bitmaps
     * Recognize formatting and apply as ASS inline styles
       * per word(!)
       * paragraph alignment
       * positioning
       * font names
       * font size
       * font style (italic, underline, bold)
       * text color, outline color
    
    Other Filter Changes
    ====================
    
     * all: Make sure to forward all link properties (time base, frame rate, w,
       h) where appropriate
     * overlaytextsubs: request frames on the subtitle input
     * overlaytextsubs: disable read-order checking
     * overlaytextsubs: improve implementation of render_latest_only
     * overlaytextsubs: ensure equal in/out video formats
     * splitcc: derive framerate from realtime_latency
     * graphicsub2video: implement caching of converted frames
     * graphicsub2video: use 1x1 output frame size as long as subtitle size is
       unknown (0x0)
    
    Plus a dozen of things I forgot..
    
    softworkz (23):
      avcodec,avutil: Move enum AVSubtitleType to avutil, add new and
        deprecate old values
      avutil/frame: Prepare AVFrame for subtitle handling
      avcodec/subtitles: Introduce new frame-based subtitle decoding API
      avcodec/libzvbi: set subtitle type
      avfilter/subtitles: Update vf_subtitles to use new decoding api
      avcodec,avutil: Move ass helper functions to avutil as avpriv_ and
        extend ass dialog parsing
      avcodec/subtitles: Replace deprecated enum values
      fftools/play,probe: Adjust for subtitle changes
      avfilter/subtitles: Add subtitles.c for subtitle frame allocation
      avfilter/avfilter: Handle subtitle frames
      avfilter/avfilter: Fix hardcoded input index
      avfilter/sbuffer: Add sbuffersrc and sbuffersink filters
      avfilter/overlaygraphicsubs: Add overlaygraphicsubs and
        graphicsub2video filters
      avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video
        filters
      avfilter/textmod: Add textmod, censor and show_speaker filters
      avfilter/stripstyles: Add stripstyles filter
      avfilter/splitcc: Add splitcc filter for closed caption handling
      avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
      avfilter/subscale: Add filter for scaling and/or re-arranging
        graphical subtitles
      avfilter/subfeed: add subtitle feed filter
      avcodec/subtitles: Migrate subtitle encoders to frame-based API
      fftools/ffmpeg: Introduce subtitle filtering and new frame-based
        subtitle encoding
      avcodec/dvbsubdec: Fix conditions for fallback to default resolution
    
     configure                                     |    7 +-
     doc/filters.texi                              |  756 ++++++++++
     fftools/ffmpeg.c                              |  610 ++++----
     fftools/ffmpeg.h                              |   17 +-
     fftools/ffmpeg_filter.c                       |  243 +++-
     fftools/ffmpeg_hw.c                           |    2 +-
     fftools/ffmpeg_opt.c                          |    4 +-
     fftools/ffplay.c                              |  102 +-
     fftools/ffprobe.c                             |   47 +-
     libavcodec/Makefile                           |   56 +-
     libavcodec/ass.h                              |  151 +-
     libavcodec/assdec.c                           |    4 +-
     libavcodec/assenc.c                           |  191 ++-
     libavcodec/avcodec.c                          |    8 +
     libavcodec/avcodec.h                          |   34 +-
     libavcodec/ccaption_dec.c                     |   20 +-
     libavcodec/codec_internal.h                   |   12 -
     libavcodec/decode.c                           |   60 +-
     libavcodec/dvbsubdec.c                        |   53 +-
     libavcodec/dvbsubenc.c                        |   96 +-
     libavcodec/dvdsubdec.c                        |    2 +-
     libavcodec/dvdsubenc.c                        |  102 +-
     libavcodec/encode.c                           |   61 +-
     libavcodec/internal.h                         |   16 +
     libavcodec/jacosubdec.c                       |    2 +-
     libavcodec/libaribb24.c                       |    2 +-
     libavcodec/libzvbi-teletextdec.c              |   17 +-
     libavcodec/microdvddec.c                      |    7 +-
     libavcodec/movtextdec.c                       |    3 +-
     libavcodec/movtextenc.c                       |  126 +-
     libavcodec/mpl2dec.c                          |    2 +-
     libavcodec/pgssubdec.c                        |    2 +-
     libavcodec/realtextdec.c                      |    2 +-
     libavcodec/samidec.c                          |    2 +-
     libavcodec/srtdec.c                           |    2 +-
     libavcodec/srtenc.c                           |  116 +-
     libavcodec/subviewerdec.c                     |    2 +-
     libavcodec/tests/avcodec.c                    |    5 +-
     libavcodec/textdec.c                          |    4 +-
     libavcodec/ttmlenc.c                          |  114 +-
     libavcodec/utils.c                            |  185 ++-
     libavcodec/webvttdec.c                        |    2 +-
     libavcodec/webvttenc.c                        |   94 +-
     libavcodec/xsubdec.c                          |    2 +-
     libavcodec/xsubenc.c                          |   88 +-
     libavfilter/Makefile                          |   15 +
     libavfilter/allfilters.c                      |   14 +
     libavfilter/avfilter.c                        |   34 +-
     libavfilter/avfilter.h                        |   11 +
     libavfilter/avfiltergraph.c                   |    5 +
     libavfilter/buffersink.c                      |   54 +
     libavfilter/buffersink.h                      |    7 +
     libavfilter/buffersrc.c                       |   72 +
     libavfilter/buffersrc.h                       |    1 +
     libavfilter/formats.c                         |   16 +
     libavfilter/formats.h                         |    3 +
     libavfilter/internal.h                        |   19 +-
     libavfilter/sf_graphicsub2text.c              | 1132 +++++++++++++++
     libavfilter/sf_splitcc.c                      |  395 ++++++
     libavfilter/sf_stripstyles.c                  |  211 +++
     libavfilter/sf_subfeed.c                      |  402 ++++++
     libavfilter/sf_subscale.c                     |  884 ++++++++++++
     libavfilter/sf_textmod.c                      |  710 ++++++++++
     libavfilter/subtitles.c                       |   63 +
     libavfilter/subtitles.h                       |   44 +
     libavfilter/vf_overlaygraphicsubs.c           |  765 ++++++++++
     libavfilter/vf_overlaytextsubs.c              |  680 +++++++++
     libavfilter/vf_subtitles.c                    |   67 +-
     libavutil/Makefile                            |    4 +
     {libavcodec => libavutil}/ass.c               |  115 +-
     libavutil/ass_internal.h                      |  135 ++
     {libavcodec => libavutil}/ass_split.c         |   30 +-
     .../ass_split_internal.h                      |   32 +-
     libavutil/frame.c                             |  211 ++-
     libavutil/frame.h                             |   85 +-
     libavutil/subfmt.c                            |   45 +
     libavutil/subfmt.h                            |  115 ++
     libavutil/version.h                           |    1 +
     tests/ref/fate/filter-overlay-dvdsub-2397     |  182 +--
     tests/ref/fate/sub-dvb                        |  162 ++-
     tests/ref/fate/sub2video                      | 1091 ++++++++++++++-
     tests/ref/fate/sub2video_basic                | 1238 +++++++++++++++--
     tests/ref/fate/sub2video_time_limited         |   78 +-
     83 files changed, 11149 insertions(+), 1412 deletions(-)
     create mode 100644 libavfilter/sf_graphicsub2text.c
     create mode 100644 libavfilter/sf_splitcc.c
     create mode 100644 libavfilter/sf_stripstyles.c
     create mode 100644 libavfilter/sf_subfeed.c
     create mode 100644 libavfilter/sf_subscale.c
     create mode 100644 libavfilter/sf_textmod.c
     create mode 100644 libavfilter/subtitles.c
     create mode 100644 libavfilter/subtitles.h
     create mode 100644 libavfilter/vf_overlaygraphicsubs.c
     create mode 100644 libavfilter/vf_overlaytextsubs.c
     rename {libavcodec => libavutil}/ass.c (59%)
     create mode 100644 libavutil/ass_internal.h
     rename {libavcodec => libavutil}/ass_split.c (94%)
     rename libavcodec/ass_split.h => libavutil/ass_split_internal.h (86%)
     create mode 100644 libavutil/subfmt.c
     create mode 100644 libavutil/subfmt.h
    
    base-commit: 9fba0b8a8c754a012fc74c90ffb7c26a56be8ca0
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.18.v4.ffstaging.FFmpeg.1653744323.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.ffstaging.FFmpeg.1642122813.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v2.ffstaging.FFmpeg.1642646916.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.18.v3.ffstaging.FFmpeg.1642649134.ffmpegagent@gmail.com
    
  • pr-ffstaging-32/softworkz/submit_alignment-v2

    tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests
    
    From: softworkz <softworkz@hotmail.com>
    
    These tests:
    
    - vsynth2-mpeg2-422
    - vsynth1-mpeg2-422
    - vsynth_lena-mpeg2-422
    
    were failing on newer CPUs where av_cpu_max_align() returns
    values > 32. This patch sets cpuflags to disable avx512
    extensions for those tests only.
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.32.v2.ffstaging.FFmpeg.1653733190354.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.32.ffstaging.FFmpeg.1653728906370.ffmpegagent@gmail.com
  • pr-ffstaging-32/softworkz/submit_alignment-v1

    tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests
    
    From: softworkz <softworkz@hotmail.com>
    
    These tests:
    
    - vsynth2-mpeg2-422
    - vsynth1-mpeg2-422
    - vsynth_lena-mpeg2-422
    
    were failing on newer CPUs where av_cpu_max_align() returns
    values > 32. This patch sets cpuflags to disable avx512
    extensions for those tests only.
    
    Signed-off-by: softworkz <softworkz@hotmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.32.ffstaging.FFmpeg.1653728906370.ffmpegagent@gmail.com
  • pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v6

    libx264: Set min build version to 158
    
    From: Matt Oliver <protogonoi@gmail.com>
    
    Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS"
    
    Setting X264_API_IMPORTS only affects msvc builds and it breaks
    linking to static builds (although is required for shared builds).
    This flag is set by x264 in its pkgconfig as required since build
    158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019.
    So this patch updates configure to require a newer x264 build that
    correctly sets the imports flag.
    
    The requirement for 158 is applied for msvc builds only,
    no change is made for all other cases.
    
    Co-authored-by: softworkz <softworkz@hotmail.com>
    Signed-off-by: softworkz <softworkz@hotmail.com>
    Signed-off-by: Matt Oliver <protogonoi@gmail.com>
    
    Submitted-As: https://master.gitmailbox.com/ffmpegdev/pull.30.v6.ffstaging.FFmpeg.1653568143191.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.ffstaging.FFmpeg.1653088310211.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v2.ffstaging.FFmpeg.1653471067991.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v3.ffstaging.FFmpeg.1653471298766.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v4.ffstaging.FFmpeg.1653476739751.ffmpegagent@gmail.com
    In-Reply-To: https://master.gitmailbox.com/ffmpegdev/pull.30.v5.ffstaging.FFmpeg.1653550090616.ffmpegagent@gmail.com