summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libvpxenc: Support targeting a VP9 levelAlex Converse2016-11-221-0/+10
| | | | Levels are specified at https://www.webmproject.org/vp9/levels/
* avcodec/cuvid: Add support for P010/P016 as an output surface formatPhilip Langdale2016-11-223-18/+60
| | | | | | | | | | | | | | | | | The nvidia 375.xx driver introduces support for P016 output surfaces, for 10bit and 12bit HEVC content (it's also the first driver to support hardware decoding of 12bit content). The cuvid api, as far as I can tell, only declares one output format that they appear to refer to as P016 in the driver strings. Of course, 10bit content in P016 is identical to P010, and it is useful for compatibility purposes to declare the format to be P010 to work with other components that only know how to consume P010 (and to avoid triggering swscale conversions that are lossy when they shouldn't be). For simplicity, this change does not maintain the previous ability to output dithered NV12 for 10/12 bit input video - the user will need to update their driver to decode such videos.
* libavutil/hwcontext_cuda: Support P010 and P016 formatsPhilip Langdale2016-11-222-2/+15
| | | | | CUVID is now capable of returning 10bit and 12bit decoded content in P010/P016. Let's support transfering those formats.
* avutil: add P016 pixel formatPhilip Langdale2016-11-223-2/+30
| | | | | | | | | P016 is the 16-bit variant of NV12 (planar luma, packed chroma), using two bytes per component. It may, and in fact is most likely to, be used in situations where there are less than 16 bits of data. It is the responsibility of the writer to zero out any unused LSBs.
* avcodec/libx264: fix forced_idr logicTimo Rothenpieler2016-11-221-3/+3
| | | | | | | | Currently, it forces IDR frames for both true and false. Not entirely sure what the original idea behind the tri-state bool option is. Reviewed-by: Derek Buitenhuis <[email protected]>
* avcodec/cuvid: allow setting number of used surfacesMiroslav Slugen2016-11-221-8/+8
| | | | Signed-off-by: Timo Rothenpieler <[email protected]>
* avcodec/nvenc: better surface allocation alghoritm, fix rc_lookaheadMiroslav Slugeň2016-11-221-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User selectable surfaces are not working correctly, if you set number of surfaces on cmdline, it will always use minimum 32 or 48 depends on selected resolution, but in nvenc it is not necessary to use so many surfaces. So from now you can define as low as 1 surface and nvenc will still work, it will ofcourse lower GPU memory usage by 95% and async_delay to zero That was the easy part, now littlebit more... Next part of this patch is to always prefer rc_lookahead to be more important for number of surfaces, than user defined surfaces value. Maximum rc_lookahead from nvidia documentation is 32, but could increase in future generations so there is no limit for this yet. Value async_depth is still accepted and prefered over rc_lookahead. There were also bug when you request more than rc_lookahead > 31, it will always set maximum 31, because surface numbers recalculation was after setting lookahead, which is now fixed. Results: If you set -rc_lookahead 32 and -bf 3 it will now use only 40 surfaces and lower GPU memory usage by 20%, also it will now increase PSNR by 0.012dB Two more comments: 1. from my internal test, i don't understand addition of 4 more surfaces when lookahead is calculated, i didn't used this and everything works as with those 4 more extra surfaces, does anybody know what is going on there? I looks like it was used for B frames which are calculated separately, because B frames maximum is 4. 2. rc_lookahead is defined default to -1, but in test condition if (ctx->rc_lookahead) which sets lookahead it will be always true, i don't know if this is intended behavior, so in default behavior is lookahead always on! This is default condition when rc_lokkahead is -1 (not defined on cmdline), whis is maybe something that is not intended: ctx->encode_config.rcParams.enableLookahead = 1; ctx->encode_config.rcParams.lookaheadDepth = 0; ctx->encode_config.rcParams.disableIadapt = 0; ctx->encode_config.rcParams.disableBadapt = 0; Signed-off-by: Timo Rothenpieler <[email protected]>
* avcodec/nvenc: maximum usable surfaces are limited to maximum registered framesMiroslav Slugeň2016-11-222-2/+2
| | | | | | | Maximum usable surfaces is limited to MAX_REGISTERED_FRAMES constant in nvenc.h Signed-off-by: Timo Rothenpieler <[email protected]>
* configure: cuda is no longer nonfree, enable and autodetect by defaultTimo Rothenpieler2016-11-221-18/+6
|
* avfilter/vf_hwupload_cuda: check ff_formats_ref for errorsTimo Rothenpieler2016-11-221-2/+9
|
* avfilter/vf_hwupload_cuda: use new hwdevice allocation APITimo Rothenpieler2016-11-221-52/+5
|
* avcodec/nvenc: use dynamically loaded CUDATimo Rothenpieler2016-11-223-146/+26
|
* avfilter/vf_scale_npp: use dynamically loaded CUDATimo Rothenpieler2016-11-221-3/+3
|
* avcodec/cuvid: use dynamically loaded CUDA/CUVIDTimo Rothenpieler2016-11-223-1180/+48
| | | | And remove the now obsolete compat headers.
* avutil/hwcontext_cuda: use dynamically loaded CUDATimo Rothenpieler2016-11-225-25/+120
|
* compat/cuda: add dynamic loaderTimo Rothenpieler2016-11-224-0/+1475
|
* avformat/flvenc: add no_metadata to flvflagsSteven Liu2016-11-222-1/+10
| | | | | | | some flv have no metadata, ffmpeg will same with the source flv stream. Signed-off-by: Steven Liu <[email protected]>
* avformat/utils: add missing brackets around arguments in av_realloc() callJames Almer2016-11-211-1/+1
| | | | | Found-by: Neil Birkbeck <[email protected]> Signed-off-by: James Almer <[email protected]>
* vaapi_encode: Fix format specifier for bitrate loggingMark Thompson2016-11-212-2/+2
| | | | | Same as e0df56f25d09b14f5315799338be246806c46806. This was accidentally reintroduced while merging c8241e730f116f1c9cfc0b34110aa7f052e05332.
* lavc/vaapi_encode_h264: fix poc incorrect issue after meeting idr frame.Jun Zhao2016-11-211-5/+7
| | | | | | | | | | | when meeting IDR frame, vaapi_encode_h264 poc number don't reset, now fix this issue based on h264 spec. Some decoder don't care this case, but this fix will enhance the encoder action. Before this fix, poc number is negative in some case. Reviewed-by: Jun Zhao <[email protected]> Signed-off-by: Wang, Yi A <[email protected]> Signed-off-by: Mark Thompson <[email protected]>
* vaapi_h265: Fix buffering parametersMark Thompson2016-11-211-4/+4
| | | | | | | A decoder may need this to be set correctly to output frames in the right order. (cherry picked from commit b8cac1e83066aa87e8402c146c81b77a11b5eec3)
* vaapi_h265: Fix slice header writingMark Thompson2016-11-211-58/+58
| | | | | | | | | | | | | This was not observed earlier because the only syntax element which it normally misses with the current setup is slice_qp_delta, but that is always going to be zero (in IDR frames QP isn't varied on the slice) which will always exp-golomb code as a single 1 bit. The immediately following part is the byte alignment, which is always a 1 bit followed by 0s which are ignored, so as long as the bitstream is never aligned at that point we will never notice because the only difference is that an ignored bit is a 1 instead of a 0. (cherry picked from commit fc30a90898e419cee7c7cb496976da6337d0bf3e)
* vaapi_h264: Write bitstream restriction fieldsMark Thompson2016-11-211-2/+23
| | | | (cherry picked from commit ec17ab381ede4f31c4bdd2767d8f62d24aaf430a)
* vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContextMark Thompson2016-11-211-2/+2
| | | | (cherry picked from commit 17a0f9481cf07af0feb3838ca315b970117e8000)
* vaapi_encode: Decide on GOP setup before initialising sequence parametersMark Thompson2016-11-211-6/+6
| | | | | | | This was always too late; several fields related to it have been incorrectly zero since the encoder was added. (cherry picked from commit 314b421dd8910ebed7a8d419a0dbea239a00044e)
* vaapi_h264: Set max_num_ref_frames to 1 when not using B framesMark Thompson2016-11-211-1/+1
| | | | (cherry picked from commit 956a54129db522998a5abae869568dae2c9774cb)
* vaapi_encode: Sync to input surface rather than outputMark Thompson2016-11-211-3/+3
| | | | | | | | | | | While outwardly bizarre, this change makes the behaviour consistent with other VAAPI encoders which sync to the encode /input/ picture in order to wait for /output/ from the encoder. It is not harmful on i965 (because synchronisation already happens in vaRenderPicture(), so it has no effect there), and it allows the encoder to work on mesa/gallium which assumes this behaviour. (cherry picked from commit 086e4b58b59ea3993107aa24d92bb962ec69667c)
* vaapi_encode: Check packed header capabilitiesMark Thompson2016-11-215-7/+54
| | | | | | | This improves behaviour with drivers which do not support packed headers, such as AMD VCE on mesa/gallium. (cherry picked from commit 892bbbcdc171ff0d08d69636a240ffb95f54243c)
* vaapi_encode: Refactor initialisationMark Thompson2016-11-215-445/+420
| | | | | | | | | | This allows better checking of capabilities and will make it easier to add more functionality later. It also commonises some duplicated code around rate control setup and adds more comments explaining the internals. (cherry picked from commit 80a5d05108cb218e8cd2e25c6621a3bfef0a832e)
* vaapi_h264: Fix HRD bit_rate/cpb_size scalingMark Thompson2016-11-211-4/+4
| | | | | | | There should be an extra offset of 6 on bit_rate_scale and of 4 on cpb_size_scale which were not accounted for here. (cherry picked from commit 3a9662af6c741f8354b1ca97642f78f5c02e2e8f)
* avformat/movenc: Restrict experimental VP9 support to MODE_MP4.Matthew Gregan2016-11-211-2/+5
| | | | | Signed-off-by: Matthew Gregan <[email protected]> Signed-off-by: James Almer <[email protected]>
* Add experimental demuxing support for FLAC in ISO BMFF (MP4).Matthew Gregan2016-11-211-0/+39
| | | | | | | Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt Signed-off-by: Matthew Gregan <[email protected]> Signed-off-by: James Almer <[email protected]>
* Add experimental muxing support for FLAC in ISO BMFF (MP4).Matthew Gregan2016-11-212-3/+48
| | | | | | | | | Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt '-strict experimental' is required to create files in this format. Signed-off-by: Matthew Gregan <[email protected]> Signed-off-by: James Almer <[email protected]>
* MAINTAINERS: add myself as an API tests maintainerLudmila Glinskih2016-11-211-0/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* ffplay: allow fallback to software rendererMarton Balint2016-11-201-0/+4
| | | | Signed-off-by: Marton Balint <[email protected]>
* ffplay: add support for negative RGBA linesizeMarton Balint2016-11-201-2/+12
| | | | | | This fixes the crash reported in ticket #5947. Signed-off-by: Marton Balint <[email protected]>
* avformat/matroskaenc: write updated STREAMINFO metadata for FLAC streams if ↵James Almer2016-11-201-0/+52
| | | | | | | | | | | available FLAC streams originating from the FLAC encoder send updated and more complete STREAMINFO metadata as part of the last packet, so write that to CodecPrivate instead of the incomplete one available in extradata during init. Signed-off-by: James Almer <[email protected]>
* avformat/matroskaenc: postpone writing the Tracks masterJames Almer2016-11-201-5/+15
| | | | | | | This will allow us to write updated stream information not available during write_header(). Signed-off-by: James Almer <[email protected]>
* avutil/opt: Fix setting int64 to its maximumMichael Niedermayer2016-11-201-3/+7
| | | | | | Found-by: Andreas Reviewed-by: Andreas Cadhalpun <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* lavc/ffv1: Support YUV4xxP12 and GRAY12.Carl Eugen Hoyos2016-11-203-3/+17
|
* ffmdec: validate codec parametersAndreas Cadhalpun2016-11-201-10/+42
| | | | | | | | A negative extradata size for example gets passed to memcpy in avcodec_parameters_from_context causing a segmentation fault. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* swscale/options: Use AV_OPT_TYPE_PIXEL_FMTMichael Niedermayer2016-11-201-2/+2
| | | | | Found-by: Andreas Cadhalpun <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/avpacket: fix leak on realloc in av_packet_add_side_data()James Almer2016-11-191-3/+4
| | | | | | | | | If realloc fails, the pointer is overwritten and the previously allocated buffer is leaked, which goes against the expected behavior of keeping the packet unchanged in case of error. Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/utils: check for overflow before reallocating side dataJames Almer2016-11-191-1/+4
| | | | | | | This makes av_stream_add_side_data() consistent with av_packet_add_side_data(). Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/matroska: use av_stream_add_side_data() for stereo3d side dataJames Almer2016-11-191-14/+8
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/mov: reuse existing err variableJames Almer2016-11-191-5/+3
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mov: use av_stream_add_side_data() for displaymatrix side dataJames Almer2016-11-181-12/+5
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/utils: add av_stream_add_side_data()James Almer2016-11-184-10/+42
| | | | | | | | Functionally similar to av_packet_add_side_data(). Allows the use of an already allocated buffer as stream side data. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/flvdec: add debug message to list keyframes index metadataSteven Liu2016-11-191-0/+2
| | | | | | | when parsing keyframe index metadata, list the message by trace log Signed-off-by: Steven Liu <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* options_table: limit codec parameters to sane valuesAndreas Cadhalpun2016-11-181-6/+6
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>