summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lavc: convert frame threading to the receive_frame() patternthread_receiveAnton Khirnov2022-08-01
| | | | | | | Reorganize the code such that the frame threading code does not call the decoders directly, but instead calls back into the generic decoding code. This avoids duplicating the logic that wraps the decoder invocation and will be useful in the following commits.
* fftools/ffmpeg_opt: reindentAnton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: factor manually mapping streams out of open_output_file()Anton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: reindentAnton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: factor auto-mapping data streams out of open_output_file()Anton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: reduce indentation in map_auto_subtitle()Anton Khirnov2022-07-28
| | | | | Fix indentation after the previous commit. Also use an early return to save one extra indentation level.
* fftools/ffmpeg_opt: factor auto-mapping subtitles out of open_output_file()Anton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: reduce indentation in map_auto_audio()Anton Khirnov2022-07-28
| | | | | Fix indentation after the previous commit. Also use an early return to save one extra indentation level.
* fftools/ffmpeg_opt: factor auto-mapping audio out of open_output_file()Anton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: reduce indentation in map_auto_video()Anton Khirnov2022-07-28
| | | | | Fix indentation after the previous commit. Also use an early return to save one extra indentation level.
* fftools/ffmpeg_opt: factor auto-mapping video out of open_output_file()Anton Khirnov2022-07-28
|
* fftools/ffmpeg: do not log to the decoder contextAnton Khirnov2022-07-28
| | | | | That should only be done from inside the decoder. Log to NULL instead, as is the current convention in ffmpeg.
* fftools/ffmpeg_mux: move some functions closer to their only callersAnton Khirnov2022-07-28
|
* fftools/ffmpeg_filter: drop a block commented out since 2012Anton Khirnov2022-07-28
| | | | | Since the option it relates to is deprecated, it is highly unlikely to become useful.
* fftools/ffmpeg: deprecate the -map_channel optionAnton Khirnov2022-07-28
| | | | | It is now entirely redundant with audio filters, and is in fact implemented by setting up a 'pan' filter instance.
* fftools/ffmpeg: move guess_input_channel_layout() to ffmpeg_opt.cAnton Khirnov2022-07-28
| | | | That is the only place where it is used. Also make it static.
* fftools/ffmpeg: drop unused hwaccel variablesAnton Khirnov2022-07-28
|
* fftools/ffmpeg_opt: drop a redundant assignmentAnton Khirnov2022-07-28
| | | | | The codec type will be set by avcodec_alloc_context3(), there is no reason to set it manually.
* fftools/ffmpeg: stop allocating an encoder context when not encodingAnton Khirnov2022-07-28
|
* fftools/ffmpeg: deprecate -psnrAnton Khirnov2022-07-28
| | | | It is entirely redundant with -flags +psnr.
* fftools/ffmpeg: do not use the encoder context for streamcopyAnton Khirnov2022-07-28
| | | | | | The streamcopy initialization code briefly needs an AVCodecContext to apply AVOptions to. Allocate a temporary codec context, do not use the encoding one.
* fftools/ffmpeg: drop OutputStream.ref_parAnton Khirnov2022-07-28
| | | | | It serves no purpose, codec parameters can be written directly to AVStream.codecpar with the same effect.
* fftools/ffmpeg: drop the -vol optionAnton Khirnov2022-07-28
| | | | It has been deprecated in favor of the volume filter since 2012.
* fftools/ffmpeg_filter: do not pass the entire AVCodecContext to ↵Anton Khirnov2022-07-28
| | | | | | | choose_pixel_fmt() It only uses strict_std_compliance, so pass just that value. Makes it more clear what fields are accessed.
* fftools/ffmpeg_filter: remove unused function argumentAnton Khirnov2022-07-28
|
* fftools/ffmpeg: remove an unnecessary avcodec_close() callAnton Khirnov2022-07-28
| | | | | No encoders can possibly be opened at this point. And even if some were, they would be closed in ffmpeg_cleanup().
* fftools/ffmpeg: stop accessing the encoder context unnecessarilyAnton Khirnov2022-07-28
| | | | | | The same information is available from AVStream.codecpar. This will allow to stop allocating an encoder unless encoding is actually performed.
* avfilter/vf_zscale: Add smpte240m transfer option and fix matrix option typoMattias Wadman2022-07-28
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/vp8, vp9: Avoid using VP56mv and VP56Frame in VP8/9Andreas Rheinhardt2022-07-28
| | | | | | | | | | | | | | | | | | | | | | | | Instead replace VP56mv by new and identical structures VP8mv and VP9mv. Also replace VP56Frame by VP8FrameType in vp8.h and use that in VP8 code. Also remove VP56_FRAME_GOLDEN2, as this has only been used by VP8, and use VP8_FRAME_ALTREF as replacement for its usage in VP8 as this is more in line with VP8 verbiage. This allows to remove all inclusions of vp56.h from everything that is not VP5/6. This also removes implicit inclusions of hpeldsp.h, h264chroma.h, vp3dsp.h and vp56dsp.h from all VP8/9 files. (This also fixes a build issue: If one compiles with -O0 and disables everything except the VP8-VAAPI encoder, the file containing ff_vpx_norm_shift is not compiled, yet this is used implicitly by vp56_rac_gets_nn() which is defined in vp56.h; it is unused by the VP8-VAAPI encoder and declared as av_unused, yet with -O0 unused noninline functions are not optimized away, leading to linking failures. With this patch, said function is not included in vaapi_encode_vp8.c any more.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vp56: Move VP5-9 range coder functions to a header of their ownAndreas Rheinhardt2022-07-28
| | | | | | Also use a vpx prefix for them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vp56: Move VP8/9-only rac functions to a header of their ownAndreas Rheinhardt2022-07-28
| | | | | | Also rename these functions from vp8_rac_* to vp89_rac_*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vp56.h: Move VP8-only functions to vp8.cAndreas Rheinhardt2022-07-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Remove transient GetByteContext from contextAndreas Rheinhardt2022-07-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/hevcdec: respect the value of no_output_of_prior_pics_flagXu Guangxin2022-07-27
| | | | | | | | Even resolution or number of picture stores changes, we still need follow no_output_of_prior_pics_flag in next IDR. Tested-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
* lavc/hevc_refs: exclude current frame from long term refsXu Guangxin2022-07-27
| | | | | | | | | | | | | suppose a. You have 3 frames, 0, 1, 4096. b. The ltMask is 0xfff and use_msb is 0. c. The 0, 1 are lt refs for 4096. d. you are decoding frame 4096, and get the 0 frame. Since 4096 & ltMask is 0 too, even you want get 0, find_ref_idx may give you 4096. add_candidate_ref will report an error for this Tested-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
* lavc/hevcdec: do not let missing ref frames invovled in dpb processXu Guangxin2022-07-27
| | | | | | | | | | We will generate a new frame for a missed reference. The frame can only be used for reference. We assign an invalid decode sequence to it, so it will not be involved in any dpb process. Tested-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
* lavc/hevc_refs: fix dpb logical for IRAPXu Guangxin2022-07-27
| | | | | | | | According to C.5.2.2, item 2. When we got an IRAP, and the NoOutputOfPriorPicsFlag = 0, we need bump all outputable frames. Tested-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
* fate/imf: Rename IMF fate-targetAndreas Rheinhardt2022-07-26
| | | | | | | | | | It conflicts with the name of the test using the testtool in libavformat.mak. Fixes ticket #9841. Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tools/target_dec_fuzzer: set avctx->workaround_bugs flagsJames Almer2022-07-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: set AV_EF_CRCCHECK in avctx->err_recognitionJames Almer2022-07-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: set some avctx->export_side_data flagsJames Almer2022-07-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevcdec: Avoid allocation of common CABAC stateAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | It used to be allocated separately, so that the pointer to it is copied to all HEVCContexts, so that all slice-threads use the same. This is completely unnecessary now that there is only one HEVCContext any more. There is just one minor complication left: The slice-threads only get a pointer to const HEVCContext, but they need to modify the common CABAC state. Fix this by adding a pointer to the common CABAC state to HEVCLocalContext and document why it exists. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Move allocation after error checksAndreas Rheinhardt2022-07-25
| | | | | | | While just at it, also use av_calloc() instead of zeroing the array ourselves in a loop. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pthread_slice: Reuse buffer if possibleAndreas Rheinhardt2022-07-25
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pthread_slice: Combine allocating and zeroing entriesAndreas Rheinhardt2022-07-25
| | | | | | | | | Actually, ff_slice_thread_allocz_entries() always already allocates zeroed entries, so ff_reset_entries() was already unnecessary. Make this more clear by renaming it to ff_slice_thread_allocz_entries(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Check allocationAndreas Rheinhardt2022-07-25
| | | | | | Also postpone it after the checks for invalid input. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Don't allocate redundant HEVCContextsAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet up until now that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. And up until recently, this is how it has been done. Yet the preceding patches changed this, making it possible to avoid allocating redundant HEVCContexts. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Pass HEVCLocalContext** via execute2Andreas Rheinhardt2022-07-25
| | | | | | | | | | | | Right now the code passes a list of ints whose entry #i is just i as opaque parameter to hls_decode_entry_wpp via execute2; said list is even constantly allocated and freed. This commit stops doing so and instead passes the list of HEVCLocalContext* instead, so that the main HEVCContext can be avoided in accessing the HEVCLocalContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Pass HEVCLocalContext when slice-threadingAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevcdec.c itself. It also constifies what can be constified in order to make the nonconst stuff stand out more. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcpred: Pass HEVCLocalContext when slice-threadingAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevcpred as well as the corresponding mips code; the latter is untested. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>