[FFmpeg-cvslog] avcodec/adpcm: only process right samples when decoding stereo
ffmpeg | branch: master | Peter Ross | Wed Jul 24 16:44:57 2024 +1000| [0e09f6d690b748f61d652ad58ed96c2d48670110] | committer: Peter Ross avcodec/adpcm: only process right samples when decoding stereo Fixes Coverity issue #1610760. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e09f6d690b748f61d652ad58ed96c2d48670110 --- libavcodec/adpcm.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 0a9780317c..8d358bc414 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1680,22 +1680,24 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, for (int count2 = 0; count2 < (channels == 2 ? 28 : 14); count2++) { byte = bytestream2_get_byteu(&gb); next_left_sample = sign_extend(byte >> 4, 4) * (1 << shift_left); -next_right_sample = sign_extend(byte, 4) * (1 << shift_right); next_left_sample = (next_left_sample + (current_left_sample * coeff1l) + (previous_left_sample * coeff2l) + 0x80) >> 8; -next_right_sample = (next_right_sample + -(current_right_sample * coeff1r) + -(previous_right_sample * coeff2r) + 0x80) >> 8; previous_left_sample = current_left_sample; current_left_sample = av_clip_int16(next_left_sample); -previous_right_sample = current_right_sample; -current_right_sample = av_clip_int16(next_right_sample); *samples++ = current_left_sample; if (channels == 2){ +next_right_sample = sign_extend(byte, 4) * (1 << shift_right); + +next_right_sample = (next_right_sample + +(current_right_sample * coeff1r) + +(previous_right_sample * coeff2r) + 0x80) >> 8; + +previous_right_sample = current_right_sample; +current_right_sample = av_clip_int16(next_right_sample); *samples++ = current_right_sample; } else { next_left_sample = sign_extend(byte, 4) * (1 << shift_left); ___ 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/lead: support format 0x0
ffmpeg | branch: master | Peter Ross | Sun Nov 12 10:55:24 2023 +1100| [37702e20663dc8111534229af551763c2a954e73] | committer: Peter Ross avcodec/lead: support format 0x0 Fixes ticket #10660. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37702e20663dc8111534229af551763c2a954e73 --- libavcodec/leaddec.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c index 07b226941f..f7d31681b8 100644 --- a/libavcodec/leaddec.c +++ b/libavcodec/leaddec.c @@ -142,7 +142,7 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, { LeadContext *s = avctx->priv_data; const uint8_t * buf = avpkt->data; -int ret, format, yuv20p_half = 0, fields = 1, q, size; +int ret, format, zero = 0, yuv20p_half = 0, fields = 1, q, size; GetBitContext gb; int16_t dc_pred[3] = {0, 0, 0}; uint16_t dequant[2][64]; @@ -152,6 +152,10 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, format = AV_RL16(buf + 4); switch(format) { +case 0x0: +zero = 1; +avctx->pix_fmt = AV_PIX_FMT_YUV420P; +break; case 0x8000: yuv20p_half = 1; // fall-through @@ -194,7 +198,44 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, init_get_bits8(&gb, s->bitstream_buf, size); -if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { +if (avctx->pix_fmt == AV_PIX_FMT_YUV420P && zero) { +for (int mb_y = 0; mb_y < avctx->height / 8; mb_y++) +for (int mb_x = 0; mb_x < avctx->width / 16; mb_x++) +for (int b = 0; b < 4; b++) { +int luma_block = 2; +const VLCElem * dc_vlc = b < luma_block ? luma_dc_vlc : chroma_dc_vlc; +int dc_bits= b < luma_block ? LUMA_DC_BITS : CHROMA_DC_BITS; +const VLCElem * ac_vlc = b < luma_block ? luma_ac_vlc : chroma_ac_vlc; +int ac_bits= b < luma_block ? LUMA_AC_BITS : CHROMA_AC_BITS; +int plane = b < luma_block ? 0 : b - 1; +int x, y, yclip; + +if (b < luma_block) { +y = 8*mb_y + 8*(b >> 1); +x = 16*mb_x + 8*(b & 1); +yclip = 0; +} else { +y = 4*mb_y; +x = 8*mb_x; +yclip = y + 8 >= avctx->height / 2; +} + +if (yclip) { +uint8_t tmp[64]; +ret = decode_block(s, &gb, dc_vlc, dc_bits, ac_vlc, ac_bits, +dc_pred + plane, dequant[!(b < 4)], tmp, 8); +for (int yy = 0; yy < 8 && y + yy < avctx->height / 2; yy++) +memcpy(frame->data[plane] + (y+yy)*frame->linesize[plane] + x, tmp + yy, 8); +} else { +ret = decode_block(s, &gb, dc_vlc, dc_bits, ac_vlc, ac_bits, +dc_pred + plane, dequant[!(b < 4)], +frame->data[plane] + y*frame->linesize[plane] + x, +frame->linesize[plane]); +} +if (ret < 0) +return ret; +} +} else if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { for (int mb_y = 0; mb_y < (avctx->height + 15) / 16; mb_y++) for (int mb_x = 0; mb_x < (avctx->width + 15) / 16; mb_x++) for (int b = 0; b < (yuv20p_half ? 4 : 6); b++) { ___ 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/lead: support unaligned blocks
ffmpeg | branch: master | Peter Ross | Sun Nov 12 11:02:47 2023 +1100| [db975ff00d2111de8052abfd65bd250a737bec6d] | committer: Peter Ross avcodec/lead: support unaligned blocks Fixed ticket #10656. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db975ff00d2111de8052abfd65bd250a737bec6d --- libavcodec/leaddec.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c index 489fe501b6..07b226941f 100644 --- a/libavcodec/leaddec.c +++ b/libavcodec/leaddec.c @@ -195,8 +195,8 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, init_get_bits8(&gb, s->bitstream_buf, size); if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { -for (int mb_y = 0; mb_y < avctx->height / 16; mb_y++) -for (int mb_x = 0; mb_x < avctx->width / 16; mb_x++) +for (int mb_y = 0; mb_y < (avctx->height + 15) / 16; mb_y++) +for (int mb_x = 0; mb_x < (avctx->width + 15) / 16; mb_x++) for (int b = 0; b < (yuv20p_half ? 4 : 6); b++) { int luma_block = yuv20p_half ? 2 : 4; const VLCElem * dc_vlc = b < luma_block ? luma_dc_vlc : chroma_dc_vlc; @@ -228,8 +228,8 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, } } else { for (int f = 0; f < fields; f++) -for (int j = 0; j < avctx->height / fields / 8; j++) -for (int i = 0; i < avctx->width / 8; i++) +for (int j = 0; j < (avctx->height + 7) / fields / 8; j++) +for (int i = 0; i < (avctx->width + 7) / 8; i++) for (int plane = 0; plane < 3; plane++) { const VLCElem * dc_vlc = !plane ? luma_dc_vlc : chroma_dc_vlc; int dc_bits= !plane ? LUMA_DC_BITS : CHROMA_DC_BITS; ___ 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] av_tx_init: accept NULL scale for RDFT
ffmpeg | branch: master | Peter Ross | Thu Feb 15 07:42:19 2024 +1100| [a2cfd6062c61e32fe95e872bcd76aabe63201162] | committer: Peter Ross av_tx_init: accept NULL scale for RDFT Make av_tx_init() agree with documentation: * Real to complex and complex to real DFTs. * For the float and int32 variants, the scale type is 'float', while for * the double variant, it's a 'double'. If scale is NULL, 1.0 will be used * as a default. Reviewed-by: Lynne Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2cfd6062c61e32fe95e872bcd76aabe63201162 --- libavutil/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/tx.c b/libavutil/tx.c index d6740071b9..cc360cff31 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -914,9 +914,9 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, if (!(flags & AV_TX_INPLACE)) flags |= FF_TX_OUT_OF_PLACE; -if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT))) +if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT) || (type == AV_TX_FLOAT_RDFT) || (AV_TX_INT32_RDFT))) scale = &default_scale_f; -else if (!scale && (type == AV_TX_DOUBLE_MDCT)) +else if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_RDFT))) scale = &default_scale_d; ret = ff_tx_init_subtx(&tmp, type, flags, NULL, len, inv, scale); ___ 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: LEAD MCMP decoder
ffmpeg | branch: master | Peter Ross | Fri Oct 14 13:19:39 2022 +1100| [10869cd849504f0792770722be52884644c54fcf] | committer: Peter Ross avcodec: LEAD MCMP decoder Partially fixes ticket #798 Reviewed-by: James Almer Reviewed-by: Michael Niedermayer Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10869cd849504f0792770722be52884644c54fcf --- Changelog | 3 + configure | 1 + doc/general_contents.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c| 1 + libavcodec/codec_desc.c | 7 ++ libavcodec/codec_id.h | 1 + libavcodec/leaddata.h | 62 +++ libavcodec/leaddec.c | 270 ++ libavcodec/version.h | 4 +- libavformat/riff.c| 1 + 11 files changed, 350 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 8f0606fc26..ca38546262 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,9 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version : +- LEAD MCMP decoder + version 6.1: - libaribcaption decoder - Playdate video decoder and demuxer diff --git a/configure b/configure index 8ab658f730..46d7a5cf0e 100755 --- a/configure +++ b/configure @@ -2887,6 +2887,7 @@ ipu_decoder_select="mpegvideodec" jpegls_decoder_select="mjpeg_decoder" jv_decoder_select="blockdsp" lagarith_decoder_select="llviddsp" +lead_decoder_select="idctdsp jpegtables" ljpeg_encoder_select="jpegtables" lscr_decoder_select="inflate_wrapper" magicyuv_decoder_select="llviddsp" diff --git a/doc/general_contents.texi b/doc/general_contents.texi index c48c812a31..62ca4f7cb6 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -997,6 +997,7 @@ following image formats are supported: @item Lagarith @tab @tab X @item LCL (LossLess Codec Library) MSZH @tab @tab X @item LCL (LossLess Codec Library) ZLIB @tab E @tab E +@item LEAD MCMP @tab @tab X @item LOCO @tab @tab X @item LucasArts SANM/Smush @tab @tab X @tab Used in LucasArts games / SMUSH animations. diff --git a/libavcodec/Makefile b/libavcodec/Makefile index ab7fba394a..57d57f3ab5 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -479,6 +479,7 @@ OBJS-$(CONFIG_JV_DECODER) += jvdec.o OBJS-$(CONFIG_KGV1_DECODER)+= kgv1dec.o OBJS-$(CONFIG_KMVC_DECODER)+= kmvc.o OBJS-$(CONFIG_LAGARITH_DECODER)+= lagarith.o lagarithrac.o +OBJS-$(CONFIG_LEAD_DECODER)+= leaddec.o jpegquanttables.o OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc_common.o OBJS-$(CONFIG_LOCO_DECODER)+= loco.o OBJS-$(CONFIG_LSCR_DECODER)+= lscrdec.o png.o pngdec.o pngdsp.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 5136a566f1..2662adb754 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -188,6 +188,7 @@ extern const FFCodec ff_jv_decoder; extern const FFCodec ff_kgv1_decoder; extern const FFCodec ff_kmvc_decoder; extern const FFCodec ff_lagarith_decoder; +extern const FFCodec ff_lead_decoder; extern const FFCodec ff_ljpeg_encoder; extern const FFCodec ff_loco_decoder; extern const FFCodec ff_lscr_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index f556bb94d5..432a9c9ea6 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1960,6 +1960,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("vMix Video"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_LEAD, +.type = AVMEDIA_TYPE_VIDEO, +.name = "lead", +.long_name = NULL_IF_CONFIG_SMALL("LEAD MCMP"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 29b410b8d3..84ce8e6aa9 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -324,6 +324,7 @@ enum AVCodecID { AV_CODEC_ID_EVC, AV_CODEC_ID_RTV1, AV_CODEC_ID_VMIX, +AV_CODEC_ID_LEAD, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/leaddata.h b/libavcodec/leaddata.h new file mode 100644 index 00..525b582cf7 --- /dev/null +++ b/libavcodec/leaddata.h @@ -0,0 +1,62 @@ +/* + * LEAD MCMP decoder tables + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser Gener
[FFmpeg-cvslog] avcodec/siren: indent
ffmpeg | branch: master | Peter Ross | Sat Nov 12 11:23:04 2022 +1100| [b653352bd89fa0da3ea0377fad07e3979eecad47] | committer: Peter Ross avcodec/siren: indent > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b653352bd89fa0da3ea0377fad07e3979eecad47 --- libavcodec/siren.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index b3627754da..fa8636946d 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -720,8 +720,8 @@ static int siren_decode(AVCodecContext *avctx, AVFrame *frame, if ((ret = init_get_bits(gb, avpkt->data, bits_per_frame)) < 0) return ret; } else -if ((ret = init_get_bits8(gb, avpkt->data, avpkt->size)) < 0) -return ret; +if ((ret = init_get_bits8(gb, avpkt->data, avpkt->size)) < 0) +return ret; skip_bits(gb, s->sample_rate_bits); ___ 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] fate/microsoft: add mss2 region test case
ffmpeg | branch: master | Peter Ross | Fri Nov 4 16:48:23 2022 +1100| [99499125ed7335f1779dc92946a16bc4b479b434] | committer: Peter Ross fate/microsoft: add mss2 region test case > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99499125ed7335f1779dc92946a16bc4b479b434 --- tests/fate/microsoft.mak | 3 ++- tests/ref/fate/mss2-region | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index ee1a062425..e98ab30aae 100644 --- a/tests/fate/microsoft.mak +++ b/tests/fate/microsoft.mak @@ -14,8 +14,9 @@ FATE_MSS2-$(call FRAMECRC, ASF, MSS2, SCALE_FILTER) += fate-mss2-rgb555 fate-mss fate-mss2-rgb555: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/rle555.wmv -pix_fmt rgb555le -vf scale fate-mss2-rgb555s: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/rle555s.wmv -pix_fmt rgb555le -vf scale -FATE_MSS2 += fate-mss2-wmv +FATE_MSS2 += fate-mss2-wmv fate-mss2-region fate-mss2-wmv: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/msscreencodec.wmv -an -frames 100 +fate-mss2-region: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/mss2_2.wmv -an FATE_MSS2-$(call FRAMECRC, ASF, MSS2) += $(FATE_MSS2) diff --git a/tests/ref/fate/mss2-region b/tests/ref/fate/mss2-region new file mode 100644 index 00..c0a99f3e1f --- /dev/null +++ b/tests/ref/fate/mss2-region @@ -0,0 +1,7 @@ +#tb 0: 1/1000 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 160x120 +#sar 0: 0/1 +0, 0, 0,1,57600, 0x51bc82a3 +0, 3000, 3000,1,57600, 0x51bc82a3 ___ 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] fate/video: vqc testcase
ffmpeg | branch: master | Peter Ross | Fri Nov 4 16:48:23 2022 +1100| [b48d2320f118f8a687a7e65f57adecbe3479e7a0] | committer: Peter Ross fate/video: vqc testcase > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b48d2320f118f8a687a7e65f57adecbe3479e7a0 --- tests/fate/video.mak | 3 +++ tests/ref/fate/vqc | 6 ++ 2 files changed, 9 insertions(+) diff --git a/tests/fate/video.mak b/tests/fate/video.mak index 40cdd9e3b6..af7e77e814 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -374,6 +374,9 @@ fate-xxan-wc4: CMD = framecrc -i $(TARGET_SAMPLES)/wc4-xan/wc4trailer-partial.av FATE_VIDEO-$(call FRAMECRC, WAV, SMVJPEG) += fate-smvjpeg fate-smvjpeg: CMD = framecrc -idct simple -flags +bitexact -i $(TARGET_SAMPLES)/smv/clock.smv -an +FATE_VIDEO-$(call FRAMECRC, AVI, VQC) += fate-vqc +fate-vqc: CMD = framecrc -i $(TARGET_SAMPLES)/vqc/samp1.avi + FATE_VIDEO += $(FATE_VIDEO-yes) FATE_SAMPLES_FFMPEG += $(FATE_VIDEO) diff --git a/tests/ref/fate/vqc b/tests/ref/fate/vqc new file mode 100644 index 00..c59393a36f --- /dev/null +++ b/tests/ref/fate/vqc @@ -0,0 +1,6 @@ +#tb 0: 845/25333 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 320x240 +#sar 0: 0/1 +0, 0, 0,1, 115200, 0xb32bba4f ___ 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] fate/audio: msnsiren test case
ffmpeg | branch: master | Peter Ross | Fri Nov 4 16:48:23 2022 +1100| [e75e3ac106140b7de6a7cd26d2a14d83c36f5630] | committer: Peter Ross fate/audio: msnsiren test case > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e75e3ac106140b7de6a7cd26d2a14d83c36f5630 --- tests/fate/audio.mak | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 5d754b1568..65317c8d45 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -46,6 +46,11 @@ fate-imc: CMP = oneoff fate-imc: CMP_TARGET = 59416 fate-imc: REF = $(SAMPLES)/imc/imc-201706.pcm +FATE_SAMPLES_AUDIO-$(call DEMDEC, WAV, MSNSIREN) += fate-msnsiren +fate-msnsiren: CMD = pcm -i $(TARGET_SAMPLES)/msnsiren/msnsiren2.wav +fate-msnsiren: CMP = oneoff +fate-msnsiren: REF = $(SAMPLES)/msnsiren/msnsiren2.pcm + FATE_SAMPLES_AUDIO-$(call DEMDEC, FLV, NELLYMOSER) += fate-nellymoser fate-nellymoser: CMD = pcm -i $(TARGET_SAMPLES)/nellymoser/nellymoser.flv fate-nellymoser: CMP = oneoff ___ 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/svq3: perform residual slice copy before xor'ing watermark key
ffmpeg | branch: master | Peter Ross | Tue Nov 1 10:16:43 2022 +1100| [95386b7b65dab6fb72bf76c14470904782642ebc] | committer: Peter Ross avcodec/svq3: perform residual slice copy before xor'ing watermark key Fixes ticket #5387 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95386b7b65dab6fb72bf76c14470904782642ebc --- libavcodec/svq3.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 7e8f16cc72..b96c4f61f6 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1037,15 +1037,16 @@ static int svq3_decode_slice_header(AVCodecContext *avctx) } memcpy(s->slice_buf, s->gb.buffer + s->gb.index / 8, slice_bytes); +if (length > 0) { +memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1); +} + if (s->watermark_key) { uint32_t header = AV_RL32(&s->slice_buf[1]); AV_WL32(&s->slice_buf[1], header ^ s->watermark_key); } init_get_bits(&s->gb_slice, s->slice_buf, slice_bits); -if (length > 0) { -memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1); -} skip_bits_long(&s->gb, slice_bytes * 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] avcodec/svq1: fix interframe mean VLC symbols
ffmpeg | branch: master | Peter Ross | Tue Nov 1 09:24:29 2022 +1100| [6fe8556a19c4494d4312f81c2fb7d4402b31b2eb] | committer: Peter Ross avcodec/svq1: fix interframe mean VLC symbols Fixes ticket #128. The SVQ1 interframe mean VLC symbols -128 and 128 are incorrectly swapped in our SVQ1 implementation, resulting in visible artifacts for some videos. This patch unswaps the order of these two symbols. The most noticable example of the artiacts caused by this error can be observed in https://trac.ffmpeg.org/attachment/ticket/128/svq1_set.7z '352_288_k_50.mov'. The artifacts are not observed when using the reference decoder (QuickTime 7.7.9 x86 binary). As a result of this patch, the reference data for the fate-svq1 test ($SAMPLES/svq1/marymary-shackles.mov) must be modified. For this file, our decoder output is now bitwise identical to the reference decoder. I have tested patch with various other samples and they are all now bitwise identical. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fe8556a19c4494d4312f81c2fb7d4402b31b2eb --- libavcodec/svq1_vlc.h | 4 ++-- tests/ref/fate/svq1 | 22 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/svq1_vlc.h b/libavcodec/svq1_vlc.h index 06e3509e4d..5c27928c2a 100644 --- a/libavcodec/svq1_vlc.h +++ b/libavcodec/svq1_vlc.h @@ -167,7 +167,7 @@ const uint16_t ff_svq1_inter_mean_vlc[512][2] = { { 0xA0, 22 }, { 0xA1, 22 }, { 0xA2, 22 }, { 0xA3, 22 }, { 0xA4, 22 }, { 0xA5, 22 }, { 0xA6, 22 }, { 0xA7, 22 }, { 0xA8, 22 }, { 0xA9, 22 }, { 0xAA, 22 }, { 0xAB, 22 }, -{ 0x7F, 22 }, { 0x8F, 21 }, { 0xAC, 22 }, { 0xAD, 22 }, +{ 0x8E, 21 }, { 0x8F, 21 }, { 0xAC, 22 }, { 0xAD, 22 }, { 0xAE, 22 }, { 0xAF, 22 }, { 0xB0, 22 }, { 0xB1, 22 }, { 0x53, 20 }, { 0x90, 21 }, { 0xB2, 22 }, { 0x91, 21 }, { 0xB3, 22 }, { 0xB4, 22 }, { 0x54, 20 }, { 0xB5, 22 }, @@ -231,7 +231,7 @@ const uint16_t ff_svq1_inter_mean_vlc[512][2] = { { 0x87, 21 }, { 0x4F, 20 }, { 0x35, 19 }, { 0x4E, 20 }, { 0x33, 19 }, { 0x32, 19 }, { 0x4D, 20 }, { 0x4C, 20 }, { 0x83, 22 }, { 0x4B, 20 }, { 0x81, 22 }, { 0x80, 22 }, -{ 0x8E, 21 }, { 0x7E, 22 }, { 0x7D, 22 }, { 0x84, 21 }, +{ 0x7F, 22 }, { 0x7E, 22 }, { 0x7D, 22 }, { 0x84, 21 }, { 0x8D, 21 }, { 0x7A, 22 }, { 0x79, 22 }, { 0x4A, 20 }, { 0x77, 22 }, { 0x76, 22 }, { 0x89, 21 }, { 0x74, 22 }, { 0x73, 22 }, { 0x72, 22 }, { 0x49, 20 }, { 0x70, 22 }, diff --git a/tests/ref/fate/svq1 b/tests/ref/fate/svq1 index d53e2952e4..0b0948cce6 100644 --- a/tests/ref/fate/svq1 +++ b/tests/ref/fate/svq1 @@ -24,19 +24,19 @@ 0, 18, 18,1,21600, 0x8d5b2ad0 0, 19, 19,1,21600, 0xe67128e6 0, 20, 20,1,21600, 0xb7bf613e -0, 21, 21,1,21600, 0xefd0f51b -0, 22, 22,1,21600, 0x31b7da59 +0, 21, 21,1,21600, 0xf697fa3e +0, 22, 22,1,21600, 0x5b6ede88 0, 23, 23,1,21600, 0x7a84a8f7 0, 24, 24,1,21600, 0x0351ad27 -0, 25, 25,1,21600, 0xed6f434d -0, 26, 26,1,21600, 0x0e771127 -0, 27, 27,1,21600, 0x37bf0b95 -0, 28, 28,1,21600, 0x30e10a77 -0, 29, 29,1,21600, 0x1a48288a -0, 30, 30,1,21600, 0xf43c6770 -0, 31, 31,1,21600, 0x3c43ae68 -0, 32, 32,1,21600, 0x04dc0949 -0, 33, 33,1,21600, 0x7920758d +0, 25, 25,1,21600, 0x57b547c2 +0, 26, 26,1,21600, 0xbb9e1558 +0, 27, 27,1,21600, 0xcb470f6b +0, 28, 28,1,21600, 0xeb100de0 +0, 29, 29,1,21600, 0x089c2bf0 +0, 30, 30,1,21600, 0xe27b6a42 +0, 31, 31,1,21600, 0xbfe2b11b +0, 32, 32,1,21600, 0xd9ca0bb5 +0, 33, 33,1,21600, 0x12fe783c 0, 34, 34,1,21600, 0x6c12bab5 0, 35, 35,1,21600, 0x1ac23706 0, 36, 36,1,21600, 0x7a95cb5f ___ 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/svq1dec: detect buggy FFmpeg encoder and apply correction to interframe mean symbols
ffmpeg | branch: master | Peter Ross | Tue Nov 1 09:24:29 2022 +1100| [16af424bf983409e00a84af1c98bbe7171ddd79f] | committer: Peter Ross avcodec/svq1dec: detect buggy FFmpeg encoder and apply correction to interframe mean symbols The FFmpeg encoder does not increment the temporal reference field, so use that knowledge plus the extradata field to detect buggy versions of the encoder. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=16af424bf983409e00a84af1c98bbe7171ddd79f --- libavcodec/svq1dec.c | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 828b38b93d..c7269456e2 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -73,6 +73,8 @@ typedef struct SVQ1Context { int height; int frame_code; int nonref; // 1 if the current frame won't be referenced + +int last_tempref; } SVQ1Context; static const uint8_t string_table[256] = { @@ -229,7 +231,7 @@ static int svq1_decode_block_intra(GetBitContext *bitbuf, uint8_t *pixels, } static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels, - ptrdiff_t pitch) + ptrdiff_t pitch, int buggy) { uint32_t bit_cache; uint8_t *list[63]; @@ -270,6 +272,13 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels, mean = get_vlc2(bitbuf, svq1_inter_mean.table, 9, 3) - 256; +if (buggy) { +if (mean == -128) +mean = 128; +else if (mean == 128) +mean = -128; +} + SVQ1_CALC_CODEBOOK_ENTRIES(ff_svq1_inter_codebooks); for (y = 0; y < height; y++) { @@ -455,7 +464,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp, GetBitContext *bitbuf, uint8_t *current, uint8_t *previous, ptrdiff_t pitch, svq1_pmv *motion, int x, int y, - int width, int height) + int width, int height, int buggy) { uint32_t block_type; int result = 0; @@ -487,7 +496,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp, ff_dlog(avctx, "Error in svq1_motion_inter_block %i\n", result); break; } -result = svq1_decode_block_non_intra(bitbuf, current, pitch); +result = svq1_decode_block_non_intra(bitbuf, current, pitch, buggy); break; case SVQ1_BLOCK_INTER_4V: @@ -498,7 +507,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp, ff_dlog(avctx, "Error in svq1_motion_inter_4v_block %i\n", result); break; } -result = svq1_decode_block_non_intra(bitbuf, current, pitch); +result = svq1_decode_block_non_intra(bitbuf, current, pitch, buggy); break; case SVQ1_BLOCK_INTRA: @@ -524,15 +533,18 @@ static void svq1_parse_string(GetBitContext *bitbuf, uint8_t out[257]) out[i] = 0; } -static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame) +static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame, int * buggy) { SVQ1Context *s = avctx->priv_data; GetBitContext *bitbuf = &s->gb; int frame_size_code; int width = s->width; int height = s->height; +int tempref; -skip_bits(bitbuf, 8); /* temporal_reference */ +tempref = get_bits(bitbuf, 8); /* temporal_reference */ +*buggy = tempref == 0 && s->last_tempref == 0 && avctx->extradata_size == 0; +s->last_tempref = tempref; /* frame type */ s->nonref = 0; @@ -624,7 +636,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *cur, int buf_size = avpkt->size; SVQ1Context *s = avctx->priv_data; uint8_t *current; -int result, i, x, y, width, height; +int result, i, x, y, width, height, buggy; int ret; /* initialize bit buffer */ @@ -664,7 +676,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *cur, src[i] = ((src[i] << 16) | (src[i] >> 16)) ^ src[7 - i]; } -result = svq1_decode_frame_header(avctx, cur); +result = svq1_decode_frame_header(avctx, cur, &buggy); if (result != 0) { ff_dlog(avctx, "Error in svq1_decode_frame_header %i\n", result); return result; @@ -734,7 +746,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *cur, result = svq1_decode_delta_block(avctx, &s->hdsp, &s->gb, ¤t[x],
[FFmpeg-cvslog] avcodec/svq1enc: do not use ambiguous interframe mean symbols
ffmpeg | branch: master | Peter Ross | Tue Nov 1 09:24:29 2022 +1100| [e1dd4a27ca275fd44c3700e2adf8d76903c17678] | committer: Peter Ross avcodec/svq1enc: do not use ambiguous interframe mean symbols Don't emit interframe mean symbols -128 and 128. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1dd4a27ca275fd44c3700e2adf8d76903c17678 --- libavcodec/svq1enc.c | 5 + tests/ref/seek/vsynth_lena-svq1 | 28 ++-- tests/ref/vsynth/vsynth1-svq1 | 8 tests/ref/vsynth/vsynth2-svq1 | 6 +++--- tests/ref/vsynth/vsynth3-svq1 | 6 +++--- tests/ref/vsynth/vsynth_lena-svq1 | 6 +++--- 6 files changed, 32 insertions(+), 27 deletions(-) diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 92f91aeebd..b275b333dc 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -240,6 +240,11 @@ static int encode_block(SVQ1EncContext *s, uint8_t *src, uint8_t *ref, } } +if (best_mean == -128) +best_mean = -127; +else if (best_mean == 128) +best_mean = 127; + split = 0; if (best_score > threshold && level) { int score = 0; diff --git a/tests/ref/seek/vsynth_lena-svq1 b/tests/ref/seek/vsynth_lena-svq1 index 33fe33e916..36c0fb7f4e 100644 --- a/tests/ref/seek/vsynth_lena-svq1 +++ b/tests/ref/seek/vsynth_lena-svq1 @@ -2,49 +2,49 @@ ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st:-1 flags:0 ts:-1.00 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517672 size: 25636 ret: 0 st: 0 flags:0 ts: 0.788359 -ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326616 size: 23552 ret: 0 st: 0 flags:1 ts:-0.317500 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret:-1 st:-1 flags:0 ts: 2.576668 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517672 size: 25636 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 157040 size: 21896 +ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 157232 size: 21896 ret: 0 st: 0 flags:1 ts:-0.740859 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret:-1 st:-1 flags:0 ts: 2.153336 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326616 size: 23552 ret: 0 st: 0 flags:0 ts:-0.058359 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st: 0 flags:1 ts: 2.835859 -ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722884 size: 25888 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722884 size: 25888 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 157040 size: 21896 +ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 157232 size: 21896 ret: 0 st: 0 flags:0 ts:-0.481641 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st: 0 flags:1 ts: 2.412500 -ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722884 size: 25888 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517568 size: 25636 +ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos: 517672 size: 25636 ret: 0 st:-1 flags:1 ts: 0.200839 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st: 0 flags:0 ts:-0.905000 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 36 size: 22300 ret: 0 st: 0 flags:1 ts: 1.989141 -ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722804 size: 25888 +ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos: 722884 size: 25888 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326556 size: 23552 +ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos: 326616 size: 23552 ret: 0
[FFmpeg-cvslog] avcodec/svq1enc: output ident string in extradata field
ffmpeg | branch: master | Peter Ross | Tue Nov 1 09:24:29 2022 +1100| [b0c1f248d9dd5b21d9c11e4e28b8862548d64cbd] | committer: Peter Ross avcodec/svq1enc: output ident string in extradata field This will enable the acurate identification of FFmpeg produced SVQ1 streams, should there be new bugs found in the encoder. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0c1f248d9dd5b21d9c11e4e28b8862548d64cbd --- libavcodec/svq1enc.c | 16 +++- tests/ref/vsynth/vsynth1-svq1 | 4 ++-- tests/ref/vsynth/vsynth2-svq1 | 4 ++-- tests/ref/vsynth/vsynth3-svq1 | 4 ++-- tests/ref/vsynth/vsynth_lena-svq1 | 4 ++-- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index b275b333dc..8f09e634a5 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -41,6 +41,7 @@ #include "svq1.h" #include "svq1encdsp.h" #include "svq1enc_cb.h" +#include "version.h" #include "libavutil/avassert.h" #include "libavutil/frame.h" @@ -572,6 +573,19 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) return 0; } +static av_cold int write_ident(AVCodecContext *avctx, const char *ident) +{ +int size = strlen(ident); +avctx->extradata = av_malloc(size + 8); +if (!avctx->extradata) +return AVERROR(ENOMEM); +AV_WB32(avctx->extradata, size + 8); +AV_WL32(avctx->extradata + 4, MKTAG('S', 'V', 'Q', '1')); +memcpy(avctx->extradata + 8, ident, size); +avctx->extradata_size = size + 8; +return 0; +} + static av_cold int svq1_encode_init(AVCodecContext *avctx) { SVQ1EncContext *const s = avctx->priv_data; @@ -632,7 +646,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) ff_h263_encode_init(&s->m); // mv_penalty -return 0; +return write_ident(avctx, s->avctx->flags & AV_CODEC_FLAG_BITEXACT ? "Lavc" : LIBAVCODEC_IDENT); } static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, diff --git a/tests/ref/vsynth/vsynth1-svq1 b/tests/ref/vsynth/vsynth1-svq1 index e91ef46f17..6a517f6b7b 100644 --- a/tests/ref/vsynth/vsynth1-svq1 +++ b/tests/ref/vsynth/vsynth1-svq1 @@ -1,4 +1,4 @@ -78cdca850b19faf3aac0b0682207451e *tests/data/fate/vsynth1-svq1.mov -1333541 tests/data/fate/vsynth1-svq1.mov +89b1ec4d7bbee1ed2710c8cc8c1e269d *tests/data/fate/vsynth1-svq1.mov +1333561 tests/data/fate/vsynth1-svq1.mov 0b9ee47ee4bf735fe3697daad64fc409 *tests/data/fate/vsynth1-svq1.out.rawvideo stddev:9.57 PSNR: 28.50 MAXDIFF: 210 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-svq1 b/tests/ref/vsynth/vsynth2-svq1 index b50ba45e20..01d78bd279 100644 --- a/tests/ref/vsynth/vsynth2-svq1 +++ b/tests/ref/vsynth/vsynth2-svq1 @@ -1,4 +1,4 @@ -42578021105a2f526179c5601e635312 *tests/data/fate/vsynth2-svq1.mov -940337 tests/data/fate/vsynth2-svq1.mov +14f355a06d475dcf6a90ac6ab3ae2970 *tests/data/fate/vsynth2-svq1.mov +940357 tests/data/fate/vsynth2-svq1.mov ba8f6b721a8e19fe8a6ef92a8cff7479 *tests/data/fate/vsynth2-svq1.out.rawvideo stddev:3.71 PSNR: 36.72 MAXDIFF: 210 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth3-svq1 b/tests/ref/vsynth/vsynth3-svq1 index ba1d3d5082..05fd497336 100644 --- a/tests/ref/vsynth/vsynth3-svq1 +++ b/tests/ref/vsynth/vsynth3-svq1 @@ -1,4 +1,4 @@ -03805cb764c00c2162b2bed24b7f34bd *tests/data/fate/vsynth3-svq1.mov -40757 tests/data/fate/vsynth3-svq1.mov +969dcdd69774b9c42dcf81e8dd393364 *tests/data/fate/vsynth3-svq1.mov +40777 tests/data/fate/vsynth3-svq1.mov a99efde992a2e3efcc085ecc6920a1e3 *tests/data/fate/vsynth3-svq1.out.rawvideo stddev: 14.49 PSNR: 24.91 MAXDIFF: 183 bytes:86700/86700 diff --git a/tests/ref/vsynth/vsynth_lena-svq1 b/tests/ref/vsynth/vsynth_lena-svq1 index 94f260865a..0889eba5bb 100644 --- a/tests/ref/vsynth/vsynth_lena-svq1 +++ b/tests/ref/vsynth/vsynth_lena-svq1 @@ -1,4 +1,4 @@ -7534b2c6b7fc7201f193e9b4514cdb90 *tests/data/fate/vsynth_lena-svq1.mov -766817 tests/data/fate/vsynth_lena-svq1.mov +8890d9ca13934391b6891ac5f67897c6 *tests/data/fate/vsynth_lena-svq1.mov +766837 tests/data/fate/vsynth_lena-svq1.mov 85261558fa744ef468fe77dbe4d91d8d *tests/data/fate/vsynth_lena-svq1.out.rawvideo stddev:3.23 PSNR: 37.93 MAXDIFF: 61 bytes: 7603200/ 7603200 ___ 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/mss2: initialise wmv9_mask variable
ffmpeg | branch: master | Peter Ross | Tue Nov 1 09:12:35 2022 +1100| [db774833638cd4465d979d6d28487bf08eefc485] | committer: Peter Ross avcodec/mss2: initialise wmv9_mask variable initialised to -1 which indicates wmv9 mask not present > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db774833638cd4465d979d6d28487bf08eefc485 --- libavcodec/mss2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 69494d8c44..14746505f4 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -519,7 +519,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, struct Rectangle wmv9rects[MAX_WMV9_RECTANGLES], *r; struct Rectangle2 draw; -int used_rects = 0, i, implicit_rect = 0, av_uninit(wmv9_mask); +int used_rects = 0, i, implicit_rect = 0, wmv9_mask = -1; if ((ret = init_get_bits8(&gb, buf, buf_size)) < 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/mss2: calculate draw region and revise split position
ffmpeg | branch: master | Peter Ross | Tue Oct 18 15:52:15 2022 +1100| [31162eb9490e51a526ff0f78a57303a4d6433aba] | committer: Peter Ross avcodec/mss2: calculate draw region and revise split position for videos with wmv9 rectangles, the region drawn by ff_mss12_decode_rect may be less than the entire video area. the wmv9 rectangles are used to calculate the ff_mss12_decode_rect draw region. Fixes tickets #3255 and #4043 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31162eb9490e51a526ff0f78a57303a4d6433aba --- libavcodec/mss2.c | 70 +++ 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index d8a30019f7..69494d8c44 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -468,6 +468,39 @@ struct Rectangle { int coded, x, y, w, h; }; +struct Rectangle2 { +int left, right, top, bottom; +}; + +static void calc_draw_region(struct Rectangle2 * draw, const struct Rectangle2 * rect) +{ +#define COMPARE(top, bottom, left, right) \ +if (rect->top <= draw->top && rect->bottom >= draw->bottom) { \ +if (rect->left <= draw->left && rect->right >= draw->left) \ +draw->left = FFMIN(rect->right, draw->right); \ +\ +if (rect->right >= draw->right) { \ +if (rect->left >= draw->left) { \ +if (rect->left < draw->right) \ +draw->right = rect->left; \ +} else { \ +draw->right = draw->left; \ +} \ +} \ +} + +COMPARE(top, bottom, left, right) +COMPARE(left, right, top, bottom) +} + +static int calc_split_position(int split_position, const struct Rectangle2 * rect, int height) +{ +if (rect->top || rect->bottom != height) +split_position = rect->top + split_position * (rect->bottom - rect->top) / height; + +return av_clip(split_position, rect->top + 1, rect->bottom - 1); +} + #define MAX_WMV9_RECTANGLES 20 #define ARITH2_PADDING 2 @@ -485,6 +518,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, int keyframe, has_wmv9, has_mv, is_rle, is_555, ret; struct Rectangle wmv9rects[MAX_WMV9_RECTANGLES], *r; +struct Rectangle2 draw; int used_rects = 0, i, implicit_rect = 0, av_uninit(wmv9_mask); if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0) @@ -671,11 +705,32 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING); arith2_init(&acoder, &gB); c->keyframe = keyframe; -if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, 0, -avctx->width, -ctx->split_position)) + +draw.left = 0; +draw.top = 0; +draw.right = avctx->width; +draw.bottom = avctx->height; +if (wmv9_mask == -1) { +for (i = 0; i < used_rects; i++) { +struct Rectangle2 r; +r.left = wmv9rects[i].x; +r.top= wmv9rects[i].y; +r.right = r.left + wmv9rects[i].w; +r.bottom = r.top + wmv9rects[i].h; +calc_draw_region(&draw, &r); +} +} + +if (draw.left >= avctx->width || draw.right > avctx->width || +draw.top >= avctx->height || draw.bottom > avctx->height) return AVERROR_INVALIDDATA; +if (c->slice_split && draw.bottom - draw.top >= 10) { +ctx->split_position = calc_split_position(ctx->split_position, &draw, avctx->height); +if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, draw.top, +avctx->width, +ctx->split_position - draw.top)) +return AVERROR_INVALIDDATA; buf += arith2_get_consumed_bytes(&acoder); buf_size -= arith2_get_consumed_bytes(&acoder); if (c->slice_split) { @@ -686,7 +741,14 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[1], &acoder, 0, ctx->split_position, avctx->width, -avctx->height - ctx->split_position)) +
[FFmpeg-cvslog] avcodec/vp3data: rectify comment
ffmpeg | branch: master | Peter Ross | Wed Oct 26 20:11:26 2022 +1100| [639b7af493824e6dc045df0890c41b8e23b8f693] | committer: Peter Ross avcodec/vp3data: rectify comment > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=639b7af493824e6dc045df0890c41b8e23b8f693 --- libavcodec/vp3data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index 317797a697..a347f492ad 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -25,7 +25,7 @@ #include /* these coefficients dequantize intraframe Y plane coefficients - * (note: same as JPEG) */ + * (note: almost the same as JPEG) */ static const uint8_t vp31_intra_y_dequant[64] = { 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, ___ 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/jpegtables: remove duplicate luma and chroma quantization tables
ffmpeg | branch: master | Peter Ross | Wed Oct 26 20:11:21 2022 +1100| [58bd7d97a47da1065e2616d396938609b50ad1e4] | committer: Peter Ross avcodec/jpegtables: remove duplicate luma and chroma quantization tables Duplicates of the standard JPEG quantization tables were found in the AGM, MSS34(dsp), NUV and VP31 codecs. This patch elimates those duplicates, placing a single copy in jpegquanttables.c. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58bd7d97a47da1065e2616d396938609b50ad1e4 --- libavcodec/Makefile | 8 +++ libavcodec/agm.c | 27 -- libavcodec/jpegquanttables.c | 54 libavcodec/jpegquanttables.h | 32 ++ libavcodec/jpegtables.c | 27 -- libavcodec/mss34dsp.c| 25 ++-- libavcodec/nuv.c | 27 +++--- libavcodec/vp3.c | 3 ++- libavcodec/vp3data.h | 13 --- 9 files changed, 102 insertions(+), 114 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 7761620de7..8930994a6a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -142,7 +142,7 @@ OBJS-$(CONFIG_MPEGVIDEOENC)+= mpegvideo_enc.o mpeg12data.o \ mpegvideoencdsp.o OBJS-$(CONFIG_MSMPEG4DEC) += msmpeg4dec.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4ENC) += msmpeg4enc.o msmpeg4.o msmpeg4data.o -OBJS-$(CONFIG_MSS34DSP)+= mss34dsp.o +OBJS-$(CONFIG_MSS34DSP)+= mss34dsp.o jpegquanttables.o OBJS-$(CONFIG_PIXBLOCKDSP) += pixblockdsp.o OBJS-$(CONFIG_QPELDSP) += qpeldsp.o OBJS-$(CONFIG_QSV) += qsv.o @@ -196,7 +196,7 @@ OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_float.o ac3enc.o ac3tab.o \ OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3enc.o ac3tab.o ac3.o kbdwin.o OBJS-$(CONFIG_AC3_MF_ENCODER) += mfenc.o mf_utils.o OBJS-$(CONFIG_ACELP_KELVIN_DECODER)+= g729dec.o lsp.o celp_math.o celp_filters.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o -OBJS-$(CONFIG_AGM_DECODER) += agm.o +OBJS-$(CONFIG_AGM_DECODER) += agm.o jpegquanttables.o OBJS-$(CONFIG_AIC_DECODER) += aic.o OBJS-$(CONFIG_ALAC_DECODER)+= alac.o alac_data.o alacdsp.o OBJS-$(CONFIG_ALAC_ENCODER)+= alacenc.o alac_data.o @@ -553,7 +553,7 @@ OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o OBJS-$(CONFIG_NOTCHLC_DECODER) += notchlc.o -OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o +OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o jpegquanttables.o OBJS-$(CONFIG_ON2AVC_DECODER) += on2avc.o on2avcdata.o OBJS-$(CONFIG_OPUS_DECODER)+= opusdec.o opusdec_celt.o opus_celt.o \ opus_pvq.o opus_silk.o opustab.o vorbis_data.o \ @@ -739,7 +739,7 @@ OBJS-$(CONFIG_VORBIS_DECODER) += vorbisdec.o vorbisdsp.o vorbis.o \ vorbis_data.o OBJS-$(CONFIG_VORBIS_ENCODER) += vorbisenc.o vorbis.o \ vorbis_data.o -OBJS-$(CONFIG_VP3_DECODER) += vp3.o +OBJS-$(CONFIG_VP3_DECODER) += vp3.o jpegquanttables.o OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vpx_rac.o OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o \ vp6dsp.o vpx_rac.o diff --git a/libavcodec/agm.c b/libavcodec/agm.c index 374e4f4ef2..b37f1a42c9 100644 --- a/libavcodec/agm.c +++ b/libavcodec/agm.c @@ -33,24 +33,7 @@ #include "decode.h" #include "get_bits.h" #include "idctdsp.h" - -static const uint8_t unscaled_luma[64] = { -16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, -26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, -14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, -68,109,103, 77, 24, 35, 55, 64, 81,104,113, 92, -49, 64, 78, 87,103,121,120,101, 72, 92, 95, 98, -112,100,103,99 -}; - -static const uint8_t unscaled_chroma[64] = { -17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, -99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, -47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, -99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, -99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, -99, 99, 99, 99 -}; +#include "jpegquanttables.h" typedef struct MotionVector { int16_t x, y; @@ -550,13 +533,13 @@ static void compute_quant_matrix(AGMContext *s, double qscale) } else { if (qscale >= 0.0) { for (int i = 0; i < 64; i++) { -luma[i] = FFMA
[FFmpeg-cvslog] avcodec: ViewQuest VQC decoder
ffmpeg | branch: master | Peter Ross | Fri Oct 14 18:19:49 2022 +1100| [3141dbb7adf1e2bd5b9ff700312d7732c958b8df] | committer: Peter Ross avcodec: ViewQuest VQC decoder Reviewed-by: Andreas Rheinhardt Reviewed-by: Tomas Härdin Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3141dbb7adf1e2bd5b9ff700312d7732c958b8df --- Changelog | 1 + doc/general_contents.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c| 1 + libavcodec/codec_desc.c | 7 + libavcodec/codec_id.h | 1 + libavcodec/version.h | 4 +- libavcodec/vqcdec.c | 430 ++ libavformat/riff.c| 2 + 9 files changed, 446 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 14ba8ac874..ec9de1bd85 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ version : - APAC decoder and demuxer - Media 100i decoders - DTS to PTS reorder bsf +- ViewQuest VQC decoder version 5.1: diff --git a/doc/general_contents.texi b/doc/general_contents.texi index b005cb6c3e..8399fcb6b7 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -1339,6 +1339,7 @@ following image formats are supported: @item TwinVQ (VQF flavor)@tab @tab X @item VIMA @tab @tab X @tab Used in LucasArts SMUSH animations. +@item ViewQuest VQC @tab @tab X @item Vorbis @tab E @tab X @tab A native but very primitive encoder exists. @item Voxware MetaSound @tab @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 37b63cadc2..c7dc5da0f9 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -761,6 +761,7 @@ OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.o OBJS-$(CONFIG_VP9_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o +OBJS-$(CONFIG_VQC_DECODER) += vqcdec.o OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o wavpackdata.o dsd.o OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackdata.o wavpackenc.o OBJS-$(CONFIG_WBMP_DECODER)+= wbmpdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index cfeb01ac1c..46ad3b5a25 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -381,6 +381,7 @@ extern const FFCodec ff_vp9_decoder; extern const FFCodec ff_vp9_rkmpp_decoder; extern const FFCodec ff_vp9_v4l2m2m_decoder; extern const FFCodec ff_vqa_decoder; +extern const FFCodec ff_vqc_decoder; extern const FFCodec ff_wbmp_decoder; extern const FFCodec ff_wbmp_encoder; extern const FFCodec ff_webp_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 93b18f9072..24a0433dba 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1916,6 +1916,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Media 100i"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_VQC, +.type = AVMEDIA_TYPE_VIDEO, +.name = "vqc", +.long_name = NULL_IF_CONFIG_SMALL("ViewQuest VQC"), +.props = AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 82874daaa3..f436a2b624 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -319,6 +319,7 @@ enum AVCodecID { AV_CODEC_ID_RADIANCE_HDR, AV_CODEC_ID_WBMP, AV_CODEC_ID_MEDIA100, +AV_CODEC_ID_VQC, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/version.h b/libavcodec/version.h index 2206401aa8..f8abc803b6 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 50 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 51 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavcodec/vqcdec.c b/libavcodec/vqcdec.c new file mode 100644 index 00..5d1a03158c --- /dev/null +++ b/libavcodec/vqcdec.c @@ -0,0 +1,430 @@ +/* + * ViewQuest VQC decoder + * Copyright (C) 2022 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without
[FFmpeg-cvslog] avcodec: WBMP (Wireless Application Protocol Bitmap) image format
ffmpeg | branch: master | Peter Ross | Sun Aug 7 18:40:47 2022 +1000| [23758380d0d0704754d0942779f283e1cf7641ae] | committer: Peter Ross avcodec: WBMP (Wireless Application Protocol Bitmap) image format Reviewed-by: Andreas Rheinhardt Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23758380d0d0704754d0942779f283e1cf7641ae --- Changelog | 1 + doc/general_contents.texi | 2 ++ libavcodec/Makefile | 2 ++ libavcodec/allcodecs.c| 2 ++ libavcodec/codec_desc.c | 7 libavcodec/codec_id.h | 1 + libavcodec/version.h | 4 +-- libavcodec/wbmpdec.c | 92 +++ libavcodec/wbmpenc.c | 89 + libavformat/img2.c| 1 + libavformat/img2enc.c | 2 +- libavformat/version.h | 2 +- tests/fate/lavf-image.mak | 1 + tests/ref/lavf/wbmp | 3 ++ 14 files changed, 205 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index d5f3d36094..cc271c22bd 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,7 @@ version : - ffmpeg now runs every muxer in a separate thread - Add new mode to cropdetect filter to detect crop-area based on motion vectors and edges - VAAPI hwaccel for 8bit 444 HEVC and VP9 +- WBMP (Wireless Application Protocol Bitmap) image format version 5.1: diff --git a/doc/general_contents.texi b/doc/general_contents.texi index f25c784d3b..86ec6d606b 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -801,6 +801,8 @@ following image formats are supported: @tab Targa (.TGA) image format @item VBN @tab X @tab X @tab Vizrt Binary Image format +@item WBMP @tab X @tab X +@tab Wireless Application Protocol Bitmap image format @item WebP @tab E @tab X @tab WebP image format, encoding supported through external library libwebp @item XBM @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 727775f066..83901bb52b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -758,6 +758,8 @@ OBJS-$(CONFIG_VP9_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o wavpackdata.o dsd.o OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackdata.o wavpackenc.o +OBJS-$(CONFIG_WBMP_DECODER)+= wbmpdec.o +OBJS-$(CONFIG_WBMP_ENCODER)+= wbmpenc.o OBJS-$(CONFIG_WCMV_DECODER)+= wcmv.o OBJS-$(CONFIG_WEBP_DECODER)+= webp.o OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o ass.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 31d2c5979c..c94e2d5966 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -378,6 +378,8 @@ extern const FFCodec ff_vp9_decoder; extern const FFCodec ff_vp9_rkmpp_decoder; extern const FFCodec ff_vp9_v4l2m2m_decoder; extern const FFCodec ff_vqa_decoder; +extern const FFCodec ff_wbmp_decoder; +extern const FFCodec ff_wbmp_encoder; extern const FFCodec ff_webp_decoder; extern const FFCodec ff_wcmv_decoder; extern const FFCodec ff_wrapped_avframe_encoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index fdcf8198fe..c1a177c22d 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1900,6 +1900,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("HDR (Radiance RGBE format) image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_WBMP, +.type = AVMEDIA_TYPE_VIDEO, +.name = "wbmp", +.long_name = NULL_IF_CONFIG_SMALL("WBMP (Wireless Application Protocol Bitmap) image"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 27bf68ec1d..386a00a7ef 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -313,6 +313,7 @@ enum AVCodecID { AV_CODEC_ID_QOI, AV_CODEC_ID_PHM, AV_CODEC_ID_RADIANCE_HDR, +AV_CODEC_ID_WBMP, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/version.h b/libavcodec/version.h index 751f0d2645..e488eee355 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 41 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 42 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavcodec/wbmpdec.c b/libavcodec/wbmpdec.c new file mode 100644 ind
[FFmpeg-cvslog] doc: describe QOI image format
ffmpeg | branch: master | Peter Ross | Wed Jun 15 17:36:25 2022 +1000| [5242ede48da227927b0c20427c893de4cab44397] | committer: Gyan Doshi doc: describe QOI image format > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5242ede48da227927b0c20427c893de4cab44397 --- doc/general_contents.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/general_contents.texi b/doc/general_contents.texi index 93a90a5e52..987a2f82fb 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -785,6 +785,8 @@ following image formats are supported: @tab Photoshop @item PTX @tab @tab X @tab V.Flash PTX format +@item QOI @tab X @tab X +@tab Quite OK Image format @item SGI @tab X @tab X @tab SGI RGB image format @item Sun Rasterfile @tab X @tab X ___ 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/binkaudio: fix indentation to match previous line
ffmpeg | branch: master | Peter Ross | Sun Apr 10 10:41:24 2022 +1000| [072101bd52f7f092ee976f4e6e41c19812ad32fd] | committer: Peter Ross avcodec/binkaudio: fix indentation to match previous line Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=072101bd52f7f092ee976f4e6e41c19812ad32fd --- libavcodec/binkaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index fb5233f0ab..16067662d6 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -264,7 +264,7 @@ static int decode_block(BinkAudioContext *s, float **out, int use_dct, j = ch; for (i = 0; i < s->overlap_len; i++, j += channels) out[ch + ch_offset][i] = (s->previous[ch + ch_offset][i] * (count - j) + - out[ch + ch_offset][i] * j) / count; + out[ch + ch_offset][i] * j) / count; } memcpy(s->previous[ch + ch_offset], &out[ch + ch_offset][s->frame_len - s->overlap_len], s->overlap_len * sizeof(*s->previous[ch + ch_offset])); ___ 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/codec2: remove surplus include 'memory.h' statement
ffmpeg | branch: master | Peter Ross | Wed Mar 23 16:26:46 2022 +1100| [7f534d022e719a2d98aa7f6ac17cf4fcca5d3779] | committer: Marton Balint avformat/codec2: remove surplus include 'memory.h' statement on glibc memory.h drags in string.h, but codec2 does not use any str* or mem* functions. additionally, memory.h is not part of the C99 or POSIX standards. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f534d022e719a2d98aa7f6ac17cf4fcca5d3779 --- libavformat/codec2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/codec2.c b/libavformat/codec2.c index cd0521299c..400c5acbdb 100644 --- a/libavformat/codec2.c +++ b/libavformat/codec2.c @@ -21,7 +21,6 @@ #include "config_components.h" -#include #include "libavcodec/codec2utils.h" #include "libavutil/channel_layout.h" #include "libavutil/intreadwrite.h" ___ 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/utils: fix logic error in ff_mkdir_p
ffmpeg | branch: master | Peter Ross | Tue Jan 25 18:28:32 2022 +1100| [6474300dc4212486eff82470061118cef720b420] | committer: Peter Ross avformat/utils: fix logic error in ff_mkdir_p Fix ticket# 9605 Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6474300dc4212486eff82470061118cef720b420 --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index cee86ae87b..ca61a97759 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1136,7 +1136,7 @@ int ff_mkdir_p(const char *path) } } -if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) { +if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) { ret = mkdir(temp, 0755); } ___ 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/img2dec: fix logic error in GEM Raster file probe
ffmpeg | branch: master | Peter Ross | Fri Jan 21 09:01:57 2022 +1100| [5903a4e32104ab343555b494991856fac5aa3aa2] | committer: Peter Ross avformat/img2dec: fix logic error in GEM Raster file probe Use correct logic to express limits of the planes and pattern_size fields. Fix ticket# 9605 Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5903a4e32104ab343555b494991856fac5aa3aa2 --- libavformat/img2dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 4d5ac51b53..2583ca2465 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1115,8 +1115,8 @@ static int gem_probe(const AVProbeData *p) int ret = 0; if ( AV_RB16(b ) >= 1 && AV_RB16(b) <= 3 && AV_RB16(b + 2) >= 8 && AV_RB16(b + 2) <= 779 && -(AV_RB16(b + 4) > 0 || AV_RB16(b + 4) <= 8) && -(AV_RB16(b + 6) > 0 || AV_RB16(b + 6) <= 8) && +(AV_RB16(b + 4) > 0 && AV_RB16(b + 4) <= 32) && /* planes */ +(AV_RB16(b + 6) > 0 && AV_RB16(b + 6) <= 8) && /* pattern_size */ AV_RB16(b + 8) && AV_RB16(b + 10) && AV_RB16(b + 12) && ___ 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/img2dec: increase probe score for GEM image fourcc variants
ffmpeg | branch: master | Peter Ross | Sun Jan 23 15:46:34 2022 +1100| [cc5eb2e66248c19bad1b9fa157540a28075544c2] | committer: Peter Ross avformat/img2dec: increase probe score for GEM image fourcc variants Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc5eb2e66248c19bad1b9fa157540a28075544c2 --- libavformat/img2dec.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 2583ca2465..8608252d83 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1112,7 +1112,6 @@ static int photocd_probe(const AVProbeData *p) static int gem_probe(const AVProbeData *p) { const uint8_t *b = p->buf; -int ret = 0; if ( AV_RB16(b ) >= 1 && AV_RB16(b) <= 3 && AV_RB16(b + 2) >= 8 && AV_RB16(b + 2) <= 779 && (AV_RB16(b + 4) > 0 && AV_RB16(b + 4) <= 32) && /* planes */ @@ -1121,13 +1120,13 @@ static int gem_probe(const AVProbeData *p) AV_RB16(b + 10) && AV_RB16(b + 12) && AV_RB16(b + 14)) { -ret = AVPROBE_SCORE_EXTENSION / 4; if (AV_RN32(b + 16) == AV_RN32("STTT") || AV_RN32(b + 16) == AV_RN32("TIMG") || AV_RN32(b + 16) == AV_RN32("XIMG")) -ret += 1; +return AVPROBE_SCORE_EXTENSION + 1; +return AVPROBE_SCORE_EXTENSION / 4; } -return ret; +return 0; } #define IMAGEAUTO_DEMUXER_0(imgname, codecid) ___ 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/img2dec: add GEM Raster image demuxer
ffmpeg | branch: master | Peter Ross | Wed Sep 15 20:15:42 2021 +1000| [4ff884069787161138e604b7aae495d27c457287] | committer: Peter Ross avformat/img2dec: add GEM Raster image demuxer Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ff884069787161138e604b7aae495d27c457287 --- libavformat/allformats.c | 1 + libavformat/img2.c | 3 +++ libavformat/img2dec.c| 22 ++ libavformat/version.h| 4 ++-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 5471f7c16f..99d8c91e00 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -499,6 +499,7 @@ extern const AVInputFormat ff_image_cri_pipe_demuxer; extern const AVInputFormat ff_image_dds_pipe_demuxer; extern const AVInputFormat ff_image_dpx_pipe_demuxer; extern const AVInputFormat ff_image_exr_pipe_demuxer; +extern const AVInputFormat ff_image_gem_pipe_demuxer; extern const AVInputFormat ff_image_gif_pipe_demuxer; extern const AVInputFormat ff_image_j2k_pipe_demuxer; extern const AVInputFormat ff_image_jpeg_pipe_demuxer; diff --git a/libavformat/img2.c b/libavformat/img2.c index 6bdd7efe26..4153102c92 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -84,6 +84,9 @@ const IdStrMap ff_img_tags[] = { { AV_CODEC_ID_XPM,"xpm" }, { AV_CODEC_ID_XFACE, "xface"}, { AV_CODEC_ID_XWD,"xwd" }, +{ AV_CODEC_ID_GEM,"img" }, +{ AV_CODEC_ID_GEM,"ximg" }, +{ AV_CODEC_ID_GEM,"timg" }, { AV_CODEC_ID_NONE, NULL } }; diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index ad4cc623c8..b535831e1c 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1105,6 +1105,27 @@ static int photocd_probe(const AVProbeData *p) return AVPROBE_SCORE_MAX - 1; } +static int gem_probe(const AVProbeData *p) +{ +const uint8_t *b = p->buf; +int ret = 0; +if ( AV_RB16(b ) >= 1 && AV_RB16(b) <= 3 && + AV_RB16(b + 2) >= 8 && AV_RB16(b + 2) <= 779 && +(AV_RB16(b + 4) > 0 || AV_RB16(b + 4) <= 8) && +(AV_RB16(b + 6) > 0 || AV_RB16(b + 6) <= 8) && + AV_RB16(b + 8) && + AV_RB16(b + 10) && + AV_RB16(b + 12) && + AV_RB16(b + 14)) { +ret = AVPROBE_SCORE_EXTENSION / 4; +if (AV_RN32(b + 16) == AV_RN32("STTT") || +AV_RN32(b + 16) == AV_RN32("TIMG") || +AV_RN32(b + 16) == AV_RN32("XIMG")) +ret += 1; +} +return ret; +} + #define IMAGEAUTO_DEMUXER(imgname, codecid)\ const AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\ .name = AV_STRINGIFY(imgname) "_pipe",\ @@ -1123,6 +1144,7 @@ IMAGEAUTO_DEMUXER(cri, AV_CODEC_ID_CRI) IMAGEAUTO_DEMUXER(dds, AV_CODEC_ID_DDS) IMAGEAUTO_DEMUXER(dpx, AV_CODEC_ID_DPX) IMAGEAUTO_DEMUXER(exr, AV_CODEC_ID_EXR) +IMAGEAUTO_DEMUXER(gem, AV_CODEC_ID_GEM) IMAGEAUTO_DEMUXER(gif, AV_CODEC_ID_GIF) IMAGEAUTO_DEMUXER(j2k, AV_CODEC_ID_JPEG2000) IMAGEAUTO_DEMUXER(jpeg,AV_CODEC_ID_MJPEG) diff --git a/libavformat/version.h b/libavformat/version.h index 85090c8111..d5dd22059b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,8 +32,8 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 59 -#define LIBAVFORMAT_VERSION_MINOR 5 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MINOR 6 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_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: GEM Raster image decoder
ffmpeg | branch: master | Peter Ross | Wed Sep 15 20:15:07 2021 +1000| [60a9d3778f87a1e458abf89eaa66edd5ba298935] | committer: Peter Ross avcodec: GEM Raster image decoder Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60a9d3778f87a1e458abf89eaa66edd5ba298935 --- Changelog | 1 + doc/general_contents.texi | 2 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c| 1 + libavcodec/codec_desc.c | 7 + libavcodec/codec_id.h | 1 + libavcodec/gemdec.c | 343 ++ libavcodec/version.h | 2 +- 8 files changed, 357 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 7f1f218708..540056d4c3 100644 --- a/Changelog +++ b/Changelog @@ -23,6 +23,7 @@ version : - morpho video filter - amr parser - (a)latency filters +- GEM Raster image decoder version 4.4: diff --git a/doc/general_contents.texi b/doc/general_contents.texi index ce5fd4639d..ef841ecfd8 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -741,6 +741,8 @@ following image formats are supported: @tab OpenEXR @item FITS @tab X @tab X @tab Flexible Image Transport System +@item IMG @tab @tab X +@tab GEM Raster image @item JPEG @tab X @tab X @tab Progressive JPEG is not supported. @item JPEG 2000@tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index ce928720e1..55391457a2 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -348,6 +348,7 @@ OBJS-$(CONFIG_G723_1_ENCODER) += g723_1enc.o g723_1.o \ acelp_vectors.o celp_filters.o celp_math.o OBJS-$(CONFIG_G729_DECODER)+= g729dec.o lsp.o celp_math.o celp_filters.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o OBJS-$(CONFIG_GDV_DECODER) += gdv.o +OBJS-$(CONFIG_GEM_DECODER) += gemdec.o OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o OBJS-$(CONFIG_GREMLIN_DPCM_DECODER)+= dpcm.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index c42aba140d..861c4b786a 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -134,6 +134,7 @@ extern const AVCodec ff_fraps_decoder; extern const AVCodec ff_frwu_decoder; extern const AVCodec ff_g2m_decoder; extern const AVCodec ff_gdv_decoder; +extern const AVCodec ff_gem_decoder; extern const AVCodec ff_gif_encoder; extern const AVCodec ff_gif_decoder; extern const AVCodec ff_h261_encoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index d954f0a428..0974ee03de 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1855,6 +1855,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"), .props = AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_GEM, +.type = AVMEDIA_TYPE_VIDEO, +.name = "gem", +.long_name = NULL_IF_CONFIG_SMALL("GEM Raster image"), +.props = AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 446bb2c2fb..ab265ec584 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -307,6 +307,7 @@ enum AVCodecID { AV_CODEC_ID_CRI, AV_CODEC_ID_SIMBIOSIS_IMX, AV_CODEC_ID_SGA_VIDEO, +AV_CODEC_ID_GEM, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/gemdec.c b/libavcodec/gemdec.c new file mode 100644 index 00..bf0927b763 --- /dev/null +++ b/libavcodec/gemdec.c @@ -0,0 +1,343 @@ +/* + * GEM Raster image decoder + * Copyright (c) 2021 Peter Ross (pr...@xvid.org) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * GEM Raster image decoder + */ + +#include "avcodec.h" +#include "bytestream.h" +#include "internal.h" + +static const uint32_t gem_co
[FFmpeg-cvslog] avcodec/siren: add checksum calculation
ffmpeg | branch: master | Peter Ross | Sat Sep 4 21:14:37 2021 +1000| [855014ff83dae786e914b4c7df88d263ec4122a7] | committer: Peter Ross avcodec/siren: add checksum calculation Reviewed-by: Lynne Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=855014ff83dae786e914b4c7df88d263ec4122a7 --- libavcodec/siren.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 0ecf0fcafc..6909ebbf2e 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -760,7 +760,37 @@ static int siren_decode(AVCodecContext *avctx, void *data, frame_error = 1; } -skip_bits(gb, s->checksum_bits); +if ((avctx->err_recognition & AV_EF_CRCCHECK) && s->checksum_bits) { +static const uint16_t ChecksumTable[4] = {0x7F80, 0x7878, 0x, 0x}; +int wpf, checksum, sum, calculated_checksum, temp1; + +checksum = get_bits(gb, s->checksum_bits); + +wpf = bits_per_frame / 16; +sum = 0; +for (int i = 0; i < wpf - 1; i++) +sum ^= AV_RB16(avpkt->data + i * 2) << (i % 15); +sum ^= (AV_RB16(avpkt->data + (wpf - 1) * 2) & ~checksum) << ((wpf - 1) % 15); +sum = (sum >> 15) ^ (sum & 0x7FFF); + +calculated_checksum = 0; +for (int i = 0; i < 4; i++) { +temp1 = ChecksumTable[i] & sum; + +for (int j = 8; j > 0; j >>= 1) +temp1 ^= temp1 >> j; + +calculated_checksum <<= 1; +calculated_checksum |= temp1 & 1; +} + +if (checksum != calculated_checksum) { +av_log(avctx, AV_LOG_WARNING, "Invalid checksum\n"); +if (avctx->err_recognition & AV_EF_EXPLODE) +return AVERROR_INVALIDDATA; +frame_error = 1; +} +} if (frame_error) { memcpy(s->imdct_in, s->backup_frame, number_of_valid_coefs * sizeof(float)); ___ 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/siren: prevent getbitcontext overread
ffmpeg | branch: master | Peter Ross | Sat Sep 18 19:55:03 2021 +1000| [b007e8968f2072b9e8076d0ab474ad944fc07ade] | committer: Peter Ross avcodec/siren: prevent getbitcontext overread Reviewed-by: Michael Niedermayer Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b007e8968f2072b9e8076d0ab474ad944fc07ade --- libavcodec/siren.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 7f2b467860..27ee356c44 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -608,12 +608,16 @@ static int decode_vector(SirenContext *s, int number_of_regions, index >>= 1; -if (error == 0 && get_bits_left(gb) >= 0) { +if (error == 0) { for (j = 0; j < vector_dimension[category]; j++) { decoded_value = mlt_quant[category][index & ((1 << index_table[category]) - 1)]; index >>= index_table[category]; if (decoded_value) { +if (get_bits_left(gb) <= 0) { +error = 1; +break; +} if (!get_bits1(gb)) decoded_value *= -decoder_standard_deviation[region]; else ___ 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/siren: don't reduce getbitcontext size by checksum_bits at initialisation
ffmpeg | branch: master | Peter Ross | Sat Sep 18 19:55:22 2021 +1000| [e40593c0505a3ee143b8ac949af1bb70becafb21] | committer: Peter Ross avcodec/siren: don't reduce getbitcontext size by checksum_bits at initialisation this allows the checksum calculation routine to also use getbitcontext Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e40593c0505a3ee143b8ac949af1bb70becafb21 --- libavcodec/siren.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 27ee356c44..0ecf0fcafc 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -594,7 +594,7 @@ static int decode_vector(SirenContext *s, int number_of_regions, for (i = 0; i < number_of_vectors[category]; i++) { index = 0; do { -if (get_bits_left(gb) <= 0) { +if (get_bits_left(gb) - s->checksum_bits <= 0) { error = 1; break; } @@ -614,7 +614,7 @@ static int decode_vector(SirenContext *s, int number_of_regions, index >>= index_table[category]; if (decoded_value) { -if (get_bits_left(gb) <= 0) { +if (get_bits_left(gb) - s->checksum_bits <= 0) { error = 1; break; } @@ -697,7 +697,7 @@ static int decode_vector(SirenContext *s, int number_of_regions, } } -return error == 1 ? AVERROR_INVALIDDATA : get_bits_left(gb); +return error == 1 ? AVERROR_INVALIDDATA : (get_bits_left(gb) - s->checksum_bits); } static int siren_decode(AVCodecContext *avctx, void *data, @@ -716,7 +716,7 @@ static int siren_decode(AVCodecContext *avctx, void *data, if (avpkt->size < bits_per_frame / 8) return AVERROR_INVALIDDATA; -if ((ret = init_get_bits(gb, avpkt->data, bits_per_frame - s->checksum_bits)) < 0) +if ((ret = init_get_bits(gb, avpkt->data, bits_per_frame)) < 0) return ret; } else if ((ret = init_get_bits8(gb, avpkt->data, avpkt->size)) < 0) @@ -730,7 +730,7 @@ static int siren_decode(AVCodecContext *avctx, void *data, rate_control = get_bits(gb, 4); -ret = categorize_regions(s->number_of_regions, get_bits_left(gb), +ret = categorize_regions(s->number_of_regions, get_bits_left(gb) - s->checksum_bits, s->absolute_region_power_index, s->power_categories, s->category_balance); if (ret < 0) @@ -745,11 +745,11 @@ static int siren_decode(AVCodecContext *avctx, void *data, if (ret < 0 && !s->microsoft) return ret; -if (get_bits_left(gb) > 0) { +if (get_bits_left(gb) - s->checksum_bits > 0) { do { frame_error |= !get_bits1(gb); -} while (get_bits_left(gb) > 0); -} else if (get_bits_left(gb) < 0 && +} while (get_bits_left(gb) - s->checksum_bits > 0); +} else if (get_bits_left(gb) - s->checksum_bits < 0 && rate_control + 1 < s->rate_control_possibilities) { frame_error = 1; } ___ 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/siren: decode_vector: remove unused parameter
ffmpeg | branch: master | Peter Ross | Sat Sep 4 20:27:09 2021 +1000| [20f9cfb3e348043bcf77cfd82d7ba70ef00ecbe5] | committer: Peter Ross avcodec/siren: decode_vector: remove unused parameter Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20f9cfb3e348043bcf77cfd82d7ba70ef00ecbe5 --- libavcodec/siren.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 2817c5c592..2161b29a2c 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -568,7 +568,7 @@ static int get_dw(SirenContext *s) } static int decode_vector(SirenContext *s, int number_of_regions, - int number_of_available_bits, float *decoder_standard_deviation, + float *decoder_standard_deviation, int *power_categories, float *coefs, int scale_factor) { GetBitContext *gb = &s->gb; @@ -731,7 +731,7 @@ static int siren_decode(AVCodecContext *avctx, void *data, for (int i = 0; i < rate_control; i++) s->power_categories[s->category_balance[i]]++; -ret = decode_vector(s, s->number_of_regions, get_bits_left(gb), +ret = decode_vector(s, s->number_of_regions, s->decoder_standard_deviation, s->power_categories, s->imdct_in, s->scale_factor); if (ret < 0 && !s->microsoft) ___ 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/siren: replace magic numbers with macro value
ffmpeg | branch: master | Peter Ross | Sat Sep 4 20:24:39 2021 +1000| [e8aec714d322cb479da2f625f977a3d5b8b8c024] | committer: Peter Ross avcodec/siren: replace magic numbers with macro value Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8aec714d322cb479da2f625f977a3d5b8b8c024 --- libavcodec/siren.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 0675fbaffd..2817c5c592 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -698,7 +698,7 @@ static int siren_decode(AVCodecContext *avctx, void *data, SirenContext *s = avctx->priv_data; GetBitContext *gb = &s->gb; AVFrame *frame = data; -int ret, number_of_valid_coefs = 20 * s->number_of_regions; +int ret, number_of_valid_coefs = REGION_SIZE * s->number_of_regions; int frame_error = 0, rate_control = 0; int bits_per_frame; @@ -765,7 +765,7 @@ static int siren_decode(AVCodecContext *avctx, void *data, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; -for (int i = 0; i < 320; i += 2) +for (int i = 0; i < FRAME_SIZE; i += 2) s->imdct_in[i] *= -1; s->tx_fn(s->tx_ctx, s->imdct_out, s->imdct_in, sizeof(float)); ___ 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/siren: MSN Siren decoder
ffmpeg | branch: master | Peter Ross | Sat Sep 4 17:22:19 2021 +1000| [c655a734b1f799e4c41349e99b0e85c5b6e1045c] | committer: Peter Ross avcodec/siren: MSN Siren decoder Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c655a734b1f799e4c41349e99b0e85c5b6e1045c --- Changelog | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 7 ++ libavcodec/codec_id.h | 1 + libavcodec/siren.c | 59 +++-- libavcodec/version.h| 2 +- libavformat/riff.c | 1 + 8 files changed, 70 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index f66f47b6cb..df24c69a69 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ version : - grayworld video filter - AV1 Low overhead bitstream format muxer - swscale slice threading +- MSN Siren decoder version 4.4: diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 68d808de42..11873eecae 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -508,6 +508,7 @@ OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o +OBJS-$(CONFIG_MSNSIREN_DECODER)+= siren.o OBJS-$(CONFIG_MSP2_DECODER)+= msp2dec.o OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o OBJS-$(CONFIG_MSS1_DECODER)+= mss1.o mss12.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index c087b91148..c42aba140d 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -479,6 +479,7 @@ extern const AVCodec ff_mp3on4float_decoder; extern const AVCodec ff_mp3on4_decoder; extern const AVCodec ff_mpc7_decoder; extern const AVCodec ff_mpc8_decoder; +extern const AVCodec ff_msnsiren_decoder; extern const AVCodec ff_nellymoser_encoder; extern const AVCodec ff_nellymoser_decoder; extern const AVCodec ff_on2avc_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 674f4bf8c3..a06992fce8 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -3222,6 +3222,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("MobiClip FastAudio"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_MSNSIREN, +.type = AVMEDIA_TYPE_AUDIO, +.name = "msnsiren", +.long_name = NULL_IF_CONFIG_SMALL("MSN Siren"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, +}, /* subtitle codecs */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index d49f9af36c..446bb2c2fb 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -514,6 +514,7 @@ enum AVCodecID { AV_CODEC_ID_SIREN, AV_CODEC_ID_HCA, AV_CODEC_ID_FASTAUDIO, +AV_CODEC_ID_MSNSIREN, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 87464808a4..0675fbaffd 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -359,11 +359,13 @@ static const float noise_category6[21] = { typedef struct SirenContext { GetBitContext gb; +int microsoft; int rate_control_possibilities; int esf_adjustment; int number_of_regions; int scale_factor; int sample_rate_bits; +int checksum_bits; unsigned dw1, dw2, dw3, dw4; @@ -421,6 +423,15 @@ static av_cold int siren_init(AVCodecContext *avctx) if (!s->fdsp) return AVERROR(ENOMEM); +s->microsoft = avctx->codec->id == AV_CODEC_ID_MSNSIREN; +if (s->microsoft) { +s->esf_adjustment = -2; +s->number_of_regions = 14; +s->scale_factor = 1; +s->sample_rate_bits = 2; +s->checksum_bits = 4; +} + return av_tx_init(&s->tx_ctx, &s->tx_fn, AV_TX_FLOAT_MDCT, 1, FRAME_SIZE, &scale, 0); } @@ -626,6 +637,20 @@ static int decode_vector(SirenContext *s, int number_of_regions, coefs_ptr = coefs + (region * REGION_SIZE); +if (category == 5 && s->microsoft) { +i = 0; +for (j = 0; j < REGION_SIZE; j++) { +if (*coefs_ptr != 0) { +i++; +if (fabs(*coefs_ptr) > 2.0 * decoder_standard_deviation[region]) { +i += 3; +} +} +coefs_ptr++; +} + +noise = decoder_standard_deviation[region] * noise_category5[i]; +} else
[FFmpeg-cvslog] fix broken links to msdn documentation
ffmpeg | branch: master | Peter Ross | Tue Apr 20 16:38:45 2021 +1000| [b5ea0980c5c78df25277f9a1baf640b60184ab61] | committer: Peter Ross fix broken links to msdn documentation Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5ea0980c5c78df25277f9a1baf640b60184ab61 --- compat/msvcrt/snprintf.c | 2 +- libavformat/mmst.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/msvcrt/snprintf.c b/compat/msvcrt/snprintf.c index c64653fe82..43f5c3bb39 100644 --- a/compat/msvcrt/snprintf.c +++ b/compat/msvcrt/snprintf.c @@ -59,7 +59,7 @@ int avpriv_vsnprintf(char *s, size_t n, const char *fmt, * recommends to provide _snprintf/_vsnprintf() a buffer size that * is one less than the actual buffer, and zero it before calling * _snprintf/_vsnprintf() to workaround this problem. - * See http://msdn.microsoft.com/en-us/library/1kt27hek(v=vs.80).aspx */ + * See https://web.archive.org/web/20151214111935/http://msdn.microsoft.com/en-us/library/1kt27hek(v=vs.80).aspx */ memset(s, 0, n); va_copy(ap_copy, ap); ret = _vsnprintf(s, n - 1, fmt, ap_copy); diff --git a/libavformat/mmst.c b/libavformat/mmst.c index 377323fe27..fa6e86ac26 100644 --- a/libavformat/mmst.c +++ b/libavformat/mmst.c @@ -25,7 +25,7 @@ * MMS protocol specification: * [1]http://msdn.microsoft.com/en-us/library/cc234711(PROT.10).aspx * ASF specification. Revision 01.20.03. - * [2]http://msdn.microsoft.com/en-us/library/bb643323.aspx + * [2]http://web.archive.org/web/20131203084402/http://msdn.microsoft.com/en-us/library/bb643323.aspx */ #include "avformat.h" ___ 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/dvenc: dv100_weight_shift never used
ffmpeg | branch: master | Peter Ross | Tue Jan 5 13:54:22 2021 +1100| [63be96414b3ee7d3a9edbf0ffca11997ed520a4e] | committer: Peter Ross avcodec/dvenc: dv100_weight_shift never used Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63be96414b3ee7d3a9edbf0ffca11997ed520a4e --- libavcodec/dvenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index 0dc290642e..233e2b68c7 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -318,9 +318,8 @@ static const int dv100_qstep_inv[16] = { 65536, 65536, 32768, 21845, 16384, 13107, 10923, 9362, 8192, 4096, 3641, 3277, 2979, 2731, 2341, 1260, }; -/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^(dv100_weight_shift) +/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^16 (in DV100 the AC components are divided by the spec weights) */ -static const int dv100_weight_shift = 16; static const int dv_weight_1080[2][64] = { { 8192, 65536, 65536, 61681, 61681, 61681, 58254, 58254, 58254, 58254, 58254, 58254, 55188, 58254, 58254, 55188, ___ 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_waveform: flat_pix_fmts never used
ffmpeg | branch: master | Peter Ross | Tue Jan 5 13:54:53 2021 +1100| [5d8e86d15a23202fd42960b314b8427f3e785676] | committer: Peter Ross avfilter/vf_waveform: flat_pix_fmts never used Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d8e86d15a23202fd42960b314b8427f3e785676 --- libavfilter/vf_waveform.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index 11f8c0016e..8191da2792 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -303,13 +303,6 @@ static const enum AVPixelFormat out_gray12_lowpass_pix_fmts[] = { AV_PIX_FMT_NONE }; -static const enum AVPixelFormat flat_pix_fmts[] = { -AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, -AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV444P10, -AV_PIX_FMT_YUV444P12, -AV_PIX_FMT_NONE -}; - static int query_formats(AVFilterContext *ctx) { WaveformContext *s = ctx->priv; ___ 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/mspdec: Microsoft Paint (MSP) demuxer
ffmpeg | branch: master | Peter Ross | Thu Oct 8 21:04:58 2020 +1100| [2aab42bc40ebed79a661285f69506b06850629df] | committer: Peter Ross avformat/mspdec: Microsoft Paint (MSP) demuxer Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2aab42bc40ebed79a661285f69506b06850629df --- Changelog | 1 + doc/general_contents.texi | 2 + libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/mspdec.c | 116 ++ libavformat/version.h | 2 +- 6 files changed, 122 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index e0f6e8e299..503317dfae 100644 --- a/Changelog +++ b/Changelog @@ -50,6 +50,7 @@ version : - asupercut filter - asubcut filter - Microsoft Paint (MSP) version 2 decoder +- Microsoft Paint (MSP) demuxer version 4.3: diff --git a/doc/general_contents.texi b/doc/general_contents.texi index 1be6f9b683..443e8ed8d1 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -735,6 +735,8 @@ following image formats are supported: @item JPEG-LS @tab X @tab X @item LJPEG@tab X @tab @tab Lossless JPEG +@item MSP @tab @tab X +@tab Microsoft Paint image @item PAM @tab X @tab X @tab PAM is a PNM extension with alpha support. @item PBM @tab X @tab X diff --git a/libavformat/Makefile b/libavformat/Makefile index be5a482b01..97d868081b 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -357,6 +357,7 @@ OBJS-$(CONFIG_MPL2_DEMUXER) += mpl2dec.o subtitles.o OBJS-$(CONFIG_MSF_DEMUXER) += msf.o OBJS-$(CONFIG_MPSUB_DEMUXER) += mpsubdec.o subtitles.o OBJS-$(CONFIG_MSNWC_TCP_DEMUXER) += msnwc_tcp.o +OBJS-$(CONFIG_MSP_DEMUXER) += mspdec.o OBJS-$(CONFIG_MTAF_DEMUXER) += mtaf.o OBJS-$(CONFIG_MTV_DEMUXER) += mtv.o OBJS-$(CONFIG_MUSX_DEMUXER) += musx.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 53e5374255..0e0caaad39 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -286,6 +286,7 @@ extern AVInputFormat ff_mpl2_demuxer; extern AVInputFormat ff_mpsub_demuxer; extern AVInputFormat ff_msf_demuxer; extern AVInputFormat ff_msnwc_tcp_demuxer; +extern AVInputFormat ff_msp_demuxer; extern AVInputFormat ff_mtaf_demuxer; extern AVInputFormat ff_mtv_demuxer; extern AVInputFormat ff_musx_demuxer; diff --git a/libavformat/mspdec.c b/libavformat/mspdec.c new file mode 100644 index 00..b81d835a63 --- /dev/null +++ b/libavformat/mspdec.c @@ -0,0 +1,116 @@ +/* + * Microsoft Paint (MSP) demuxer + * Copyright (c) 2020 Peter Ross (pr...@xvid.org) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Microsoft Paint (MSP) demuxer + */ + +#include "libavutil/intreadwrite.h" +#include "libavutil/imgutils.h" +#include "avformat.h" +#include "internal.h" + +typedef struct { +int packet_size; +} MSPContext; + +static int msp_probe(const AVProbeData *p) +{ +unsigned int i, sum; + +if (p->buf_size <= 32 || (memcmp(p->buf, "DanM", 4) && memcmp(p->buf, "LinS", 4))) +return 0; + +sum = 0; +for (i = 0; i < 24; i += 2) +sum ^= AV_RL16(p->buf + i); + +return AV_RL16(p->buf + 24) == sum ? AVPROBE_SCORE_MAX : 0; +} + +static int msp_read_header(AVFormatContext *s) +{ +MSPContext * cntx = s->priv_data; +AVIOContext *pb = s->pb; +AVStream *st; + +st = avformat_new_stream(s, NULL); +if (!st) +return AVERROR(ENOMEM); + +st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; +st->codecpar->codec_id = avio_rl32(pb) == MKTAG('D', 'a', 'n', 'M') ? AV_CODEC_ID_RAWVIDEO : AV_CODEC_ID_MSP2; + +st->codecpar->width = avio_rl16(pb); +st->codecpar->height = avio_rl16(pb); +st->codecpar->format = AV_PIX_FMT_MONOBLACK; + +st->sample_aspect_ratio.num = avio_rl16(pb); +st->sample_aspect_ratio.den = avio_rl16(pb); +avio_skip(pb, 20); + +if (st->codecpar-&
[FFmpeg-cvslog] avcodec/msp2dec: Microsoft Paint (MSP) version 2 decoder
ffmpeg | branch: master | Peter Ross | Thu Oct 8 21:04:58 2020 +1100| [85b442e231ea065410312ce6a04ac241cced4765] | committer: Peter Ross avcodec/msp2dec: Microsoft Paint (MSP) version 2 decoder Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85b442e231ea065410312ce6a04ac241cced4765 --- Changelog | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 7 libavcodec/codec_id.h | 1 + libavcodec/msp2dec.c| 102 libavcodec/version.h| 2 +- 7 files changed, 114 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 32eb71608a..e0f6e8e299 100644 --- a/Changelog +++ b/Changelog @@ -49,6 +49,7 @@ version : - SpeedHQ encoder - asupercut filter - asubcut filter +- Microsoft Paint (MSP) version 2 decoder version 4.3: diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 01d8c5ee46..33e08548f5 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -508,6 +508,7 @@ OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o +OBJS-$(CONFIG_MSP2_DECODER)+= msp2dec.o OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o OBJS-$(CONFIG_MSS1_DECODER)+= mss1.o mss12.o OBJS-$(CONFIG_MSS2_DECODER)+= mss2.o mss12.o mss2dsp.o wmv2data.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 774d5670bf..f00d524747 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -215,6 +215,7 @@ extern AVCodec ff_msmpeg4v2_decoder; extern AVCodec ff_msmpeg4v3_encoder; extern AVCodec ff_msmpeg4v3_decoder; extern AVCodec ff_msmpeg4_crystalhd_decoder; +extern AVCodec ff_msp2_decoder; extern AVCodec ff_msrle_decoder; extern AVCodec ff_mss1_decoder; extern AVCodec ff_mss2_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 3b148883b8..40a5a9a9e5 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1419,6 +1419,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("AVS3-P2/IEEE1857.10"), .props = AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_MSP2, +.type = AVMEDIA_TYPE_VIDEO, +.name = "msp2", +.long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, +}, { .id= AV_CODEC_ID_Y41P, .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 668c565788..6133e03bb9 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -243,6 +243,7 @@ enum AVCodecID { AV_CODEC_ID_AVS2, AV_CODEC_ID_PGX, AV_CODEC_ID_AVS3, +AV_CODEC_ID_MSP2, AV_CODEC_ID_Y41P = 0x8000, AV_CODEC_ID_AVRP, diff --git a/libavcodec/msp2dec.c b/libavcodec/msp2dec.c new file mode 100644 index 00..cc548d218a --- /dev/null +++ b/libavcodec/msp2dec.c @@ -0,0 +1,102 @@ +/* + * Microsoft Paint (MSP) version 2 decoder + * Copyright (c) 2020 Peter Ross (pr...@xvid.org) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Microsoft Paint (MSP) version 2 decoder + */ + +#include "avcodec.h" +#include "bytestream.h" +#include "internal.h" + +static int msp2_decode_frame(AVCodecContext *avctx, +void *data, int *got_frame, +AVPacket *avpkt) +{ +const uint8_t *buf = avpkt->data; +int buf_size = avpkt->size; +AVFrame *p = data; +int ret; +unsigned int x, y, width = (avctx->width + 7) / 8; +GetByteContext idx, gb; + +if (buf_size <= 2 * avctx->height) +return AVERROR_INVALIDDATA; + +avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; + +if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
[FFmpeg-cvslog] FATE/dnn: only run unit test when CONFIG_DNN enabled
ffmpeg | branch: master | Peter Ross | Thu Oct 8 22:00:56 2020 +1100| [9553c0b46ad02b37c361e0ecd753cc2ce8e9f263] | committer: Guo, Yejun FATE/dnn: only run unit test when CONFIG_DNN enabled Signed-off-by: Peter Ross Reviewed-by: Guo, Yejun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9553c0b46ad02b37c361e0ecd753cc2ce8e9f263 --- tests/fate/dnn.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/dnn.mak b/tests/fate/dnn.mak index 90a1bb3cac..c5e458708e 100644 --- a/tests/fate/dnn.mak +++ b/tests/fate/dnn.mak @@ -33,6 +33,6 @@ fate-dnn-layer-avgpool: $(DNNTESTSDIR)/dnn-layer-avgpool-test$(EXESUF) fate-dnn-layer-avgpool: CMD = run $(DNNTESTSDIR)/dnn-layer-avgpool-test$(EXESUF) fate-dnn-layer-avgpool: CMP = null -FATE-yes += $(FATE_DNN) +FATE-$(CONFIG_DNN) += $(FATE_DNN) fate-dnn: $(FATE_DNN) ___ 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] ffplay: set stream_index to -1 earlier to prevent segfault
ffmpeg | branch: release/4.2 | Peter Ross | Sat Apr 25 11:25:15 2020 +1000| [1fc446d7e232f8b5e8d5c3d46b139e6249658f5f] | committer: Marton Balint ffplay: set stream_index to -1 earlier to prevent segfault Signed-off-by: Peter Ross Reviewed-by: Marton Balint (cherry picked from commit 6cfb33f976812a52bceba29b3db3bbdb84ab7c32) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1fc446d7e232f8b5e8d5c3d46b139e6249658f5f --- fftools/ffplay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index fee0619f7c..a5d6852c18 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2760,9 +2760,6 @@ static int read_thread(void *arg) } memset(st_index, -1, sizeof(st_index)); -is->last_video_stream = is->video_stream = -1; -is->last_audio_stream = is->audio_stream = -1; -is->last_subtitle_stream = is->subtitle_stream = -1; is->eof = 0; ic = avformat_alloc_context(); @@ -3068,6 +3065,9 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat) is = av_mallocz(sizeof(VideoState)); if (!is) return NULL; +is->last_video_stream = is->video_stream = -1; +is->last_audio_stream = is->audio_stream = -1; +is->last_subtitle_stream = is->subtitle_stream = -1; is->filename = av_strdup(filename); if (!is->filename) goto fail; ___ 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/vp9: prevent null pointer use on init_frames() failure
ffmpeg | branch: master | Peter Ross | Sat Apr 25 11:25:15 2020 +1000| [1217b06a9b5e8264fa86ab0e7573564c39bf3ce9] | committer: Peter Ross avcodec/vp9: prevent null pointer use on init_frames() failure Signed-off-by: Peter Ross Reviewed-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1217b06a9b5e8264fa86ab0e7573564c39bf3ce9 --- libavcodec/vp9.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 2a3a4555b9..b356b24515 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1216,17 +1216,14 @@ static av_cold int vp9_decode_free(AVCodecContext *avctx) int i; for (i = 0; i < 3; i++) { -if (s->s.frames[i].tf.f->buf[0]) -vp9_frame_unref(avctx, &s->s.frames[i]); +vp9_frame_unref(avctx, &s->s.frames[i]); av_frame_free(&s->s.frames[i].tf.f); } av_buffer_pool_uninit(&s->frame_extradata_pool); for (i = 0; i < 8; i++) { -if (s->s.refs[i].f->buf[0]) -ff_thread_release_buffer(avctx, &s->s.refs[i]); +ff_thread_release_buffer(avctx, &s->s.refs[i]); av_frame_free(&s->s.refs[i].f); -if (s->next_refs[i].f->buf[0]) -ff_thread_release_buffer(avctx, &s->next_refs[i]); +ff_thread_release_buffer(avctx, &s->next_refs[i]); av_frame_free(&s->next_refs[i].f); } ___ 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] ffplay: set stream_index to -1 earlier to prevent segfault
ffmpeg | branch: master | Peter Ross | Sat Apr 25 11:25:15 2020 +1000| [6cfb33f976812a52bceba29b3db3bbdb84ab7c32] | committer: Peter Ross ffplay: set stream_index to -1 earlier to prevent segfault Signed-off-by: Peter Ross Reviewed-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6cfb33f976812a52bceba29b3db3bbdb84ab7c32 --- fftools/ffplay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 1beec54293..d673b8049a 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2775,9 +2775,6 @@ static int read_thread(void *arg) } memset(st_index, -1, sizeof(st_index)); -is->last_video_stream = is->video_stream = -1; -is->last_audio_stream = is->audio_stream = -1; -is->last_subtitle_stream = is->subtitle_stream = -1; is->eof = 0; ic = avformat_alloc_context(); @@ -3083,6 +3080,9 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat) is = av_mallocz(sizeof(VideoState)); if (!is) return NULL; +is->last_video_stream = is->video_stream = -1; +is->last_audio_stream = is->audio_stream = -1; +is->last_subtitle_stream = is->subtitle_stream = -1; is->filename = av_strdup(filename); if (!is->filename) goto fail; ___ 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/pngdec: set return value on av_stereo3d_create_side_data() failure
ffmpeg | branch: master | Peter Ross | Fri Apr 17 22:35:43 2020 +1000| [55d830f69a2ff3ca191d97862200d4cc480d25b7] | committer: Peter Ross avcodec/pngdec: set return value on av_stereo3d_create_side_data() failure Signed-off-by: Peter Ross Reviewed-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55d830f69a2ff3ca191d97862200d4cc480d25b7 --- libavcodec/pngdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 7e2c19bd57..12d4eb0610 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1286,8 +1286,10 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, case MKTAG('s', 'T', 'E', 'R'): { int mode = bytestream2_get_byte(&s->gb); AVStereo3D *stereo3d = av_stereo3d_create_side_data(p); -if (!stereo3d) +if (!stereo3d) { +ret = AVERROR(ENOMEM); goto fail; +} if (mode == 0 || mode == 1) { stereo3d->type = AV_STEREO3D_SIDEBYSIDE; ___ 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/mv30: remove unused table elements
ffmpeg | branch: master | Peter Ross | Fri Apr 10 23:10:11 2020 +1000| [06dab51e683a93d66a30cd97bf56265d6250389a] | committer: Peter Ross avcodec/mv30: remove unused table elements > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06dab51e683a93d66a30cd97bf56265d6250389a --- libavcodec/mv30.c | 16 1 file changed, 16 deletions(-) diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c index ffa04ac493..6e25ed647b 100644 --- a/libavcodec/mv30.c +++ b/libavcodec/mv30.c @@ -86,14 +86,6 @@ static const uint8_t luma_tab[] = { 25, 31, 42, 48, 58, 72, 81, 75, 38, 46, 54, 61, 71, 84, 88, 85, 50, 61, 65, 68, 79, 78, 86, 91, -12, 12, 16, 18, 20, 30, 40, 45, -12, 12, 16, 18, 30, 40, 45, 50, -16, 16, 20, 30, 40, 45, 50, 55, -18, 18, 35, 40, 45, 50, 55, 60, -20, 30, 40, 45, 50, 55, 60, 65, -30, 40, 45, 50, 55, 60, 65, 70, -40, 45, 50, 55, 60, 65, 70, 75, -45, 50, 55, 60, 65, 70, 75, 80, }; static const uint8_t chroma_tab[] = { @@ -105,14 +97,6 @@ static const uint8_t chroma_tab[] = { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, -12, 16, 20, 24, 28, 36, 40, 44, -16, 20, 24, 28, 36, 40, 44, 50, -20, 24, 28, 36, 40, 44, 50, 60, -24, 28, 36, 40, 44, 50, 60, 80, -28, 36, 40, 44, 50, 60, 80, 99, -36, 40, 44, 50, 60, 80, 99, 99, -40, 44, 50, 60, 80, 99, 99, 99, -44, 50, 60, 80, 99, 99, 99, 99, }; static const uint8_t zigzag[] = { ___ 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/vp3: fix indentation
ffmpeg | branch: master | Peter Ross | Tue Apr 7 22:05:35 2020 +1000| [3e5f0cf271a104caf764ac6c1e89d368e08b664c] | committer: Peter Ross avcodec/vp3: fix indentation > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e5f0cf271a104caf764ac6c1e89d368e08b664c --- libavcodec/vp3.c | 68 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index c45bed8f85..6fe1ca46a3 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2417,32 +2417,32 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) /* init VLC tables */ if (s->version < 2) { -for (i = 0; i < 16; i++) { -/* DC histograms */ -init_vlc(&s->dc_vlc[i], 11, 32, - &dc_bias[i][0][1], 4, 2, - &dc_bias[i][0][0], 4, 2, 0); +for (i = 0; i < 16; i++) { +/* DC histograms */ +init_vlc(&s->dc_vlc[i], 11, 32, + &dc_bias[i][0][1], 4, 2, + &dc_bias[i][0][0], 4, 2, 0); -/* group 1 AC histograms */ -init_vlc(&s->ac_vlc_1[i], 11, 32, - &ac_bias_0[i][0][1], 4, 2, - &ac_bias_0[i][0][0], 4, 2, 0); +/* group 1 AC histograms */ +init_vlc(&s->ac_vlc_1[i], 11, 32, + &ac_bias_0[i][0][1], 4, 2, + &ac_bias_0[i][0][0], 4, 2, 0); -/* group 2 AC histograms */ -init_vlc(&s->ac_vlc_2[i], 11, 32, - &ac_bias_1[i][0][1], 4, 2, - &ac_bias_1[i][0][0], 4, 2, 0); +/* group 2 AC histograms */ +init_vlc(&s->ac_vlc_2[i], 11, 32, + &ac_bias_1[i][0][1], 4, 2, + &ac_bias_1[i][0][0], 4, 2, 0); -/* group 3 AC histograms */ -init_vlc(&s->ac_vlc_3[i], 11, 32, - &ac_bias_2[i][0][1], 4, 2, - &ac_bias_2[i][0][0], 4, 2, 0); +/* group 3 AC histograms */ +init_vlc(&s->ac_vlc_3[i], 11, 32, + &ac_bias_2[i][0][1], 4, 2, + &ac_bias_2[i][0][0], 4, 2, 0); -/* group 4 AC histograms */ -init_vlc(&s->ac_vlc_4[i], 11, 32, - &ac_bias_3[i][0][1], 4, 2, - &ac_bias_3[i][0][0], 4, 2, 0); -} +/* group 4 AC histograms */ +init_vlc(&s->ac_vlc_4[i], 11, 32, + &ac_bias_3[i][0][1], 4, 2, + &ac_bias_3[i][0][0], 4, 2, 0); +} #if CONFIG_VP4_DECODER } else { /* version >= 2 */ for (i = 0; i < 16; i++) { @@ -2786,10 +2786,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, ff_thread_finish_setup(avctx); if (s->version < 2) { -if ((ret = unpack_superblocks(s, &gb)) < 0) { -av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n"); -goto error; -} +if ((ret = unpack_superblocks(s, &gb)) < 0) { +av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n"); +goto error; +} #if CONFIG_VP4_DECODER } else { if ((ret = vp4_unpack_macroblocks(s, &gb)) < 0) { @@ -2812,10 +2812,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, } if (s->version < 2) { -if ((ret = unpack_dct_coeffs(s, &gb)) < 0) { -av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n"); -goto error; -} +if ((ret = unpack_dct_coeffs(s, &gb)) < 0) { +av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n"); +goto error; +} #if CONFIG_VP4_DECODER } else { if ((ret = vp4_unpack_dct_coeffs(s, &gb)) < 0) { @@ -2839,10 +2839,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, // filter the last row if (s->version < 2) -for (i = 0; i < 3; i++) { -int row = (s->height >> (3 + (i && s->chroma_y_shift))) - 1; -apply_loop_filter(s, i, row, row + 1); -} +for (i = 0; i < 3; i++) { +int row = (s->height >> (3 + (i && s->chroma_y_shift))) - 1; +apply_loop_filter(s, i, row, row + 1); +} vp3_draw_horiz_band(s, s->height); /* output frame, offset as needed */ ___ 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/mv30: use aandcttables
ffmpeg | branch: master | Peter Ross | Fri Apr 10 23:14:35 2020 +1000| [1b59f3f844dd3fe0dc1a02bc1b602e713e7fde43] | committer: Peter Ross avcodec/mv30: use aandcttables > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b59f3f844dd3fe0dc1a02bc1b602e713e7fde43 --- configure | 2 +- libavcodec/mv30.c | 22 ++ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 80fdfa1388..4f285f0074 100755 --- a/configure +++ b/configure @@ -2790,7 +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" +mv30_decoder_select="aandcttables blockdsp" mvha_decoder_deps="zlib" mvha_decoder_select="llviddsp" mwsc_decoder_deps="zlib" diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c index 6e25ed647b..fed9bcd1e8 100644 --- a/libavcodec/mv30.c +++ b/libavcodec/mv30.c @@ -33,6 +33,7 @@ #include "blockdsp.h" #include "get_bits.h" #include "internal.h" +#include "aandcttab.h" typedef struct MV30Context { GetBitContext gb; @@ -58,25 +59,6 @@ typedef struct MV30Context { static VLC cbp_tab; -static const int16_t scale_tab[] = { -16384, 22725, 21407, 19266, -16384, 12873, 8867, 4520, -22725, 31521, 29692, 26722, -22725, 17855, 12299, 6270, -21407, 29692, 27969, 25172, -21407, 16819, 11585, 5906, -19266, 26722, 25172, 22654, -19266, 15137, 10426, 5315, -16384, 22725, 21407, 19266, -16384, 12873, 8867, 4520, -12873, 17855, 16819, 15137, -12873, 10114, 6967, 3552, - 8867, 12299, 11585, 10426, - 8867, 6967, 4799, 2446, - 4520, 6270, 5906, 5315, - 4520, 3552, 2446, 1247, -}; - static const uint8_t luma_tab[] = { 12, 12, 15, 19, 25, 34, 40, 48, 12, 12, 18, 22, 27, 44, 47, 46, @@ -116,7 +98,7 @@ static void get_qtable(int16_t *table, int quant, const uint8_t *quant_tab) for (int i = 0; i < 64; i++) { table[i] = av_clip((quant_tab[i] * factor + 0x32) / 100, 1, 0x7fff); -table[i] = ((int)scale_tab[i] * (int)table[i] + 0x800) >> 12; +table[i] = ((int)ff_aanscales[i] * (int)table[i] + 0x800) >> 12; } } ___ 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".
[FFmpeg-cvslog] avcodec/vp3: propagate error codes
ffmpeg | branch: master | Peter Ross | Sun Apr 5 15:44:44 2020 +1000| [31c4fe177d750858dff04de6ebfec97dbf7bd04c] | committer: Peter Ross avcodec/vp3: propagate error codes throughout vp3_decode_frame the error code was being captured (ret) but never returned. Signed-off-by: Peter Ross Reviewed-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31c4fe177d750858dff04de6ebfec97dbf7bd04c --- libavcodec/vp3.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index d53dd87029..2ae54255c6 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2741,7 +2741,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, s->current_frame.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; s->current_frame.f->key_frame = s->keyframe; -if (ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF) < 0) +if ((ret = ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) goto error; if (!s->edge_emu_buffer) @@ -2793,8 +2793,8 @@ static int vp3_decode_frame(AVCodecContext *avctx, "vp3: first frame not a keyframe\n"); s->golden_frame.f->pict_type = AV_PICTURE_TYPE_I; -if (ff_thread_get_buffer(avctx, &s->golden_frame, - AV_GET_BUFFER_FLAG_REF) < 0) +if ((ret = ff_thread_get_buffer(avctx, &s->golden_frame, + AV_GET_BUFFER_FLAG_REF)) < 0) goto error; ff_thread_release_buffer(avctx, &s->last_frame); if ((ret = ff_thread_ref_frame(&s->last_frame, @@ -2808,39 +2808,39 @@ static int vp3_decode_frame(AVCodecContext *avctx, ff_thread_finish_setup(avctx); if (s->version < 2) { -if (unpack_superblocks(s, &gb)) { +if ((ret = unpack_superblocks(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n"); goto error; } #if CONFIG_VP4_DECODER } else { -if (vp4_unpack_macroblocks(s, &gb)) { +if ((ret = vp4_unpack_macroblocks(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in vp4_unpack_macroblocks\n"); goto error; } #endif } -if (unpack_modes(s, &gb)) { +if ((ret = unpack_modes(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in unpack_modes\n"); goto error; } -if (unpack_vectors(s, &gb)) { +if (ret = unpack_vectors(s, &gb)) { av_log(s->avctx, AV_LOG_ERROR, "error in unpack_vectors\n"); goto error; } -if (unpack_block_qpis(s, &gb)) { +if ((ret = unpack_block_qpis(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in unpack_block_qpis\n"); goto error; } if (s->version < 2) { -if (unpack_dct_coeffs(s, &gb)) { +if ((ret = unpack_dct_coeffs(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n"); goto error; } #if CONFIG_VP4_DECODER } else { -if (vp4_unpack_dct_coeffs(s, &gb)) { +if ((ret = vp4_unpack_dct_coeffs(s, &gb)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "error in vp4_unpack_dct_coeffs\n"); goto error; } @@ -2892,7 +2892,7 @@ error: if (!HAVE_THREADS || !(s->avctx->active_thread_type & FF_THREAD_FRAME)) av_frame_unref(s->current_frame.f); -return -1; +return ret; } static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *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] ansi: process ESC[3m italics attribute
ffmpeg | branch: master | Peter Ross | Tue Feb 18 12:03:53 2020 +1100| [bb01baae269cd2d7a0e61dc9bf327168edd43b04] | committer: Peter Ross ansi: process ESC[3m italics attribute squelch unknown escape code warnings Reviewed-by: Paul B Mahol Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb01baae269cd2d7a0e61dc9bf327168edd43b04 --- libavcodec/ansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 5e1035ffd0..516d07db69 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -34,6 +34,7 @@ #define ATTR_BOLD 0x01 /**< Bold/Bright-foreground (mode 1) */ #define ATTR_FAINT0x02 /**< Faint (mode 2) */ +#define ATTR_ITALICS 0x04 /**< Italics (mode 3) */ #define ATTR_UNDERLINE0x08 /**< Underline (mode 4) */ #define ATTR_BLINK0x10 /**< Blink/Bright-background (mode 5) */ #define ATTR_REVERSE 0x40 /**< Reverse (mode 7) */ @@ -308,7 +309,7 @@ static int execute_code(AVCodecContext * avctx, int c) s->attributes = 0; s->fg = DEFAULT_FG_COLOR; s->bg = DEFAULT_BG_COLOR; -} else if (m == 1 || m == 2 || m == 4 || m == 5 || m == 7 || m == 8) { +} else if (m == 1 || m == 2 || m == 3 || m == 4 || m == 5 || m == 7 || m == 8) { s->attributes |= 1 << (m - 1); } else if (m >= 30 && m <= 37) { s->fg = ansi_to_cga[m - 30]; ___ 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] vp4: prevent unaligned memory access in loop filter
ffmpeg | branch: master | Peter Ross | Fri Jun 21 07:52:31 2019 +1000| [fd172185580c1ccdcfb90bbfdb59fa806fad3117] | committer: Michael Niedermayer vp4: prevent unaligned memory access in loop filter VP4 applies a loop filter during motion compensation, causing the block offset will often by unaligned. This produces a bus error on some platforms, namely ARMv7 NEON. This patch adds a unaligned version of the loop filter function pointer to VP3DSPContext. Reported-by: Mike Melanson Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd172185580c1ccdcfb90bbfdb59fa806fad3117 --- libavcodec/vp3.c | 10 -- libavcodec/vp3dsp.c | 4 ++-- libavcodec/vp3dsp.h | 2 ++ libavcodec/x86/vp3dsp_init.c | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index a2bd2ef07d..9a3821a8b9 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2031,11 +2031,17 @@ static int vp4_mc_loop_filter(Vp3DecodeContext *s, int plane, int motion_x, int plane_width, plane_height); +#define safe_loop_filter(name, ptr, stride, bounding_values) \ +if ((uintptr_t)(ptr) & 7) \ +s->vp3dsp.name##_unaligned(ptr, stride, bounding_values); \ +else \ +s->vp3dsp.name(ptr, stride, bounding_values); + if (x_offset) -s->vp3dsp.h_loop_filter(loop + loop_stride + x_offset + 1, loop_stride, bounding_values); +safe_loop_filter(h_loop_filter, loop + loop_stride + x_offset + 1, loop_stride, bounding_values); if (y_offset) -s->vp3dsp.v_loop_filter(loop + (y_offset + 1)*loop_stride + 1, loop_stride, bounding_values); +safe_loop_filter(v_loop_filter, loop + (y_offset + 1)*loop_stride + 1, loop_stride, bounding_values); } for (i = 0; i < 9; i++) diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c index ac4c57441c..f485fba1f6 100644 --- a/libavcodec/vp3dsp.c +++ b/libavcodec/vp3dsp.c @@ -449,8 +449,8 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags) c->idct_put = vp3_idct_put_c; c->idct_add = vp3_idct_add_c; c->idct_dc_add = vp3_idct_dc_add_c; -c->v_loop_filter = vp3_v_loop_filter_8_c; -c->h_loop_filter = vp3_h_loop_filter_8_c; +c->v_loop_filter = c->v_loop_filter_unaligned = vp3_v_loop_filter_8_c; +c->h_loop_filter = c->h_loop_filter_unaligned = vp3_h_loop_filter_8_c; if (ARCH_ARM) ff_vp3dsp_init_arm(c, flags); diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h index 32b2cad0ef..3b849ec05d 100644 --- a/libavcodec/vp3dsp.h +++ b/libavcodec/vp3dsp.h @@ -43,6 +43,8 @@ typedef struct VP3DSPContext { void (*idct_dc_add)(uint8_t *dest, ptrdiff_t stride, int16_t *block); void (*v_loop_filter)(uint8_t *src, ptrdiff_t stride, int *bounding_values); void (*h_loop_filter)(uint8_t *src, ptrdiff_t stride, int *bounding_values); +void (*v_loop_filter_unaligned)(uint8_t *src, ptrdiff_t stride, int *bounding_values); +void (*h_loop_filter_unaligned)(uint8_t *src, ptrdiff_t stride, int *bounding_values); } VP3DSPContext; void ff_vp3dsp_v_loop_filter_12(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values); diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c index 1ba9576431..ba47e1c6cd 100644 --- a/libavcodec/x86/vp3dsp_init.c +++ b/libavcodec/x86/vp3dsp_init.c @@ -59,8 +59,8 @@ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) c->idct_dc_add = ff_vp3_idct_dc_add_mmxext; if (!(flags & AV_CODEC_FLAG_BITEXACT)) { -c->v_loop_filter = ff_vp3_v_loop_filter_mmxext; -c->h_loop_filter = ff_vp3_h_loop_filter_mmxext; +c->v_loop_filter = c->v_loop_filter_unaligned = ff_vp3_v_loop_filter_mmxext; +c->h_loop_filter = c->v_loop_filter_unaligned = ff_vp3_h_loop_filter_mmxext; } } ___ 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] ifv: populate creation_time
ffmpeg | branch: master | Peter Ross | Mon Jul 1 22:00:24 2019 +1000| [9654e97572decb58d0effbfa8d0a0ede3cbe2d95] | committer: Peter Ross ifv: populate creation_time Reviewed-by: Carl Eugen Hoyos Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9654e97572decb58d0effbfa8d0a0ede3cbe2d95 --- libavformat/ifv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/ifv.c b/libavformat/ifv.c index 03c682bb9d..6acbb29a75 100644 --- a/libavformat/ifv.c +++ b/libavformat/ifv.c @@ -90,7 +90,10 @@ static int parse_header(AVFormatContext *s) uint32_t aud_magic; uint32_t vid_magic; -avio_skip(s->pb, 0x5c); +avio_skip(s->pb, 0x34); +avpriv_dict_set_timestamp(&s->metadata, "creation_time", avio_rl32(s->pb) * 100LL); +avio_skip(s->pb, 0x24); + ifv->width = avio_rl16(s->pb); ifv->height = avio_rl16(s->pb); ___ 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] fate: add VP4 test
ffmpeg | branch: master | Peter Ross | Tue May 14 23:25:50 2019 +1000| [f4c35a458f9d7eea9dc30bb1cad7c141a9037011] | committer: Peter Ross fate: add VP4 test > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4c35a458f9d7eea9dc30bb1cad7c141a9037011 --- tests/fate/vpx.mak | 3 +++ tests/ref/fate/vp4 | 29 + 2 files changed, 32 insertions(+) diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak index 0be5aa2aaa..3b3da18feb 100644 --- a/tests/fate/vpx.mak +++ b/tests/fate/vpx.mak @@ -34,6 +34,9 @@ fate-vp31: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/vp3/vp31.avi FATE_SAMPLES_AVCONV += $(FATE_VP3-yes) fate-vp3: $(FATE_VP3-yes) +FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, VP4) += fate-vp4 +fate-vp4: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/vp4/KTkvw8dg1J8.avi + FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, VP5) += fate-vp5 fate-vp5: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/vp5/potter512-400-partial.avi -an diff --git a/tests/ref/fate/vp4 b/tests/ref/fate/vp4 new file mode 100644 index 00..dae848eab7 --- /dev/null +++ b/tests/ref/fate/vp4 @@ -0,0 +1,29 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 608x256 +#sar 0: 0/1 +0, 0, 0,1, 233472, 0xcf3a25ae +0, 1, 1,1, 233472, 0xcc16c0bb +0, 2, 2,1, 233472, 0xb2dcf0fd +0, 3, 3,1, 233472, 0xbc0f0aea +0, 4, 4,1, 233472, 0x97a1b4e9 +0, 5, 5,1, 233472, 0x40d1661e +0, 6, 6,1, 233472, 0x2bc13fe4 +0, 7, 7,1, 233472, 0xe9ff96b4 +0, 8, 8,1, 233472, 0xd57585ad +0, 9, 9,1, 233472, 0xcf1a0cbe +0, 10, 10,1, 233472, 0x4b49d6e0 +0, 11, 11,1, 233472, 0x9e2562f1 +0, 12, 12,1, 233472, 0x62675663 +0, 13, 13,1, 233472, 0x8b27fc45 +0, 14, 14,1, 233472, 0x437eb1f7 +0, 15, 15,1, 233472, 0x1be26067 +0, 16, 16,1, 233472, 0x479f32fb +0, 17, 17,1, 233472, 0x405bdeb0 +0, 18, 18,1, 233472, 0x966b3045 +0, 19, 19,1, 233472, 0x4630a436 +0, 20, 20,1, 233472, 0x70141070 +0, 21, 21,1, 233472, 0x50a66c51 +0, 22, 22,1, 233472, 0x266e9b5a +0, 23, 23,1, 233472, 0xbbde5029 ___ 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/riff: add VP4 fourcc
ffmpeg | branch: master | Peter Ross | Sat Jan 12 10:30:02 2019 +1100| [8913af7d94d48559865739d3b068222434fbd319] | committer: Peter Ross avformat/riff: add VP4 fourcc > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8913af7d94d48559865739d3b068222434fbd319 --- libavformat/riff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/riff.c b/libavformat/riff.c index 0f5cd62547..56387916f2 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -307,6 +307,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { AV_CODEC_ID_INDEO5, MKTAG('I', 'V', '5', '0') }, { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') }, +{ AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') }, { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') }, { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') }, { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') }, ___ 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/vp3: spin off get_eob_run and get_coeff coeff functions
ffmpeg | branch: master | Peter Ross | Sat Jun 8 10:55:51 2019 +1000| [a212c8da48fea89bff3e26324aef257e5663233e] | committer: Peter Ross avcodec/vp3: spin off get_eob_run and get_coeff coeff functions these reoutines are shared by vp3 and vp4. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a212c8da48fea89bff3e26324aef257e5663233e --- libavcodec/vp3.c | 39 ++- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 63f60c9109..65aa0f353c 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -931,6 +931,30 @@ static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb) return 0; } +static inline int get_eob_run(GetBitContext *gb, int token) +{ +int v = eob_run_table[token].base; +if (eob_run_table[token].bits) +v += get_bits(gb, eob_run_table[token].bits); +return v; +} + +static inline int get_coeff(GetBitContext *gb, int token, int16_t *coeff) +{ +int bits_to_get, zero_run; + +bits_to_get = coeff_get_bits[token]; +if (bits_to_get) +bits_to_get = get_bits(gb, bits_to_get); +*coeff = coeff_tables[token][bits_to_get]; + +zero_run = zero_run_base[token]; +if (zero_run_get_bits[token]) +zero_run += get_bits(gb, zero_run_get_bits[token]); + +return zero_run; +} + /* * This function is called by unpack_dct_coeffs() to extract the VLCs from * the bitstream. The VLCs encode tokens which are used to unpack DCT @@ -952,7 +976,6 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, int token; int zero_run = 0; int16_t coeff = 0; -int bits_to_get; int blocks_ended; int coeff_i = 0; int num_coeffs = s->num_coded_frags[plane][coeff_index]; @@ -988,10 +1011,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, token = get_vlc2(gb, vlc_table, 11, 3); /* use the token to get a zero run, a coefficient, and an eob run */ if ((unsigned) token <= 6U) { -eob_run = eob_run_table[token].base; -if (eob_run_table[token].bits) -eob_run += get_bits(gb, eob_run_table[token].bits); - +eob_run = get_eob_run(gb, token); if (!eob_run) eob_run = INT_MAX; @@ -1009,14 +1029,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, eob_run = 0; } } else if (token >= 0) { -bits_to_get = coeff_get_bits[token]; -if (bits_to_get) -bits_to_get = get_bits(gb, bits_to_get); -coeff = coeff_tables[token][bits_to_get]; - -zero_run = zero_run_base[token]; -if (zero_run_get_bits[token]) -zero_run += get_bits(gb, zero_run_get_bits[token]); +zero_run = get_coeff(gb, token, &coeff); if (zero_run) { dct_tokens[j++] = TOKEN_ZERO_RUN(coeff, zero_run); ___ 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] fate: add dst decoder test
ffmpeg | branch: master | Peter Ross | Mon Dec 24 20:09:46 2018 +1100| [b12432721611ea7a0936645dcbd57b3b8f7d56e6] | committer: Peter Ross fate: add dst decoder test > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b12432721611ea7a0936645dcbd57b3b8f7d56e6 --- tests/fate/audio.mak | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 4fab472f90..c41958ea2d 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -28,6 +28,11 @@ FATE_SAMPLES_AUDIO-$(call DEMDEC, DSS, DSS_SP) += fate-dss-lp fate-dss-sp fate-dss-lp: CMD = framecrc -i $(TARGET_SAMPLES)/dss/lp.dss -frames 30 fate-dss-sp: CMD = framecrc -i $(TARGET_SAMPLES)/dss/sp.dss -frames 30 +FATE_SAMPLES_AUDIO-$(call DEMDEC, DSF, DST) += fate-dsf-dst +fate-dsf-dst: CMD = pcm -i $(TARGET_SAMPLES)/dst/dst-64fs44-2ch.dff +fate-dsf-dst: CMP = oneoff +fate-dsf-dst: REF = $(SAMPLES)/dst/dst-64fs44-2ch.pcm + FATE_SAMPLES_AUDIO-$(call DEMDEC, AVI, IMC) += fate-imc fate-imc: CMD = pcm -i $(TARGET_SAMPLES)/imc/imc.avi fate-imc: CMP = oneoff ___ 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/vp3data: combine eob_run_base and eob_run_get_bits tables
ffmpeg | branch: master | Peter Ross | Fri May 24 20:10:32 2019 +1000| [b6ca032adebe05573d9fe9c3a2625240f55b33b0] | committer: Peter Ross avcodec/vp3data: combine eob_run_base and eob_run_get_bits tables > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6ca032adebe05573d9fe9c3a2625240f55b33b0 --- libavcodec/vp3.c | 6 +++--- libavcodec/vp3data.h | 9 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index b248c90413..63f60c9109 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -988,9 +988,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, token = get_vlc2(gb, vlc_table, 11, 3); /* use the token to get a zero run, a coefficient, and an eob run */ if ((unsigned) token <= 6U) { -eob_run = eob_run_base[token]; -if (eob_run_get_bits[token]) -eob_run += get_bits(gb, eob_run_get_bits[token]); +eob_run = eob_run_table[token].base; +if (eob_run_table[token].bits) +eob_run += get_bits(gb, eob_run_table[token].bits); if (!eob_run) eob_run = INT_MAX; diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index c82b1b3a86..d520a10c76 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -198,11 +198,10 @@ static const int8_t fixed_motion_vector_table[64] = { }; /* only tokens 0..6 indicate eob runs */ -static const uint8_t eob_run_base[7] = { -1, 2, 3, 4, 8, 16, 0 -}; -static const uint8_t eob_run_get_bits[7] = { -0, 0, 0, 2, 3, 4, 12 +static const struct { +uint8_t base, bits; +} eob_run_table[7] = { +{1, 0}, {2, 0}, {3, 0}, {4, 2}, {8, 3}, {16, 4}, {0, 12} }; static const uint8_t zero_run_base[32] = { ___ 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/vp6: use ff_vp3dsp_[hv]_loop_filter_12
ffmpeg | branch: master | Peter Ross | Sun Jan 13 15:15:29 2019 +1100| [160ebe0a8d780f6db7c18e824d8ec6f437da33a2] | committer: Peter Ross avcodec/vp6: use ff_vp3dsp_[hv]_loop_filter_12 Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=160ebe0a8d780f6db7c18e824d8ec6f437da33a2 --- libavcodec/vp56.c| 10 ++ libavcodec/vp56.h| 1 + libavcodec/vp56dsp.c | 19 --- tests/ref/fate/vp61 | 230 +- tests/ref/fate/vp6f | 340 +-- 5 files changed, 296 insertions(+), 304 deletions(-) diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index 27b4b8b944..e9e8d5d9fd 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -33,6 +33,8 @@ void ff_vp56_init_dequant(VP56Context *s, int quantizer) { +if (s->quantizer != quantizer) +ff_vp3dsp_set_bounding_values(s->bounding_values_array, ff_vp56_filter_threshold[quantizer]); s->quantizer = quantizer; s->dequant_dc = ff_vp56_dc_dequant[quantizer] << 2; s->dequant_ac = ff_vp56_ac_dequant[quantizer] << 2; @@ -320,9 +322,17 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) static void vp56_deblock_filter(VP56Context *s, uint8_t *yuv, ptrdiff_t stride, int dx, int dy) { +if (s->avctx->codec->id == AV_CODEC_ID_VP5) { int t = ff_vp56_filter_threshold[s->quantizer]; if (dx) s->vp56dsp.edge_filter_hor(yuv + 10-dx , stride, t); if (dy) s->vp56dsp.edge_filter_ver(yuv + stride*(10-dy), stride, t); +} else { +int * bounding_values = s->bounding_values_array + 127; +if (dx) +ff_vp3dsp_h_loop_filter_12(yuv + 10-dx, stride, bounding_values); +if (dy) +ff_vp3dsp_v_loop_filter_12(yuv + stride*(10-dy), stride, bounding_values); +} } static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src, diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h index 70e1d38a83..9b3036895c 100644 --- a/libavcodec/vp56.h +++ b/libavcodec/vp56.h @@ -170,6 +170,7 @@ struct vp56_context { int filter_mode; int max_vector_length; int sample_variance_threshold; +DECLARE_ALIGNED(8, int, bounding_values_array)[256]; uint8_t coeff_ctx[4][64]; /* used in vp5 only */ uint8_t coeff_ctx_last[4]; /* used in vp5 only */ diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c index 9f299dc60f..e8d93d6680 100644 --- a/libavcodec/vp56dsp.c +++ b/libavcodec/vp56dsp.c @@ -72,27 +72,8 @@ av_cold void ff_vp5dsp_init(VP56DSPContext *s) #endif /* CONFIG_VP5_DECODER */ #if CONFIG_VP6_DECODER -static int vp6_adjust(int v, int t) -{ -int V = v, s = v >> 31; -V ^= s; -V -= s; -if (V-t-1 >= (unsigned)(t-1)) -return v; -V = 2*t - V; -V += s; -V ^= s; -return V; -} - -VP56_EDGE_FILTER(vp6, hor, 1, stride) -VP56_EDGE_FILTER(vp6, ver, stride, 1) - av_cold void ff_vp6dsp_init(VP56DSPContext *s) { -s->edge_filter_hor = vp6_edge_filter_hor; -s->edge_filter_ver = vp6_edge_filter_ver; - s->vp6_filter_diag4 = ff_vp6_filter_diag4_c; if (ARCH_ARM) diff --git a/tests/ref/fate/vp61 b/tests/ref/fate/vp61 index a5a813e670..13146c4071 100644 --- a/tests/ref/fate/vp61 +++ b/tests/ref/fate/vp61 @@ -8,118 +8,118 @@ 0, 2, 2,1,18816, 0x1eec8b7d 0, 3, 3,1,18816, 0x3817859f 0, 4, 4,1,18816, 0x8f487c41 -0, 5, 5,1,18816, 0xe1097136 -0, 6, 6,1,18816, 0x494161dd -0, 7, 7,1,18816, 0x40c85514 -0, 8, 8,1,18816, 0xd1854b86 -0, 9, 9,1,18816, 0xdd563ad4 -0, 10, 10,1,18816, 0x00122fac -0, 11, 11,1,18816, 0x0a6f19f4 -0, 12, 12,1,18816, 0x74fe0e01 -0, 13, 13,1,18816, 0x576e00bf -0, 14, 14,1,18816, 0xcb84f7e1 -0, 15, 15,1,18816, 0x7f85ebf3 -0, 16, 16,1,18816, 0xc6c2e22b -0, 17, 17,1,18816, 0x9b22cd80 -0, 18, 18,1,18816, 0x512fc164 -0, 19, 19,1,18816, 0x5c2aaf7b -0, 20, 20,1,18816, 0x98a5a700 -0, 21, 21,1,18816, 0xccf19d74 -0, 22, 22,1,18816, 0x15d08d90 -0, 23, 23,1,18816, 0xe04f7b1b -0, 24, 24,1,18816, 0x251564f6 -0, 25, 25,1,18816, 0x81bf5498 -0, 26, 26,1,18816, 0xd94f4861 -0, 27, 27
[FFmpeg-cvslog] avcodec/vp6: select idct based (loosely) on number of coefficients decoded
ffmpeg | branch: master | Peter Ross | Sun Jan 13 15:45:07 2019 +1100| [d8ebfd1bdf7e2c47af3eb057b97de5b7fe854e35] | committer: Peter Ross avcodec/vp6: select idct based (loosely) on number of coefficients decoded The VP3/4/5/6 reference decoders all use three IDCT versions: one for the DC-only case, another for blocks with more than 10 coefficients, and an optimised one for blocks with up to 10 AC coefficents. VP6 relies on the sparse 10 coefficient version, and without it, IDCT drift occurs. Fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8ebfd1bdf7e2c47af3eb057b97de5b7fe854e35 --- libavcodec/vp5.c | 1 + libavcodec/vp56.c | 30 +-- libavcodec/vp56.h | 2 + libavcodec/vp6.c | 14 tests/ref/fate/vp6a| 172 - tests/ref/fate/vp6a-skip_alpha | 172 - 6 files changed, 213 insertions(+), 178 deletions(-) diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index cb08cec33f..49988b8b76 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -252,6 +252,7 @@ static int vp5_parse_coeff(VP56Context *s) for (i=coeff_idx; i<=ctx_last; i++) s->coeff_ctx[ff_vp56_b6to4[b]][i] = 5; s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[ff_vp56_b6to4[b]][0]; +s->idct_selector[b] = 63; } return 0; } diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index e9e8d5d9fd..72fea3780e 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -406,6 +406,24 @@ static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src, } } +static void vp56_idct_put(VP56Context *s, uint8_t * dest, ptrdiff_t stride, int16_t *block, int selector) +{ +if (selector > 10 || selector == 1) +s->vp3dsp.idct_put(dest, stride, block); +else +ff_vp3dsp_idct10_put(dest, stride, block); +} + +static void vp56_idct_add(VP56Context *s, uint8_t * dest, ptrdiff_t stride, int16_t *block, int selector) +{ +if (selector > 10) +s->vp3dsp.idct_add(dest, stride, block); +else if (selector > 1) +ff_vp3dsp_idct10_add(dest, stride, block); +else +s->vp3dsp.idct_dc_add(dest, stride, block); +} + static av_always_inline void vp56_render_mb(VP56Context *s, int row, int col, int is_alpha, VP56mb mb_type) { int b, ab, b_max, plane, off; @@ -426,8 +444,8 @@ static av_always_inline void vp56_render_mb(VP56Context *s, int row, int col, in case VP56_MB_INTRA: for (b=0; bvp3dsp.idct_put(frame_current->data[plane] + s->block_offset[b], -s->stride[plane], s->block_coeff[b]); +vp56_idct_put(s, frame_current->data[plane] + s->block_offset[b], +s->stride[plane], s->block_coeff[b], s->idct_selector[b]); } break; @@ -439,8 +457,8 @@ static av_always_inline void vp56_render_mb(VP56Context *s, int row, int col, in s->hdsp.put_pixels_tab[1][0](frame_current->data[plane] + off, frame_ref->data[plane] + off, s->stride[plane], 8); -s->vp3dsp.idct_add(frame_current->data[plane] + off, -s->stride[plane], s->block_coeff[b]); +vp56_idct_add(s, frame_current->data[plane] + off, + s->stride[plane], s->block_coeff[b], s->idct_selector[b]); } break; @@ -457,8 +475,8 @@ static av_always_inline void vp56_render_mb(VP56Context *s, int row, int col, in plane = ff_vp56_b2p[b+ab]; vp56_mc(s, b, plane, frame_ref->data[plane], s->stride[plane], 16*col+x_off, 16*row+y_off); -s->vp3dsp.idct_add(frame_current->data[plane] + s->block_offset[b], -s->stride[plane], s->block_coeff[b]); +vp56_idct_add(s, frame_current->data[plane] + s->block_offset[b], + s->stride[plane], s->block_coeff[b], s->idct_selector[b]); } break; } diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h index 9b3036895c..84b2f6c94b 100644 --- a/libavcodec/vp56.h +++ b/libavcodec/vp56.h @@ -105,6 +105,7 @@ typedef struct VP56Macroblock { typedef struct VP56Model { uint8_t coeff_reorder[64]; /* used in vp6 only */ uint8_t coeff_index_to_pos[64]; /* used in vp6 only */ +uint8_t coeff_index_to_idct_selector[64]; /* used in vp6 only */ uint8_t vector_sig[2]; /* delta sign */ uint8_t vector_dct[2]; /* delta codin
[FFmpeg-cvslog] avcodec/vp3dsp: move vp3 init loop filter function to vp3dsp
ffmpeg | branch: master | Peter Ross | Sun Jan 13 14:55:53 2019 +1100| [1dfd7aecf26e2f4d3ee1ca893e6365f90c02b899] | committer: Peter Ross avcodec/vp3dsp: move vp3 init loop filter function to vp3dsp This is also used by the VP6 decoder. Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dfd7aecf26e2f4d3ee1ca893e6365f90c02b899 --- libavcodec/vp3.c| 22 +- libavcodec/vp3dsp.c | 32 libavcodec/vp3dsp.h | 2 ++ 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index a5d8c2ed0b..b248c90413 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -416,27 +416,7 @@ static void init_dequantizer(Vp3DecodeContext *s, int qpi) */ static void init_loop_filter(Vp3DecodeContext *s) { -int *bounding_values = s->bounding_values_array + 127; -int filter_limit; -int x; -int value; - -filter_limit = s->filter_limit_values[s->qps[0]]; -av_assert0(filter_limit < 128U); - -/* set up the bounding values */ -memset(s->bounding_values_array, 0, 256 * sizeof(int)); -for (x = 0; x < filter_limit; x++) { -bounding_values[-x] = -x; -bounding_values[x] = x; -} -for (x = value = filter_limit; x < 128 && value; x++, value--) { -bounding_values[ x] = value; -bounding_values[-x] = -value; -} -if (value) -bounding_values[128] = value; -bounding_values[129] = bounding_values[130] = filter_limit * 0x02020202; +ff_vp3dsp_set_bounding_values(s->bounding_values_array, s->filter_limit_values[s->qps[0]]); } /* diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c index cdf7d6490e..4e08ee0b8f 100644 --- a/libavcodec/vp3dsp.c +++ b/libavcodec/vp3dsp.c @@ -27,6 +27,7 @@ #include "libavutil/attributes.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" +#include "libavutil/avassert.h" #include "avcodec.h" #include "rnd_avg.h" @@ -296,3 +297,34 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags) if (ARCH_MIPS) ff_vp3dsp_init_mips(c, flags); } + +/* + * This function initializes the loop filter boundary limits if the frame's + * quality index is different from the previous frame's. + * + * where sizeof(bounding_values_array) is 256 * sizeof(int) + * + * The filter_limit_values may not be larger than 127. + */ +void ff_vp3dsp_set_bounding_values(int * bounding_values_array, int filter_limit) +{ +int *bounding_values = bounding_values_array + 127; +int x; +int value; + +av_assert0(filter_limit < 128U); + +/* set up the bounding values */ +memset(bounding_values_array, 0, 256 * sizeof(int)); +for (x = 0; x < filter_limit; x++) { +bounding_values[-x] = -x; +bounding_values[x] = x; +} +for (x = value = filter_limit; x < 128 && value; x++, value--) { +bounding_values[ x] = value; +bounding_values[-x] = -value; +} +if (value) +bounding_values[128] = value; +bounding_values[129] = bounding_values[130] = filter_limit * 0x02020202; +} diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h index f5f042dc0c..f55a7f834f 100644 --- a/libavcodec/vp3dsp.h +++ b/libavcodec/vp3dsp.h @@ -51,4 +51,6 @@ void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags); void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags); void ff_vp3dsp_init_mips(VP3DSPContext *c, int flags); +void ff_vp3dsp_set_bounding_values(int * bound_values_array, int filter_limit); + #endif /* AVCODEC_VP3DSP_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vp6: use rounded shift for chroma motion vector calculation
ffmpeg | branch: master | Peter Ross | Thu Jan 10 20:55:06 2019 +1100| [10a57f55e60902ab91388b8a46b73f1f4532f737] | committer: Peter Ross avcodec/vp6: use rounded shift for chroma motion vector calculation Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10a57f55e60902ab91388b8a46b73f1f4532f737 --- libavcodec/vp56.c | 8 +- tests/ref/fate/vp60 | 202 +++ tests/ref/fate/vp61 | 238 ++-- tests/ref/fate/vp6f | 342 ++-- 4 files changed, 393 insertions(+), 397 deletions(-) diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index b69fe6c176..27b4b8b944 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -196,12 +196,8 @@ static void vp56_decode_4mv(VP56Context *s, int row, int col) s->macroblocks[row * s->mb_width + col].mv = s->mv[3]; /* chroma vectors are average luma vectors */ -if (s->avctx->codec->id == AV_CODEC_ID_VP5) { -s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2); -s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2); -} else { -s->mv[4] = s->mv[5] = (VP56mv) {mv.x/4, mv.y/4}; -} +s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2); +s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2); } static VP56mb vp56_decode_mv(VP56Context *s, int row, int col) diff --git a/tests/ref/fate/vp60 b/tests/ref/fate/vp60 index 4becf2a8e2..2381c2775a 100644 --- a/tests/ref/fate/vp60 +++ b/tests/ref/fate/vp60 @@ -18,114 +18,114 @@ 0, 12, 12,1,55296, 0xe76b7df7 0, 13, 13,1,55296, 0x5a049f33 0, 14, 14,1,55296, 0xc83d9b90 -0, 15, 15,1,55296, 0x567877b8 -0, 16, 16,1,55296, 0x334c7f6e -0, 17, 17,1,55296, 0x9317945c -0, 18, 18,1,55296, 0xf032831e -0, 19, 19,1,55296, 0x7b6c8d2c -0, 20, 20,1,55296, 0x37109fd6 -0, 21, 21,1,55296, 0xe9b0b61b -0, 22, 22,1,55296, 0x7385dae8 -0, 23, 23,1,55296, 0x74a8a9f5 -0, 24, 24,1,55296, 0xbcd2e218 -0, 25, 25,1,55296, 0x0aa6c623 -0, 26, 26,1,55296, 0x2224d6d6 -0, 27, 27,1,55296, 0x8c8ee4d9 -0, 28, 28,1,55296, 0x0d4ceccc -0, 29, 29,1,55296, 0x623f10c7 -0, 30, 30,1,55296, 0x13a61f8f -0, 31, 31,1,55296, 0x5343fa8d -0, 32, 32,1,55296, 0x21fef1b5 -0, 33, 33,1,55296, 0x380de6b4 -0, 34, 34,1,55296, 0x04bedfd3 -0, 35, 35,1,55296, 0x428cf510 -0, 36, 36,1,55296, 0xbca8c214 -0, 37, 37,1,55296, 0x947faa34 -0, 38, 38,1,55296, 0x70769f45 -0, 39, 39,1,55296, 0xcb9483ad +0, 15, 15,1,55296, 0x464d77d6 +0, 16, 16,1,55296, 0x725d7fa2 +0, 17, 17,1,55296, 0xc30494d5 +0, 18, 18,1,55296, 0x5687839f +0, 19, 19,1,55296, 0x38be8df5 +0, 20, 20,1,55296, 0x62afa0ca +0, 21, 21,1,55296, 0x683ab733 +0, 22, 22,1,55296, 0xccbedc72 +0, 23, 23,1,55296, 0x43c4abc5 +0, 24, 24,1,55296, 0xf2f2e3f5 +0, 25, 25,1,55296, 0x5fb8c813 +0, 26, 26,1,55296, 0x7814d907 +0, 27, 27,1,55296, 0xbb87e71a +0, 28, 28,1,55296, 0x41c6ef34 +0, 29, 29,1,55296, 0x3f041373 +0, 30, 30,1,55296, 0x14b62281 +0, 31, 31,1,55296, 0x9a41fddb +0, 32, 32,1,55296, 0x8961f556 +0, 33, 33,1,55296, 0x98edea61 +0, 34, 34,1,55296, 0x434ae3dd +0, 35, 35,1,55296, 0x0aa4fa23 +0, 36, 36,1,55296, 0x0b8bc77f +0, 37, 37,1,55296, 0x79dfafbc +0, 38, 38,1,55296, 0x199ea4da +0, 39, 39,1,55296, 0xd270896d 0, 40, 40,1,55296, 0xac4ea82b -0, 41, 41,1,55296, 0xa3816977 -0, 42, 42,1,55296, 0xcfd54ec4 -0, 43, 43,1,55296, 0x9774
[FFmpeg-cvslog] avcodec/vp3dsp: add 12 pixel loop filter functions
ffmpeg | branch: master | Peter Ross | Sun Jan 6 12:45:40 2019 +1100| [19565c6026016ee95a957ec95af0669103224ab5] | committer: Peter Ross avcodec/vp3dsp: add 12 pixel loop filter functions Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19565c6026016ee95a957ec95af0669103224ab5 --- libavcodec/vp3dsp.c | 28 libavcodec/vp3dsp.h | 3 +++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c index 4e08ee0b8f..de0130a9cf 100644 --- a/libavcodec/vp3dsp.c +++ b/libavcodec/vp3dsp.c @@ -228,14 +228,14 @@ static void vp3_idct_dc_add_c(uint8_t *dest /* align 8 */, ptrdiff_t stride, block[0] = 0; } -static void vp3_v_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, -int *bounding_values) +static av_always_inline void vp3_v_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, + int *bounding_values, int count) { unsigned char *end; int filter_value; const ptrdiff_t nstride = -stride; -for (end = first_pixel + 8; first_pixel < end; first_pixel++) { +for (end = first_pixel + count; first_pixel < end; first_pixel++) { filter_value = (first_pixel[2 * nstride] - first_pixel[stride]) + (first_pixel[0] - first_pixel[nstride]) * 3; filter_value = bounding_values[(filter_value + 4) >> 3]; @@ -245,13 +245,13 @@ static void vp3_v_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, } } -static void vp3_h_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, -int *bounding_values) +static av_always_inline void vp3_h_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, + int *bounding_values, int count) { unsigned char *end; int filter_value; -for (end = first_pixel + 8 * stride; first_pixel != end; first_pixel += stride) { +for (end = first_pixel + count * stride; first_pixel != end; first_pixel += stride) { filter_value = (first_pixel[-2] - first_pixel[1]) + (first_pixel[ 0] - first_pixel[-1]) * 3; filter_value = bounding_values[(filter_value + 4) >> 3]; @@ -261,6 +261,18 @@ static void vp3_h_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, } } +#define LOOP_FILTER(prefix, suffix, dim, count) \ +void prefix##_##dim##_loop_filter_##count##suffix(uint8_t *first_pixel, ptrdiff_t stride, \ +int *bounding_values) \ +{ \ +vp3_##dim##_loop_filter_c(first_pixel, stride, bounding_values, count); \ +} + +static LOOP_FILTER(vp3,_c, v, 8) +static LOOP_FILTER(vp3,_c, h, 8) +LOOP_FILTER(ff_vp3dsp, , v, 12) +LOOP_FILTER(ff_vp3dsp, , h, 12) + static void put_no_rnd_pixels_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t stride, int h) { @@ -285,8 +297,8 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags) c->idct_put = vp3_idct_put_c; c->idct_add = vp3_idct_add_c; c->idct_dc_add = vp3_idct_dc_add_c; -c->v_loop_filter = vp3_v_loop_filter_c; -c->h_loop_filter = vp3_h_loop_filter_c; +c->v_loop_filter = vp3_v_loop_filter_8_c; +c->h_loop_filter = vp3_h_loop_filter_8_c; if (ARCH_ARM) ff_vp3dsp_init_arm(c, flags); diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h index f55a7f834f..7549bcb3de 100644 --- a/libavcodec/vp3dsp.h +++ b/libavcodec/vp3dsp.h @@ -45,6 +45,9 @@ typedef struct VP3DSPContext { void (*h_loop_filter)(uint8_t *src, ptrdiff_t stride, int *bounding_values); } VP3DSPContext; +void ff_vp3dsp_v_loop_filter_12(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values); +void ff_vp3dsp_h_loop_filter_12(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values); + void ff_vp3dsp_init(VP3DSPContext *c, int flags); void ff_vp3dsp_init_arm(VP3DSPContext *c, int flags); void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vp3dsp: add 10 coefficient version of the VP3 IDCT
ffmpeg | branch: master | Peter Ross | Sun Jan 13 18:37:28 2019 +1100| [f4756ee9f7cc41e03531b86fe9f4b5e7406065ba] | committer: Peter Ross avcodec/vp3dsp: add 10 coefficient version of the VP3 IDCT This version of the IDCT is used by the VP6 decoder. Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4756ee9f7cc41e03531b86fe9f4b5e7406065ba --- libavcodec/vp3dsp.c | 152 libavcodec/vp3dsp.h | 3 ++ 2 files changed, 155 insertions(+) diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c index de0130a9cf..ac4c57441c 100644 --- a/libavcodec/vp3dsp.c +++ b/libavcodec/vp3dsp.c @@ -195,6 +195,158 @@ static av_always_inline void idct(uint8_t *dst, ptrdiff_t stride, } } +static av_always_inline void idct10(uint8_t *dst, ptrdiff_t stride, +int16_t *input, int type) +{ +int16_t *ip = input; + +int A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H; +int Ed, Gd, Add, Bdd, Fd, Hd; + +int i; + +/* Inverse DCT on the rows now */ +for (i = 0; i < 4; i++) { +/* Check for non-zero values */ +if (ip[0 * 8] | ip[1 * 8] | ip[2 * 8] | ip[3 * 8]) { +A = M(xC1S7, ip[1 * 8]); +B = M(xC7S1, ip[1 * 8]); +C = M(xC3S5, ip[3 * 8]); +D = -M(xC5S3, ip[3 * 8]); + +Ad = M(xC4S4, (A - C)); +Bd = M(xC4S4, (B - D)); + +Cd = A + C; +Dd = B + D; + +E = M(xC4S4, ip[0 * 8]); +F = E; + +G = M(xC2S6, ip[2 * 8]); +H = M(xC6S2, ip[2 * 8]); + +Ed = E - G; +Gd = E + G; + +Add = F + Ad; +Bdd = Bd - H; + +Fd = F - Ad; +Hd = Bd + H; + +/* Final sequence of operations over-write original inputs */ +ip[0 * 8] = Gd + Cd; +ip[7 * 8] = Gd - Cd; + +ip[1 * 8] = Add + Hd; +ip[2 * 8] = Add - Hd; + +ip[3 * 8] = Ed + Dd; +ip[4 * 8] = Ed - Dd; + +ip[5 * 8] = Fd + Bdd; +ip[6 * 8] = Fd - Bdd; + +} + +ip += 1; +} + +ip = input; + +for (i = 0; i < 8; i++) { +/* Check for non-zero values (bitwise or faster than ||) */ +if (ip[0] | ip[1] | ip[2] | ip[3]) { +A = M(xC1S7, ip[1]); +B = M(xC7S1, ip[1]); +C = M(xC3S5, ip[3]); +D = -M(xC5S3, ip[3]); + +Ad = M(xC4S4, (A - C)); +Bd = M(xC4S4, (B - D)); + +Cd = A + C; +Dd = B + D; + +E = M(xC4S4, ip[0]); +if (type == 1) +E += 16 * 128; +F = E; + +G = M(xC2S6, ip[2]); +H = M(xC6S2, ip[2]); + +Ed = E - G; +Gd = E + G; + +Add = F + Ad; +Bdd = Bd - H; + +Fd = F - Ad; +Hd = Bd + H; + +Gd += 8; +Add += 8; +Ed += 8; +Fd += 8; + +/* Final sequence of operations over-write original inputs. */ +if (type == 1) { +dst[0 * stride] = av_clip_uint8((Gd + Cd) >> 4); +dst[7 * stride] = av_clip_uint8((Gd - Cd) >> 4); + +dst[1 * stride] = av_clip_uint8((Add + Hd) >> 4); +dst[2 * stride] = av_clip_uint8((Add - Hd) >> 4); + +dst[3 * stride] = av_clip_uint8((Ed + Dd) >> 4); +dst[4 * stride] = av_clip_uint8((Ed - Dd) >> 4); + +dst[5 * stride] = av_clip_uint8((Fd + Bdd) >> 4); +dst[6 * stride] = av_clip_uint8((Fd - Bdd) >> 4); +} else { +dst[0 * stride] = av_clip_uint8(dst[0 * stride] + ((Gd + Cd) >> 4)); +dst[7 * stride] = av_clip_uint8(dst[7 * stride] + ((Gd - Cd) >> 4)); + +dst[1 * stride] = av_clip_uint8(dst[1 * stride] + ((Add + Hd) >> 4)); +dst[2 * stride] = av_clip_uint8(dst[2 * stride] + ((Add - Hd) >> 4)); + +dst[3 * stride] = av_clip_uint8(dst[3 * stride] + ((Ed + Dd) >> 4)); +dst[4 * stride] = av_clip_uint8(dst[4 * stride] + ((Ed - Dd) >> 4)); + +dst[5 * stride] = av_clip_uint8(dst[5 * stride] + ((Fd + Bdd) >> 4)); +dst[6 * stride] = av_clip_uint8(dst[6 * stride] + ((Fd - Bdd) >> 4)); +} +} else { +if (type == 1) { +dst[0*stride] = +dst[1*stride] = +dst[2*stride] = +dst[3*stride] = +dst[4*stride] = +dst[5*stride] = +dst[6*stride] = +dst[7*stride] = 128; +} +} + +ip += 8; +dst++; +} +} + +void ff_vp3dsp_idct10_put(uint8_t *des
[FFmpeg-cvslog] avcodec/vp3: ref_frame/ref_frames are only required when HAVE_THREADS=1
ffmpeg | branch: master | Peter Ross | Fri Jan 4 13:06:07 2019 +1100| [d52a1be4e339f977485941ebf3bd26da2a40f72f] | committer: Peter Ross avcodec/vp3: ref_frame/ref_frames are only required when HAVE_THREADS=1 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d52a1be4e339f977485941ebf3bd26da2a40f72f --- libavcodec/vp3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 9df2fda49d..a5d8c2ed0b 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1961,6 +1961,7 @@ fail: return ret; } +#if HAVE_THREADS static int ref_frame(Vp3DecodeContext *s, ThreadFrame *dst, ThreadFrame *src) { ff_thread_release_buffer(s->avctx, dst); @@ -1979,7 +1980,6 @@ static int ref_frames(Vp3DecodeContext *dst, Vp3DecodeContext *src) return 0; } -#if HAVE_THREADS static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dstdec: use appropriate alignment
ffmpeg | branch: master | Peter Ross | Mon Dec 24 20:09:18 2018 +1100| [ad0d5d7516dc3de7d1172c03920256b6a48fcd39] | committer: Peter Ross avcodec/dstdec: use appropriate alignment this was a typo in my original dst decoder. there is no requirement for 64-byte alignment here. the change does not affect decoder performance. Signed-off-by: Peter Ross > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad0d5d7516dc3de7d1172c03920256b6a48fcd39 --- libavcodec/dstdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 4f75bc9f37..0614c99c4b 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -70,7 +70,7 @@ typedef struct DSTContext { GetBitContext gb; ArithCoder ac; Table fsets, probs; -DECLARE_ALIGNED(64, uint8_t, status)[DST_MAX_CHANNELS][16]; +DECLARE_ALIGNED(16, uint8_t, status)[DST_MAX_CHANNELS][16]; DECLARE_ALIGNED(16, int16_t, filter)[DST_MAX_ELEMENTS][16][256]; DSDContext dsdctx[DST_MAX_CHANNELS]; } DSTContext; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] dstdec: big-endian compatiblity
ffmpeg | branch: master | Peter Ross | Sun Jan 6 21:38:47 2019 +1100| [127564b3f114da4a08883a533411f83584874aac] | committer: Peter Ross dstdec: big-endian compatiblity > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=127564b3f114da4a08883a533411f83584874aac --- libavcodec/dstdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 368cb64931..4f75bc9f37 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -343,8 +343,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, v = ((predict >> 15) ^ residual) & 1; dsd[((i >> 3) * channels + ch) << 2] |= v << (7 - (i & 0x7 )); -AV_WN64A(status + 8, (AV_RN64A(status + 8) << 1) | ((AV_RN64A(status) >> 63) & 1)); -AV_WN64A(status, (AV_RN64A(status) << 1) | v); +AV_WL64A(status + 8, (AV_RL64A(status + 8) << 1) | ((AV_RL64A(status) >> 63) & 1)); +AV_WL64A(status, (AV_RL64A(status) << 1) | v); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] intreadwrite: add AV_RL64A, AV_WL64A
ffmpeg | branch: master | Peter Ross | Mon Jan 7 22:12:13 2019 +1100| [b4e6d1f597a3d299176cebb42f1cf60e891a259a] | committer: Peter Ross intreadwrite: add AV_RL64A, AV_WL64A macros for reading and writing 64-bit aligned little-endian values. these macros are used by the DST decoder and give a performance boost on platforms that where the compiler must guard against unaligned memory access. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4e6d1f597a3d299176cebb42f1cf60e891a259a --- libavutil/intreadwrite.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h index 67c763b135..4c8413a536 100644 --- a/libavutil/intreadwrite.h +++ b/libavutil/intreadwrite.h @@ -542,6 +542,21 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; # define AV_WN64A(p, v) AV_WNA(64, p, v) #endif +#if AV_HAVE_BIGENDIAN +# define AV_RLA(s, p)av_bswap##s(AV_RN##s##A(p)) +# define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +#else +# define AV_RLA(s, p)AV_RN##s##A(p) +# define AV_WLA(s, p, v) AV_WN##s##A(p, v) +#endif + +#ifndef AV_RL64A +# define AV_RL64A(p) AV_RLA(64, p) +#endif +#ifndef AV_WL64A +# define AV_WL64A(p, v) AV_WLA(64, p, v) +#endif + /* * The AV_COPYxxU macros are suitable for copying data to/from unaligned * memory locations. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vp3data: use more compact data type
ffmpeg | branch: master | Peter Ross | Mon Jan 7 09:01:14 2019 +1100| [2659a0fe36327233a5f2f3968d638d061ecbba39] | committer: Peter Ross avcodec/vp3data: use more compact data type > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2659a0fe36327233a5f2f3968d638d061ecbba39 --- libavcodec/vp3data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index 3884bca878..c82b1b3a86 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -73,7 +73,7 @@ static const uint8_t vp31_dc_scale_factor[64] = { 20, 10, 10, 10, 10, 10, 10, 10 }; -static const uint32_t vp31_ac_scale_factor[64] = { +static const uint16_t vp31_ac_scale_factor[64] = { 500, 450, 400, 370, 340, 310, 285, 265, 245, 225, 210, 195, 185, 180, 170, 160, 150, 145, 135, 130, 125, 115, 110, 107, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: --help typo
ffmpeg | branch: master | Peter Ross | Thu Dec 20 11:38:31 2018 +1100| [fa0f898e3f781d270af87d09a9a1626310f395ef] | committer: Peter Ross configure: --help typo > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa0f898e3f781d270af87d09a9a1626310f395ef --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index be49c19b88..7136f22395 100755 --- a/configure +++ b/configure @@ -473,7 +473,7 @@ Developer options (useful when working on FFmpeg itself): --random-seed=VALUE seed value for --enable/disable-random --disable-valgrind-backtrace do not print a backtrace under Valgrind (only applies to --disable-optimizations builds) - --enable-osfuzz Enable building fuzzer tool + --enable-ossfuzz Enable building fuzzer tool --libfuzzer=PATH path to libfuzzer --ignore-tests=TESTS comma-separated list (without "fate-" prefix in the name) of tests whose result is ignored ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: make --windres option work
ffmpeg | branch: master | Peter Ross | Thu Dec 20 11:39:39 2018 +1100| [16ec62bbf4344d83a1ace856c2a79ab88044f48e] | committer: Peter Ross configure: make --windres option work this option is described by --help, but the definition was missing in CMDLINE_SET. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=16ec62bbf4344d83a1ace856c2a79ab88044f48e --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 2f35741aca..2205751402 100755 --- a/configure +++ b/configure @@ -2436,6 +2436,7 @@ CMDLINE_SET=" tempprefix toolchain valgrind +windres x86asmexe " ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: --help should dipslay --host-extralibs
ffmpeg | branch: master | Peter Ross | Thu Dec 20 11:39:14 2018 +1100| [d80eb8409c5a682042327b6fac2061694c3d9f9b] | committer: Peter Ross configure: --help should dipslay --host-extralibs > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d80eb8409c5a682042327b6fac2061694c3d9f9b --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 7136f22395..2f35741aca 100755 --- a/configure +++ b/configure @@ -380,7 +380,7 @@ Toolchain options: --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host --host-ld=HOSTLD use host linker HOSTLD --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host - --host-libs=HLIBSuse libs HLIBS when linking for host + --host-extralibs=HLIBS use libs HLIBS when linking for host --host-os=OS compiler host OS [$target_os] --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS] ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro
ffmpeg | branch: master | Peter Ross | Sat Dec 15 12:54:43 2018 +1100| [436bffaca2312ce1b0fae149c50e77e411bcaa8e] | committer: Peter Ross avutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro squelch format type warning > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=436bffaca2312ce1b0fae149c50e77e411bcaa8e --- libavutil/tests/random_seed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/tests/random_seed.c b/libavutil/tests/random_seed.c index 78067dbe41..bf0c6c7986 100644 --- a/libavutil/tests/random_seed.c +++ b/libavutil/tests/random_seed.c @@ -47,7 +47,7 @@ int main(void) retry:; } if (retry >= 3) { -printf("rsf %d: FAIL at %d with %X\n", rsf, j, seeds[j]); +printf("rsf %d: FAIL at %d with %"PRIX32"\n", rsf, j, seeds[j]); return 1; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] os_support: define socket shutdown SHUT_xxx macros if they are not defined
ffmpeg | branch: master | Peter Ross | Sat Nov 24 23:26:13 2018 +1100| [b41f378fc4ddb1a34aebe459805d3c8dbcc96b36] | committer: Peter Ross os_support: define socket shutdown SHUT_xxx macros if they are not defined this section has been moved into the CONFIG_NETWORK block, since it only affects network enabled builds. sys/socket.h (with WIN32 guard) is needed to check if the SHUT_xxx macro exists. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b41f378fc4ddb1a34aebe459805d3c8dbcc96b36 --- libavformat/os_support.h | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 7a56dc9a7c..5e6b32d2dc 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -76,17 +76,7 @@ static inline int is_dos_path(const char *path) return 0; } -#if defined(__OS2__) -#define SHUT_RD 0 -#define SHUT_WR 1 -#define SHUT_RDWR 2 -#endif - #if defined(_WIN32) -#define SHUT_RD SD_RECEIVE -#define SHUT_WR SD_SEND -#define SHUT_RDWR SD_BOTH - #ifndef S_IRUSR #define S_IRUSR S_IREAD #endif @@ -96,6 +86,19 @@ static inline int is_dos_path(const char *path) #endif #if CONFIG_NETWORK +#if defined(_WIN32) +#define SHUT_RD SD_RECEIVE +#define SHUT_WR SD_SEND +#define SHUT_RDWR SD_BOTH +#else +#include +#if !defined(SHUT_RD) /* OS/2, DJGPP */ +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 +#endif +#endif + #if !HAVE_SOCKLEN_T typedef int socklen_t; #endif ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avpriv_tempfile: add djgpp fallback
ffmpeg | branch: master | Peter Ross | Tue Nov 20 18:42:41 2018 +1100| [331715534a5bbf692b468989225104cd9bbf9fdb] | committer: Peter Ross avpriv_tempfile: add djgpp fallback > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=331715534a5bbf692b468989225104cd9bbf9fdb --- libavutil/file_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index a8da283583..cc302f2f76 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -138,7 +138,7 @@ int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *l #else snprintf(*filename, len, "/tmp/%sXX", prefix); fd = mkstemp(*filename); -#if defined(_WIN32) || defined (__ANDROID__) +#if defined(_WIN32) || defined (__ANDROID__) || defined(__DJGPP__) if (fd < 0) { snprintf(*filename, len, "./%sXX", prefix); fd = mkstemp(*filename); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: memalign is broken on djgpp 2.05
ffmpeg | branch: master | Peter Ross | Tue Nov 13 21:32:23 2018 +1100| [8b7a1c22274e591f6927e1d4f0e2cb6989081fcc] | committer: Peter Ross configure: memalign is broken on djgpp 2.05 djgpp 2.05 finally provides posix-compatible memalign, but it is broken, so use malloc instead. discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b7a1c22274e591f6927e1d4f0e2cb6989081fcc --- configure | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 197e978a55..3e9222ed1b 100755 --- a/configure +++ b/configure @@ -6796,10 +6796,17 @@ check_deps $CONFIG_LIST \ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" enabled avresample && warn "Building with deprecated library libavresample" -if test $target_os = "haiku"; then +case $target_os in +haiku) disable memalign disable posix_memalign -fi +;; +*-dos|freedos|opendos) +if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then +disable memalign +fi +;; +esac flatten_extralibs(){ nested_entries= ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] additional math.h functions for djgpp
ffmpeg | branch: master | Peter Ross | Sun Nov 11 21:49:29 2018 +1100| [dea1224754fda003b0229c56bce6602a5699d8db] | committer: Peter Ross additional math.h functions for djgpp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dea1224754fda003b0229c56bce6602a5699d8db --- compat/djgpp/math.c | 47 +++ compat/djgpp/math.h | 25 + configure | 2 ++ tests/ref/fate/source | 1 + 4 files changed, 75 insertions(+) diff --git a/compat/djgpp/math.c b/compat/djgpp/math.c new file mode 100644 index 00..777b879e01 --- /dev/null +++ b/compat/djgpp/math.c @@ -0,0 +1,47 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#define FUN(name, type, op) \ +type name(type x, type y) \ +{ \ +if (fpclassify(x) == FP_NAN) return y; \ +if (fpclassify(y) == FP_NAN) return x; \ +return x op y ? x : y; \ +} + +FUN(fmin, double, <) +FUN(fmax, double, >) +FUN(fminf, float, <) +FUN(fmaxf, float, >) + +long double fmodl(long double x, long double y) +{ +return fmod(x, y); +} + +long double scalbnl(long double x, int exp) +{ +return scalbn(x, exp); +} + +long double copysignl(long double x, long double y) +{ +return copysign(x, y); +} diff --git a/compat/djgpp/math.h b/compat/djgpp/math.h new file mode 100644 index 00..4c02ea9c40 --- /dev/null +++ b/compat/djgpp/math.h @@ -0,0 +1,25 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +double fmin(double, double); +double fmax(double, double); +float fminf(float, float); +float fmaxf(float, float); +long double fmodl(long double, long double); +long double scalbnl(long double, int); +long double copysignl(long double, long double); diff --git a/configure b/configure index 6909eaa72a..197e978a55 100755 --- a/configure +++ b/configure @@ -5468,6 +5468,8 @@ EOF elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then eval ${pfx}libc_type=djgpp add_cppflags -U__STRICT_ANSI__ +add_cflags "-include $source_path/compat/djgpp/math.h" +add_compat djgpp/math.o fi test_${pfx}cc < diff --git a/tests/ref/fate/source b/tests/ref/fate/source index b35f016127..0c98a0638a 100644 --- a/tests/ref/fate/source +++ b/tests/ref/fate/source @@ -28,6 +28,7 @@ compat/avisynth/avxsynth_c.h compat/avisynth/windowsPorts/basicDataTypeConversions.h compat/avisynth/windowsPorts/windows2linux.h compat/cuda/dynlink_loader.h +compat/djgpp/math.h compat/float/float.h compat/float/limits.h Use of av_clip() where av_clip_uintp2() could be used: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: detect djgpp libc
ffmpeg | branch: master | Peter Ross | Sun Nov 11 22:02:56 2018 +1100| [533ba0b6b5a5357fe8c19b3b5bb23fa16b6979f1] | committer: Peter Ross configure: detect djgpp libc > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=533ba0b6b5a5357fe8c19b3b5bb23fa16b6979f1 --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ab3144e459..6909eaa72a 100755 --- a/configure +++ b/configure @@ -5297,7 +5297,6 @@ case $target_os in network_extralibs="-lsocket" objformat="coff" enable dos_paths -add_cppflags -U__STRICT_ANSI__ ;; linux) enable section_data_rel_ro @@ -5466,6 +5465,9 @@ EOF elif test_${pfx}cpp_condition sys/brand.h "defined LABELED_BRAND_NAME"; then eval ${pfx}libc_type=solaris add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 +elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then +eval ${pfx}libc_type=djgpp +add_cppflags -U__STRICT_ANSI__ fi test_${pfx}cc < ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/graphmonitor: use SIZE_SPECIFIER for size_t type
ffmpeg | branch: master | Peter Ross | Mon Nov 19 20:03:39 2018 +1100| [1ee4b4006be6c34a0dfec367a60942b85d13238e] | committer: Peter Ross avfilter/graphmonitor: use SIZE_SPECIFIER for size_t type > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ee4b4006be6c34a0dfec367a60942b85d13238e --- libavfilter/f_graphmonitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c index 7052c84d9b..c001835364 100644 --- a/libavfilter/f_graphmonitor.c +++ b/libavfilter/f_graphmonitor.c @@ -211,7 +211,7 @@ static void draw_items(AVFilterContext *ctx, AVFrame *out, snprintf(buffer, sizeof(buffer)-1, " | queue: "); drawtext(out, xpos, ypos, buffer, s->white); xpos += strlen(buffer) * 8; -snprintf(buffer, sizeof(buffer)-1, "%"PRId64, frames); +snprintf(buffer, sizeof(buffer)-1, "%"SIZE_SPECIFIER, frames); drawtext(out, xpos, ypos, buffer, frames > 0 ? frames >= 10 ? frames >= 50 ? s->red : s->yellow : s->green : s->white); xpos += strlen(buffer) * 8; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate-api-h264-slice: use the heap for nal buffer
ffmpeg | branch: master | Peter Ross | Wed Nov 21 01:31:44 2018 +1100| [3fc7b69496fd586a609f9c8a2f1ed17e46bf5fff] | committer: Michael Niedermayer fate-api-h264-slice: use the heap for nal buffer nal buffer is 512 kilobytes Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3fc7b69496fd586a609f9c8a2f1ed17e46bf5fff --- tests/api/api-h264-slice-test.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/api/api-h264-slice-test.c b/tests/api/api-h264-slice-test.c index c6614da34d..b893737bca 100644 --- a/tests/api/api-h264-slice-test.c +++ b/tests/api/api-h264-slice-test.c @@ -117,9 +117,9 @@ int main(int argc, char **argv) unsigned int threads; AVPacket *pkt; FILE *file = NULL; -char nal[MAX_SLICES * UINT16_MAX + AV_INPUT_BUFFER_PADDING_SIZE]; +char * nal = NULL; int nals = 0, ret = 0; -char *p = nal; +char *p; if (argc < 4) { fprintf(stderr, "Usage: %s \n", argv[0]); @@ -139,6 +139,11 @@ int main(int argc, char **argv) return -1; } +nal = av_malloc(MAX_SLICES * UINT16_MAX + AV_INPUT_BUFFER_PADDING_SIZE); +if (!nal) +goto err; +p = nal; + if (!(codec = avcodec_find_decoder(AV_CODEC_ID_H264))) { fprintf(stderr, "Codec not found\n"); ret = -1; @@ -223,6 +228,8 @@ int main(int argc, char **argv) ret = decode(c, frame, NULL); err: +if (nal) +av_free(nal); if (file) fclose(file); av_frame_free(&frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] api-h264-slice-test: use av_be2ne16 instead of ntohs
ffmpeg | branch: master | Peter Ross | Tue Nov 20 18:51:52 2018 +1100| [7cda7d217cd0e9eaa38cc0d5dbbb6204b92fce97] | committer: Michael Niedermayer api-h264-slice-test: use av_be2ne16 instead of ntohs avformat/network.h is not required here. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cda7d217cd0e9eaa38cc0d5dbbb6204b92fce97 --- tests/api/api-h264-slice-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api/api-h264-slice-test.c b/tests/api/api-h264-slice-test.c index be03e80049..c6614da34d 100644 --- a/tests/api/api-h264-slice-test.c +++ b/tests/api/api-h264-slice-test.c @@ -41,10 +41,10 @@ #include #include -#include "libavformat/network.h" #include "libavcodec/avcodec.h" #include "libavutil/pixdesc.h" #include "libavutil/hash.h" +#include "libavutil/bswap.h" static int header = 0; @@ -191,7 +191,7 @@ int main(int argc, char **argv) if (ret != sizeof(uint16_t)) break; -size = ntohs(size); +size = av_be2ne16(size); ret = fread(p, 1, size, file); if (ret != size) { perror("Couldn't read data"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: add Direct Stream Transfer (DST) decoder
ffmpeg | branch: master | Peter Ross | Thu May 5 21:21:27 2016 +0200| [86e493a6ffac3b3705ea4b276060c380ee2f5e75] | committer: Paul B Mahol avcodec: add Direct Stream Transfer (DST) decoder Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86e493a6ffac3b3705ea4b276060c380ee2f5e75 --- libavcodec/Makefile |9 +- libavcodec/allcodecs.c|1 + libavcodec/avcodec.h |1 + libavcodec/codec_desc.c |7 + libavcodec/dsd.c | 86 +++ libavcodec/dsd.h | 53 +++ libavcodec/dsd_tablegen.h | 18 +-- libavcodec/dsddec.c | 63 +--- libavcodec/dstdec.c | 374 + libavcodec/utils.c|2 + libavformat/iff.c | 85 ++- 11 files changed, 611 insertions(+), 88 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 998477c..3f0ffd1 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -239,13 +239,14 @@ OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o OBJS-$(CONFIG_DPX_DECODER) += dpx.o OBJS-$(CONFIG_DPX_ENCODER) += dpxenc.o -OBJS-$(CONFIG_DSD_LSBF_DECODER)+= dsddec.o -OBJS-$(CONFIG_DSD_MSBF_DECODER)+= dsddec.o -OBJS-$(CONFIG_DSD_LSBF_PLANAR_DECODER) += dsddec.o -OBJS-$(CONFIG_DSD_MSBF_PLANAR_DECODER) += dsddec.o +OBJS-$(CONFIG_DSD_LSBF_DECODER)+= dsddec.o dsd.o +OBJS-$(CONFIG_DSD_MSBF_DECODER)+= dsddec.o dsd.o +OBJS-$(CONFIG_DSD_LSBF_PLANAR_DECODER) += dsddec.o dsd.o +OBJS-$(CONFIG_DSD_MSBF_PLANAR_DECODER) += dsddec.o dsd.o OBJS-$(CONFIG_DSICINAUDIO_DECODER) += dsicinaudio.o OBJS-$(CONFIG_DSICINVIDEO_DECODER) += dsicinvideo.o OBJS-$(CONFIG_DSS_SP_DECODER) += dss_sp.o +OBJS-$(CONFIG_DST_DECODER) += dstdec.o dsd.o OBJS-$(CONFIG_DVBSUB_DECODER) += dvbsubdec.o OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsub.o OBJS-$(CONFIG_DVDSUB_DECODER) += dvdsubdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index d435136..44ebafd 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -395,6 +395,7 @@ void avcodec_register_all(void) REGISTER_DECODER(DSD_MSBF_PLANAR, dsd_msbf_planar); REGISTER_DECODER(DSICINAUDIO, dsicinaudio); REGISTER_DECODER(DSS_SP,dss_sp); +REGISTER_DECODER(DST, dst); REGISTER_ENCDEC (EAC3, eac3); REGISTER_DECODER(EVRC, evrc); REGISTER_DECODER(FFWAVESYNTH, ffwavesynth); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 97b2128..9ec9adf 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -591,6 +591,7 @@ enum AVCodecID { AV_CODEC_ID_INTERPLAY_ACM, AV_CODEC_ID_XMA1, AV_CODEC_ID_XMA2, +AV_CODEC_ID_DST, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 57bd4ba..23d5911 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2683,6 +2683,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 2"), .props = AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_DST, +.type = AVMEDIA_TYPE_AUDIO, +.name = "dst", +.long_name = NULL_IF_CONFIG_SMALL("DST (Direct Stream Transfer)"), +.props = AV_CODEC_PROP_LOSSLESS, +}, /* subtitle codecs */ { diff --git a/libavcodec/dsd.c b/libavcodec/dsd.c new file mode 100644 index 000..9104f38 --- /dev/null +++ b/libavcodec/dsd.c @@ -0,0 +1,86 @@ +/* + * Direct Stream Digital (DSD) decoder + * based on BSD licensed dsd2pcm by Sebastian Gesemann + * Copyright (c) 2009, 2011 Sebastian Gesemann. All rights reserved. + * Copyright (c) 2014 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/internal.h" +#include "libavcodec/mathops.h" +#include "avcodec.h" +
[FFmpeg-cvslog] avformat: add Wideband Single-bit Data (WSD) demuxer
ffmpeg | branch: master | Peter Ross | Fri Apr 29 18:48:45 2016 +0200| [10d48c63b2a7e2f929eb9c56e3012dd2d7334925] | committer: Paul B Mahol avformat: add Wideband Single-bit Data (WSD) demuxer Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10d48c63b2a7e2f929eb9c56e3012dd2d7334925 --- Changelog|1 + libavformat/Makefile |1 + libavformat/allformats.c |1 + libavformat/version.h|4 +- libavformat/wsddec.c | 172 ++ 5 files changed, 177 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 328ba46..86b7285 100644 --- a/Changelog +++ b/Changelog @@ -29,6 +29,7 @@ version : - VAAPI-accelerated format conversion and scaling - libnpp/CUDA-accelerated format conversion and scaling - Duck TrueMotion 2.0 Real Time decoder +- Wideband Single-bit Data (WSD) demuxer version 3.0: - Common Encryption (CENC) MP4 encoding and decoding support diff --git a/libavformat/Makefile b/libavformat/Makefile index 51260f4..0f40176 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -493,6 +493,7 @@ OBJS-$(CONFIG_WEBP_MUXER)+= webpenc.o OBJS-$(CONFIG_WEBVTT_DEMUXER)+= webvttdec.o subtitles.o OBJS-$(CONFIG_WEBVTT_MUXER) += webvttenc.o OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood_aud.o +OBJS-$(CONFIG_WSD_DEMUXER) += wsddec.o rawdec.o OBJS-$(CONFIG_WSVQA_DEMUXER) += westwood_vqa.o OBJS-$(CONFIG_WTV_DEMUXER) += wtvdec.o wtv_common.o asf.o \ avlanguage.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index dbf2737..e6ee8d6 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -335,6 +335,7 @@ void av_register_all(void) REGISTER_MUXER (WEBP, webp); REGISTER_MUXDEMUX(WEBVTT, webvtt); REGISTER_DEMUXER (WSAUD,wsaud); +REGISTER_DEMUXER (WSD, wsd); REGISTER_DEMUXER (WSVQA,wsvqa); REGISTER_MUXDEMUX(WTV, wtv); REGISTER_DEMUXER (WVE, wve); diff --git a/libavformat/version.h b/libavformat/version.h index 5141b5b..6a3a17f 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -30,8 +30,8 @@ #include "libavutil/version.h" #define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 34 -#define LIBAVFORMAT_VERSION_MICRO 103 +#define LIBAVFORMAT_VERSION_MINOR 35 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ diff --git a/libavformat/wsddec.c b/libavformat/wsddec.c new file mode 100644 index 000..e84d093 --- /dev/null +++ b/libavformat/wsddec.c @@ -0,0 +1,172 @@ +/* + * Wideband Single-bit Data (WSD) demuxer + * Copyright (c) 2014 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intreadwrite.h" +#include "libavutil/timecode.h" +#include "avformat.h" +#include "internal.h" +#include "rawdec.h" + +static int wsd_probe(AVProbeData *p) +{ +if (p->buf_size < 45 || memcmp(p->buf, "1bit", 4) || +!AV_RB32(p->buf + 36) || !p->buf[44] || +(p->buf[0] >= 0x10 && (AV_RB32(p->buf + 20) < 0x80 || AV_RB32(p->buf + 24) < 0x80))) + return 0; +return AVPROBE_SCORE_MAX; +} + +static int empty_string(const char *buf, unsigned size) +{ +while (size--) { + if (*buf++ != ' ') + return 0; +} +return 1; +} + +static int wsd_to_av_channel_layoyt(AVFormatContext *s, int bit) +{ +switch (bit) { +case 2: return AV_CH_BACK_RIGHT; +case 3: +avpriv_request_sample(s, "Rr-middle"); +break; +case 4: return AV_CH_BACK_CENTER; +case 5: +avpriv_request_sample(s, "Lr-middle"); +break; +case 6: return AV_CH_BACK_LEFT; +case 24: return AV_CH_LOW_FREQUENCY; +case 26: return AV_CH_FRONT_RIGHT; +case 27: return AV_CH_FRONT_RIGHT_OF_CENTE
[FFmpeg-cvslog] libavformat/electronicarts: also demux mpeg audio layer 2
ffmpeg | branch: master | Peter Ross | Thu Oct 22 13:46:25 2015 +1100| [cdfc61de4eeac2fe6a129ad2fa11ffb61353b9d6] | committer: Michael Niedermayer libavformat/electronicarts: also demux mpeg audio layer 2 Signed-off-by: Peter Ross http://wiki.multimedia.cx/index.php?title=Electronic_Arts_SCxl Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cdfc61de4eeac2fe6a129ad2fa11ffb61353b9d6 --- libavformat/electronicarts.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 8087c9f..dc66060 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -239,6 +239,7 @@ static int process_audio_header_elements(AVFormatContext *s) return 0; } break; +case 15: case 16: ea->audio_codec = AV_CODEC_ID_MP3; break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: test ea vp6 with alpha stream
ffmpeg | branch: master | Peter Ross | Thu Jun 25 15:06:25 2015 +1000| [ea8fec20573a8f10ba4188b710228b956f8276dc] | committer: Michael Niedermayer fate: test ea vp6 with alpha stream Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea8fec20573a8f10ba4188b710228b956f8276dc --- tests/fate/demux.mak |3 ++ tests/ref/fate/d-eavp6-demux | 98 ++ 2 files changed, 101 insertions(+) diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 05ce4bf..e48d398 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -32,6 +32,9 @@ fate-cine-demux: CMD = crc -i $(TARGET_SAMPLES)/cine/bayer_gbrg8.cine -c copy FATE_SAMPLES_DEMUX-$(CONFIG_DAUD_DEMUXER) += fate-d-cinema-demux fate-d-cinema-demux: CMD = framecrc -i $(TARGET_SAMPLES)/d-cinema/THX_Science_FLT_1920-partial.302 -acodec copy +FATE_SAMPLES_DEMUX-$(CONFIG_EA_DEMUXER) += fate-d-eavp6-demux +fate-d-eavp6-demux: CMD = framecrc -i $(TARGET_SAMPLES)/ea-vp6/SmallRing.vp6 -map 0 -vcodec copy + FATE_SAMPLES_DEMUX-$(CONFIG_GIF_DEMUXER) += fate-gif-demux fate-gif-demux: CMD = framecrc -i $(TARGET_SAMPLES)/gif/Newtons_cradle_animation_book_2.gif -vcodec copy diff --git a/tests/ref/fate/d-eavp6-demux b/tests/ref/fate/d-eavp6-demux new file mode 100644 index 000..3587a08 --- /dev/null +++ b/tests/ref/fate/d-eavp6-demux @@ -0,0 +1,98 @@ +#tb 0: 32767/982027 +#tb 1: 32767/982027 +0, 0, 0,1, 1860, 0xbd548c4c +1, 0, 0,1, 1748, 0x96046284 +0, 1, 1,1, 1044, 0x814efc86, F=0x0 +1, 1, 1,1, 204, 0x0ea1573a, F=0x0 +0, 2, 2,1, 1036, 0xf672f905, F=0x0 +1, 2, 2,1, 240, 0x634e7448, F=0x0 +0, 3, 3,1, 1048, 0xe0f80ee7, F=0x0 +1, 3, 3,1, 260, 0xc35b8521, F=0x0 +0, 4, 4,1, 1072, 0x980918e9, F=0x0 +1, 4, 4,1, 376, 0x6e5cb85e, F=0x0 +0, 5, 5,1, 1052, 0x73e6fd33, F=0x0 +1, 5, 5,1, 344, 0xaacdad6b, F=0x0 +0, 6, 6,1, 1056, 0x5242fb20, F=0x0 +1, 6, 6,1, 404, 0x7498be1f, F=0x0 +0, 7, 7,1, 1092, 0x8b7111c2, F=0x0 +1, 7, 7,1, 368, 0xe2b8afd2, F=0x0 +0, 8, 8,1, 1144, 0xc1003410, F=0x0 +1, 8, 8,1, 412, 0x3615c893, F=0x0 +0, 9, 9,1, 1152, 0x6b9234f9, F=0x0 +1, 9, 9,1, 424, 0x04a5cdb7, F=0x0 +0, 10, 10,1, 1132, 0x7d45384b, F=0x0 +1, 10, 10,1, 356, 0x4ad5a9d5, F=0x0 +0, 11, 11,1, 1164, 0x47d637a1, F=0x0 +1, 11, 11,1, 448, 0x2811d959, F=0x0 +0, 12, 12,1, 1152, 0xede932ad, F=0x0 +1, 12, 12,1, 316, 0x911a9c11, F=0x0 +0, 13, 13,1, 1112, 0x49f31a9e, F=0x0 +1, 13, 13,1, 312, 0x1bb08de2, F=0x0 +0, 14, 14,1, 1112, 0x7f022bc7, F=0x0 +1, 14, 14,1, 308, 0x2c3698bb, F=0x0 +0, 15, 15,1, 1128, 0x2a7a4381, F=0x0 +1, 15, 15,1, 424, 0xec77c694, F=0x0 +0, 16, 16,1, 1012, 0x22a3f64b, F=0x0 +1, 16, 16,1, 220, 0x7506677f, F=0x0 +0, 17, 17,1, 1012, 0x0ea3f03b, F=0x0 +1, 17, 17,1, 204, 0xbf3f607e, F=0x0 +0, 18, 18,1, 1072, 0xdf860cc2, F=0x0 +1, 18, 18,1, 416, 0x5f08ca69, F=0x0 +0, 19, 19,1, 1052, 0x29a9116a, F=0x0 +1, 19, 19,1, 244, 0x8d1a7c05, F=0x0 +0, 20, 20,1, 1048, 0xfeb1107d, F=0x0 +1, 20, 20,1, 260, 0xd0b27b40, F=0x0 +0, 21, 21,1, 1084, 0xeed50a32, F=0x0 +1, 21, 21,1, 304, 0x5e5e8f10, F=0x0 +0, 22, 22,1, 992, 0xabd4e695, F=0x0 +1, 22, 22,1, 304, 0x2c839490, F=0x0 +0, 23, 23,1, 1016, 0x7396e5a4, F=0x0 +1, 23, 23,1, 264, 0x5bac855a, F=0x0 +0, 24, 24,1, 1000, 0x1d91ef45, F=0x0 +1, 24, 24,1, 220, 0xcda465a8, F=0x0 +0, 25, 25,1, 960, 0x1c99da31, F=0x0 +1, 25, 25,1, 280, 0xc1d08783, F=0x0 +0, 26, 26,1, 948, 0x48a4c938, F=0x0 +1,
[FFmpeg-cvslog] electronicarts: move video stream properties into dedicated structure
ffmpeg | branch: master | Peter Ross | Thu Jun 25 15:04:58 2015 +1000| [a2517fca1e7dc5e0ff63c8490b5c92a9298f5837] | committer: Michael Niedermayer electronicarts: move video stream properties into dedicated structure This is required for the alpha stream demux patch. Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2517fca1e7dc5e0ff63c8490b5c92a9298f5837 --- libavformat/electronicarts.c | 123 +++--- 1 file changed, 67 insertions(+), 56 deletions(-) diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index d999a0b..6e53ae7 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -63,14 +63,18 @@ #define MVIf_TAG MKTAG('M', 'V', 'I', 'f') /* CMV I-frame */ #define AVP6_TAG MKTAG('A', 'V', 'P', '6') -typedef struct EaDemuxContext { -int big_endian; - -enum AVCodecID video_codec; +typedef struct VideoProperties { +enum AVCodecID codec; AVRational time_base; int width, height; int nb_frames; -int video_stream_index; +int stream_index; +} VideoProperties; + +typedef struct EaDemuxContext { +int big_endian; + +VideoProperties video; enum AVCodecID audio_codec; int audio_stream_index; @@ -302,46 +306,43 @@ static void process_audio_header_sead(AVFormatContext *s) ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_SEAD; } -static void process_video_header_mdec(AVFormatContext *s) +static void process_video_header_mdec(AVFormatContext *s, VideoProperties *video) { -EaDemuxContext *ea = s->priv_data; AVIOContext *pb= s->pb; avio_skip(pb, 4); -ea->width = avio_rl16(pb); -ea->height = avio_rl16(pb); -ea->time_base = (AVRational) { 1, 15 }; -ea->video_codec = AV_CODEC_ID_MDEC; +video->width = avio_rl16(pb); +video->height = avio_rl16(pb); +video->time_base = (AVRational) { 1, 15 }; +video->codec = AV_CODEC_ID_MDEC; } -static int process_video_header_vp6(AVFormatContext *s) +static int process_video_header_vp6(AVFormatContext *s, VideoProperties *video) { -EaDemuxContext *ea = s->priv_data; -AVIOContext *pb= s->pb; +AVIOContext *pb = s->pb; avio_skip(pb, 8); -ea->nb_frames = avio_rl32(pb); +video->nb_frames = avio_rl32(pb); avio_skip(pb, 4); -ea->time_base.den = avio_rl32(pb); -ea->time_base.num = avio_rl32(pb); -if (ea->time_base.den <= 0 || ea->time_base.num <= 0) { +video->time_base.den = avio_rl32(pb); +video->time_base.num = avio_rl32(pb); +if (video->time_base.den <= 0 || video->time_base.num <= 0) { av_log(s, AV_LOG_ERROR, "Timebase is invalid\n"); return AVERROR_INVALIDDATA; } -ea->video_codec = AV_CODEC_ID_VP6; +video->codec = AV_CODEC_ID_VP6; return 1; } -static void process_video_header_cmv(AVFormatContext *s) +static void process_video_header_cmv(AVFormatContext *s, VideoProperties *video) { -EaDemuxContext *ea = s->priv_data; int fps; avio_skip(s->pb, 10); fps = avio_rl16(s->pb); if (fps) -ea->time_base = (AVRational) { 1, fps }; -ea->video_codec = AV_CODEC_ID_CMV; +video->time_base = (AVRational) { 1, fps }; +video->codec = AV_CODEC_ID_CMV; } /* Process EA file header. @@ -353,7 +354,7 @@ static int process_ea_header(AVFormatContext *s) AVIOContext *pb= s->pb; int i; -for (i = 0; i < 5 && (!ea->audio_codec || !ea->video_codec); i++) { +for (i = 0; i < 5 && (!ea->audio_codec || !ea->video.codec); i++) { uint64_t startpos = avio_tell(pb); int err = 0; @@ -395,40 +396,40 @@ static int process_ea_header(AVFormatContext *s) break; case MVIh_TAG: -process_video_header_cmv(s); +process_video_header_cmv(s, &ea->video); break; case kVGT_TAG: -ea->video_codec = AV_CODEC_ID_TGV; +ea->video.codec = AV_CODEC_ID_TGV; break; case mTCD_TAG: -process_video_header_mdec(s); +process_video_header_mdec(s, &ea->video); break; case MPCh_TAG: -ea->video_codec = AV_CODEC_ID_MPEG2VIDEO; +ea->video.codec = AV_CODEC_ID_MPEG2VIDEO; break; case pQGT_TAG: case TGQs_TAG: -ea->video_codec = AV_CODEC_ID_TGQ; -ea->time_base = (AVRational) { 1, 15 }; +ea->video.codec = AV_CODEC_ID_TGQ; +ea->video.time_base = (AVRational) { 1, 15 }; break; case pIQT
[FFmpeg-cvslog] electronicarts: demux alpha stream
ffmpeg | branch: master | Peter Ross | Thu Jun 25 15:05:07 2015 +1000| [803bdc546942890ce71e6bbcd339b964fb076c79] | committer: Michael Niedermayer electronicarts: demux alpha stream Electronic Arts VP6 files may contain two video streams: one for the primary video stream and another for the alpha mask. The file format uses identical data structures for both streams. Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=803bdc546942890ce71e6bbcd339b964fb076c79 --- libavformat/electronicarts.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 6e53ae7..5d21d49 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -59,6 +59,9 @@ #define MVhd_TAG MKTAG('M', 'V', 'h', 'd') #define MV0K_TAG MKTAG('M', 'V', '0', 'K') #define MV0F_TAG MKTAG('M', 'V', '0', 'F') +#define AVhd_TAG MKTAG('A', 'V', 'h', 'd') +#define AV0K_TAG MKTAG('A', 'V', '0', 'K') +#define AV0F_TAG MKTAG('A', 'V', '0', 'F') #define MVIh_TAG MKTAG('M', 'V', 'I', 'h') /* CMV header */ #define MVIf_TAG MKTAG('M', 'V', 'I', 'f') /* CMV I-frame */ #define AVP6_TAG MKTAG('A', 'V', 'P', '6') @@ -74,7 +77,7 @@ typedef struct VideoProperties { typedef struct EaDemuxContext { int big_endian; -VideoProperties video; +VideoProperties video, alpha; enum AVCodecID audio_codec; int audio_stream_index; @@ -431,6 +434,10 @@ static int process_ea_header(AVFormatContext *s) case MVhd_TAG: err = process_video_header_vp6(s, &ea->video); break; + +case AVhd_TAG: +err = process_video_header_vp6(s, &ea->alpha); +break; } if (err < 0) { @@ -511,7 +518,7 @@ static int ea_read_header(AVFormatContext *s) if (process_ea_header(s)<=0) return AVERROR(EIO); -if (init_video_stream(s, &ea->video)) +if (init_video_stream(s, &ea->video) || init_video_stream(s, &ea->alpha)) return AVERROR(ENOMEM); if (ea->audio_codec) { @@ -672,10 +679,12 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt) goto get_video_packet; case MV0K_TAG: +case AV0K_TAG: case MPCh_TAG: case pIQT_TAG: key = AV_PKT_FLAG_KEY; case MV0F_TAG: +case AV0F_TAG: get_video_packet: if (!chunk_size) continue; @@ -689,7 +698,10 @@ get_video_packet: break; } partial_packet = chunk_type == MVIh_TAG; -pkt->stream_index = ea->video.stream_index; +if (chunk_type == AV0K_TAG || chunk_type == AV0F_TAG) +pkt->stream_index = ea->alpha.stream_index; +else +pkt->stream_index = ea->video.stream_index; pkt->flags |= key; packet_read = 1; break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/aiffdec: improve readability
ffmpeg | branch: master | Peter Ross | Fri Jan 9 10:09:04 2015 +1100| [624384503643f1d3fd2e8f8f9b986ddcf2067a21] | committer: Michael Niedermayer avformat/aiffdec: improve readability Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=624384503643f1d3fd2e8f8f9b986ddcf2067a21 --- libavformat/aiffdec.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 8dbed32..301d90f 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -116,12 +116,12 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size, size -= 18; /* get codec id for AIFF-C */ -if (version == AIFF_C_VERSION1 && size >= 4) { +if (size < 4) { +version = AIFF; +} else if (version == AIFF_C_VERSION1) { codec->codec_tag = avio_rl32(pb); codec->codec_id = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag); size -= 4; -} else { -version = AIFF; } if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/aiffdec: only read codec tag when there is space in header
ffmpeg | branch: master | Peter Ross | Mon Jan 5 08:44:06 2015 +1100| [f1098eb97d3c15640d3473aeba97e2be22ee0d54] | committer: Michael Niedermayer avformat/aiffdec: only read codec tag when there is space in header Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1098eb97d3c15640d3473aeba97e2be22ee0d54 --- libavformat/aiffdec.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 91ef2a4..8dbed32 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -116,10 +116,12 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size, size -= 18; /* get codec id for AIFF-C */ -if (version == AIFF_C_VERSION1) { +if (version == AIFF_C_VERSION1 && size >= 4) { codec->codec_tag = avio_rl32(pb); codec->codec_id = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag); size -= 4; +} else { +version = AIFF; } if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_lut: gammaval709()
ffmpeg | branch: release/2.4 | Peter Ross | Fri Nov 14 09:14:24 2014 +1100| [057ee35924187979ae41f8c3f84fe16659a68656] | committer: Carl Eugen Hoyos avfilter/vf_lut: gammaval709() See http://www.itu.int/rec/R-REC-BT.709 Item 1.2, overall opto-electronic transfer characteristics at source Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer (cherry picked from commit b186b7131e160d7e3ea8ef4c52745b56ddcb287b) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=057ee35924187979ae41f8c3f84fe16659a68656 --- libavfilter/vf_lut.c | 17 + 1 file changed, 17 insertions(+) diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index fff5a2b..0b7a2ca 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -161,15 +161,32 @@ static double compute_gammaval(void *opaque, double gamma) return pow((val-minval)/(maxval-minval), gamma) * (maxval-minval)+minval; } +/** + * Compute Rec.709 gama correction of value val + */ +static double compute_gammaval709(void *opaque, double gamma) +{ +LutContext *s = opaque; +double val= s->var_values[VAR_CLIPVAL]; +double minval = s->var_values[VAR_MINVAL]; +double maxval = s->var_values[VAR_MAXVAL]; +double level = (val - minval) / (maxval - minval); +level = level < 0.018 ? 4.5 * level + : 1.099 * pow(level, 1.0 / gamma) - 0.099; +return level * (maxval - minval) + minval; +} + static double (* const funcs1[])(void *, double) = { (void *)clip, (void *)compute_gammaval, +(void *)compute_gammaval709, NULL }; static const char * const funcs1_names[] = { "clip", "gammaval", +"gammaval709", NULL }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cinedec: report white balance gain coefficients using metadata
ffmpeg | branch: release/2.4 | Peter Ross | Sun Nov 9 12:05:41 2014 +1100| [e386241d54a0cc39b4513a4cfc250630c1d560ba] | committer: Carl Eugen Hoyos cinedec: report white balance gain coefficients using metadata Signed-off-by: Michael Niedermayer (cherry picked from commit 2093c1dc51ee1c08cb558759a1c59e6d1e3358a0) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e386241d54a0cc39b4513a4cfc250630c1d560ba --- libavformat/cinedec.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 9eed006..0583ce0 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -27,6 +27,7 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/bmp.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "internal.h" @@ -78,6 +79,16 @@ static int set_metadata_int(AVDictionary **dict, const char *key, int value, int return 0; } +static int set_metadata_float(AVDictionary **dict, const char *key, float value, int allow_zero) +{ +if (value != 0 || allow_zero) { +char tmp[64]; +snprintf(tmp, sizeof(tmp), "%f", value); +return av_dict_set(dict, key, tmp, 0); +} +return 0; +} + static int cine_read_header(AVFormatContext *avctx) { AVIOContext *pb = avctx->pb; @@ -177,7 +188,10 @@ static int cine_read_header(AVFormatContext *avctx) set_metadata_int(&st->metadata, "contrast", avio_rl32(pb), 1); set_metadata_int(&st->metadata, "gamma", avio_rl32(pb), 1); -avio_skip(pb, 72); // Reserved1 .. WBView +avio_skip(pb, 12 + 16); // Reserved1 .. AutoExpRect +set_metadata_float(&st->metadata, "wbgain[0].r", av_int2float(avio_rl32(pb)), 1); +set_metadata_float(&st->metadata, "wbgain[0].b", av_int2float(avio_rl32(pb)), 1); +avio_skip(pb, 36); // WBGain[1].. WBView st->codec->bits_per_coded_sample = avio_rl32(pb); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_lut: gammaval709()
ffmpeg | branch: master | Peter Ross | Fri Nov 14 09:14:24 2014 +1100| [b186b7131e160d7e3ea8ef4c52745b56ddcb287b] | committer: Michael Niedermayer avfilter/vf_lut: gammaval709() See http://www.itu.int/rec/R-REC-BT.709 Item 1.2, overall opto-electronic transfer characteristics at source Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b186b7131e160d7e3ea8ef4c52745b56ddcb287b --- libavfilter/vf_lut.c | 17 + 1 file changed, 17 insertions(+) diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index fff5a2b..0b7a2ca 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -161,15 +161,32 @@ static double compute_gammaval(void *opaque, double gamma) return pow((val-minval)/(maxval-minval), gamma) * (maxval-minval)+minval; } +/** + * Compute Rec.709 gama correction of value val + */ +static double compute_gammaval709(void *opaque, double gamma) +{ +LutContext *s = opaque; +double val= s->var_values[VAR_CLIPVAL]; +double minval = s->var_values[VAR_MINVAL]; +double maxval = s->var_values[VAR_MAXVAL]; +double level = (val - minval) / (maxval - minval); +level = level < 0.018 ? 4.5 * level + : 1.099 * pow(level, 1.0 / gamma) - 0.099; +return level * (maxval - minval) + minval; +} + static double (* const funcs1[])(void *, double) = { (void *)clip, (void *)compute_gammaval, +(void *)compute_gammaval709, NULL }; static const char * const funcs1_names[] = { "clip", "gammaval", +"gammaval709", NULL }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cinedec: report white balance gain coefficients using metadata
ffmpeg | branch: master | Peter Ross | Sun Nov 9 12:05:41 2014 +1100| [2093c1dc51ee1c08cb558759a1c59e6d1e3358a0] | committer: Michael Niedermayer cinedec: report white balance gain coefficients using metadata Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2093c1dc51ee1c08cb558759a1c59e6d1e3358a0 --- libavformat/cinedec.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 5776708..632f46c 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -27,6 +27,7 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/bmp.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "internal.h" @@ -78,6 +79,16 @@ static int set_metadata_int(AVDictionary **dict, const char *key, int value, int return 0; } +static int set_metadata_float(AVDictionary **dict, const char *key, float value, int allow_zero) +{ +if (value != 0 || allow_zero) { +char tmp[64]; +snprintf(tmp, sizeof(tmp), "%f", value); +return av_dict_set(dict, key, tmp, 0); +} +return 0; +} + static int cine_read_header(AVFormatContext *avctx) { AVIOContext *pb = avctx->pb; @@ -177,7 +188,10 @@ static int cine_read_header(AVFormatContext *avctx) set_metadata_int(&st->metadata, "contrast", avio_rl32(pb), 1); set_metadata_int(&st->metadata, "gamma", avio_rl32(pb), 1); -avio_skip(pb, 72); // Reserved1 .. WBView +avio_skip(pb, 12 + 16); // Reserved1 .. AutoExpRect +set_metadata_float(&st->metadata, "wbgain[0].r", av_int2float(avio_rl32(pb)), 1); +set_metadata_float(&st->metadata, "wbgain[0].b", av_int2float(avio_rl32(pb)), 1); +avio_skip(pb, 36); // WBGain[1].. WBView st->codec->bits_per_coded_sample = avio_rl32(pb); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat/iff: print error message when DSDIFF compression type is not supported
ffmpeg | branch: master | Peter Ross | Fri Sep 26 15:44:46 2014 +1000| [1964251be7df69122108df89fb619f9a71bfb23f] | committer: Michael Niedermayer libavformat/iff: print error message when DSDIFF compression type is not supported Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1964251be7df69122108df89fb619f9a71bfb23f --- libavformat/iff.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/iff.c b/libavformat/iff.c index 8e20303..e7c240c 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -285,7 +285,13 @@ static int parse_dsd_prop(AVFormatContext *s, AVStream *st, uint64_t eof) case MKTAG('C','M','P','R'): if (size < 4) return AVERROR_INVALIDDATA; -st->codec->codec_id = ff_codec_get_id(dsd_codec_tags, avio_rl32(pb)); +tag = avio_rl32(pb); +st->codec->codec_id = ff_codec_get_id(dsd_codec_tags, tag); +if (!st->codec->codec_id) { +av_log(s, AV_LOG_ERROR, "'%c%c%c%c' compression is not supported\n", +tag&0xFF, (tag>>8)&0xFF, (tag>>16)&0xFF, (tag>>24)&0xFF); +return AVERROR_PATCHWELCOME; +} break; case MKTAG('F','S',' ',' '): ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/wtvdec: seek over broken chunks
ffmpeg | branch: master | Peter Ross | Fri Aug 29 16:42:04 2014 +1000| [9b8eedd736ea443c4829baaca1ede4e146ebc024] | committer: Michael Niedermayer avformat/wtvdec: seek over broken chunks Fixes ticket #3898 Signed-off-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b8eedd736ea443c4829baaca1ede4e146ebc024 --- libavformat/wtvdec.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index c70057c..4cb3295 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -751,6 +751,26 @@ enum { }; /** + * Try to seek over a broken chunk + * @return <0 on error + */ +static int recover(WtvContext *wtv, uint64_t broken_pos) +{ +AVIOContext *pb = wtv->pb; +int i; +for (i = 0; i < wtv->nb_index_entries; i++) { +if (wtv->index_entries[i].pos > broken_pos) { +int ret = avio_seek(pb, wtv->index_entries[i].pos, SEEK_SET); +if (ret < 0) +return ret; +wtv->pts = wtv->index_entries[i].timestamp; +return 0; + } + } + return AVERROR(EIO); +} + +/** * Parse WTV chunks * @param mode SEEK_TO_DATA or SEEK_TO_PTS * @param seekts timestamp @@ -767,8 +787,13 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p ff_get_guid(pb, &g); len = avio_rl32(pb); -if (len < 32) -break; +if (len < 32) { +int ret; +av_log(s, AV_LOG_WARNING, "encountered broken chunk\n"); +if ((ret = recover(wtv, avio_tell(pb) - 20)) < 0) +return ret; +continue; +} sid = avio_rl32(pb) & 0x7FFF; avio_skip(pb, 8); consumed = 32; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog