summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* libavfilter: Remove Async Flag from DNN Filter SideShubhanshu Saxena2021-08-28
| | | | | | | Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* libavfilter: Remove synchronous functions from DNN filtersShubhanshu Saxena2021-08-28
| | | | | | | | This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* libavfilter: Unify Execution Modes in DNN FiltersShubhanshu Saxena2021-08-28
| | | | | | | | | | | | | | | | | | | | | | | This commit unifies the async and sync mode from the DNN filters' perspective. As of this commit, the Native backend only supports synchronous execution mode. Now the user can switch between async and sync mode by using the 'async' option in the backend_configs. The values can be 1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain This commit also updates the filters vf_dnn_detect and vf_dnn_classify to send only the input frame and send NULL as output frame instead of input frame to the DNN backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Task-based Inference in Native BackendShubhanshu Saxena2021-08-28
| | | | | | | This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* avfilter/signature: fix integer rounding cast precedenceJai Luthra2021-08-28
| | | | | Co-authored-by: Oscar <oscar_davids@outlook.com> Signed-off-by: Jai Luthra <me@jailuthra.in>
* avfilter/vf_scale: reset color matrix in case of identity & non-RGBJan Ekström2021-08-28
| | | | | | | Fixes passing through mismatching metadata from the input side when RGB input (from f.ex. H.264 or HEVC) gets converted to YCbCr. Fixes #9132
* avfilter/graphdump: Use pointer to const for pointer to static stringsAndreas Rheinhardt2021-08-27
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/graphdump: Don't return truncated stringAndreas Rheinhardt2021-08-27
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/graphdump: Don't silently truncate channel layout stringAndreas Rheinhardt2021-08-27
| | | | | | | 64B are not enough any more. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/graphdump: Properly initialize AVBPrintAndreas Rheinhardt2021-08-27
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Avoid calling strlen multiple timesAndreas Rheinhardt2021-08-27
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/vorbiscomment: Don't compute strlen twiceAndreas Rheinhardt2021-08-27
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_colorcorrect: add median analyze modePaul B Mahol2021-08-27
|
* avfilter/vf_blend: use float for opacity calculationsPaul B Mahol2021-08-27
|
* avfilter/aeval: fix forgotten EOF case for activatePaul B Mahol2021-08-26
| | | | Bring fate test how it was previously.
* avcodec/vc1dec: return value check for init_get_bitsmaryam ebrahimzadeh2021-08-26
| | | | | | As the second argument for init_get_bits(avctx and buf) can be crafted, a return value check for this function call is necessary, so replace init_get_bits with init_get_bits8 and add return value check.
* avcodec/wmadec: handle run_level_decode errorStéphane Cerveau2021-08-26
| | | | | | | | | Consider data as invalid if ff_wma_run_level_decode gets out with an error. It avoids an unpleasant sound distorsion. See http://trac.ffmpeg.org/ticket/9358
* avcodec/wma: Return specific error codeOlivier Crête2021-08-26
| | | | | | | This way, the calling function can just forward it instead of making it up. Signed-off-by: Olivier Crête <olivier.crete@collabora.com>
* avfilter/avf_showwaves: remove invalid multiplication by 2Paul B Mahol2021-08-26
| | | | Fixes output of average filter.
* avcodec/vp6: return value check for init_get_bitsmaryam ebrahimzadeh2021-08-26
| | | | | | | | As the second argument for init_get_bits(buf) can be crafted, a return value check for this function call is necessary. Also replace init_get_bits with init_get_bits8. Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/bsf: Avoid allocation for AVBSFInternalAndreas Rheinhardt2021-08-25
| | | | | | | | | | Do this by allocating AVBSFContext together with the data that is currently in AVBSFInternal; or rather: Put AVBSFContext at the beginning of a new structure called FFBSFContext (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove the AVBSFInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: Use ffio_fill for paddingAndreas Rheinhardt2021-08-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: Avoid allocation when using dynamic bufferAndreas Rheinhardt2021-08-25
| | | | | | | This can be achieved by allocating the AVIOContext and the dynamic buffer's opaque and internal write buffer together. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avio: Move internal AVIOContext fields to avio_internal.hAndreas Rheinhardt2021-08-25
| | | | | | | | | | | | | | Currently AVIOContext's private fields are all over AVIOContext. This commit moves them into a new structure in avio_internal.h instead. Said structure contains the public AVIOContext as its first element in order to avoid having to allocate a separate AVIOContextInternal which is costly for those use cases where one just wants to access an already existing buffer via the AVIOContext-API. For these cases ffio_init_context() can't fail and always returned zero, which was typically not checked. Therefore it has been made to not return anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: Make ffio_set_buf_size() staticAndreas Rheinhardt2021-08-25
| | | | | | Possible since 9c3adb7ce23522dcceb264bc0bffd3592dd3e1a5. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ffio_limit() to aviobufAndreas Rheinhardt2021-08-25
| | | | | | | | It is the more natural place for it given that it only deals with I/O; in fact, the function already has the ffio prefix and its declaration already is in avio_internal.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskadec: Read RealAudio extradata directlyAndreas Rheinhardt2021-08-25
| | | | | | Don't use the avio-API to read a few bytes at fixed offsets. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: Avoid calling function twice due to FFMAX()Andreas Rheinhardt2021-08-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/log: Reorder elements of AVClass to make it smallerAndreas Rheinhardt2021-08-25
| | | | | | Putting child_next besides child_class_iterate is actually nicer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec: Reorder elements to make AVCodec smallerAndreas Rheinhardt2021-08-25
| | | | | | Reordering max_lowres is an ABI break. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_slice: don't allocate film grain buffers when using hwaccelJames Almer2021-08-25
| | | | | | Fixes regression since 66845cffc3bbb17f91294d15cd6f57f3df3bce97 Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg_filter: silence valgrind warningPaul B Mahol2021-08-25
|
* avcodec/dnxhddec: ignore second flag for encoded fieldPaul B Mahol2021-08-25
| | | | | | And instead use previous field flag. Fixes decoding files produced by non-compliant encoders.
* arm: hevc_qpel: Fix the assembly to work with non-multiple of 8 widthsMartin Storsjö2021-08-25
| | | | | | | | | | | | | | | | | | | | This unbreaks the fate-checkasm-hevc_pel test on arm targets. The assembly assumed that the width passed to the DSP functions is a multiple of 8, while the checkasm test used other widths too. This wasn't noticed before, because the hevc_pel checkasm tests (that were added in 9c513edb7999a35ddcc6e3a8d984a96c8fb492a3 in January) weren't run as part of fate until in b492cacffd36ad4cb251ba1f13ac398318ee639a in August. As this hasn't been an issue in practice with actual full decoding tests, it seems like the actual decoder doesn't call these functions with such widths. Therefore, we could alternatively fix the test to only test things that the real decoder does, and this modification could be reverted. Signed-off-by: Martin Storsjö <martin@martin.st>
* tests/fate: move TTML-in-MP4 tests from subtitles.mak to mov.makJan Ekström2021-08-25
| | | | | | | | subtitles.mak's fate-sub tests utilize a more strict comparator ("rawdiff"), which causes the tests fail in case of white space differences, such as CRLF vs LF. This in turn causes these ffprobe-using TTML-in-MP4 tests to fail on non-LF systems such as Windows or wine.
* avfilter: add hsvkey and hsvhold video filtersPaul B Mahol2021-08-25
|
* avcodec/jpeg2000_parser: Fix skipping of JP2 info markers by correctly ↵Shaun Simpson2021-08-25
| | | | | | reading marker size Signed-off-by: Shaun Simpson <shauns2029@gmail.com>
* avcodec/jpeg2000_parser: Fix parsing of tile-part headerShaun Simpson2021-08-25
| | | | | | And frames where the end of frame marker is at the end of the buffer. Signed-off-by: Shaun Simpson <shauns2029@gmail.com>
* avformat/movenc: add support for TTML muxingJan Ekström2021-08-25
| | | | | | | | | | | Includes basic support for both the ISMV ('dfxp') and MP4 ('stpp') methods. This initial version also foregoes fragmentation support in case the built-in sample squashing is to be utilized, as this eases the initial review. Additionally, add basic tests for both muxing modes in MP4. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/ttml: split TTML paragraph based or not check into headerJan Ekström2021-08-25
| | | | | | This way it can be re-utilized in movenc. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avcodec/h264dec: fix possible out-of-bounds array accessNiklas Haas2021-08-25
| | | | | | | | | | | | | | If slice_type is > 9, the access to ff_h264_golomb_to_pict_type is out-of-bounds. Fix this by simply setting the slice_type to 0 in this case. This is completely inconsequential because the value is only being used to being used as an offset in the calculation of the film grain seed value, a corruption of which is practically invisible. Fixes coverity ticket #1490802 Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm: collapse hevc pel testsJ. Dekker2021-08-24
| | | | | | Also add to `make fate-checkasm' target. Signed-off-by: J. Dekker <jdek@itanimul.li>
* fate: update some missing refsJames Almer2021-08-24
| | | | | | Forgotten in 590a7e02f04795ef308240bb13b76f97f916b16e Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_slice: signal the presence of Film Grain in the decoder contextJames Almer2021-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1: signal the presence of Film Grain in the decoder contextJames Almer2021-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libdav1d: signal the presence of Film Grain in the decoder contextJames Almer2021-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add a Film Grain codec property flagJames Almer2021-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/pthread_frame: also keep AVCodecContext.properties in sync between ↵James Almer2021-08-24
| | | | | | | | | threads Some frame threaded decoders set it, but this information never reached the caller in frame threading scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264dec: apply H.274 film grainNiklas Haas2021-08-24
| | | | | | | | | | | | | | | | | | | | | | | Because we need access to ref frames without film grain applied, we have to add an extra AVFrame to H264Picture to avoid messing with the original. This requires some amount of overhead to make the reference moves work out, but it allows us to benefit from frame multithreading for film grain application "for free". Unfortunately, this approach requires twice as much RAM to be constantly allocated for ref frames, due to the need for an extra buffer per H264Picture. In theory, we could get away with freeing up this memory as soon as it's no longer needed (since ref frames do not need film grain buffers any longer), but trying to call ff_thread_release_buffer() from output_frame() conflicts with possible later accesses to that same frame and I'm not sure how to synchronize that well. Tested on all three cases of (no fg), (fg present but exported) and (fg present and not exported), with and without threading. Co-authored-by: James Almer <jamrial@gmail.com> Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h274: add film grain synthesis routineNiklas Haas2021-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | This could arguably also be a vf, but I decided to put it here since decoders are technically required to apply film grain during the output step, and I would rather want to avoid requiring users insert the correct film grain synthesis filter on their own. The code, while in C, is written in a way that unrolls/vectorizes fairly well under -O3, and is reasonably cache friendly. On my CPU, a single thread pushes about 400 FPS at 1080p. Apart from hand-written assembly, one possible avenue of improvement would be to change the access order to compute the grain row-by-row rather than in 8x8 blocks. This requires some redundant PRNG calls, but would make the algorithm more cache-oblivious. The implementation has been written to the wording of SMPTE RDD 5-2006 as faithfully as I can manage. However, apart from passing a visual inspection, no guarantee of correctness can be made due to the lack of any publicly available reference implementation against which to compare it. Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>