Commit Graph

8542 Commits

Author SHA1 Message Date
Lynne bd3e552549
lavu: bump minor and add APIChanges entry for RISC-V's RVBbasic 2022-10-05 08:31:15 +02:00
Anton Khirnov a6bf4d47a9 lavfi/avf_showspatial: add framerate option
Apparently this option was intended (the context contains a
currently-unused frame_rate field), but was never added. This results in
the output timebase being unset after config_output(), so the input
audio timebase ends up being used for video output, which is clearly
wrong.

Add an option for setting output video framerate. Also set output frame
durations.
2022-10-04 11:55:03 +02:00
Anton Khirnov 3d86a13b47 fftools/ffmpeg: drop the -async option
It has been deprecated in favor of the aresample filter for almost 10
years.

Another thing this option can do is drop audio timestamps and have them
generated by the encoding code or the muxer, but
- for encoding, this can already be done with the setpts filter
- for muxing this should almost never be done as timestamp generation by
  the muxer is deprecated, but people who really want to do this can use
  the setts bitstream filter
2022-10-04 11:55:03 +02:00
Andreas Rheinhardt d09776d486 avformat/avio: Schedule AVIODirContext to become an opaque type
Users can't make anything with its content.
Making it opaque might allow us to avoid one level of indirection.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-03 23:21:57 +02:00
Anton Khirnov 5c94b6694a lavu: add an APIchanges entry for RISC-V CPU flags
Forgotten in 0c0a3deb18.
2022-10-02 11:59:34 +02:00
Anton Khirnov 8bafe8a418 doc/APIchanges: mention the addition of AV_PIX_FMT_RGB[A]F*
lavu minor bump was apparently forgotten for those, so mention them in
the block adding av_chroma_location*(), which was the next lavu minor
bump.
2022-10-02 11:59:25 +02:00
Wenbin Chen 3771d54989 libavcodec/qsvenc: Add pic_timing_sei reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen 29a3ba8693 libavcodec/qsvenc: Add bitrate reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen 17df61083d libavcodec/qsvenc: Add framerate reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Andreas Rheinhardt a02a0e8db4 avcodec/avcodec: Deprecate lavc chroma pos API functions
avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum()
deal with enum AVChromaLocation which is defined in lavu.
These functions are therefore replaced by
av_chroma_location_enum_to_pos() and av_chroma_location_pos_to_enum().
This commit provides the necessary deprecations. Also already make
these functions wrappers around the corresponding lavu functions
as not doing so would force one to disable deprecation warnings.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 03:02:49 +02:00
Andreas Rheinhardt 8be6552aa4 avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum)
They are intended as replacements for avcodec_enum_to_chroma_pos()
and avcodec_chroma_pos_to_enum().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 03:02:25 +02:00
Andreas Rheinhardt cf856d8957 avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.h
They are also frequently used in libavformat.
This change does not cause any breakage as avcodec.h
includes defs.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 02:51:46 +02:00
Andreas Rheinhardt 7ae1c0dd3e avcodec/h264_redundant_pps_bsf: Don't remove PPS
There is no check for whether these supposedly redundant PPS
are actually redundant. One could check via memcmp which would
work in practice* (because all content buffers are initially
zero-allocated), but this is not portable as compilers may
trash padding inside structures as they wish.

