summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/mpegvideo: Move handling Simple Studio Profile to mpeg4videodecAndreas Rheinhardt2022-01-29
| | | | | | This is its only user. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/mpeg4: Add test for MPEG-4 Simple Studio ProfileAndreas Rheinhardt2022-01-29
| | | | | | | The sample mpeg4/mpeg4_sstp_dpcm.m4v existed in the FATE-suite, but it was surprisingly unused. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Fix crash when using lowres with 10bit MPEG-4Andreas Rheinhardt2022-01-29
| | | | | | | | | | | | | | In this case the macroblocks written to are smaller, yet the MPEG-4 Simple Studio Profile code for 10bit DPCM ignored this; e.g. in case of lowres = 2 or = 3, the sample mpeg4_sstp_dpcm.m4v from the FATE-suite reads beyond the end of the buffer. This commit fixes this by taking lowres into account. The DPCM macroblocks of the aforementioned sample look as good as can be expected after this patch; yet the non-DPCM coded macroblocks are simply corrupt. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Fix off-by-one error when decoding >8 bit MPEG-4Andreas Rheinhardt2022-01-29
| | | | | | | | Fixes visual corruptions on two macroblocks from two frames from https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4447/A003C003_SR_422_23.98p.mxf Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Don't hardcode list of codecs supporting bframesAndreas Rheinhardt2022-01-29
| | | | | | Check for the encoder's AV_CODEC_CAP_DELAY instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Localize check for invalid number of b-framesAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move frame_rate_index to (Mpeg1|MPEG12Enc)ContextAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Move H.263p? encoders to ituh263enc.cAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Move msmpeg4/wmv1 encoders to msmpeg4enc.cAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move gop_picture_number to MPEG12EncContextAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Don't sync gop_picture_number among slice threadsAndreas Rheinhardt2022-01-29
| | | | | | It is only used by the main thread. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move timecode_frame_start to Mpeg1ContextAndreas Rheinhardt2022-01-29
| | | | | | It is only used there and only by the main thread. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move aspect_ratio_info to Mpeg1ContextAndreas Rheinhardt2022-01-29
| | | | | | Only used there and only by the main thread. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263dec: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263enc: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videoenc: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Reindent after the previous commitAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Return early if no Sequence Header is writtenAndreas Rheinhardt2022-01-29
| | | | | | Allows to avoid one level of indentation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263enc: Use stack variable for custom_pcfAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4?video: Move vo_type to Mpeg4DecContextAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Keep vo_type in sync between threadsAndreas Rheinhardt2022-01-29
| | | | | | Otherwise one can get outdated values when setting FF_DEBUG_PICT_INFO. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videoenc: Use stack variable for vo_typeAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263: Move decoding-only stuff to a new header h263dec.hAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263: Remove declaration for inexistent functionAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/jpeg2000dec: Move preparations to main thread, fix raceAndreas Rheinhardt2022-01-29
| | | | | | | | | | | | | | 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>
* avfilter/vf_v360: improve xyz_to_fisheye()Paul B Mahol2022-01-29
|
* avfilter/vf_v360: improve xyz_to_dfisheye() even morePaul B Mahol2022-01-29
|
* avutil/hwcontext_qsv: fix typoTimo Rothenpieler2022-01-29
|
* avfilter/af_afir: switch to lavu/txPaul B Mahol2022-01-29
|
* lavc/qsvdec: export AVFilmGrainParams side dataHaihao Xiang2022-01-29
| | | | | | | 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>
* lavc/qsvdec: track the runtime session versionHaihao Xiang2022-01-29
| | | | | | We may check the runtime version for the given features Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsv: allow to add more parameter buffers to QSV frameHaihao Xiang2022-01-29
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc: add tile encoding support for VP9Haihao Xiang2022-01-29
| | | | | | | 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>
* libavutil/hwcontext_opencl: fix a bug for mapping qsv frame to openclnyanmisaka2022-01-29
| | | | | | | | | | | | | | | 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>
* libavcodec/vaapi_decode: fix the problem that init_pool_size < nb_surfaceWenbin Chen2022-01-29
| | | | | | | | | | | | | | | | | | | | 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>
* x86/tx_float: mark AVX2 functions as AVXSLOWLynne2022-01-29
| | | | | | | | | | | | | 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.
* lavu/tx: do not unconditionally free subcontexts if initialization failsLynne2022-01-29
| | | | | | | | | 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.
* lavu/tx: reset subcontext pointer if initialization failsLynne2022-01-29
| | | | Thanks to mkver for pointing this out.
* lavu/tx: print debug info even if no transforms are foundLynne2022-01-28
|
* avutil/tx: add null pointer check after av_malloczSteven Liu2022-01-28
| | | | | | | 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>
* avutil/tx: remove deadcode of the control flowSteven Liu2022-01-28
| | | | | | | | | 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>
* hwcontext_vulkan: avoid using 64-bit enumsLynne2022-01-27
| | | | MSVC (2016, but possibly more) still force enums to be basic ints.
* lavu/tx: avoid using 64-bit enumsLynne2022-01-27
| | | | MSVC (2016, but possibly more) still force enums to be basic ints.
* configure: add libplacebo to help messageZhao Zhili2022-01-27
|
* libavcodec/qsvenc: Add intra refresh to hevc_qsv and add new intra refresh ↵Wenbin Chen2022-01-27
| | | | | | | | | | | | 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>
* libavcodec/qsvenc: Add b_strategy option to hevc_qsvWenbin Chen2022-01-27
| | | | | | | | 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>
* libavcodec/qsvenc: Add max slice size support to hevc_qsvWenbin Chen2022-01-27
| | | | | | | 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>
* avcodec/h264data: Add missing rational.h inclusionAndreas Rheinhardt2022-01-27
| | | | | | Fixes checkheaders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>