Commit Graph

67 Commits

Author SHA1 Message Date
Zhao Zhili
c417616762 lavc/{av1, h264, h265}_metadata_bsf: fix description of tick_rate
Users may take the description literally which leads to inverted
results.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Jun Zhao <barryjzhao@tencent.com
2022-01-01 10:43:17 +08:00
Gyan Doshi
b9176dbfb7 avcodec/noise_bsf: restore dropamount for backwards compatibility 2021-07-30 17:14:43 +05:30
Gyan Doshi
23da5caf09 avcodec/noise_bsf: add expr support 2021-07-29 22:05:11 +05:30
James Almer
041267b558 avcodec/setts_bsf: add a NOPTS constant
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-04 11:18:43 -03:00
Derek Buitenhuis
d70dde2712 avcodec/h264_metadata_bsf: Allow zeroing constraint_set4_flag and constraint_set5_flag
These bits are reserved in earlier versions of the H.264 spec, and
some poor hardware decoders require they are zero. Thus, it is useful
to be able to zero these on streams that may have them set. The result
is still a valid H.264 bitstream.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-06-29 15:31:06 +01:00
Paul B Mahol
6941d93faa avcodec/setts_bsf: add sample rate for expressions 2021-02-15 20:52:44 +01:00
Paul B Mahol
48a0eb21aa avcodec: add setts bitstream filter 2021-02-12 19:50:07 +01:00
Marton Balint
2035620b7c avcodec/pcm_rechunk_bsf: add bitstream filter to rechunk pcm audio
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-07 23:12:24 +02:00
Limin Wang
d8bc4d23e3 avcodec/prores_metadata_bsf: add arib-std-b67 format support
It's based on the following specs:
RDD 45:2017 - SMPTE Registered Disclosure Doc - Interoperable Master Format - Application ProRes

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-03 05:28:33 +08:00
Limin Wang
2d17f43fe1 avcodec/prores_metadata_bsf: add smpte2084 format support
It's based on the following specs:
RDD 36:2015 - SMPTE Registered Disclosure Doc - Apple ProRes Bitstream Syntax and Decoding Process

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-03 05:28:33 +08:00
Limin Wang
377fa6612a doc/bitstream_filters: Fix copy an paste typo
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-05 21:21:32 +01:00
Mark Thompson
b123d0780e h264_metadata: Support overscan_appropriate_flag
Fixes #8041.
2019-07-29 19:57:09 +01:00
Andreas Rheinhardt
abb2e9ac3c vp9_metadata: Improve spec-compliance and warnings
The earlier version had three deficits:
1. It allowed to set the stream to RGB although this is not allowed when
the profile is 0 or 2.
2. If it set the stream to RGB, then it did not automatically set the
range to full range; the result was that one got a warning every time a
frame with color_config element was processed if the frame originally
had TV range and the user didn't explicitly choose PC range. Now one
gets only one warning in such a situation.
3. Intra-only frames in profile 0 are automatically BT.601, but if the
user wished another color space, he was not informed about his wishes
being unfulfillable.

The commit also improves the documentation about this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-07-28 19:02:34 +01:00
Andreas Rheinhardt
3469cfab4a dump_extra: Don't add extradata if it already exists
The dump_extra bitstream filter currently simply adds the extradata to
the packets indicated by the user without checking whether said
extradata already exists in the packets. Besides wasting space
duplicated extradata in the same packet/access unit is also forbidden
for some codecs, e.g. MPEG-2.

This check has been added to be able to use the mpeg2_qsv encoder (which
only adds the sequence headers to the first packet) in broadcast
scenarios where repeating sequence headers are required.

The check used here is not perfect: E.g. dump_extra would add the
extradata to a H.264 access unit consisting of an access unit delimiter,
SPS, PPS and slices.

