summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vaapi_encode_h265: Fix ordering of tile dimensionsMark Thompson2020-08-01
| | | | | | | Dimensions are normally specified as width x height, and this will match the same option to libaom-av1. Remove the indirection through the private context at the same time.
* vaapi_encode_h265: Remove confusing and redundant tile optionsMark Thompson2020-08-01
| | | | | | | The tile_rows/cols options currently do a confusingly different thing to the options of the same name on other encoders like libvpx and libaom. There is no backward-compatibility reason to implement the log2 behaviour as there was for libaom, so just get rid of them entirely.
* libsvtav1: Fix the documentation to match the actual optionsMark Thompson2020-07-31
|
* libsvtav1: Use _ rather than - in optionsMark Thompson2020-07-31
|
* libsvtav1: Rename without a _Mark Thompson2020-07-31
| | | | The external library is called libsvtav1, so use this name everywhere.
* tests/imgutils: test the output of av_image_fill_* functionsJames Almer2020-07-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/apm: fix APM_FILE_HEADER_SIZE valueZane van Iperen2020-07-30
| | | | | | Value was incorrectly changed in 3bf1be210150b435c51c7c8eb8fd05a1fca08814. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/options_table: make AVCodecContext->level search for child constantsJames Almer2020-07-29
| | | | | | | | | | This change makes it possible for child encoders to define custom level option names which can be used for setting the AVCodecContext->level. Based on 337fe4bcc2 Reviewed-by: jkqxz Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/pgxdec Fix pix format selection errorGautam Ramakrishnan2020-07-30
| | | | | | | | This patch makes the pgx decoder select the correct byte order instead of selecting big endian format for 16 bit images. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/j2kenc: Encoding up to 16 bitsGautam Ramakrishnan2020-07-30
| | | | | | | This patch allows the JPEG2000 encoder to encode images to up to 16 bits. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: Fix segfault in imdct36_mips_float.Shiyou Yin2020-07-30
| | | | | | | 'li.s' is a synthesized instruction, it does not work properly when compiled with clang on mips, and A segfault occurred. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/cabac: Fix a bug in get_cabac_inline_mips.Shiyou Yin2020-07-30
| | | | | | | Failed fate case: fate-h264-conformance-caba2_sony_e Clang is more strict in the use of register constraint. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/mips/generic_macros_msa: Fix prob that 'ulw' and 'uld' unsupported by ↵Shiyou Yin2020-07-30
| | | | | | | | | clang. GCC support these two synthesized instruction, but clang does not yet. Use machine instruction instead to adapt clang compiler. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: Fix register constraint error reported by clang.Shiyou Yin2020-07-30
| | | | | | | | | Clang report following error in aacsbr_mips.c,ac3dsp_mips.c and aacdec_mips.c: "couldn't allocate output register for constraint 'r'" Use 'f' constraint for float variable. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: increase initial program date time precisionMarton Balint2020-07-29
| | | | | | | | | Also query time only once, not for every variant stream, otherwise variant streams might get a slightly different initial program date time. And we can set this unconditionally because HLS_PROGRAM_DATE_TIME flag is checked elsewhere. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg: make specifying thread_queue_size turn on threaded inputMarton Balint2020-07-29
| | | | | | | | Threaded input can increase smoothness of e.g. x11grab significantly. Before this patch, in order to activate threaded input the user had to specify a "dummy" additional input, with this change it is no longer required. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/libsvt_av1: remove forced-idr optionLynne2020-07-29
| | | | | | | | | | This option is directly copy-pasted from the SVT1-HEVC wrapper and has no place in the options for an AV1 encoder. AV1 has no H.264/5 IDR frames nor anything like them. All this option does is change all real keyframes to an intra-only AV1 frame, which is not seekable. Hence, any streams encoded with this option enabled will not be seekable.
* avcodec: Add an SVT-AV1 encoder wrapperDaryl Seah2020-07-29
| | | | | | | | | Signed-off-by: Daryl Seah <daryl.seah@intel.com> Signed-off-by: Jing SUN <jing.a.sun@intel.com> Signed-off-by: ZhiZhen Tang <zhizhen.tang@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cavsdec, h264*, hevc_parser: Use get_ue_golomb_31 where possibleAndreas Rheinhardt2020-07-29
| | | | | | | | | | instead of get_ue_golomb(). The difference between the two is that the latter also has to take into account the case in which the read code is more than 9 bits (four preceding zeroes + at most five value bits) long, leading to more code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/golomb: Document return value of get_ue_golomb_31 on errorAndreas Rheinhardt2020-07-29
| | | | | | | | | | | | | | | | | | | | | | | | get_ue_golomb_31() reads nine bits and an array with 512 entries to parse golomb codes. The longest golomb codes that fit into 9 bits use four leading zeroes and five value bits and can encode numbers in the 0..30 range. 31 meanwhile is encoded on 11 bits and if the nine bits read coincide with the first nine bits of the encoding of 31, get_ue_golomb_31() returns 31 (and skips 11 bits). But looking at the first nine bits only makes it impossible to distinguish 31 from 32..34. Therefore the documentation of get_ue_golomb_31() simply states that the return value is undefined if the value of the encountered exp golomb code was outside the 0..31 range. But actually get_ue_golomb_31() does not behave that bad: If the returned value is in the range of 0..30, then this is the actually encountered value, so that this function can be used without any problems to parse and validate parameters whose legal values are a subset of the 0..30 range. This commit documents this fact. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/golomb: Prevent shift by negative numberAndreas Rheinhardt2020-07-29
| | | | | | | | | | | | | This happened in get_ue_golomb() if the cached bitstream reader was in use, because there was no check to handle the case of the read value not being in the supported range. For consistency with the uncached bitstream reader and for compliance with the documentation, every value not in the 0-8190 range is treated as error although the cached bitstream reader could actually read values in the range 0..65534 without problems. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavcodec/jpeg2000dec: Support for PPM markerGautam Ramakrishnan2020-07-28
| | | | | | | | This patch adds support for PPM marker for JPEG2000 decoder. It allows the samples p1_03.j2k and p1_05.j2k to be decoded. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Move reslevelno check before use in case JPEG2000_PGOD_RPCLMichael Niedermayer2020-07-28
| | | | | | | | | | Fixes: division by zero Fixes: 24201/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5665813827420160 Fixes: 24245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6285831682392064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Gautam Ramakrishnan <gautamramk@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/libxavs2.c: mark key-frame packetshwren2020-07-28
| | | | | Signed-off-by: hwren <hwrenx@126.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvenc: fix B-Ref-Mode support check for recent HEVCTimo Rothenpieler2020-07-28
|
* avcodec/golomb: Don't emit error message in get_ue_golombAndreas Rheinhardt2020-07-28
| | | | | | | | | Said error message is not very informative and lacked a proper logging context; furthermore, many callers already provided more descriptive error messages of their own. So just drop this one. Suggested-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/smacker: Don't return packets for streams with AVDISCARD_ALLAndreas Rheinhardt2020-07-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/smacker: Fix duration for PCM audioAndreas Rheinhardt2020-07-28
| | | | | | | | | | | | For non-PCM audio, a Smacker frame contains the size of the decoded audio in the first four bytes of the audio packet data; for PCM data, said information would be redundant and according to [1] this field does not exist. Therefore this commit sets the duration and timestamps properly for PCM audio. [1]: https://wiki.multimedia.cx/index.php/Smacker#Audio_Track_Chunk Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/smacker: Set audio durationAndreas Rheinhardt2020-07-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/smacker: Support seeking to first frameTimotej Lazar2020-07-28
| | | | | | | | | Add .read_seek function to the smacker demuxer for the special case of seeking to ts=0. This is useful because smacker – like bink, with a similar implementation – was mostly used to encode clips in video games, where random seeks are rare but looping media are common. Signed-off-by: Timotej Lazar <timotej.lazar@araneo.si>
* lavf/srt: fix build fail when used the libsrt 1.4.1Jun Zhao2020-07-28
| | | | | | | | | | | | libsrt changed the: SRTO_SMOOTHER -> SRTO_CONGESTION SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC) in the header, it's lead to build fail fix #8760 Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* Revert "lavc/vaapi_encode: add EQUAL_MULTI_ROWS support for slice structure"Mark Thompson2020-07-27
| | | | | | | | | | | This reverts commit 489c5db0791f39518775b12eef6d48276c17f96f. Treating EQUAL_MULTI_ROWS in the same way as the arbitrary-size cases is just wrong. Consider 9 rows, 4 slices - we pick 4 slices with sizes { 3, 2, 2, 2 }, which EQUAL_MULTI_ROWS does not allow. It isn't possible to split the frame into 4 slices at all with the EQUAL_MULTI_ROWS structure - the closest options are 3 slices with sizes { 3, 3, 3 } or 5 slices with sizes { 2, 2, 2, 2, 1 }.
* hwcontext_vaapi: remove duplicate formats from sw_format listHaihao Xiang2020-07-27
| | | | | | | | | | | | | | | | | | | | | | hwcontext_vaapi maps different VA fourcc to the same pix_fmt for U/V plane swap cases, however duplicate formats are not expected in sw_format list when merging formats. For example: ffmpeg -loglevel debug -init_hw_device vaapi -filter_hw_device vaapi0 \ -f lavfi -i smptebars -vf \ "hwupload=derive_device=vaapi,scale_vaapi,hwdownload,format=yuv420p" \ -vframes 1 -f null - Without this fix, an auto scaler is required for the above command Duplicate formats in ff_merge_formats detected [auto_scaler_0 @ 0x560df58f4550] Setting 'flags' to value 'bicubic' [auto_scaler_0 @ 0x560df58f4550] w:iw h:ih flags:'bicubic' interl:0 [Parsed_hwupload_0 @ 0x560df58f0ec0] auto-inserting filter 'auto_scaler_0' between the filter 'graph 0 input from stream 0:0' and the filter 'Parsed_hwupload_0' Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* hwcontext_vaapi: avoid fd leak in vaapi_device_deriveHaihao Xiang2020-07-27
|
* avutil/imgutils: always zero data pointers in av_image_fill_pointers()James Almer2020-07-26
| | | | | | | This restores the relevant behavior of the function as it was before 3a8e927176. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/imgutils: don't fill data pointers for missing planesJames Almer2020-07-26
| | | | | | | | | | | The size for a previous plane doesn't signal the presence of another after it. If the plane is present, av_image_fill_plane_sizes() will have returned a size for it. Fixes a regression since 3a8e927176. Reported-by: Imad R. Faiad <irfaiad@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ape: Error out in case of EOF in the headerMichael Niedermayer2020-07-26
| | | | | | | | Fixes: OOM Fixes: 24375/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6216862443241472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/segafilmenc: Avoid seek when writing headerAndreas Rheinhardt2020-07-26
| | | | | | | | | | | | | | | | | | Up until now, the Sega FILM muxer would first write all the packet data, then shift the data (in the muxer's write_trailer function) by the amount necessary to write the header at the front (which entails a seek to the front), then seek back to the beginning and actually write the header. This commit changes this: The dynamic buffer that is used to write the sample table (containing information about each sample in the file) is now used to write the complete header. This is possible because the size of everything in the header except the sample table is known in advance. Said buffer can then be used as one of the two temporary buffers used for shifting which also reduces the amount one has to allocate for this. Thereby the header will be written when shifting, so that the second seek to the beginning is unnecessary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segafilmenc: Don't store packet info in linked listAndreas Rheinhardt2020-07-26
| | | | | | | | | | | | | | | | | Up until now, the Sega FILM muxer would store some information about each packet in a linked list. When writing the trailer, the information in said linked list would be used to write a table in the file header. Each entry in said table is 16 bytes long, but each entry of the linked list is 32 bytes long (assuming 64 bit pointer and no padding). Therefore it makes sense to remove the linked list and write the array entries directly into a dynamic buffer while writing the packet (this is possible because the table entries don't depend on any information not available when writing the packet (the offset is not relative to the beginning of the file, but to the end of the table). This also simplifies writing the array at the end (there is no need to traverse a linked list). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segafilmenc: Simplify writing two bytesAndreas Rheinhardt2020-07-26
| | | | | | Use avio_wb16() instead of avio_write() to write two zero bytes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segafilmenc: Remove write-only variableAndreas Rheinhardt2020-07-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segafilm: Reorder elements of struct to make it smallerAndreas Rheinhardt2020-07-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/daudenc: Return proper error codes instead if -1Andreas Rheinhardt2020-07-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/daudenc: Turn write_header function into init functionAndreas Rheinhardt2020-07-26
| | | | | | daud_write_header() doesn't write anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: CosmeticsAndreas Rheinhardt2020-07-26
| | | | | | | | | Mostly using intermediate pointers for accesses (i.e. storing s->pb in a variable pb and then using pb for writing instead of s->pb) to improve readability. Furthermore, the opening brace '{' of a function has been moved into a line of its own in instances where it wasn't before. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Only check for existence of metadata if it is usedAndreas Rheinhardt2020-07-26
| | | | | | | Also return proper error codes when it is absent: AVERROR(EINVAL) instead of AVERROR_INVALIDDATA. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Avoid allocations, fix memleakAndreas Rheinhardt2020-07-26
| | | | | | | | | | | | | | | | | | | When using the WebM DASH Manifest muxer, every stream of each adaptation set has to contain a metadata entry containing the filename of the source file. In case of live stream manifests, said filename has to conform to a pattern of <file_description>_<representation_id>.<extension>. These pieces are used to create the other strings that are actually output. Up until now, these other strings would be allocated, used once and then freed directly after usage. This commit changes this: The function that allocated and assembled these strings now returns pointers to the '_' and '.' delimiters and so that the caller can easily pick substrings from it without needing to copy the string. Avoiding allocations also fixes a memleak: One of the allocated strings would leak upon a subsequent allocation failure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Fix segfault when no filename is given when liveAndreas Rheinhardt2020-07-26
| | | | | | by checking a bit earlier. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/riffenc: correct calculation for extradata sizeGyan Doshi2020-07-26
| | | | | | In 1ec2b3de5a, the extradata size was affected when the raster was signaled as flipped due to user-set option rather than via extradata. This resulted in a wrong header size being written. Fixed.
* swscale/yuv2rgb: cosmeticsLimin Wang2020-07-25
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>