Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-27avcodec/nvenc: fix indentationTimo Rothenpieler
2019-04-27avcodec/nvenc: only unregister input resources when absolutely neededTimo Rothenpieler
This reverts nvenc to old behaviour, which in some super rare edge cases performs better. The implication of this is that any potential API user who relies on nvenc cleaning up every frames device resources after it's done using them will have to change their usage pattern. That should not be a problem, since pretty much every normal usage pattern automatically implies that surfaces are reused from a common pool, since constant re-allocation is also very expensive.
2019-03-10avcodec/nvenc: add minimum driver version for SDK 8.2 and 9.0Timo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-14avcodec/nvenc: add b_as_ref support for HEVCRoman Arzumanyan
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-11-15avutil/hwcontext_cuda: Define and use common CHECK_CU()Philip Langdale
We have a pattern of wrapping CUDA calls to print errors and normalise return values that is used in a couple of places. To avoid duplication and increase consistency, let's put the wrapper implementation in a shared place and use it everywhere. Affects: * avcodec/cuviddec * avcodec/nvdec * avcodec/nvenc * avfilter/vf_scale_cuda * avfilter/vf_scale_npp * avfilter/vf_thumbnail_cuda * avfilter/vf_transpose_npp * avfilter/vf_yadif_cuda
2018-08-21avcodec/nvenc: add option to turn off a53 closed caption embeddingTimo Rothenpieler
2018-06-15avcodec/nvenc: enable nvenc encoder instance reusePavel Koshevoy
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-05-10Revert "avcodec/nvenc: make hw_frames_ctx fully optional"Timo Rothenpieler
This reverts commit 7d4e1f7cfb667585514bfa0a4d0fee2f717a93ed. Accidentially pushed this with a batch of other patches, and it didn't seem to break anything, so I went with it. Except it does, so reverting it it is.
2018-05-05avcodec/nvenc: move reconfig_encoder call inside of push/pop ctxTimo Rothenpieler
Also make it void, it must not fail the encode anyway.
2018-05-05avcodec/nvenc: add A53CC supportRoman Arzumanyan
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-05-05avcodec/nvenc: support dynamic bitrate changespkviet
The patch enables dynamic bitrate through ReconfigureEncoder method from nvenc API. This is useful for live streaming in case of network congestion. Signed-off-by: pkviet <pkv.stream@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-05-05avcodec/nvenc: support dynamic aspect ratio changeMiroslav Slugeň
If there is input like DVB-T streams it can change aspect ratio on-the-fly, so nvenc should respect this change and change aspect ratio in encoder. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-05-05avcodec/nvenc: make hw_frames_ctx fully optionalTimo Rothenpieler
2018-04-13avcodec/nv{enc,dec}: use sane version checking macroTimo Rothenpieler
For some odd reason, the Nvidia version macros puts the minor version in the msb, so comparing against it is impossible.
2018-04-11avcodec/nvenc: update required driver versions for nvencTimo Rothenpieler
2018-04-11avcodec/nvenc: add support for B frames as refTimo Rothenpieler
2018-03-03avcodec/nvenc: Declare support for P016Philip Langdale
nvenc doesn't support P016, but we have two problems today: 1) We declare support for YUV444P16 which nvenc also doesn't support. We do this because it's the only pix_fmt we have that can approximate nvenc's internal format that is YUV444P10 with data in MSBs instead of LSBs. Because the declared format is a 16bit one, it will be preferrentially chosen when encoding >10bit content, but that content will normally be YUV420P12 or P016 which should get mapped to P010 and not YUV444P10. 2) Transcoding P016 content with nvenc should be possible in a pure hardware pipeline, and that can't be done if nvenc doesn't say it accepts P016. By mapping it to P010, we can use it, albeit with truncation. I have established that swscale doesn't know how to dither to 10bits so we'd get truncation anyway, even if we tried to do this 'properly'.
2018-01-28avcodec/nvenc: also clear data pointer after unregistering a resourceTimo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28avcodec/nvenc: add some more error case checksTimo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28avcodec/nvenc: unregister input resource when unmappingTimo Rothenpieler
Currently the resource is only ever unregistered when the registered_frames array is fully in use and an unmapped entry is re-used and cleaned up. I'm pretty sure the frame will have been cleaned up before that happens, so I'm kinda surprised this never blew up. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28avcodec/nvenc: refcount input frame mappingsTimo Rothenpieler
If some logic like vsync in ffmpeg.c duplicates frames, it might pass the same frame twice, which will result in a crash due it being effectively mapped and unmapped twice. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-29avcodec/nvenc: set correct error codePan Bian
In function process_output_surface(), the return value is 0 on the path that av_mallocz() returns a NULL pointer. 0 indicates success, which deviates from the fact. Return "AVERROR(ENOMEM)" instead of "0". Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-20compat/cuda: Pass a logging context to load functionsMark Thompson
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-18avcodec/nvenc: check pop_context return valueTimo Rothenpieler
2017-11-15nvenc: support d3d11 surface inputHendrik Leppkes
2017-11-15nvenc: factor context push/pop into functionsHendrik Leppkes
This reduces code repetition, and will allow adding further push/pop refinement for D3D11 devices in future commits.
2017-09-07avcodec/nvenc: sanitize variable namesTimo Rothenpieler
2017-09-07avcodec/nvenc: migrate to new encode APITimo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-02avcodec/nvenc: always output picture timing SEITimo Rothenpieler
Interlaced encoding profits from it, or might even need it in some players. No harm in enabling it unconditionally. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-01avcodec/nvenc: only push cuda context on encoder close if encoder existsTimo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-01avcodec/nvenc: add support for specifying entropy coding modeTimo Rothenpieler
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-06-02avcodec/nvenc: fix hw accelerated transcode with bframesGanapathy Kasi
hw accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was broken after the filtergraph initialization was changed to intialize decoder first followed by encoder (commit af1761f7b5b1b72197dc40934953b775c2d951cc). During initialzing encoder with bframes, local buffers are allocated internally in encoder which fails since no cuda context is available. Now pushing the correct cuda context before encoder initialization fixes the issue. Also adding push/pop cuda ctx during create/destroy/map/unmap resources and destroy encoder session. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-06-01avcodec/nvenc: print minimum driver version on errorTimo Rothenpieler
2017-05-23avcodec/nvenc: remove unnecessary alignmentTimo Rothenpieler
Fixes #6260
2017-05-10avcodec/nvenc: add weighted prediction supportSumit Agarwal
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-05-10avcodec/nvenc: add fractional CQ supportBen Chang
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-05-09avcodec/nvenc: deprecated old rc modes, add new onesTimo Rothenpieler
2017-05-09avcodec/nvenc: remove usage of deprecated fieldsTimo Rothenpieler
2017-05-07avcodec/nvenc: use frames hwctx when registering a frameTimo Rothenpieler
2017-05-07avcodec/nvenc: support external context in sw modeTimo Rothenpieler
2017-04-26avcodec/nvenc: surface allocation reductionBen Chang
This patch aims to reduce the number of input/output surfaces NVENC allocates per session. Previous default sets allocated surfaces to 32 (unless there is user specified param or lookahead involved). Having large number of surfaces consumes extra video memory (esp for higher resolution encoding). The patch changes the surfaces calculation for default, B-frames, lookahead scenario respectively. The other change involves surface selection. Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic). To prevent unused surfaces, changing surface rotation to using predefined fifo. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-03-23avcodec/nvenc: apply quantization factors to cqpTimo Rothenpieler
2017-03-23avcodec/nvenc: Deprecate usage of global_quality, introducing qpTimo Rothenpieler
2017-03-21lavc/nvenc: misc cosmetics to reduce diff with LibavClément Bœsch
2017-03-17avcodec/nvenc: allow different const-qps for I, P and B framesKonda Raju
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-03-01avcodec/nvenc: add initial QP value optionsKonda Raju
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-03-01avcodec/nvenc: remove qmin and qmax constraints for vbrGanapathy Raman Kasi
qmin and qmax are not necessary for nvenc vbr. Enforcing this constraint, doesn't allow user to use vbr 2 pass mode without explicity setting the qmin and qmax options Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-02-14avcodec/nvenc: push cuda context before encoding a frameTimo Rothenpieler
Thanks to Miroslav Slugeň for figuring out what was going on here.
2017-02-13avcodec/nvenc: set frame buffer format for mapped framesTimo Rothenpieler
2017-01-20avcodec/nvenc: add logging for more error casesTimo Rothenpieler