[FFmpeg-cvslog] libavcodec/utils: Free threads on init failure
ffmpeg | branch: master | Michael Niedermayer | Tue Aug 27 17:21:00 2019 +0200| [61b055bed0968d60eb24a5080fb4ba2bcf73b753] | committer: Michael Niedermayer libavcodec/utils: Free threads on init failure Fixes: Multiple memleaks Fixes: ffmpeg-memory-leak Found-by: Francis Provencher Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61b055bed0968d60eb24a5080fb4ba2bcf73b753 --- libavcodec/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index a6a646636d..729c10a8ed 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1029,6 +1029,9 @@ free_and_end: (avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP))) avctx->codec->close(avctx); +if (HAVE_THREADS && avctx->internal->thread_ctx) +ff_thread_free(avctx); + if (codec->priv_class && codec->priv_data_size) av_opt_free(avctx->priv_data); av_opt_free(avctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hcom: Tell the compiler about set but not read variables
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 28 19:07:23 2019 +0200| [24e52709112e3cf625cf00d3a4c3ae7d0c323d3c] | committer: Michael Niedermayer avformat/hcom: Tell the compiler about set but not read variables This avoids 3 warnings Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24e52709112e3cf625cf00d3a4c3ae7d0c323d3c --- libavformat/hcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hcom.c b/libavformat/hcom.c index 0d1736b620..3e1e8da236 100644 --- a/libavformat/hcom.c +++ b/libavformat/hcom.c @@ -38,7 +38,7 @@ static int hcom_probe(const AVProbeData *p) static int hcom_read_header(AVFormatContext *s) { AVStream *st; -unsigned data_size, rsrc_size, huffcount; +av_unused unsigned data_size, rsrc_size, huffcount; unsigned compresstype, divisor; unsigned dict_entries; int ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/vividas: remove dead assignment
ffmpeg | branch: master | Michael Niedermayer | Sat Aug 31 22:32:32 2019 +0200| [08dc354ef72991df22109cc6f84c34e798369bfb] | committer: Michael Niedermayer avformat/vividas: remove dead assignment Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08dc354ef72991df22109cc6f84c34e798369bfb --- libavformat/vividas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index 1ac86a107e..d7d75a8d3c 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -164,8 +164,6 @@ static void decode_block(uint8_t *src, uint8_t *dest, unsigned size, } if (s >= 4) { -if (!align) -align = 4; xor_block(src + a2, dest + a2, s & ~3, key, key_ptr); s &= 3; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] repeat an even number of characters in occured
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 28 19:04:42 2019 +0200| [fccc37ca85a7c3b0b32075ad7d18588973235517] | committer: Michael Niedermayer repeat an even number of characters in occured Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fccc37ca85a7c3b0b32075ad7d18588973235517 --- libavcodec/mpeg4videodec.c | 2 +- libavformat/matroskadec.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 25f528d59e..055afabc7e 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3212,7 +3212,7 @@ static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) * Decode MPEG-4 headers. * * @param header If set the absence of a VOP is not treated as error; otherwise, it is treated as such. - * @return <0 if an error occured + * @return <0 if an error occurred * FRAME_SKIPPED if a not coded VOP is found * 0 else */ diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 8c4ff30935..10c398856b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -798,7 +798,7 @@ static int matroska_resync(MatroskaDemuxContext *matroska, int64_t last_pos) id == MATROSKA_ID_CLUSTER || id == MATROSKA_ID_CHAPTERS) { /* Prepare the context for parsing of a level 1 element. */ matroska_reset_status(matroska, id, -1); -/* Given that we are here means that an error has occured, +/* Given that we are here means that an error has occurred, * so treat the segment as unknown length in order not to * discard valid data that happens to be beyond the designated * end of the segment. */ @@ -1331,7 +1331,7 @@ static int ebml_parse(MatroskaDemuxContext *matroska, // current element (i.e. how much would be skipped); if there were // more than a few skipped elements in a row and skipping the current // element would lead us more than SKIP_THRESHOLD away from the last -// known good position, then it is inferred that an error occured. +// known good position, then it is inferred that an error occurred. // The dependency on the number of unknown elements in a row exists // because the distance to the last known good position is // automatically big if the last parsed element was big. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/gdv: Replace assert() checking bitstream by if()
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 28 21:53:05 2019 +0200| [a9fae76370baf11a03b2c0ea590bb2d2f3f372ce] | committer: Michael Niedermayer avcodec/gdv: Replace assert() checking bitstream by if() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9fae76370baf11a03b2c0ea590bb2d2f3f372ce --- libavcodec/gdv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c index a5ce6b799e..f00f3ac145 100644 --- a/libavcodec/gdv.c +++ b/libavcodec/gdv.c @@ -358,7 +358,8 @@ static int decompress_68(AVCodecContext *avctx, unsigned skip, unsigned use8) if (val != ((1 << lbits) - 1)) { break; } -assert(lbits < 16); +if (lbits >= 16) +return AVERROR_INVALIDDATA; } for (i = 0; i < len; i++) { bytestream2_put_byte(pb, bytestream2_get_byte(gb)); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tools/target_dec_fuzzer: increase snows threshold
ffmpeg | branch: master | Michael Niedermayer | Thu Aug 29 21:08:42 2019 +0200| [305f6dbb060f490e5de0eed84e3149f0fd91] | committer: Michael Niedermayer tools/target_dec_fuzzer: increase snows threshold snow allows creating large output from tiny input, like other wavelet codecs Fixes: Timeout (82sec -> 1.5sec) Fixes: 9520/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6286612576075776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=305f6dbb060f490e5de0eed84e3149f0fd91 --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index a1e660a63f..973705f1e9 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -141,6 +141,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_INDEO4:maxpixels /= 128; break; case AV_CODEC_ID_LSCR:maxpixels /= 16; break; case AV_CODEC_ID_MOTIONPIXELS:maxpixels /= 256; break; +case AV_CODEC_ID_SNOW:maxpixels /= 128; break; case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/hevcdec: repeat character in skiped
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 28 19:01:41 2019 +0200| [d2d8e797cc4f3cea3470d464bd5f51cd097fe371] | committer: Michael Niedermayer avcodec/hevcdec: repeat character in skiped Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2d8e797cc4f3cea3470d464bd5f51cd097fe371 --- libavcodec/hevcdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index eed031913a..18395ce833 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -508,7 +508,7 @@ static int hls_slice_header(HEVCContext *s) sh->first_slice_in_pic_flag = get_bits1(gb); if (s->ref && sh->first_slice_in_pic_flag) { av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n"); -return 1; // This slice will be skiped later, do not corrupt state +return 1; // This slice will be skipped later, do not corrupt state } if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/vividas: Remove align offset which is always masked off
ffmpeg | branch: master | Michael Niedermayer | Sat Aug 31 22:33:56 2019 +0200| [8e8fd25272c5c270243674184662ff6957e70484] | committer: Michael Niedermayer avformat/vividas: Remove align offset which is always masked off Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e8fd25272c5c270243674184662ff6957e70484 --- libavformat/vividas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index d7d75a8d3c..cb4949b4a6 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -218,7 +218,7 @@ static uint8_t *read_vblock(AVIOContext *src, uint32_t *size, memcpy(buf, tmp, 4); if (avio_read(src, buf + 4, n) == n) { -decode_block(buf + 4, buf + 4, n, key, k2, align + 4); +decode_block(buf + 4, buf + 4, n, key, k2, align); } else { av_free(buf); buf = NULL; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/cfhd: Check that cropped size is smaller than full
ffmpeg | branch: master | Michael Niedermayer | Thu Aug 29 18:59:10 2019 +0200| [9fac243744c6c0ce2a2cf23550bc48b736661379] | committer: Michael Niedermayer avcodec/cfhd: Check that cropped size is smaller than full Fixes: signed integer overflow: 57342 * 120830 cannot be represented in type 'int' Fixes: 16426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5758744817827840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9fac243744c6c0ce2a2cf23550bc48b736661379 --- libavcodec/cfhd.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 27eed415d1..b4d6b25cbc 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -625,8 +625,12 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, ret = ff_set_dimensions(avctx, s->coded_width, s->coded_height); if (ret < 0) return ret; -if (s->cropped_height) -avctx->height = s->cropped_height << (avctx->pix_fmt == AV_PIX_FMT_BAYER_RGGB16); +if (s->cropped_height) { +unsigned height = s->cropped_height << (avctx->pix_fmt == AV_PIX_FMT_BAYER_RGGB16); +if (avctx->height < height) +return AVERROR_INVALIDDATA; +avctx->height = height; +} frame.f->width = frame.f->height = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tools/target_dec_fuzzer: Adjust motionpixels threshold
ffmpeg | branch: master | Michael Niedermayer | Sun Aug 25 17:24:41 2019 +0200| [9fd62b84d57e2fa676f90eb843c2ecb1130427d5] | committer: Michael Niedermayer tools/target_dec_fuzzer: Adjust motionpixels threshold Fixes: Timeout (151sec -> 173ms) Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5647069169057792 Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5108957126852608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9fd62b84d57e2fa676f90eb843c2ecb1130427d5 --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 6fb53d5ab2..a1e660a63f 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -140,6 +140,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // Cliping in C, generally slow even with small input case AV_CODEC_ID_INDEO4:maxpixels /= 128; break; case AV_CODEC_ID_LSCR:maxpixels /= 16; break; +case AV_CODEC_ID_MOTIONPIXELS:maxpixels /= 256; break; case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/cdxl: Fix integer overflow in intermediate
ffmpeg | branch: master | Michael Niedermayer | Sat Aug 31 00:20:39 2019 +0200| [5c5575c8dc892473ef9d35ca6419e8dabbc5e5ac] | committer: Michael Niedermayer avformat/cdxl: Fix integer overflow in intermediate Fixes: signed integer overflow: 65535 * 65312 cannot be represented in type 'int' Fixes: 16704/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6294115603447808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c5575c8dc892473ef9d35ca6419e8dabbc5e5ac --- libavformat/cdxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index 9aacaddb40..e675b2c8f1 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -131,7 +131,8 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) height = AV_RB16(>header[16]); palette_size = AV_RB16(>header[20]); audio_size = AV_RB16(>header[22]); -if (FFALIGN(width, 16) * (uint64_t)height * cdxl->header[19] > INT_MAX) +if (cdxl->header[19] == 0 || +FFALIGN(width, 16) * (uint64_t)height * cdxl->header[19] > INT_MAX) return AVERROR_INVALIDDATA; if (format == 0x20) image_size = width * height * cdxl->header[19] / 8; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code"
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 28 19:09:46 2019 +0200| [c80715f15359ded7c90bf517b2bbfa1c2b0ce517] | committer: Michael Niedermayer doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c80715f15359ded7c90bf517b2bbfa1c2b0ce517 --- doc/examples/decode_audio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c index 6f589b9878..6c2a8ed550 100644 --- a/doc/examples/decode_audio.c +++ b/doc/examples/decode_audio.c @@ -115,6 +115,9 @@ int main(int argc, char **argv) size_t data_size; AVPacket *pkt; AVFrame *decoded_frame = NULL; +enum AVSampleFormat sfmt; +int n_channels = 0; +const char *fmt; if (argc <= 2) { fprintf(stderr, "Usage: %s \n", argv[0]); @@ -202,9 +205,7 @@ int main(int argc, char **argv) decode(c, pkt, decoded_frame, outfile); /* print output pcm infomations, because there have no metadata of pcm */ -enum AVSampleFormat sfmt = c->sample_fmt; -int n_channels = 0; -const char *fmt; +sfmt = c->sample_fmt; if (av_sample_fmt_is_planar(sfmt)) { const char *packed = av_get_sample_fmt_name(sfmt); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros.
ffmpeg | branch: master | gxw | Tue Aug 6 19:11:16 2019 +0800| [92fc0bfa54d82e3bb18138f9f0ebc3a7322b64ce] | committer: Michael Niedermayer avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros. Changing details as following: 1. The previous order of parameters are irregular and difficult to understand. Adjust the order of the parameters according to the rule: (RTYPE, input registers, input mask/input index/..., output registers). Most of the existing msa macros follow the rule. 2. Remove the redundant macro SLDI_Bn_0 and use SLDI_Bn instead. Reviewed-by: Shiyou Yin Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92fc0bfa54d82e3bb18138f9f0ebc3a7322b64ce --- libavcodec/mips/h264dsp_msa.c | 9 ++-- libavcodec/mips/h264qpel_msa.c | 64 ++-- libavcodec/mips/hevc_lpf_sao_msa.c | 70 --- libavcodec/mips/hevcpred_msa.c | 30 ++--- libavcodec/mips/hpeldsp_msa.c | 66 ++--- libavcodec/mips/me_cmp_msa.c| 8 ++-- libavcodec/mips/qpeldsp_msa.c | 84 ++--- libavcodec/mips/vp8_mc_msa.c| 4 +- libavcodec/mips/vp9_idct_msa.c | 3 +- libavcodec/mips/vp9_lpf_msa.c | 3 +- libavcodec/mips/vp9_mc_msa.c| 16 +++ libavutil/mips/generic_macros_msa.h | 80 ++- 12 files changed, 222 insertions(+), 215 deletions(-) diff --git a/libavcodec/mips/h264dsp_msa.c b/libavcodec/mips/h264dsp_msa.c index c580d884f5..dd0598291e 100644 --- a/libavcodec/mips/h264dsp_msa.c +++ b/libavcodec/mips/h264dsp_msa.c @@ -618,7 +618,7 @@ static void avc_biwgt_8x16_msa(uint8_t *src, uint8_t *dst, int32_t stride, \ out0 = (v16u8) __msa_ilvr_b((v16i8) in1, (v16i8) in0); \ out1 = (v16u8) __msa_sldi_b(zero_m, (v16i8) out0, 2);\ -SLDI_B2_0_UB(out1, out2, out2, out3, 2); \ +SLDI_B2_UB(zero_m, out1, zero_m, out2, 2, out2, out3); \ } #define AVC_LPF_H_2BYTE_CHROMA_422(src, stride, tc_val, alpha, beta, res) \ @@ -1023,7 +1023,8 @@ static void avc_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int32_t stride, ILVR_W2_SB(tmp2, tmp0, tmp3, tmp1, src6, src3); ILVL_W2_SB(tmp2, tmp0, tmp3, tmp1, src1, src5); -SLDI_B4_0_SB(src6, src1, src3, src5, src0, src2, src4, src7, 8); +SLDI_B4_SB(zeros, src6, zeros, src1, zeros, src3, zeros, src5, + 8, src0, src2, src4, src7); p0_asub_q0 = __msa_asub_u_b((v16u8) src2, (v16u8) src3); p1_asub_p0 = __msa_asub_u_b((v16u8) src1, (v16u8) src2); @@ -1114,10 +1115,10 @@ static void avc_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int32_t stride, ILVRL_H2_SH(zeros, dst2_x, tmp2, tmp3); ILVR_W2_UB(tmp2, tmp0, tmp3, tmp1, dst0, dst4); -SLDI_B2_0_UB(dst0, dst4, dst1, dst5, 8); +SLDI_B2_UB(zeros, dst0, zeros, dst4, 8, dst1, dst5); dst2_x = (v16u8) __msa_ilvl_w((v4i32) tmp2, (v4i32) tmp0); dst2_y = (v16u8) __msa_ilvl_w((v4i32) tmp3, (v4i32) tmp1); -SLDI_B2_0_UB(dst2_x, dst2_y, dst3_x, dst3_y, 8); +SLDI_B2_UB(zeros, dst2_x, zeros, dst2_y, 8, dst3_x, dst3_y); out0 = __msa_copy_u_w((v4i32) dst0, 0); out1 = __msa_copy_u_h((v8i16) dst0, 2); diff --git a/libavcodec/mips/h264qpel_msa.c b/libavcodec/mips/h264qpel_msa.c index df7e3e2a3f..e435c18750 100644 --- a/libavcodec/mips/h264qpel_msa.c +++ b/libavcodec/mips/h264qpel_msa.c @@ -790,8 +790,8 @@ void ff_put_h264_qpel16_mc10_msa(uint8_t *dst, const uint8_t *src, minus5b, res4, res5, res6, res7); DPADD_SB4_SH(vec2, vec5, vec8, vec11, plus20b, plus20b, plus20b, plus20b, res4, res5, res6, res7); -SLDI_B2_SB(src1, src3, src0, src2, src0, src2, 2); -SLDI_B2_SB(src5, src7, src4, src6, src4, src6, 2); +SLDI_B4_SB(src1, src0, src3, src2, src5, src4, src7, src6, 2, + src0, src2, src4, src6); SRARI_H4_SH(res0, res1, res2, res3, 5); SRARI_H4_SH(res4, res5, res6, res7, 5); SAT_SH4_SH(res0, res1, res2, res3, 7); @@ -858,8 +858,8 @@ void ff_put_h264_qpel16_mc30_msa(uint8_t *dst, const uint8_t *src, minus5b, res4, res5, res6, res7); DPADD_SB4_SH(vec2, vec5, vec8, vec11, plus20b, plus20b, plus20b, plus20b, res4, res5, res6, res7); -SLDI_B2_SB(src1, src3, src0, src2, src0, src2, 3); -SLDI_B2_SB(src5, src7, src4, src6, src4, src6, 3); +SLDI_B4_SB(src1, src0, src3, src2, src5, src4, src7, src6, 3, + src0, src2, src4, src6); SRARI_H4_SH(res0, res1, res2, res3, 5); SRARI_H4_SH(res4, res5, res6, res7, 5); SAT_SH4_SH(res0, res1, res2, res3, 7); @@ -911,10 +911,10 @@ void ff_put_h264_qpel8_mc10_msa(uint8_t *dst, const uint8_t *src, VSHF_B2_SB(src6, src6, src7, src7, mask2, mask2,
[FFmpeg-cvslog] lavc/videotoolboxdec: fix crop handling when multithreaded
ffmpeg | branch: master | Rodger Combs | Fri Sep 6 22:31:06 2019 -0500| [77937a42e7127271bd50d7f8035c3ebd5a1047c5] | committer: Aman Gupta lavc/videotoolboxdec: fix crop handling when multithreaded This was partially fixed by 233cd89, but it made changes to AVFrame fields from within end_frame, which doesn't work consistently when multithreading is enabled. This is what the post_process function is for. Signed-off-by: Aman Gupta > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77937a42e7127271bd50d7f8035c3ebd5a1047c5 --- libavcodec/videotoolbox.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 67e5b54932..e9b3370169 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -91,6 +91,11 @@ static int videotoolbox_postproc_frame(void *avctx, AVFrame *frame) return AVERROR_EXTERNAL; } +frame->crop_right = 0; +frame->crop_left = 0; +frame->crop_top = 0; +frame->crop_bottom = 0; + frame->data[3] = (uint8_t*)ref->pixbuf; if (ref->hw_frames_ctx) { @@ -898,11 +903,6 @@ static int videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame) AVVideotoolboxContext *videotoolbox = videotoolbox_get_context(avctx); VTContext *vtctx = avctx->internal->hwaccel_priv_data; -frame->crop_right = 0; -frame->crop_left = 0; -frame->crop_top = 0; -frame->crop_bottom = 0; - if (vtctx->reconfig_needed == true) { vtctx->reconfig_needed = false; av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox decoder needs reconfig, restarting..\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/v4l2: fix compile with older videodev2.h
ffmpeg | branch: master | Aman Gupta | Fri Sep 13 16:30:13 2019 -0700| [81abf90aeae6ab88e820b664df4ea011b345b725] | committer: Aman Gupta avcodec/v4l2: fix compile with older videodev2.h Some of these symbols are only defined in newer kernel releases. Signed-off-by: Aman Gupta > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81abf90aeae6ab88e820b664df4ea011b345b725 --- libavcodec/v4l2_buffers.c | 8 libavcodec/v4l2_m2m_enc.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c index ca8045f8d1..e301dcd6bd 100644 --- a/libavcodec/v4l2_buffers.c +++ b/libavcodec/v4l2_buffers.c @@ -351,10 +351,18 @@ static int v4l2_buffer_swframe_to_buf(const AVFrame *frame, V4L2Buffer *out) switch (pixel_format) { case V4L2_PIX_FMT_YUV420M: case V4L2_PIX_FMT_YVU420M: +#ifdef V4L2_PIX_FMT_YUV422M case V4L2_PIX_FMT_YUV422M: +#endif +#ifdef V4L2_PIX_FMT_YVU422M case V4L2_PIX_FMT_YVU422M: +#endif +#ifdef V4L2_PIX_FMT_YUV444M case V4L2_PIX_FMT_YUV444M: +#endif +#ifdef V4L2_PIX_FMT_YVU444M case V4L2_PIX_FMT_YVU444M: +#endif case V4L2_PIX_FMT_NV12M: case V4L2_PIX_FMT_NV21M: case V4L2_PIX_FMT_NV12MT_16X16: diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c index 4849bc26c5..474e6bef89 100644 --- a/libavcodec/v4l2_m2m_enc.c +++ b/libavcodec/v4l2_m2m_enc.c @@ -245,8 +245,10 @@ static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame) V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; V4L2Context *const output = >output; +#ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME if (frame && frame->pict_type == AV_PICTURE_TYPE_I) v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame"); +#endif return ff_v4l2_context_enqueue_frame(output, frame); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/libdav1d: use the library default for the filmgrain option
ffmpeg | branch: master | James Almer | Sun Sep 15 11:09:39 2019 -0300| [6c0167f6f67b160b098957b96e0b5b0001c407a5] | committer: James Almer avcodec/libdav1d: use the library default for the filmgrain option Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c0167f6f67b160b098957b96e0b5b0001c407a5 --- doc/decoders.texi | 6 +++--- libavcodec/libdav1d.c | 5 +++-- libavcodec/version.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 0582b018b0..676e062e72 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -57,7 +57,7 @@ You need to explicitly configure the build with @code{--enable-libdav1d}. @subsection Options -The following option is supported by the libdav1d wrapper. +The following options are supported by the libdav1d wrapper. @table @option @@ -68,8 +68,8 @@ Set amount of frame threads to use during decoding. The default value is 0 (auto Set amount of tile threads to use during decoding. The default value is 0 (autodetect). @item filmgrain -Apply film grain to the decoded video if present in the bitstream. The default value -is true. +Apply film grain to the decoded video if present in the bitstream. Defaults to the +internal default of the library. @end table diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 8335751b7b..9ad735c771 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -131,7 +131,8 @@ static av_cold int libdav1d_init(AVCodecContext *c) s.allocator.alloc_picture_callback = libdav1d_picture_allocator; s.allocator.release_picture_callback = libdav1d_picture_release; s.frame_size_limit = c->max_pixels; -s.apply_grain = dav1d->apply_grain; +if (dav1d->apply_grain >= 0) +s.apply_grain = dav1d->apply_grain; s.n_tile_threads = dav1d->tile_threads ? dav1d->tile_threads @@ -342,7 +343,7 @@ static av_cold int libdav1d_close(AVCodecContext *c) static const AVOption libdav1d_options[] = { { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD }, { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD }, -{ "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VD }, +{ "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD }, { NULL } }; diff --git a/libavcodec/version.h b/libavcodec/version.h index b4b79ef63a..5748d31051 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MINOR 56 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MICRO 102 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/rmdec.c: fix brackets around arguments
ffmpeg | branch: master | James Almer | Sun Sep 15 11:04:33 2019 -0300| [4c34ed65f68542ab5d1b0be0e26716ae74df0d23] | committer: James Almer avformat/rmdec.c: fix brackets around arguments Regression since 78f52b4fe3 Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c34ed65f68542ab5d1b0be0e26716ae74df0d23 --- libavformat/rmdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index e95cc9f858..e612c42e57 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -724,7 +724,7 @@ static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stre num = avio_rb16(pb); *timestamp = avio_rb32(pb); -mlti_id = avio_r8((pb) >> 1) - 1; +mlti_id = (avio_r8(pb) >> 1) - 1; mlti_id = FFMAX(mlti_id, 0) << 16; *flags = avio_r8(pb); /* flags */ } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/rmdec.c: fix left shift of negative value in rm_sync()
ffmpeg | branch: master | James Almer | Sun Sep 15 00:06:34 2019 -0300| [78f52b4fe388bb63ed2ca674f7486edc11053f70] | committer: James Almer avformat/rmdec.c: fix left shift of negative value in rm_sync() Fixes ticket 8143. Reviewed-by: Andreas Rheinhardt Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78f52b4fe388bb63ed2ca674f7486edc11053f70 --- libavformat/rmdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index c9abd38d33..e95cc9f858 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -724,8 +724,8 @@ static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stre num = avio_rb16(pb); *timestamp = avio_rb32(pb); -mlti_id = (avio_r8(pb)>>1)-1<<16; -mlti_id = FFMAX(mlti_id, 0); +mlti_id = avio_r8((pb) >> 1) - 1; +mlti_id = FFMAX(mlti_id, 0) << 16; *flags = avio_r8(pb); /* flags */ } for(i=0;inb_streams;i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_stereo3d: add tb (top-bottom) aliases
ffmpeg | branch: master | Paul B Mahol | Sun Sep 15 10:50:12 2019 +0200| [5a9560dfc6f2151fc26c814d600ee7f074f23ae0] | committer: Paul B Mahol avfilter/vf_stereo3d: add tb (top-bottom) aliases > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a9560dfc6f2151fc26c814d600ee7f074f23ae0 --- doc/filters.texi | 8 libavfilter/vf_stereo3d.c | 8 2 files changed, 16 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 4045812122..bbfdad4d4d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16645,16 +16645,20 @@ side by side crosseye with half width resolution (right eye left, left eye right) @item abl +@item tbl above-below (left eye above, right eye below) @item abr +@item tbr above-below (right eye above, left eye below) @item ab2l +@item tb2l above-below with half height resolution (left eye above, right eye below) @item ab2r +@item tb2r above-below with half height resolution (right eye above, left eye below) @@ -16698,16 +16702,20 @@ side by side crosseye with half width resolution (right eye left, left eye right) @item abl +@item tbl above-below (left eye above, right eye below) @item abr +@item tbr above-below (right eye above, left eye below) @item ab2l +@item tb2l above-below with half height resolution (left eye above, right eye below) @item ab2r +@item tb2r above-below with half height resolution (right eye above, left eye below) diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index 0e39fb3931..50bf875ab3 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -160,9 +160,13 @@ typedef struct Stereo3DContext { static const AVOption stereo3d_options[] = { { "in","set input format", OFFSET(in.format), AV_OPT_TYPE_INT, {.i64=SIDE_BY_SIDE_LR}, INTERLEAVE_ROWS_LR, STEREO_CODE_COUNT-1, FLAGS, "in"}, { "ab2l", "above below half height left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_LR}, 0, 0, FLAGS, "in" }, +{ "tb2l", "above below half height left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_LR}, 0, 0, FLAGS, "in" }, { "ab2r", "above below half height right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_RL}, 0, 0, FLAGS, "in" }, +{ "tb2r", "above below half height right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_RL}, 0, 0, FLAGS, "in" }, { "abl", "above below left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_LR}, 0, 0, FLAGS, "in" }, +{ "tbl", "above below left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_LR}, 0, 0, FLAGS, "in" }, { "abr", "above below right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_RL}, 0, 0, FLAGS, "in" }, +{ "tbr", "above below right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_RL}, 0, 0, FLAGS, "in" }, { "al","alternating frames left first", 0, AV_OPT_TYPE_CONST, {.i64=ALTERNATING_LR}, 0, 0, FLAGS, "in" }, { "ar","alternating frames right first", 0, AV_OPT_TYPE_CONST, {.i64=ALTERNATING_RL}, 0, 0, FLAGS, "in" }, { "sbs2l", "side by side half width left first", 0, AV_OPT_TYPE_CONST, {.i64=SIDE_BY_SIDE_2_LR}, 0, 0, FLAGS, "in" }, @@ -175,9 +179,13 @@ static const AVOption stereo3d_options[] = { { "icr", "interleave columns right first", 0, AV_OPT_TYPE_CONST, {.i64=INTERLEAVE_COLS_RL}, 0, 0, FLAGS, "in" }, { "out", "set output format", OFFSET(out.format), AV_OPT_TYPE_INT, {.i64=ANAGLYPH_RC_DUBOIS}, 0, STEREO_CODE_COUNT-1, FLAGS, "out"}, { "ab2l", "above below half height left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_LR}, 0, 0, FLAGS, "out" }, +{ "tb2l", "above below half height left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_LR}, 0, 0, FLAGS, "out" }, { "ab2r", "above below half height right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_RL}, 0, 0, FLAGS, "out" }, +{ "tb2r", "above below half height right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_2_RL}, 0, 0, FLAGS, "out" }, { "abl", "above below left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_LR}, 0, 0, FLAGS, "out" }, +{ "tbl", "above below left first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_LR}, 0, 0, FLAGS, "out" }, { "abr", "above below right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_RL}, 0, 0, FLAGS, "out" }, +{ "tbr", "above below right first", 0, AV_OPT_TYPE_CONST, {.i64=ABOVE_BELOW_RL}, 0, 0, FLAGS, "out" }, { "agmc", "anaglyph green magenta color",0, AV_OPT_TYPE_CONST, {.i64=ANAGLYPH_GM_COLOR}, 0, 0, FLAGS, "out" }, { "agmd", "anaglyph green magenta dubois", 0, AV_OPT_TYPE_CONST, {.i64=ANAGLYPH_GM_DUBOIS}, 0, 0, FLAGS, "out" }, { "agmg", "anaglyph green magenta gray", 0, AV_OPT_TYPE_CONST, {.i64=ANAGLYPH_GM_GRAY}, 0, 0, FLAGS,
[FFmpeg-cvslog] avfilter/vf_v360: refactor dimensions and offsets calculations
ffmpeg | branch: master | Paul B Mahol | Sun Sep 15 10:37:42 2019 +0200| [7f8f886344fa0e7eded47816d6a77e40090e47ce] | committer: Paul B Mahol avfilter/vf_v360: refactor dimensions and offsets calculations > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f8f886344fa0e7eded47816d6a77e40090e47ce --- libavfilter/vf_v360.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index cb4f84d89d..e74509e6f2 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -2157,6 +2157,14 @@ static void fov_from_dfov(V360Context *s, float w, float h) s->v_fov += 360.f; } +static void set_dimensions(int *outw, int *outh, int w, int h, const AVPixFmtDescriptor *desc) +{ +outw[1] = outw[2] = FF_CEIL_RSHIFT(w, desc->log2_chroma_w); +outw[0] = outw[3] = w; +outh[1] = outh[2] = FF_CEIL_RSHIFT(h, desc->log2_chroma_h); +outh[0] = outh[3] = h; +} + static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; @@ -2264,15 +2272,8 @@ static int config_output(AVFilterLink *outlink) av_assert0(0); } -s->inplaneheight[1] = s->inplaneheight[2] = FF_CEIL_RSHIFT(h, desc->log2_chroma_h); -s->inplaneheight[0] = s->inplaneheight[3] = h; -s->inplanewidth[1] = s->inplanewidth[2] = FF_CEIL_RSHIFT(w, desc->log2_chroma_w); -s->inplanewidth[0] = s->inplanewidth[3] = w; - -s->in_offset_h[1] = s->in_offset_h[2] = FF_CEIL_RSHIFT(in_offset_h, desc->log2_chroma_h); -s->in_offset_h[0] = s->in_offset_h[3] = in_offset_h; -s->in_offset_w[1] = s->in_offset_w[2] = FF_CEIL_RSHIFT(in_offset_w, desc->log2_chroma_w); -s->in_offset_w[0] = s->in_offset_w[3] = in_offset_w; +set_dimensions(s->inplanewidth, s->inplaneheight, w, h, desc); +set_dimensions(s->in_offset_w, s->in_offset_h, in_offset_w, in_offset_h, desc); switch (s->in) { case EQUIRECTANGULAR: @@ -2419,10 +2420,7 @@ static int config_output(AVFilterLink *outlink) return err; } -s->pr_height[1] = s->pr_height[2] = FF_CEIL_RSHIFT(h, desc->log2_chroma_h); -s->pr_height[0] = s->pr_height[3] = h; -s->pr_width[1] = s->pr_width[2] = FF_CEIL_RSHIFT(w, desc->log2_chroma_w); -s->pr_width[0] = s->pr_width[3] = w; +set_dimensions(s->pr_width, s->pr_height, w, h, desc); switch (s->out_stereo) { case STEREO_2D: @@ -2442,15 +2440,8 @@ static int config_output(AVFilterLink *outlink) av_assert0(0); } -s->out_offset_h[1] = s->out_offset_h[2] = FF_CEIL_RSHIFT(out_offset_h, desc->log2_chroma_h); -s->out_offset_h[0] = s->out_offset_h[3] = out_offset_h; -s->out_offset_w[1] = s->out_offset_w[2] = FF_CEIL_RSHIFT(out_offset_w, desc->log2_chroma_w); -s->out_offset_w[0] = s->out_offset_w[3] = out_offset_w; - -s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(h, desc->log2_chroma_h); -s->planeheight[0] = s->planeheight[3] = h; -s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(w, desc->log2_chroma_w); -s->planewidth[0] = s->planewidth[3] = w; +set_dimensions(s->out_offset_w, s->out_offset_h, out_offset_w, out_offset_h, desc); +set_dimensions(s->planewidth, s->planeheight, w, h, desc); for (int i = 0; i < 4; i++) s->uv_linesize[i] = FFALIGN(s->pr_width[i], 8); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".