[FFmpeg-cvslog] lavf/oggparsevorbis: Use case-insensitive key compare for vorbis picture
ffmpeg | branch: master | Mattias Wadman | Sat Apr 11 12:56:21 2020 +0200| [9d21d18ec3ca2721e989fd4522d19bd90d6ac2db] | committer: Carl Eugen Hoyos lavf/oggparsevorbis: Use case-insensitive key compare for vorbis picture Regression since 8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys were changed to not be touppered but the picture block strcmp was not changed to be case-insensitive. Fixes ticket #8608. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d21d18ec3ca2721e989fd4522d19bd90d6ac2db --- libavformat/oggparsevorbis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 8dd27e7770..27d2c686b6 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -151,7 +151,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, * 'METADATA_BLOCK_PICTURE'. This is the preferred and * recommended way of embedding cover art within VorbisComments." */ -if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) { +if (!av_strcasecmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) { int ret, len = AV_BASE64_DECODE_SIZE(vl); char *pict = av_malloc(len); ___ 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] lavfi/telecine: Mark telecined frames as interlaced.
ffmpeg | branch: master | Carl Eugen Hoyos | Sun Apr 5 01:00:44 2020 +0200| [dbc5c0c1c8b205b7f2af6c00177d99d5f44e9207] | committer: Carl Eugen Hoyos lavfi/telecine: Mark telecined frames as interlaced. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dbc5c0c1c8b205b7f2af6c00177d99d5f44e9207 --- libavfilter/vf_telecine.c | 8 1 file changed, 8 insertions(+) diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 62599a7a3a..ff8151dfc9 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -207,6 +207,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) s->stride[i], (s->planeheight[i] - !s->first_field + 1) / 2); } +s->frame[nout]->interlaced_frame = 1; +s->frame[nout]->top_field_first = !s->first_field; nout++; len--; s->occupied = 0; @@ -220,6 +222,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) inpicref->data[i], inpicref->linesize[i], s->stride[i], s->planeheight[i]); +s->frame[nout]->interlaced_frame = inpicref->interlaced_frame; +s->frame[nout]->top_field_first = inpicref->top_field_first; nout++; len -= 2; } @@ -236,6 +240,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) for (i = 0; i < nout; i++) { AVFrame *frame = av_frame_clone(s->frame[i]); +int interlaced = frame->interlaced_frame; +int tff= frame->top_field_first; if (!frame) { av_frame_free(&inpicref); @@ -243,6 +249,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) } av_frame_copy_props(frame, inpicref); +frame->interlaced_frame = interlaced; +frame->top_field_first = tff; frame->pts = ((s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time) + av_rescale(outlink->frame_count_in, s->ts_unit.num, s->ts_unit.den); ___ 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/aacdec: fix compilation under soft float MIPS
ffmpeg | branch: master | Rosen Penev | Sun Apr 5 20:37:10 2020 -0700| [875ba240c2e13af370832e49c9371ffb0f91] | committer: Carl Eugen Hoyos avcodec/aacdec: fix compilation under soft float MIPS Place HAVE_MIPSFPU further up so that functions that use floating point ASM are defined away. Otherwise compilation failures result when soft float in enabled on the toolchain. Signed-off-by: Rosen Penev > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=875ba240c2e13af370832e49c9371ffb0f91 --- libavcodec/mips/aacdec_mips.c | 4 ++-- libavcodec/mips/aacpsdsp_mips.c | 4 ++-- libavcodec/mips/aacsbr_mips.c | 4 ++-- libavcodec/mips/sbrdsp_mips.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/mips/aacdec_mips.c b/libavcodec/mips/aacdec_mips.c index 01a2b3087b..8e30652935 100644 --- a/libavcodec/mips/aacdec_mips.c +++ b/libavcodec/mips/aacdec_mips.c @@ -59,6 +59,7 @@ #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU static av_always_inline void float_copy(float *dst, const float *src, int count) { // Copy 'count' floats from src to dst @@ -282,7 +283,6 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce) } } -#if HAVE_MIPSFPU static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) { /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ @@ -433,9 +433,9 @@ static void update_ltp_mips(AACContext *ac, SingleChannelElement *sce) void ff_aacdec_init_mips(AACContext *c) { #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU c->imdct_and_windowing = imdct_and_windowing_mips; c->apply_ltp = apply_ltp_mips; -#if HAVE_MIPSFPU c->update_ltp = update_ltp_mips; #endif /* HAVE_MIPSFPU */ #endif /* HAVE_INLINE_ASM */ diff --git a/libavcodec/mips/aacpsdsp_mips.c b/libavcodec/mips/aacpsdsp_mips.c index 83fdc2f9db..ef47e31a9e 100644 --- a/libavcodec/mips/aacpsdsp_mips.c +++ b/libavcodec/mips/aacpsdsp_mips.c @@ -57,6 +57,7 @@ #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU static void ps_hybrid_analysis_ileave_mips(float (*out)[32][2], float L[2][38][64], int i, int len) { @@ -187,7 +188,6 @@ static void ps_hybrid_synthesis_deint_mips(float out[2][38][64], } } -#if HAVE_MIPSFPU #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 static void ps_add_squares_mips(float *dst, const float (*src)[2], int n) { @@ -450,9 +450,9 @@ static void ps_stereo_interpolate_mips(float (*l)[2], float (*r)[2], void ff_psdsp_init_mips(PSDSPContext *s) { #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU s->hybrid_analysis_ileave = ps_hybrid_analysis_ileave_mips; s->hybrid_synthesis_deint = ps_hybrid_synthesis_deint_mips; -#if HAVE_MIPSFPU #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 s->add_squares= ps_add_squares_mips; s->mul_pair_single= ps_mul_pair_single_mips; diff --git a/libavcodec/mips/aacsbr_mips.c b/libavcodec/mips/aacsbr_mips.c index 56aa4e8682..2e0cd723d7 100644 --- a/libavcodec/mips/aacsbr_mips.c +++ b/libavcodec/mips/aacsbr_mips.c @@ -58,6 +58,7 @@ #define ENVELOPE_ADJUSTMENT_OFFSET 2 #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU static int sbr_lf_gen_mips(AACContext *ac, SpectralBandReplication *sbr, float X_low[32][40][2], const float W[2][32][32][2], int buf_idx) @@ -310,7 +311,6 @@ static int sbr_x_gen_mips(SpectralBandReplication *sbr, float X[2][38][64], return 0; } -#if HAVE_MIPSFPU #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 static void sbr_hf_assemble_mips(float Y1[38][64][2], const float X_high[64][40][2], @@ -611,9 +611,9 @@ static void sbr_hf_inverse_filter_mips(SBRDSPContext *dsp, void ff_aacsbr_func_ptr_init_mips(AACSBRContext *c) { #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU c->sbr_lf_gen= sbr_lf_gen_mips; c->sbr_x_gen = sbr_x_gen_mips; -#if HAVE_MIPSFPU #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 c->sbr_hf_inverse_filter = sbr_hf_inverse_filter_mips; c->sbr_hf_assemble = sbr_hf_assemble_mips; diff --git a/libavcodec/mips/sbrdsp_mips.c b/libavcodec/mips/sbrdsp_mips.c index 1b0a10608d..83039fd802 100644 --- a/libavcodec/mips/sbrdsp_mips.c +++ b/libavcodec/mips/sbrdsp_mips.c @@ -59,6 +59,7 @@ #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU static void sbr_qmf_pre_shuffle_mips(float *z) { int Temp1, Temp2, Temp3, Temp4, Temp5, Temp6; @@ -165,7 +166,6 @@ static void sbr_qmf_post_shuffle_mips(float W[32][2], const float *z) ); } -#if HAVE_MIPSFPU #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 static void sbr_sum64x5_mips(float *z) { @@ -890,9 +890,9 @@ static void sbr_hf_apply_noise_3_mips(float (*Y)[2], const float *s_m, void ff_sbrdsp_init_mips(SBRDSPContext *s) { #if HAVE_INLINE_ASM +#if HAVE_MIPSFPU s->qm
[FFmpeg-cvslog] lavc/amrwbdec: Output silence for frames marked as corrupt.
ffmpeg | branch: master | Carl Eugen Hoyos | Sun Apr 5 17:35:38 2020 +0200| [e426f71c96e9fac3ff87f51cfe7df603220fbd5d] | committer: Carl Eugen Hoyos lavc/amrwbdec: Output silence for frames marked as corrupt. Fixes ticket #7113. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e426f71c96e9fac3ff87f51cfe7df603220fbd5d --- libavcodec/amrwbdec.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 3d82b6ba71..7d357a2685 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1121,7 +1121,10 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, header_size = decode_mime_header(ctx, buf); expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; -if (ctx->fr_cur_mode == NO_DATA) { +if (!ctx->fr_quality) +av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n"); + +if (ctx->fr_cur_mode == NO_DATA || !ctx->fr_quality) { av_samples_set_silence(&frame->data[0], 0, frame->nb_samples, 1, AV_SAMPLE_FMT_FLT); *got_frame_ptr = 1; return expected_fr_size; @@ -1139,9 +1142,6 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } -if (!ctx->fr_quality) -av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n"); - if (ctx->fr_cur_mode == MODE_SID) { /* Comfort noise frame */ avpriv_request_sample(avctx, "SID mode"); return AVERROR_PATCHWELCOME; ___ 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] lavc/amrwbdec: Remove a dead comparison.
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Apr 11 14:08:49 2020 +0200| [8f01fa378fb3f54941d02918ba343811822a605a] | committer: Carl Eugen Hoyos lavc/amrwbdec: Remove a dead comparison. Modes > MODE_SID are already filtered out at this point. Simplifies the following change. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f01fa378fb3f54941d02918ba343811822a605a --- libavcodec/amrwbdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 5943bfc84e..3d82b6ba71 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1139,7 +1139,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } -if (!ctx->fr_quality || ctx->fr_cur_mode > MODE_SID) +if (!ctx->fr_quality) av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n"); if (ctx->fr_cur_mode == MODE_SID) { /* Comfort noise 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] lavc/amrwbdec: Add a comment about the missing muting technique.
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Apr 11 14:23:51 2020 +0200| [53254234370367b0996d9322f871de985ebbfa3c] | committer: Carl Eugen Hoyos lavc/amrwbdec: Add a comment about the missing muting technique. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53254234370367b0996d9322f871de985ebbfa3c --- libavcodec/amrwbdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 7d357a2685..555c4bc45d 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1125,6 +1125,8 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n"); if (ctx->fr_cur_mode == NO_DATA || !ctx->fr_quality) { +/* The specification suggests a "random signal" and + "a muting technique" to "gradually decrease the output level". */ av_samples_set_silence(&frame->data[0], 0, frame->nb_samples, 1, AV_SAMPLE_FMT_FLT); *got_frame_ptr = 1; return expected_fr_size; ___ 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/adpcm: remove unused shift parameter from adpcm_ima_qt_expand_nibble()
ffmpeg | branch: master | Zane van Iperen | Sat Apr 11 08:12:40 2020 +| [67c4405fac3f227126a6233daab629f322abe4d2] | committer: Carl Eugen Hoyos avcodec/adpcm: remove unused shift parameter from adpcm_ima_qt_expand_nibble() Signed-off-by: Zane van Iperen > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67c4405fac3f227126a6233daab629f322abe4d2 --- libavcodec/adpcm.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index e9abddc43c..ee18875579 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -348,7 +348,7 @@ static inline int16_t adpcm_ima_wav_expand_nibble(ADPCMChannelStatus *c, GetBitC return (int16_t)c->predictor; } -static inline int adpcm_ima_qt_expand_nibble(ADPCMChannelStatus *c, int nibble, int shift) +static inline int adpcm_ima_qt_expand_nibble(ADPCMChannelStatus *c, int nibble) { int step_index; int predictor; @@ -969,8 +969,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, for (m = 0; m < 64; m += 2) { int byte = bytestream2_get_byteu(&gb); -samples[m] = adpcm_ima_qt_expand_nibble(cs, byte & 0x0F, 3); -samples[m + 1] = adpcm_ima_qt_expand_nibble(cs, byte >> 4 , 3); +samples[m] = adpcm_ima_qt_expand_nibble(cs, byte & 0x0F); +samples[m + 1] = adpcm_ima_qt_expand_nibble(cs, byte >> 4 ); } } break; @@ -1280,16 +1280,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, case AV_CODEC_ID_ADPCM_IMA_SSI: while (bytestream2_get_bytes_left(&gb) > 0) { int v = bytestream2_get_byteu(&gb); -*samples++ = adpcm_ima_qt_expand_nibble(&c->status[0], v >> 4 , 3); -*samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0x0F, 3); +*samples++ = adpcm_ima_qt_expand_nibble(&c->status[0], v >> 4 ); +*samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0x0F); } break; case AV_CODEC_ID_ADPCM_IMA_APM: for (n = nb_samples / 2; n > 0; n--) { for (channel = 0; channel < avctx->channels; channel++) { int v = bytestream2_get_byteu(&gb); -*samples++ = adpcm_ima_qt_expand_nibble(&c->status[channel], v >> 4 , 3); -samples[st] = adpcm_ima_qt_expand_nibble(&c->status[channel], v & 0x0F, 3); +*samples++ = adpcm_ima_qt_expand_nibble(&c->status[channel], v >> 4 ); +samples[st] = adpcm_ima_qt_expand_nibble(&c->status[channel], v & 0x0F); } samples += avctx->channels; } @@ -1640,8 +1640,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, for (n = nb_samples >> (1 - st); n > 0; n--) { int v = bytestream2_get_byteu(&gb); -*samples++ = adpcm_ima_qt_expand_nibble(&c->status[0 ], v >> 4, 3); -*samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0xf, 3); +*samples++ = adpcm_ima_qt_expand_nibble(&c->status[0 ], v >> 4 ); +*samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0xf); } break; case AV_CODEC_ID_ADPCM_CT: ___ 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/ac3_tab: Zero-terminate ff_ac3_sample_rate_tab
ffmpeg | branch: master | Andreas Rheinhardt | Sat Apr 11 16:11:01 2020 +0200| [12a5e0409d32105b7ae3346cf2cdf83b40ab33b2] | committer: Andreas Rheinhardt avcodec/ac3_tab: Zero-terminate ff_ac3_sample_rate_tab This is required to use it as an AVCodec.supported_samplerates array. Adding the sentinel has been forgotten in 4679a474. Without it e.g. the FATE-test ffmpeg-filter_complex_audio fails with ASAN. Reviewed-by: Carl Eugen Hoyos Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12a5e0409d32105b7ae3346cf2cdf83b40ab33b2 --- libavcodec/ac3tab.c | 2 +- libavcodec/ac3tab.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c index 96ef8ebaeb..ef2a41bc59 100644 --- a/libavcodec/ac3tab.c +++ b/libavcodec/ac3tab.c @@ -126,7 +126,7 @@ const uint8_t ff_ac3_dec_channel_map[8][2][6] = { }; /* possible frequencies */ -const int ff_ac3_sample_rate_tab[3] = { 48000, 44100, 32000 }; +const int ff_ac3_sample_rate_tab[] = { 48000, 44100, 32000, 0 }; /* possible bitrates */ const uint16_t ff_ac3_bitrate_tab[19] = { diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h index f0f6e6ccc4..1d1264e3fc 100644 --- a/libavcodec/ac3tab.h +++ b/libavcodec/ac3tab.h @@ -33,7 +33,7 @@ extern const uint8_t ff_ac3_channels_tab[8]; extern av_export_avcodec const uint16_t avpriv_ac3_channel_layout_tab[8]; extern const uint8_t ff_ac3_enc_channel_map[8][2][6]; extern const uint8_t ff_ac3_dec_channel_map[8][2][6]; -extern const int ff_ac3_sample_rate_tab[3]; +extern const int ff_ac3_sample_rate_tab[]; extern const uint16_t ff_ac3_bitrate_tab[19]; extern const uint8_t ff_ac3_rematrix_band_tab[5]; extern const uint8_t ff_eac3_default_cpl_band_struct[18]; ___ 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] libavcodec/jpeg2000: fix precinct coordinate calculation
ffmpeg | branch: master | Gautam Ramakrishnan | Sat Apr 11 12:28:09 2020 +0530| [995d937827dda228e68eeffca10feeea32463cf7] | committer: Michael Niedermayer libavcodec/jpeg2000: fix precinct coordinate calculation The calculation of precinct boundaries has been fixed. The precinct boundaries were calculated as an offset to the band boundary, but must instead be calculated as an offset from the reslevel. This patch fixes #4669 and #4679. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=995d937827dda228e68eeffca10feeea32463cf7 --- libavcodec/jpeg2000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index 3f50bf9fb3..73206d17f3 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -276,11 +276,11 @@ static int init_prec(Jpeg2000Band *band, /* TODO: Verify with previous count of codeblocks per band */ /* Compute P_x0 */ -prec->coord[0][0] = ((band->coord[0][0] >> log2_band_prec_width) + precno % reslevel->num_precincts_x) * +prec->coord[0][0] = ((reslevel->coord[0][0] >> reslevel->log2_prec_width) + precno % reslevel->num_precincts_x) * (1 << log2_band_prec_width); /* Compute P_y0 */ -prec->coord[1][0] = ((band->coord[1][0] >> log2_band_prec_height) + precno / reslevel->num_precincts_x) * +prec->coord[1][0] = ((reslevel->coord[1][0] >> reslevel->log2_prec_height) + precno / reslevel->num_precincts_x) * (1 << log2_band_prec_height); /* Compute P_x1 */ ___ 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] mov: fix seek to next root atom in fragmented mp4
ffmpeg | branch: master | John Stebbins | Sun Mar 29 13:32:45 2020 -0700| [21a65d63109628276a8fa88f8e6a106696506dc9] | committer: Michael Niedermayer mov: fix seek to next root atom in fragmented mp4 If some but not all moof's are referenced in an sidx, whole fragments were being skipped. Fixes tickets 7377, 7389, and 8502 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21a65d63109628276a8fa88f8e6a106696506dc9 --- libavformat/mov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 32f51e6a4c..eb9a8714a0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7734,7 +7734,8 @@ static int mov_switch_root(AVFormatContext *s, int64_t target, int index) mov->next_root_atom = 0; if (index < 0 || index >= mov->frag_index.nb_items) index = search_frag_moof_offset(&mov->frag_index, target); -if (index < mov->frag_index.nb_items) { +if (index < mov->frag_index.nb_items && +mov->frag_index.item[index].moof_offset == target) { if (index + 1 < mov->frag_index.nb_items) mov->next_root_atom = mov->frag_index.item[index + 1].moof_offset; if (mov->frag_index.item[index].headers_read) ___ 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] libavformat/mov: fix multiple trun per traf
ffmpeg | branch: master | John Stebbins | Sun Mar 29 14:27:38 2020 -0700| [9f4054a0cb27503e535804ab8c2b58cc91c72591] | committer: Michael Niedermayer libavformat/mov: fix multiple trun per traf dts would start over at the beginning of each trun when they should be computed contiguously for each trun in a traf Fixes ticket 8070 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f4054a0cb27503e535804ab8c2b58cc91c72591 --- libavformat/isom.h | 1 + libavformat/mov.c | 12 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index 4943b80ccf..41a9c64c11 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -129,6 +129,7 @@ typedef struct MOVFragmentStreamInfo { int64_t sidx_pts; int64_t first_tfra_pts; int64_t tfdt_dts; +int64_t next_trun_dts; int index_entry; MOVEncryptionIndex *encryption_index; } MOVFragmentStreamInfo; diff --git a/libavformat/mov.c b/libavformat/mov.c index eb9a8714a0..8e8aba7ba5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1336,6 +1336,7 @@ static int update_frag_index(MOVContext *c, int64_t offset) frag_stream_info[i].id = c->fc->streams[i]->id; frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE; frag_stream_info[i].tfdt_dts = AV_NOPTS_VALUE; +frag_stream_info[i].next_trun_dts = AV_NOPTS_VALUE; frag_stream_info[i].first_tfra_pts = AV_NOPTS_VALUE; frag_stream_info[i].index_entry = -1; frag_stream_info[i].encryption_index = NULL; @@ -4614,6 +4615,7 @@ static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) MOVFragment *frag = &c->fragment; MOVTrackExt *trex = NULL; int flags, track_id, i; +MOVFragmentStreamInfo * frag_stream_info; avio_r8(pb); /* version */ flags = avio_rb24(pb); @@ -4647,6 +4649,10 @@ static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb) : trex->flags; av_log(c->fc, AV_LOG_TRACE, "frag flags 0x%x\n", frag->flags); +frag_stream_info = get_current_frag_stream_info(&c->frag_index); +if (frag_stream_info) +frag_stream_info->next_trun_dts = AV_NOPTS_VALUE; + return 0; } @@ -4800,7 +4806,9 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) frag_stream_info = get_current_frag_stream_info(&c->frag_index); if (frag_stream_info) { -if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE && +if (frag_stream_info->next_trun_dts != AV_NOPTS_VALUE) { +dts = frag_stream_info->next_trun_dts - sc->time_offset; +} else if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE && c->use_mfra_for == FF_MOV_FLAG_MFRA_PTS) { pts = frag_stream_info->first_tfra_pts; av_log(c->fc, AV_LOG_DEBUG, "found mfra time %"PRId64 @@ -4960,6 +4968,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->nb_frames_for_fps ++; } } +if (frag_stream_info) +frag_stream_info->next_trun_dts = dts + sc->time_offset; if (i < entries) { // EOF found before reading all entries. Fix the hole this would // leave in index_entries and ctts_data ___ 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] libavcodec/jpeg2000dec.c: fix error in cod marker
ffmpeg | branch: master | Gautam Ramakrishnan | Sat Apr 11 12:28:08 2020 +0530| [e8344f21e16b7043411830cea99304169127dacf] | committer: Michael Niedermayer libavcodec/jpeg2000dec.c: fix error in cod marker This patch fixes an error where the COC marker overrides all data of the SPcod field of the COD marker. It must override only one bit of SPcod field. This now allows p0_08.j2k to be decoded correctly (mentioned in #4679). Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8344f21e16b7043411830cea99304169127dacf --- libavcodec/jpeg2000dec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 9684e57b34..7196cba6b4 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -566,6 +566,7 @@ static int get_coc(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c, uint8_t *properties) { int compno, ret; +uint8_t has_eph; if (bytestream2_get_bytes_left(&s->g) < 2) { av_log(s->avctx, AV_LOG_ERROR, "Insufficient space for COC\n"); @@ -582,7 +583,9 @@ static int get_coc(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c, } c += compno; +has_eph = c->csty & JPEG2000_CSTY_EPH; c->csty = bytestream2_get_byteu(&s->g); +c->csty |= has_eph; //do not override eph present bits from COD if ((ret = get_cox(s, c)) < 0) return 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] avcodec/dpcm: clip exponent into supported range in XAN DPCM
ffmpeg | branch: master | Michael Niedermayer | Thu Apr 9 15:37:55 2020 +0200| [20ade59d9633def4ebf84ec170f56367bfb6aa6c] | committer: Michael Niedermayer avcodec/dpcm: clip exponent into supported range in XAN DPCM Fixes: shift exponent 32 is too large for 32-bit type 'int' Fixes: 21200/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XAN_DPCM_fuzzer-5754704894361600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20ade59d9633def4ebf84ec170f56367bfb6aa6c --- libavcodec/dpcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index 069bf1dcd8..7078419f08 100644 --- a/libavcodec/dpcm.c +++ b/libavcodec/dpcm.c @@ -321,9 +321,8 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, shift[ch] -= (2 * n); diff = sign_extend((diff &~ 3) << 8, 16); -/* saturate the shifter to a lower limit of 0 */ -if (shift[ch] < 0) -shift[ch] = 0; +/* saturate the shifter to 0..31 */ +shift[ch] = av_clip_uintp2(shift[ch], 5); diff >>= shift[ch]; predictor[ch] += diff; ___ 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/libaomenc.c: Add a libaom command-line option 'tune'
ffmpeg | branch: master | Wang Cao | Sat Apr 4 05:00:26 2020 +0800| [bd3389e9f498dca74bc20b5f4e96520d23f072ed] | committer: James Zern avcodec/libaomenc.c: Add a libaom command-line option 'tune' Signed-off-by: Wang Cao Signed-off-by: James Zern > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd3389e9f498dca74bc20b5f4e96520d23f072ed --- doc/encoders.texi | 9 + libavcodec/libaomenc.c | 7 +++ libavcodec/version.h | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index e23b6b32fe..18bfe8f2eb 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -1508,6 +1508,15 @@ Complexity-based. Cyclic refresh. @end table +@item tune (@emph{tune}) +Set the distortion metric the encoder is tuned with. Default is @code{psnr}. + +@table @samp +@item psnr (@emph{0}) + +@item ssim (@emph{1}) +@end table + @item lag-in-frames Set the maximum number of frames which the encoder may keep in flight at any one time for lookahead purposes. Defaults to the internal diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 096aadbe1c..747624ae54 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -94,6 +94,7 @@ typedef struct AOMEncoderContext { int enable_intrabc; int enable_restoration; int usage; +int tune; } AOMContext; static const char *const ctlidstr[] = { @@ -132,6 +133,7 @@ static const char *const ctlidstr[] = { [AV1E_SET_ENABLE_INTRABC] = "AV1E_SET_ENABLE_INTRABC", #endif [AV1E_SET_ENABLE_CDEF] = "AV1E_SET_ENABLE_CDEF", +[AOME_SET_TUNING] = "AOME_SET_TUNING", }; static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc) @@ -699,6 +701,8 @@ static av_cold int aom_init(AVCodecContext *avctx, codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh); if (ctx->crf >= 0) codecctl_int(avctx, AOME_SET_CQ_LEVEL, ctx->crf); +if (ctx->tune >= 0) +codecctl_int(avctx, AOME_SET_TUNING, ctx->tune); codecctl_int(avctx, AV1E_SET_COLOR_PRIMARIES, avctx->color_primaries); codecctl_int(avctx, AV1E_SET_MATRIX_COEFFICIENTS, avctx->colorspace); @@ -1096,6 +1100,9 @@ static const AVOption options[] = { { "usage", "Quality and compression efficiency vs speed tradeof", OFFSET(usage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "usage"}, { "good","Good quality", 0, AV_OPT_TYPE_CONST, {.i64 = 0 /* AOM_USAGE_GOOD_QUALITY */}, 0, 0, VE, "usage"}, { "realtime","Realtime encoding", 0, AV_OPT_TYPE_CONST, {.i64 = 1 /* AOM_USAGE_REALTIME */}, 0, 0, VE, "usage"}, +{ "tune","The metric that the encoder tunes for. Automatically chosen by the encoder by default", OFFSET(tune), AV_OPT_TYPE_INT, {.i64 = -1}, -1, AOM_TUNE_SSIM, VE, "tune"}, +{ "psnr",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AOM_TUNE_PSNR}, 0, 0, VE, "tune"}, +{ "ssim",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AOM_TUNE_SSIM}, 0, 0, VE, "tune"}, { NULL }, }; diff --git a/libavcodec/version.h b/libavcodec/version.h index 278f6be0cf..b348a6ca7a 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MINOR 78 -#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] avcodec/libaomenc,cosmetics: fix a typo
ffmpeg | branch: master | James Zern | Sat Apr 11 15:22:35 2020 -0700| [0ece80559a358fa7313c44fbd8f76bf75d3e5b84] | committer: James Zern avcodec/libaomenc,cosmetics: fix a typo tradeof -> trade-off Signed-off-by: James Zern > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ece80559a358fa7313c44fbd8f76bf75d3e5b84 --- libavcodec/libaomenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 747624ae54..fc1ea96659 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -1097,7 +1097,7 @@ static const AVOption options[] = { { "enable-global-motion", "Enable global motion", OFFSET(enable_global_motion), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-intrabc", "Enable intra block copy prediction mode", OFFSET(enable_intrabc), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-restoration", "Enable Loop Restoration filtering", OFFSET(enable_restoration), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, -{ "usage", "Quality and compression efficiency vs speed tradeof", OFFSET(usage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "usage"}, +{ "usage", "Quality and compression efficiency vs speed trade-off", OFFSET(usage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "usage"}, { "good","Good quality", 0, AV_OPT_TYPE_CONST, {.i64 = 0 /* AOM_USAGE_GOOD_QUALITY */}, 0, 0, VE, "usage"}, { "realtime","Realtime encoding", 0, AV_OPT_TYPE_CONST, {.i64 = 1 /* AOM_USAGE_REALTIME */}, 0, 0, VE, "usage"}, { "tune","The metric that the encoder tunes for. Automatically chosen by the encoder by default", OFFSET(tune), AV_OPT_TYPE_INT, {.i64 = -1}, -1, AOM_TUNE_SSIM, VE, "tune"}, ___ 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] configure: add mv30 blockdsp dependency
ffmpeg | branch: master | Peter Ross | Fri Apr 10 23:05:51 2020 +1000| [f1894c206eec463832eef851a5388949a68a050f] | committer: Peter Ross configure: add mv30 blockdsp dependency fix link error introduced in 481ebb1c8b3368e2a1bb9e33bd10b50a8818dbf7 Signed-off-by: Peter Ross Reviewed-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1894c206eec463832eef851a5388949a68a050f --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 09bda9b408..4d4c429be9 100755 --- a/configure +++ b/configure @@ -2790,6 +2790,7 @@ msmpeg4v3_decoder_select="h263_decoder" msmpeg4v3_encoder_select="h263_encoder" mss2_decoder_select="mpegvideo qpeldsp vc1_decoder" mts2_decoder_select="mss34dsp" +mv30_decoder_select="blockdsp" mvha_decoder_deps="zlib" mvha_decoder_select="llviddsp" mwsc_decoder_deps="zlib" ___ 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".