summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/codec2utils: remove avpriv prefix from inline functionsJames Almer2020-10-28
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1dec: fix loading PrevGmParams for frames with primary_ref_frame noneJames Almer2020-10-28
| | | | | Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1dec: don't derive loop filter delta parametersJames Almer2020-10-28
| | | | | | This is now handled by CBS. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: infer segmentation parameters from reference framesJames Almer2020-10-28
| | | | | | | | | Partially implements setup_past_independence() and load_previous(). These ensures they are always set, even if the values were not coded in the input bitstream and will not be coded in the output bitstream. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: infer loop filter delta parameters from reference framesJames Almer2020-10-28
| | | | | | | | | Partially implements setup_past_independence() and load_previous(). These ensures they are always set, even if the values were not coded in the input bitstream and will not be coded in the output bitstream. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* lavf: move AVStream.last_in_packet_buffer to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.probe_data to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.pts_buffer to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.*index_entries* to AVStreamInternalAnton Khirnov2020-10-28
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Since there are some (semi-)public fields located after these, even though this section is supposed to be private, keep some dummy padding there until the next major bump to preserve ABI compatibility.
* lavf: move AVStream.interleaver_chunk_* to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{request_probe,skip_to_keyframe} to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{*skip_samples.*_discard_sample} to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{nb_decoded_frames,mux_ts_offset} to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{pts_wrap_*,update_initial_durations_done} to ↵Anton Khirnov2020-10-28
| | | | | | | AVStreamInternal Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.pts_reorder_error[_count] to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{last_dts_for_order_check,dts_[mis]ordered} to ↵Anton Khirnov2020-10-28
| | | | | | | AVStreamInternal Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.{inject_global_side_data,display_aspect_ratio} to ↵Anton Khirnov2020-10-28
| | | | | | | AVStreamInternal Those are private fields, no reason to have them exposed in a public header.
* lavf: move AVStream.info to AVStreamInternalAnton Khirnov2020-10-28
| | | | | | | This struct is for internal use of avformat_find_stream_info(), so it should not be exposed in public headers. Keep a stub pointer in its place to avoid changing AVStream layout, since e.g. ffmpeg.c accesses some fields located after it (even though they are marked as private).
* ffmpeg.c: stop accessing private AVStream.codec_info_nb_framesAnton Khirnov2020-10-28
| | | | | Use AVSTREAM_EVENT_FLAG_NEW_PACKETS instead, which should provide the same information in this case.
* avformat: add a stream event flag for new packetsAnton Khirnov2020-10-28
|
* ffmpeg.c: rename 'area' to 'score'Anton Khirnov2020-10-28
| | | | | Other factors besides area are used to pick the best video stream, so the name 'area' is misleading.
* avformat: extend documentation of event_flagsAnton Khirnov2020-10-28
| | | | | Document how it is to be used for muxing (currently supported by flvenc).
* avformat: fix typo in doxyAnton Khirnov2020-10-28
| | | | av_read_frame() reads new packets, av_read_packet() does not exist.
* lavc: un-avpriv avpriv_bprint_to_extradata()Anton Khirnov2020-10-28
| | | | | | It has not been used outside of lavc since 6f69f7a8bf6. Also, move it to the only place where it is used.
* put_bits: make avpriv_copy_bits() lavc-localAnton Khirnov2020-10-28
| | | | | It is not used outside of lavc anymore. Keep the avpriv exported symbol around until the next bump to preserve ABI compatibility.
* put_bits: make avpriv_put_string() lavc-localAnton Khirnov2020-10-28
| | | | | It has not been used outside of libavcodec since 20f325f320c6e18ee88983870d2a1fee94257293
* put_bits: make avpriv_align_put_bits() inlineAnton Khirnov2020-10-28
| | | | | | | | | This function is so extremely simple that it is preferable to make it inline rather than deal with all the complications arising from it being an exported symbol. Keep avpriv_align_put_bits() around until the next major bump to preserve ABI compatibility.
* lavf/latmenc: use a local simplified copy of avpriv_copy_bits()Anton Khirnov2020-10-28
| | | | | This is the only place in lavf where avpriv_copy_bits() is used, so this allows us to make avpriv_copy_bits() lavc-local.
* lavf/latmenc: fix units mismatchAnton Khirnov2020-10-28
| | | | | | avpriv_copy_bits() takes the size in bits, not bytes. According to a736eb4a605f46d5ff96c7b32e55710ecd9cce89, nobody is quite sure whether this code produces working files.
* rtsp: increase the control uri sizeYigit Uyan2020-10-28
| | | | | | Current browsers support up to 2k characters. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/bitstream: Stop allocating one VLCcode more than neededAndreas Rheinhardt2020-10-28
| | | | | | | | | Allocating one temporary entry more than needed was made necessary by the COPY loop below writing an element before having checked that it should be written at all. But given that this behaviour changed, the need for overallocating is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/bitstream: Check code length before truncating to uint8_tAndreas Rheinhardt2020-10-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hevcdec: constrained intra predict, do not check top left IS_INTRA ↵Xu Guangxin2020-10-28
| | | | | | | | | | | | | | if it's not available fix ticket: 8932 For poc 2, we have tile boundary at x = 640. When we predict cu(640,912),the top left pixel is not avaliable to the cu. So, we can not check it's intra or not. We need set top[-1] = top[0] directly. see 8.4.4.2.1 for details Signed-off-by: Xu Guangxin <oddstone@gmail.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avfilter/vf_normalize: fix regression with white/black point calculationPaul B Mahol2020-10-27
|
* avcodec/webp: Replace never-true check by assertAndreas Rheinhardt2020-10-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/webp: Return directly when creating Huff table failsAndreas Rheinhardt2020-10-27
| | | | | | | Neither the auxiliary VLC table nor the code_lengths array need to be freed if creating the auxiliary VLC table fails. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/webp: Use uint8_t for code lengthsAndreas Rheinhardt2020-10-27
| | | | | | | | | | They are always in the range 0..15, so using an int is not necessary. Furthermore, using an int would not work if sizeof(int) != 4 as ff_init_vlc_sparse() can only handle uint8_t, uint16_t and uint32_t lengths. Reviewed-by: zhilizhao(赵志立) <quinkblack@foxmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegtsenc: make first_pcr sync with the first valid dtsLimin Wang2020-10-27
| | | | | | | | | | | | | now first_pts assume dts will start from zero, if it's not true(copyts is enable), too many null packet will be inserted for cbr output. Please test with below command, you'll get huge test.ts without the patch: ./ffmpeg -y -copyts -i ../fate-suite/mpegts/loewe.ts -c:v libx264 -x264opts \ nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize \ 1000k -c:a mp2 -muxrate 4500k -vframes 1000 test.ts Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegtsenc: use total_size instead of avio_tell()Limin Wang2020-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avio_tell() fails to get the amount of data written so far when the underlying IO context is flushed to segments. Please test with below command: $ ./ffmpeg -f lavfi -i testsrc=duration=100:size=vga -c:v libx264 -x264opts \ nal-hrd=cbr:force-cfr=1 -b:v 500k -minrate 500k -maxrate 500k -bufsize 500k \ -f hls -hls_time 10 -hls_ts_options "muxrate=2000000" test%d.ts $ du -h test*.ts Before: 2.4M test00.ts 4.8M test11.ts 7.2M test22.ts 9.6M test33.ts 12M test44.ts ... After apply the patch: 2.4M test00.ts 2.4M test11.ts 2.4M test22.ts 2.4M test33.ts 2.4M test44.ts ... Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/bitstream: Consistently treat symbol as VLC_TYPEAndreas Rheinhardt2020-10-27
| | | | | | | | | | | | | If a static VLC table gets initialized a second time (or concurrently by two threads) and if said VLC table uses symbols that have the sign bit of VLC_TYPE (a typedef for int16_t) set, initializing the VLC fails. The reason is that the type of the symbol in the temporary array is an uint16_t and so comparing it to the symbol read from the VLC table will fail, because only the lower 16bits coincide. Said failure triggers an assert. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4videodec: Don't check for errors for complete VLCsAndreas Rheinhardt2020-10-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3plus: Perform reusing of VLCs during initAndreas Rheinhardt2020-10-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3: Use least max_depth for get_vlc2()Andreas Rheinhardt2020-10-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3: Inline constantsAndreas Rheinhardt2020-10-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3: Don't use too big VLC tablesAndreas Rheinhardt2020-10-27
| | | | | | | | | The longest code of any of the VLC tables used is eight bits long, so using nine bits long VLC tables is wasteful. Furthermore, there are only seven VLC tables used, yet the code up until now made it look like there should be eight. This has been corrected, too. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/av1dec: Check for unset obu instead of crashingMichael Niedermayer2020-10-26
| | | | | | | | | Fixes: NULL pointer dereference Fixes: 26550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5417762807349248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dirac_parser: do not offset AV_NOPTS_OFFSETMichael Niedermayer2020-10-26
| | | | | | | | | Fixes: signed integer overflow: -9223372036854775807 - 48000 cannot be represented in type 'long long' Fixes: 26521/clusterfuzz-testcase-minimized-ffmpeg_dem_DIRAC_fuzzer-5635536506847232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mobiclip: Use smaller type for codesAndreas Rheinhardt2020-10-26
| | | | | | | | | Even though the length of these codes is > 8, only the lowest seven bits are ever set (because the long codes are on the left of the tree), so one can use an uint8_t for them, saving space. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mobiclip: Use static VLC tablesAndreas Rheinhardt2020-10-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mobiclip: Don't use too big max_depth, inline constantsAndreas Rheinhardt2020-10-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>