1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-18 03:19:31 +02:00
Commit Graph

106615 Commits

Author SHA1 Message Date
Andreas Rheinhardt
30dfd87da1 avcodec/mpeg4videodec: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:31 +01:00
Andreas Rheinhardt
9288b6366b avcodec/ituh263dec: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
f2da650258 avcodec/ituh263enc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
b326c2dcdc avcodec/mpeg4videoenc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
5256658af5 avcodec/mpeg12enc: Reindent after the previous commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
d3a2d06633 avcodec/mpeg12enc: Return early if no Sequence Header is written
Allows to avoid one level of indentation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
f05ba7b169 avcodec/mpeg12enc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
769703613a avcodec/ituh263enc: Use stack variable for custom_pcf
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
426d65e3e3 avcodec/mpeg4?video: Move vo_type to Mpeg4DecContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
eb67659884 avcodec/mpeg4videodec: Keep vo_type in sync between threads
Otherwise one can get outdated values when setting FF_DEBUG_PICT_INFO.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
49627b2f2a avcodec/mpeg4videoenc: Use stack variable for vo_type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
7f6596c8bb avcodec/h263: Move decoding-only stuff to a new header h263dec.h
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
85bbae8473 avcodec/h263: Remove declaration for inexistent function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Andreas Rheinhardt
218d1f76d4 avcodec/jpeg2000dec: Move preparations to main thread, fix race
jpeg2000_decode_tile() (which is run concurrently by several threads
when using slice threading) currently modifies some joint values
before doing its actual work. This is a data race that happens to work
because all threads set the same values; but it is nevertheless
undefined behaviour.

Fix this by performing said preparatory work in the main thread instead.
This fixes the vsynth(1|2|_lena)-jpeg2000(-97)? FATE-tests when using
TSAN and slice threading.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 18:34:30 +01:00
Paul B Mahol
e13f0b9456 avfilter/vf_v360: improve xyz_to_fisheye() 2022-01-29 17:36:37 +01:00
Paul B Mahol
3981dbd192 avfilter/vf_v360: improve xyz_to_dfisheye() even more 2022-01-29 17:36:37 +01:00
Timo Rothenpieler
2f323b1978 avutil/hwcontext_qsv: fix typo 2022-01-29 15:37:38 +01:00
Paul B Mahol
d388dc20b9 avfilter/af_afir: switch to lavu/tx 2022-01-29 11:46:55 +01:00
Haihao Xiang
8ca06a8148 lavc/qsvdec: export AVFilmGrainParams side data
When AV_CODEC_EXPORT_DATA_FILM_GRAIN is present, AV1 decoder should
disable film grain application and export the corresponding side data

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-29 12:02:52 +08:00
Haihao Xiang
7c24a768d3 lavc/qsvdec: track the runtime session version
We may check the runtime version for the given features

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-29 12:02:52 +08:00
Haihao Xiang
8dd507bf0d lavc/qsv: allow to add more parameter buffers to QSV frame
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-29 12:02:52 +08:00
Haihao Xiang
80801e5705 lavc/qsvenc: add tile encoding support for VP9
Add -tile_rows and -tile_cols options to specify the number of tile
rows and columns

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-29 12:02:52 +08:00
nyanmisaka
4cc7239d8b libavutil/hwcontext_opencl: fix a bug for mapping qsv frame to opencl
mfxHDLPair was added to qsv, so modify qsv->opencl map function as well.
Now the following commandline works:

ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 \
-init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device ocl \
-hwaccel qsv -hwaccel_output_format qsv -hwaccel_device qs -c:v h264_qsv \
-i input.264 -vf "hwmap=derive_device=opencl,format=opencl,avgblur_opencl, \
hwmap=derive_device=qsv:reverse=1:extra_hw_frames=32,format=qsv" \
-c:v h264_qsv output.264

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-01-29 12:02:52 +08:00
Wenbin Chen
a5b1e632c9 libavcodec/vaapi_decode: fix the problem that init_pool_size < nb_surface
For vaapi if the init_pool_size is not zero, the pool size is fixed.
This means max surfaces is init_pool_size, but when mapping vaapi
frame to qsv frame, the init_pool_size < nb_surface. The cause is that
vaapi_decode_make_config() config the init_pool_size and it is called
twice. The first time is to init frame_context and the second time is to
init codec. On the second time the init_pool_size is changed to original
value so the init_pool_size is lower than the reall size because
pool_size used to initialize frame_context need to plus thread_count and
3 (guarantee 4 base work surfaces). Now add code to make sure
init_pool_size is only set once. Now the following commandline works:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
-hwaccel_output_format vaapi -i input.264 \
-vf "hwmap=derive_device=qsv,format=qsv" \
-c:v h264_qsv output.264

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-01-29 12:02:52 +08:00
Lynne
35080149ef
x86/tx_float: mark AVX2 functions as AVXSLOW
Makes Bulldozer prefer AVX functions rather than AVX2,
which are 64% slower:

AVX:  117653 decicycles in av_tx (fft), 1048535 runs,     41 skips
AVX2: 193385 decicycles in av_tx (fft), 1048561 runs,     15 skips

