summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avfilter/vf_ssim: remove unnecessary checkLimin Wang2021-05-01
| | | | | | For the pointer have been checked in the previous few lines of code Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_scale: store the offset in a local variable before adding itJames Almer2021-04-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mjpegdec: fix SOF check in EOIJames Almer2021-04-30
| | | | | | | | | | | | For frames decoded with skip_frame == AVDISCARD_ALL, a picture is not allocated and got_picture is never set to 1 even if a SOF and SOS were parsed. The existing check in EOI only cares if a SOF was parsed, not if a picture allocated, so change it and add a new check to explicitly ensure a picture was allocated when skip_frame != AVDISCARD_ALL. Fixes probing and decoding when skip_frame is AVDISCARD_ALL. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/mem: Also poison new av_realloc-allocated blocksAndreas Rheinhardt2021-04-30
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/dump: Remove remnants of codec timebaseAndreas Rheinhardt2021-04-30
| | | | | | | Fixes Coverity issue #1477414. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: fix vulkan dep for libglslang based filtersJames Almer2021-04-29
| | | | | | Temporary fix until the filters are updated. Signed-off-by: James Almer <jamrial@gmail.com>
* configure: add -lvulkan to libglslang's lib flagsLynne2021-04-30
| | | | | | Since libavutil no longer links to libvulkan but libavfilter's Vulkan code wasn't ported yet to dynamically open the functions, do this temporarily.
* hwcontext_vulkan: dlopen libvulkanLynne2021-04-30
| | | | | | | | | | | | While Vulkan itself went more or less the way it was expected to go, libvulkan didn't quite solve all of the opengl loader issues. It's multi-vendor, yes, but unfortunately, the code is Google/Khronos QUALITY, so suffers from big static linking issues (static linking on anything but OSX is unsupported), has bugs, and due to the prefix system used, there are 3 or so ways to type out functions. Just solve all of those problems by dlopening it. We even have nice emulation for it on Windows.
* hwcontext_vulkan: dynamically load functionsLynne2021-04-30
| | | | This patch allows for alternative loader implementations.
* avutil/hwcontext_vulkan: fix format specifiers for some printed variablesJames Almer2021-04-29
| | | | | | | | | | VkPhysicalDeviceLimits.optimalBufferCopyRowPitchAlignment and VkPhysicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment are of type VkDeviceSize (a typedef uint64_t). VkPhysicalDeviceLimits.minMemoryMapAlignment is of type size_t. Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Lynne <dev@lynne.ee>
* fate: add adpcm_ima_ws test in a VQA v3 fileZane van Iperen2021-04-29
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* doc/filters: Documentation to add sess_config option for tensorflow backendLimin Wang2021-04-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_dataLimin Wang2021-04-29
| | | | | | | | please use tools/python/tf_sess_config.py to get the sess_config after that. note the byte order of session config is in normal order. bump the MICRO version for the config change. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/zmbvenc: Simplify setting keyframe flagAndreas Rheinhardt2021-04-29
| | | | | Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegtsenc: Fix indentation inside if-clause in mpegts_write_pes()zheng qian2021-04-28
| | | | | | | Fix indentation caused by the added stream_id check. Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other typeszheng qian2021-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PES packet definition defined in Table 2-17 of ISO_IEC_13818-1 specification, some fields like PTS/DTS or pes_extension could only appears if the stream_id meets the condition: if (stream_id != 0xBC && // program_stream_map stream_id != 0xBE && // padding_stream stream_id != 0xBF && // private_stream_2 stream_id != 0xF0 && // ECM stream_id != 0xF1 && // EMM stream_id != 0xFF && // program_stream_directory stream_id != 0xF2 && // DSMCC_stream stream_id != 0xF8) // ITU-T Rec. H.222.1 type E stream And the following stream_id types don't have fields like PTS/DTS: else if ( stream_id == program_stream_map || stream_id == private_stream_2 || stream_id == ECM || stream_id == EMM || stream_id == program_stream_directory || stream_id == DSMCC_stream || stream_id == ITU-T Rec. H.222.1 type E stream ) { for (i = 0; i < PES_packet_length; i++) { PES_packet_data_byte } } Current implementation skipped the check of stream_id causing some kind of streams like private_stream_2 to be incorrectly written with actually a private_stream_1-like PES header with PTS/DTS field. For example, Japan DTV transmits news and alerts through ARIB superimpose that utilizes private_stream_2 still could not be remuxed correctly for now. This patch set fixes the remuxing for private_stream_2 and other stream_id types. Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: Fix indentation for stream_id constantszheng qian2021-04-28
| | | | | Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: Add missing constants for MPEG-TS stream_id definitionszheng qian2021-04-28
| | | | | Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: factorize determining pes stream idMarton Balint2021-04-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwardsMarton Balint2021-04-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* hwcontext_vulkan: reorder structure fields and add spaces in betweenLynne2021-04-28
| | | | We're in the middle of an ABI unstable period, so we're allowed to.
* avcodec/flacenc: Remove always-true checkAndreas Rheinhardt2021-04-28
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove redundant freeing of extradata of encodersAndreas Rheinhardt2021-04-28
| | | | | | | | AVCodecContext.extradata is freed generically by libavcodec for encoders, so it is unnecessary for an encoder to do it on its own. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm_ima_apm: cosmeticsZane van Iperen2021-04-28
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ima_apm: remove old extradata formatZane van Iperen2021-04-28
| | | | | | | | | | | | Was added in error very early on, passing in only the required fields. Later, the muxer and demuxer were changed to pass the entire APMState struct as extradata. Technically a breaking change, but this was only around for a *very* short time before it was updated, Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/avcodec: Use avcodec_close() on avcodec_open2() failureAndreas Rheinhardt2021-04-28
| | | | | | | | | | | | | | | | | | | | | | Compared to the earlier behaviour the following changes: a) AVCodecInternal.byte_buffer is freed. b) The last_pkt_props FIFO is emptied before freeing it. c) If set AVCodecContext.hwaccel is uninitialized and its private data is freed; hw_frames_ctx and hw_device_ctx are also unreferenced. d) coded_side_data is freed. e) active_thread_type is reset. a), b), d) should be no-ops as the buffer/fifo should be empty and no coded_side_data should exist at any point of avcodec_open2(). e) is obviously not bad. c) is in accordance with the documentation of hw_(frames|device)_ctx which states that libacodec takes over ownership of these references. At least in the case of VC-1 it is possible for the hw acceleration to be set during init and in this case freeing it actually fixes a memleak. avcodec_close() needed only minor adjustments to make it work with a potentially not fully initialized codec. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Store whether AVCodec->close needs to be calledAndreas Rheinhardt2021-04-28
| | | | | | | | | | | | | | | Right now all AVCodecContexts except those using frame-threaded decoding call the codec's init function and expect its close function to be called. In order to make sure that the close function is not called for frame-threaded decoding ff_frame_thread_free() resets AVCodecContext.codec (and because of this it has to free the private AVOptions of the main AVCodecContext itself). This is not obvious and potentially fragile. Instead add a field to AVCodecInternal that indicates whether close should be called for this AVCodecContext. It is always zero when using frame-threaded decoding, so that resetting the codec is no longer necessary and has been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Free frame_thread_encoder on avcodec_open2() errorAndreas Rheinhardt2021-04-28
| | | | | | | | The frame_thread_encoder has so far not been freed in case an error happened in avcodec_open2() after ff_frame_thread_encoder_init(). This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Remove unnecessary forward declarationAndreas Rheinhardt2021-04-28
| | | | | | Forgotten in ba6cada92eb7c3446bfb1d4525031d405a052516. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Remove obsolete dependency of eatqi dec on rl.oAndreas Rheinhardt2021-04-28
| | | | | | | Unnecessary since 6e8fcd9c5624c1a89e49803de9e10562ace61b6a. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/packet_internal: move the next pointer in PacketList to the top of ↵James Almer2021-04-27
| | | | | | the struct Signed-off-by: James Almer <jamrial@gmail.com>
* doc/APIchanges: add hashes and version numbers for recent entriesJames Almer2021-04-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice: Constify all devicesAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Constify all AVFiltersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Bump major versions of all libraries.Anton Khirnov2021-04-27
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: postpone removal of deprecated libopenh264 wrapper optionsJames Almer2021-04-27
| | | | | | They were deprecated only a year ago Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: postpone removal of deprecated codec capsJames Almer2021-04-27
| | | | | | This was deprecated only a year ago Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/buffersrc: postpone removal of sws_paramJames Almer2021-04-27
| | | | | | It was depreacted less than two years ago Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated AVClass.child_class_nextJames Almer2021-04-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated AVStream.codecJames Almer2021-04-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Move all AVCodecParser.split functions to remove_extradata_bsfAndreas Rheinhardt2021-04-27
| | | | | | | The remove_extradata bsf is the only user of these functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Constify all the AVCodecParsersAndreas Rheinhardt2021-04-27
| | | | | | | Possible now that the next pointer no longer exists. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Constify AVCodecParserContext.parserAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/avdevice: Constify av_*_device_next APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/avdevice: Constify avdevice_list_input_sources/output_sinksAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat, utils: Make av_find_best_stream const-correctAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/codec, allcodecs: Constify the AVCodec APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: Constify AVFormatContext.*_codec pointersAndreas Rheinhardt2021-04-27
| | | | | | | | This also allows to exclusively use pointers to const AVCodec in fftools/ffmpeg_opt.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>