Fixes #8007.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-14 22:17:43 +02:00
Mark Thompson
c7142875c3 h265_metadata: Add option to set the level of the stream
To match the same option in h264_metadata.
2019-07-07 13:29:50 +01:00
Andreas Rheinhardt
d81913e680 bitstream_filters: Correct dump_extradata description
The default is to dump extradata to keyframes, not all frames.
Also improve the description of the relevant AVOption.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-06-04 20:04:05 +05:30
James Almer
ee16d14b0a avcodec/av1_metadata: add an option to remove Padding OBUs
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-04-03 18:12:37 -03:00
Moritz Barsnick
885a80d189 doc: fix various typos
Found with the help of codespell-1.14.0.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-10 21:12:40 +05:30
Andreas Rheinhardt
5d8df52c45 trace_headers: Update documentation
It also supports AV1 and (M)JPEG.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-12-02 19:49:16 +00:00
Paul B Mahol
0279cb4f69 avcodec: add truehd_core bitstream filter 2018-11-23 22:03:56 +01:00
Martin Vignali
0aba92d42d avcodec : add prores_metadata bsf for set the color property of each prores frame 2018-11-11 21:06:34 +01:00
Mark Thompson
57f312a34d doc/bitstream_filters: Add av1_metadata 2018-10-16 22:57:13 +01:00
Mark Thompson
6522ba30e9 h264_metadata: Add option to set the level of the stream 2018-09-23 14:42:34 +01:00
Mark Thompson
308b989e0c lavc: Add VP9 metadata bitstream filter
Can adjust the colour information.
2018-05-02 01:21:40 +01:00
Mark Thompson
b5df289eb7 lavc: Add coded bitstream read/write support for VP9 2018-05-02 01:21:33 +01:00
Paul B Mahol
2974b2556b avcodec: add eac3_core bitstream filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-29 10:24:00 +02:00
Mark Thompson
c99f837dde lavc: Add filter_units bitstream filter
This can remove units with types in or not in a given set from a stream.
For example, it can be used to remove all non-VCL NAL units from an H.264 or
H.265 stream.
2018-03-18 18:23:18 +00:00
Martin Vignali
7b0cb2e032 avcodec/hapqa_extract_bsf : add new bsf filter
convert HapQA data to HAPQ or HAPAlphaOnly
by copying the corresponding texture
2018-03-13 20:26:07 +01:00
Jun Zhao
1c7f1f38c5 doc/bitstream_filters: correct dump_extra bsfs docs.
Update dump_extra bit stream filter docs to follow current
code implement.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-03 23:01:41 +01:00
Jun Zhao
b141902872 doc/bitstream_filters: documents delete_filler option.
documents delete_filler option for bsf h264_metadata.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00
Mark Thompson
569721ac8d lavc: Add mpeg2_metadata bitstream filter
(cherry picked from commit b78c30d7ec)
2017-10-17 20:56:30 +01:00
Mark Thompson
03f982bbca lavc: Add hevc_metadata bitstream filter
This is able to modify some header metadata found in the VPS/SPS/VUI,
and can also add/remove AUDs.

(cherry picked from commit b31a9eae02)
2017-10-17 20:56:30 +01:00
Mark Thompson
8b26306294 lavc: Add h264_redundant_pps bitstream filter
This applies a specific fixup to some Blu-ray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.

A new single global PPS is created, and all of the redundant PPSs
within the stream are removed.

(cherry picked from commit e6874bc3af)
2017-10-17 20:56:30 +01:00
Mark Thompson
a308872b04 lavc: Add h264_metadata bitstream filter
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.

(cherry picked from commit 9e93001b61)
(cherry picked from commit c42b62d1f9)
2017-10-17 20:56:29 +01:00
Mark Thompson
9c7d70b49b lavc: Add trace_headers bitstream filter
Supports all streams that the coded bitstream infrastructure does
(currently H.264, H.265 and MPEG-2).