The only difference between both is that vgatherdpd is used in
the former. We don't want to mark them with the new SLOW_GATHER
flag however, since gathers are still faster on Haswell/Zen 2/3
than plain loads.
2022-01-29 03:08:16 +01:00
Lynne
7e35e0224c
lavu/tx: do not unconditionally free subcontexts if initialization fails
If a codelet initializes 2 subtransforms, and the second one fails,
the failure would free all subcontexts.
Instead, if there are subcontexts still left, don't free the array.
If all initializations fail, the init() function will return,
and reset_ctx() from the previous step will clean up all contained
subtransforms.
2022-01-29 01:02:37 +01:00
Lynne
265731f201
lavu/tx: reset subcontext pointer if initialization fails
Thanks to mkver for pointing this out.
2022-01-29 00:53:35 +01:00
Lynne
95f02e43e1
lavu/tx: print debug info even if no transforms are found 2022-01-28 08:28:02 +01:00
Steven Liu
9887ec3e9b avutil/tx: add null pointer check after av_mallocz
Fix CID: 1497863
there will get null pointer in attempt to initialize each if alloc memory failed.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2022-01-28 08:27:48 +01:00
Steven Liu
f0044d886f avutil/tx: remove deadcode of the control flow
Fix CID: 1497864
The control flow should return ENOSYS if nb_cd_matches is 0 at before
and the ret equal AVERROR(ENOMEM) or goto end label, so remove the last
control flow if (ret >= 0) before end label.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2022-01-28 08:27:46 +01:00
Lynne
3c831847a8
hwcontext_vulkan: avoid using 64-bit enums
MSVC (2016, but possibly more) still force enums to be basic ints.
2022-01-27 10:27:09 +01:00
Lynne
238e11b71f
lavu/tx: avoid using 64-bit enums
MSVC (2016, but possibly more) still force enums to be basic ints.
2022-01-27 10:21:25 +01:00
Zhao Zhili
2b15acb96a configure: add libplacebo to help message 2022-01-27 10:05:27 +01:00
Wenbin Chen
e102fd98d6 libavcodec/qsvenc: Add intra refresh to hevc_qsv and add new intra refresh parameter
Add intra refresh support to hevc_qsv as well.
Add an new intra refresh type: "horizontal", and an new param
ref_cycle_dist. This param specify the distance between the
beginnings of the intra-refresh cycles in frames.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:39 +08:00
Wenbin Chen
2ecc4fde5f libavcodec/qsvenc: Add b_strategy option to hevc_qsv
Add b_strategy option to hevc_qsv. By enabling this option, encoder can
use b frames as reference.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:33 +08:00
Wenbin Chen
168c6e23a5 libavcodec/qsvenc: Add max slice size support to hevc_qsv
Add max_slice_size option to hevc_qsv as well.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:26 +08:00
Andreas Rheinhardt
5e9ac1ebec avcodec/h264data: Add missing rational.h inclusion
Fixes checkheaders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-27 02:45:19 +01:00
Lynne
6c397f6bb5
x86/tx_float: add missing FF_TX_OUT_OF_PLACE flag to functions
This caused smaller length dedicated transforms to not be picked up.
2022-01-27 02:18:35 +01:00
Lynne
008c131d68
lavu/tx: clean up CPU flags check
Just makes it more readable.
2022-01-27 02:18:06 +01:00
Lynne
9787005846
x86/tx_float: do not build tx_float_init.c if x86 assembly is disabled
This broke builds with --disable-mmx, which also disabled assembly
entirely, but ARCH_X86 was still true, so the init file tried to find
assembly that didn't exist.
Instead of checking for architecture, check if external x86 assembly
is enabled.
2022-01-27 02:17:46 +01:00
Andreas Rheinhardt
b2421c4f26 avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h
It is a more fitting place for it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-26 15:30:54 +01:00
Andreas Rheinhardt
c3ff716808 avcodec/h264_*: Remove unnecessary internal.h inclusions
Also remove some other unnecessary headers while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-26 15:30:54 +01:00
Andreas Rheinhardt
c793e05381 avcodec/h264dec: Remove unnecessary headers
E.g. the inclusion of parser.h comes from a time when
the parser used a H264Context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-26 15:30:54 +01:00
Andreas Rheinhardt
5fef87f140 avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions
This is only needed by h264_cabac.c and h264_cavlc.c.
Also fix up the other headers while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-26 15:30:54 +01:00
Anton Khirnov
d0f0d61392 lavc/svq3: stop including h264dec.h
The only thing that is actually used directly from there is the
PART_NOT_AVAILABLE constant, which can be moved to h264pred.h.

Otherwise it only depends on other indirectly included headers.
2022-01-26 15:30:28 +01:00
Anton Khirnov
359912f0df lavc/x86/h264_qpel: stop unnecessarily including h264dec 2022-01-26 15:23:30 +01:00
Anton Khirnov
76b8ae2e22 lavc/vdpau: stop unnecessarily including h264dec 2022-01-26 15:23:30 +01:00
Anton Khirnov
ded77f5654 lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse
Allows to stop including h264dec.h in h264data.c.
2022-01-26 15:23:30 +01:00
Anton Khirnov
2f1716dcd6 lavc/h264_parse: stop including h264dec.h
It is unnecessary and only files that are parts of the decoder (as
opposed to standalone code called by the decoder) are allowed to include
h264dec.h
2022-01-26 15:23:30 +01:00
Anton Khirnov
e1027aba68 lavc/h264data.h: stop including h264dec.h
This header does not need anything from there.
2022-01-26 15:23:30 +01:00