In case the PPS is not really redundant the output is garbage.
This happens with several files from the FATE-suite. E.g.
h264-conformance/CVCANLMA2_Sony_C.jsv doesn't decode correctly
any more, whereas h264-conformance/CABA3_TOSHIBA_E.264 even
fails in ff_cbs_write_packet(), because the inferred value
of num_ref_idx_l0_active_minus1 mismatches with the value set
in the slice (this happens when num_ref_idx_l0_default_active_minus1
changes in the PPS; the value in the slice header is inferred from
the original PPS's num_ref_idx_l0_default_active_minus1).

*: Unless slice_group_id is used, i.e. unless slice_group_map_type
is six.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-25 14:53:45 +02:00
Paul B Mahol 257eea3db4 doc: mention new audio formats 2022-09-24 14:03:59 +02:00
Chema Gonzalez 7adf7502b8
doc/examples/extract_mvs: add motion information
Note that the motion information includes subpel motion information

This was likely forgotten in 56bdf61baa.

Tested:
```
$ make examples -j
...
$ doc/examples/extract_mvs in.264 | head -40 | \
    csvcut -C framenum,source,flags |csvlook
| blockw | blockh |  srcx | srcy |  dstx | dsty | motion_x | motion_y | motion_scale |
| ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ |
|     16 |     16 |    20 |   26 |     8 |    8 |       49 |       72 |            4 |
|     16 |     16 |   152 |   15 |   136 |    8 |       65 |       28 |            4 |
|     16 |      8 |   360 |    3 |   360 |    4 |        1 |       -6 |            4 |
|     16 |      8 |   360 |   13 |   360 |   12 |       -1 |        4 |            4 |
|     16 |     16 |   440 |   10 |   440 |    8 |        3 |       10 |            4 |
|      8 |     16 |   829 |    7 |   836 |    8 |      -31 |       -6 |            4 |
|      8 |     16 |   844 |    7 |   844 |    8 |       -1 |       -4 |            4 |
|     16 |     16 | 1,004 |   14 | 1,048 |    8 |     -177 |       24 |            4 |
|     16 |     16 | 1,096 |    8 | 1,096 |    8 |       -1 |        0 |            4 |
|     16 |      8 | 1,417 |   24 | 1,416 |    4 |        7 |       82 |            4 |
|     16 |      8 | 1,416 |   13 | 1,416 |   12 |        0 |        6 |            4 |
|     16 |      8 |    87 |   20 |    88 |   20 |       -7 |        0 |            4 |
|     16 |      8 |    99 |   44 |    88 |   28 |       45 |       66 |            4 |
...
```

Also:
```
$ make fate -j
...
```

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-09-23 22:42:19 +02:00
Lynne ace42cf581
x86/tx_float: add 15xN PFA FFT AVX SIMD
~4x faster than the C version.
The shuffles in the 15pt dim1 are seriously expensive. Not happy with it,
but I'm contempt.

Can be easily converted to pure AVX by removing all vpermpd/vpermps
instructions.
2022-09-23 12:35:27 +02:00
James Zern bd7d69fe35 avcodec/libvpxenc: add -min-gf-interval
this maps to the vpxenc argument with the same name and the
VP9E_SET_MIN_GF_INTERVAL codec control

Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-09-22 11:52:16 -07:00
Paul B Mahol 1af0051977 doc/filters: add speechnorm examples 2022-09-18 19:43:42 +02:00
Paul B Mahol dd2a01ef5c avformat: add LAF demuxer 2022-09-16 10:02:19 +02:00
Paul B Mahol ea93943bee avcodec: add MI-SC4 audio decoder 2022-09-16 10:02:19 +02:00
Roman Arzumanyan cc81ab283c libavfilter: add vf_colorrange_cuda, CUDA-accelerated color conversion filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-13 22:59:30 +02:00
Rémi Denis-Courmont 092ce9712f doc: reference the RISC-V specification 2022-09-13 16:50:43 -03:00
Wenbin Chen a2fd553dd3 libavcodec/qsvenc: Add low_delay_brc reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen 005c7a4f61 libavcodec/qsvenc: Add max/min qp reset support in qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen 9155ec096b libavcodec/qsvenc: Add intra refresh reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen f3ba1458b6 libavcodec/qsvenc: Add "slice" intra refresh type to qsvenc
Add "slice" intra refresh type to h264_qsv and hevc_qsv. This type means
horizontal refresh by slices without overlapping. Also update the doc.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen d60f657a50 libavcodec/qsvenc: Add gop_size reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen c679de9be0 libavcodec/qsvenc: Add max_frame_size reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Haihao Xiang a5b6e29227 lavc/qsvenc: use VBR if maxrate is not specified on Windows
Currently AVBR is disabled and VBR is the default method if maxrate is
not specified on Linux, but AVBR is the default one if maxrate is not
specified on Windows. In order to make user experience better accross
Linux and Windows, use VBR by default on Windows if maxrate is not
specified. User need to set both avbr_accuracy and avbr_convergence to
non-zero explicitly and not to specify maxrate if AVBR is expected.

In addition, AVBR works for H264 and HEVC only in the SDK.

$ ffmpeg.exe -v verbose -f lavfi -i yuvtestsrc -vf "format=nv12" -c:v
vp9_qsv -f null -
2022-09-07 14:01:06 +08:00
Andreas Rheinhardt 5c16df1b92 fftools/ffprobe: Report initial and trailing padding
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-05 20:32:12 +02:00
Philip Langdale d75c4693fe lavu/pixfmt: Add P012, Y212, XV30, and XV36 formats
These are the formats we want/need to use when dealing with the Intel
VAAPI decoder for 12bit 4:2:0, 12bit 4:2:2, 10bit 4:4:4 and 12bit 4:4:4
respectively.

As with the already supported Y210 and YUVX (XVUY) formats, they are
based on formats Microsoft picked as their preferred 4:2:2 and 4:4:4
video formats, and Intel ran with it.

P12 and Y212 are simply an extension of 10 bit formats to say 12 bits
will be used, with 4 unused bits instead of 6.

XV30, and XV36, as exotic as they sound, are variants of Y410 and Y412
where the alpha channel is left formally undefined. We prefer these
over the alpha versions because the hardware cannot actually do
anything with the alpha channel and respecting it is just overhead.

Y412/XV46 is a normal looking packed 4 channel format where each
channel is 16bits wide but only the 12msb are used (like P012).

Y410/XV30 packs three 10bit channels in 32bits with 2bits of alpha,
like A/X2RGB10 style formats. This annoying layout forced me to define
the BE version as a bitstream format. It seems like our pixdesc
infrastructure can handle the LE version being byte-defined, but not
when it's reversed. If there's a better way to handle this, please
let me know. Our existing X2 formats all have the 2 bits at the MSB
end, but this format places them at the LSB end and that seems to be
the root of the problem.
2022-09-03 16:19:40 -07:00
Andreas Rheinhardt dea9744560 avutil/file: Properly deprecate av_tempfile()
It has been deprecated in b4f59beeb4,
but the attribute_deprecated was not set and there was no entry
in APIchanges. This commit adds these and schedules it for removal.
Given that the reason behind the deprecation is exactly the same
as in av_fopen_utf8(), reuse its FF_API_AV_FOPEN_UTF8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-03 15:42:40 +02:00
Mohamed Khaled Mohamed 1a5cd79f51 avfilter: add bilateral_cuda filter
GSoC 2022

Signed-off-by: Mohamed Khaled <mohamed.elbassiony00@eng-st.cu.edu.eg>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-03 15:18:56 +02:00
Paul B Mahol d1513e7f9c avfilter: add 3D scope multimedia filter 2022-09-03 14:44:59 +02:00
Michael Niedermayer ced0dc807e
doc/git-howto.texi: Document commit signing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-08-28 22:06:45 +02:00
Philip Langdale cc5a5c9860 lavu/pixfmt: Introduce VUYX format
This is the alphaless version of VUYA that I introduced recently. After
further discussion and noting that the Intel vaapi driver explicitly
lists XYUV as a support format for encoding and decoding 8bit 444
content, we decided to switch our usage and avoid the overhead of
having a declared alpha channel around.

Note that I am not removing VUYA, as this turned out to have another
use, which was to replace the need for v408enc/dec when dealing with
the format.

The vaapi switching will happen in the next change
2022-08-25 19:02:49 -07:00
Haihao Xiang 1adfd28f9e qsvenc_{hevc,h264}: add scenario option
User may get better experience after providing corresponding senario hint
to encoder for the encoding session. See [1] for scenario support in the
SDK

[1]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#scenarioinfo
2022-08-23 12:42:19 +08:00
Wenbin Chen ae7d19680b libavcodec/qsvenc: Add adaptive_i/b to hevc_qsv
Add adaptive_i/b feature to hevc_qsv. Adaptive_i allows changing of
frame type from P and B to I. Adaptive_b allows changing of frame type
frome B to P.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-08-23 12:42:19 +08:00
Anton Khirnov 14726571dd lavf: deprecate av_stream_get_end_pts()
According to its documentation it returns "pts of the last muxed packet
+ its duration", but the value it actually returns right now is
(possibly guessed) dts after muxer-internal bitstream filtering (if
any).

This function was added for ffmpeg.c, but it is not used there anymore.
Since the value it returns is ill-defined and so inappropriate for any
serious use, deprecate it.
2022-08-22 11:35:43 +02:00
James Almer 0446282320 APIchanges: fix library version in the latest entry
Also add commit hash and date while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-19 23:01:10 -03:00
James Almer 352799dca8 The vuya pixel format was recently added, so this lavc workaround is no longer
needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-19 22:48:42 -03:00
Chema Gonzalez 59225b459f doc: fix binary values of SI prefixes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-18 17:10:42 +02:00
Timo Rothenpieler 317f5252c0 doc/APIchanges: add missing rgbaf16 pixfmt entry 2022-08-16 12:31:03 +02:00
Haihao Xiang e0bbdbe0a6 lavu/hwcontext_qsv: add loader field to AVQSVDeviceContext
In oneVPL, a valid mfxLoader handle is needed when creating mfx session
for decoding, encoding and processing[1], so add loader field to
AVQSVDeviceContext. User should fill this field before calling
av_hwdevice_ctx_init() if using oneVPL

This is in preparation for oneVPL support

[1]https://spec.oneapi.io/versions/latest/elements/oneVPL/source/programming_guide/VPL_prg_session.html#onevpl-dispatcher
2022-08-12 10:43:39 +08:00
Gyan Doshi 9e029dc265 doc/filters: clarify behaviour of weights in amix 2022-08-09 13:59:29 +05:30
Fei Wang 26890b6b67 lavfi/overlay_vaapi: set defalut alpha value as 1.0
The present default value of 0 will render the overlay video invisible.
A default of 1.0 is consistent with most common use cases.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-08-09 14:02:25 +08:00
Fei Wang 4e0686df39 doc/filters: correct description of overlay_vaapi
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-08-09 14:01:38 +08:00
Gyan Doshi baf1f5dfb2 doc/filters: add examples for amix to subsection 2022-08-09 10:16:50 +05:30
Anton Khirnov 889b4b2f60 doc/ffmpeg: update -map documentation
Make it match reality (current text was not updated for stream
specifiers), extend and clarify the text.
2022-08-08 16:20:58 +02:00
Anton Khirnov fee249b30a fftools/ffmpeg: deprecate specifying a sync stream with -map
It has not had any effect whatsoever for over 10 years.
2022-08-08 16:20:58 +02:00