(cherry picked from commit f11d8a5e8b)
2017-10-17 20:56:29 +01:00
Marton Balint
b406f387c8 avcodec/noise_bsf: add support for dropping packets
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-09 19:41:58 +02:00
Mark Thompson
49419925d3 vp9: Add bsf to fix reordering in raw streams
Takes a raw input stream containing frames with correct timestamps but
possibly out of order and inserts additional show-existing-frame
packets to correct the ordering.

(cherry picked from commit 34e051d168)
(cherry picked from commit b43b95f478)

Also converted from bitstream to get_bits.
2017-06-24 17:41:30 +01:00
James Almer
fdeab95a82 Merge commit '03a80925effc2698d21dc0b00290eecf42dd9e68'
* commit '03a80925effc2698d21dc0b00290eecf42dd9e68':
  lavc: add a bitstream filter for splitting VP9 superframes

Merged-by: James Almer <jamrial@gmail.com>
2017-04-22 23:27:05 -03:00
Clément Bœsch
e22d495538 Merge commit '47e547b321338c73c21fa623789f1efbd80a297a'
* commit '47e547b321338c73c21fa623789f1efbd80a297a':
  lavc: add a null bitstream filter

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-17 14:01:57 +02:00
Michael Niedermayer
9dd1573423 doc/bitstream_filters: Fix project name after merge
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-26 19:17:30 +02:00
James Almer
7ebc9f8df4 Merge commit '89b35a139e838deeb32ec20d8d034c81014401d0'
* commit '89b35a139e838deeb32ec20d8d034c81014401d0':
  lavc: add a bitstream filter for extracting extradata from packets

Merged-by: James Almer <jamrial@gmail.com>
2017-03-23 16:31:15 -03:00
Anton Khirnov
03a80925ef lavc: add a bitstream filter for splitting VP9 superframes
Partially based on code by Ronald S. Bultje <rsbultje@gmail.com>.
2016-12-14 09:06:45 +01:00
Anton Khirnov
47e547b321 lavc: add a null bitstream filter
It is useful for testing/debugging and will also be used as the default
filter in the following commit adding pre-decode filtering to avoid
having a separate non-filtered codepath.
2016-12-14 09:06:44 +01:00
Moritz Barsnick
c493a531ed doc/bsfs: various improvements
- Restored alphabetical order.
- Enhanced sections aac_adtstoasc, dca_core, h264_mp4toannexb.
- Added sections hevc_mp4toannexb and vp9_superframe.
- Renamed (if required) and filled previously empty sections
  mjpegadump, mov2textsub/text2movsub, mp3decomp, and
  remove_extra.
- Fixes ticket #3198.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-11-17 10:49:51 -09:00
Anton Khirnov
89b35a139e lavc: add a bitstream filter for extracting extradata from packets
This is intended as a replacement for the 'split' function exported by
some parsers.
2016-10-16 20:27:16 +02:00
Jan Sebechlebsky
2ab52644ee doc/bsfs: Fix bsf options divider in documentation
The actual implementation uses ':' divider, not '/' as
documented.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 11:05:24 +02:00
Paul B Mahol
ff982e02b5 avcodec: add dca core extraction bsf
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-03-28 10:50:41 +02:00
Andreas Cadhalpun
0224b35c89 avcodec: add unpack packed B-frames bitstream filter
Fixes Ticket #2913

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 02:24:56 +02:00
Christophe Gisquet
55a06b4619 doc: mention the noise_bsf parameter in the docs
This looks more like a seed than an amount, as the variable name
could lead to think.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-01 23:47:07 +01:00
Christophe Gisquet
4c592c3908 ffmpeg: take bsf arguments from the command line
The format is now:
-bsf:X filter1[=opt1=str1/opt2=str2],filter2
ie the parameters are appended after the filter name using '='. As ','
has been reserved already for the list of filters, '/' is just an
example of token separation for now, but that could become part of the
API to avoid each bsf using its own tokenization.

The proper solution would be using AVOption, but this is overkill for now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 13:11:34 +01:00