[FFmpeg-cvslog] avcodec/qdmc: check return code of ff_fft_init()
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 15:43:46 2018 +0200| [d8ad8fd8bd25072b383ec4edf9f709ff52a4b9b3] | committer: Paul B Mahol avcodec/qdmc: check return code of ff_fft_init() > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8ad8fd8bd25072b383ec4edf9f709ff52a4b9b3 --- libavcodec/qdmc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index f1f86accd8..8f5b7b920d 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -253,7 +253,7 @@ static av_cold int qdmc_decode_init(AVCodecContext *avctx) { static AVOnce init_static_once = AV_ONCE_INIT; QDMCContext *s = avctx->priv_data; -int fft_size, fft_order, size, g, j, x; +int ret, fft_size, fft_order, size, g, j, x; GetByteContext b; ff_thread_once(&init_static_once, qdmc_init_static_data); @@ -338,7 +338,9 @@ static av_cold int qdmc_decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } -ff_fft_init(&s->fft_ctx, fft_order, 1); +ret = ff_fft_init(&s->fft_ctx, fft_order, 1); +if (ret < 0) +return ret; avctx->sample_fmt = AV_SAMPLE_FMT_S16; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/wcmv: fix output on big-endian with rgb565 format
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 15:48:53 2018 +0200| [af71a3ff3eb86c349bf7de09bea47575c4a882f7] | committer: Paul B Mahol avcodec/wcmv: fix output on big-endian with rgb565 format > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af71a3ff3eb86c349bf7de09bea47575c4a882f7 --- libavcodec/wcmv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wcmv.c b/libavcodec/wcmv.c index 233427f3fa..384ceecd32 100644 --- a/libavcodec/wcmv.c +++ b/libavcodec/wcmv.c @@ -209,7 +209,7 @@ static av_cold int decode_init(AVCodecContext *avctx) int zret; switch (avctx->bits_per_coded_sample) { -case 16: avctx->pix_fmt = AV_PIX_FMT_RGB565; break; +case 16: avctx->pix_fmt = AV_PIX_FMT_RGB565LE; break; case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break; case 32: avctx->pix_fmt = AV_PIX_FMT_BGRA; break; default: av_log(avctx, AV_LOG_ERROR, "Unsupported bits_per_coded_sample: %d\n", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: add RemotelyAnywhere Screen Capture decoder
ffmpeg | branch: master | Paul B Mahol | Sun Sep 2 11:18:33 2018 +0200| [a5278b672aaa8970cd550dd10f4bd2c582197bd3] | committer: Paul B Mahol avcodec: add RemotelyAnywhere Screen Capture decoder > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5278b672aaa8970cd550dd10f4bd2c582197bd3 --- Changelog | 1 + configure | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 7 + libavcodec/rasc.c | 812 libavcodec/version.h| 4 +- libavformat/riff.c | 1 + 9 files changed, 827 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index a5736a15d1..ca49ac611f 100644 --- a/Changelog +++ b/Changelog @@ -22,6 +22,7 @@ version : - MatchWare Screen Capture Codec decoder - WinCam Motion Video decoder - 1D LUT filter (lut1d) +- RemotelyAnywhere Screen Capture decoder version 4.0: diff --git a/configure b/configure index 0d6ee0abfc..595be65f2c 100755 --- a/configure +++ b/configure @@ -2719,6 +2719,7 @@ qdm2_decoder_select="mdct rdft mpegaudiodsp" ra_144_decoder_select="audiodsp" ra_144_encoder_select="audio_frame_queue lpc audiodsp" ralf_decoder_select="golomb" +rasc_decoder_deps="zlib" rawvideo_decoder_select="bswapdsp" rscc_decoder_deps="zlib" rtjpeg_decoder_select="me_cmp" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index f8673f0121..ceec1df972 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -536,6 +536,7 @@ OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_filters.o OBJS-$(CONFIG_RALF_DECODER)+= ralf.o +OBJS-$(CONFIG_RASC_DECODER)+= rasc.o OBJS-$(CONFIG_RAWVIDEO_DECODER)+= rawdec.o OBJS-$(CONFIG_RAWVIDEO_ENCODER)+= rawenc.o OBJS-$(CONFIG_REALTEXT_DECODER)+= realtextdec.o ass.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index a461131c78..8fc1aeab79 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -248,6 +248,7 @@ extern AVCodec ff_r10k_encoder; extern AVCodec ff_r10k_decoder; extern AVCodec ff_r210_encoder; extern AVCodec ff_r210_decoder; +extern AVCodec ff_rasc_decoder; extern AVCodec ff_rawvideo_encoder; extern AVCodec ff_rawvideo_decoder; extern AVCodec ff_rl2_decoder; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b6688b7af3..719c181a08 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -451,6 +451,7 @@ enum AVCodecID { AV_CODEC_ID_PROSUMER, AV_CODEC_ID_MWSC, AV_CODEC_ID_WCMV, +AV_CODEC_ID_RASC, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 46dfe3f5e5..67a30542d1 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1682,6 +1682,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("WinCAM Motion Video"), .props = AV_CODEC_PROP_LOSSLESS, }, +{ +.id= AV_CODEC_ID_RASC, +.type = AVMEDIA_TYPE_VIDEO, +.name = "rasc", +.long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"), +.props = AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c new file mode 100644 index 00..fbbb134f4b --- /dev/null +++ b/libavcodec/rasc.c @@ -0,0 +1,812 @@ +/* + * RemotelyAnywhere Screen Capture decoder + * + * Copyright (c) 2018 Paul B Mahol + * + * 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 +#include +#include + +#include "libavutil/avassert.h" +#include "libavutil/imgutils.h" +#include "libavutil/opt.h" + +#include "avcodec.h" +#include "bytestream.h" +#include "internal.h" + +#include + +#define KBND MKTAG('K', 'B', 'N', 'D') +#define FINT MKTAG('F', 'I', 'N', 'T') +#define INIT MKTAG('I', 'N', 'I', 'T') +#define BNDL MKTAG('B', 'N', 'D', 'L') +#define KFRM MKTAG('K', 'F', 'R', 'M
[FFmpeg-cvslog] avcodec/rscc: fix decoding of some iscc files
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 17:27:40 2018 +0200| [068412f2e88b9fde731894bca685c25b985ec8e1] | committer: Paul B Mahol avcodec/rscc: fix decoding of some iscc files > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=068412f2e88b9fde731894bca685c25b985ec8e1 --- libavcodec/rscc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c index dae5e84634..7921f149ed 100644 --- a/libavcodec/rscc.c +++ b/libavcodec/rscc.c @@ -85,8 +85,18 @@ static av_cold int rscc_init(AVCodecContext *avctx) /* Get pixel format and the size of the pixel */ if (avctx->codec_tag == MKTAG('I', 'S', 'C', 'C')) { -avctx->pix_fmt = AV_PIX_FMT_BGRA; -ctx->component_size = 4; +if (avctx->extradata && avctx->extradata_size == 4) { +if ((avctx->extradata[0] >> 1) & 1) { +avctx->pix_fmt = AV_PIX_FMT_BGRA; +ctx->component_size = 4; +} else { +avctx->pix_fmt = AV_PIX_FMT_BGR24; +ctx->component_size = 3; +} +} else { +avctx->pix_fmt = AV_PIX_FMT_BGRA; +ctx->component_size = 4; +} } else if (avctx->codec_tag == MKTAG('R', 'S', 'C', 'C')) { ctx->component_size = avctx->bits_per_coded_sample / 8; switch (avctx->bits_per_coded_sample) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/cscd: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:06:19 2018 +0200| [aa76bdea1fd541e93c0960583107b464d852c564] | committer: Paul B Mahol avcodec/cscd: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa76bdea1fd541e93c0960583107b464d852c564 --- libavcodec/cscd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index 5eb511a565..707674535c 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -170,5 +170,6 @@ AVCodec ff_cscd_decoder = { .init = decode_init, .close = decode_end, .decode = decode_frame, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .capabilities = AV_CODEC_CAP_DR1, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dsicinvideo: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:14:58 2018 +0200| [ea6f61025eac1edb7bf093277cf4a33fdf7791dd] | committer: Paul B Mahol avcodec/dsicinvideo: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea6f61025eac1edb7bf093277cf4a33fdf7791dd --- libavcodec/dsicinvideo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c index aa080417d2..37175d67b2 100644 --- a/libavcodec/dsicinvideo.c +++ b/libavcodec/dsicinvideo.c @@ -328,5 +328,6 @@ AVCodec ff_dsicinvideo_decoder = { .init = cinvideo_decode_init, .close = cinvideo_decode_end, .decode = cinvideo_decode_frame, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .capabilities = AV_CODEC_CAP_DR1, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/interplayacm: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:44:22 2018 +0200| [0d37823c836d880d3ef5267b49f7823000c02566] | committer: Paul B Mahol avcodec/interplayacm: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d37823c836d880d3ef5267b49f7823000c02566 --- libavcodec/interplayacm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/interplayacm.c b/libavcodec/interplayacm.c index c897e72bb6..5639d8de82 100644 --- a/libavcodec/interplayacm.c +++ b/libavcodec/interplayacm.c @@ -629,5 +629,6 @@ AVCodec ff_interplay_acm_decoder = { .close = decode_close, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .priv_data_size = sizeof(InterplayACMContext), }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/on2avc: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 21:00:55 2018 +0200| [1e09dd96fe5c384113bdd6ffbe2411ebfefbc796] | committer: Paul B Mahol avcodec/on2avc: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e09dd96fe5c384113bdd6ffbe2411ebfefbc796 --- libavcodec/on2avc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index 4e4be7530a..00e5bf5397 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -1018,6 +1018,7 @@ AVCodec ff_on2avc_decoder = { .decode = on2avc_decode_frame, .close = on2avc_decode_close, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodecc/cscd: fix some obvious style issues
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:09:27 2018 +0200| [94437e440925cc1c2eec2d76300418d976f956d0] | committer: Paul B Mahol avcodecc/cscd: fix some obvious style issues > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94437e440925cc1c2eec2d76300418d976f956d0 --- libavcodec/cscd.c | 71 +-- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index 707674535c..8781df110c 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -38,7 +38,8 @@ typedef struct CamStudioContext { } CamStudioContext; static void copy_frame_default(AVFrame *f, const uint8_t *src, - int linelen, int height) { + int linelen, int height) +{ int i, src_stride = FFALIGN(linelen, 4); uint8_t *dst = f->data[0]; dst += (height - 1) * f->linesize[0]; @@ -50,7 +51,8 @@ static void copy_frame_default(AVFrame *f, const uint8_t *src, } static void add_frame_default(AVFrame *f, const uint8_t *src, - int linelen, int height) { + int linelen, int height) +{ int i, j, src_stride = FFALIGN(linelen, 4); uint8_t *dst = f->data[0]; dst += (height - 1) * f->linesize[0]; @@ -63,7 +65,8 @@ static void add_frame_default(AVFrame *f, const uint8_t *src, } static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, -AVPacket *avpkt) { +AVPacket *avpkt) +{ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; CamStudioContext *c = avctx->priv_data; @@ -79,30 +82,30 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, // decompress data switch ((buf[0] >> 1) & 7) { -case 0: { // lzo compression -int outlen = c->decomp_size, inlen = buf_size - 2; -if (av_lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen) || outlen) { -av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); -return AVERROR_INVALIDDATA; -} -break; +case 0: { // lzo compression +int outlen = c->decomp_size, inlen = buf_size - 2; +if (av_lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen) || outlen) { +av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); +return AVERROR_INVALIDDATA; } -case 1: { // zlib compression +break; +} +case 1: { // zlib compression #if CONFIG_ZLIB -unsigned long dlen = c->decomp_size; -if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK) { -av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n"); -return AVERROR_INVALIDDATA; -} -break; +unsigned long dlen = c->decomp_size; +if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK) { +av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n"); +return AVERROR_INVALIDDATA; +} +break; #else -av_log(avctx, AV_LOG_ERROR, "compiled without zlib support\n"); -return AVERROR(ENOSYS); +av_log(avctx, AV_LOG_ERROR, "compiled without zlib support\n"); +return AVERROR(ENOSYS); #endif -} -default: -av_log(avctx, AV_LOG_ERROR, "unknown compression\n"); -return AVERROR_INVALIDDATA; +} +default: +av_log(avctx, AV_LOG_ERROR, "unknown compression\n"); +return AVERROR_INVALIDDATA; } // flip upside down, add difference frame @@ -125,18 +128,19 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return buf_size; } -static av_cold int decode_init(AVCodecContext *avctx) { +static av_cold int decode_init(AVCodecContext *avctx) +{ CamStudioContext *c = avctx->priv_data; int stride; switch (avctx->bits_per_coded_sample) { -case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555LE; break; -case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break; -case 32: avctx->pix_fmt = AV_PIX_FMT_BGR0; break; -default: -av_log(avctx, AV_LOG_ERROR, - "CamStudio codec error: invalid depth %i bpp\n", - avctx->bits_per_coded_sample); -return AVERROR_INVALIDDATA; +case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555LE; break; +case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break; +case 32: avctx->pix_fmt = AV_PIX_FMT_BGR0; break; +default: +av_log(avctx, AV_LOG_ERROR, + "CamStudio codec error: invalid depth %i bpp\n", + avctx->bits_per_coded_sample); +return AVERROR_INVALIDDATA; } c->bpp = avctx->bits_per_coded_sample; c->linelen = avctx->width * avctx->bits_per_coded_sample / 8; @@ -154,7
[FFmpeg-cvslog] avcodec/cook: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:02:41 2018 +0200| [aaa3f115d8e4751f54bbb3aa47bf6e2008b8058b] | committer: Paul B Mahol avcodec/cook: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaa3f115d8e4751f54bbb3aa47bf6e2008b8058b --- libavcodec/cook.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 53cb83852e..c5f68c98ba 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1282,6 +1282,7 @@ AVCodec ff_cook_decoder = { .close = cook_decode_close, .decode = cook_decode_frame, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/flashsv: check return value of flashsv_decode_init()
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:29:34 2018 +0200| [15a5f49c0b6b8769056eb70050a6deb27a9da4d4] | committer: Paul B Mahol avcodec/flashsv: check return value of flashsv_decode_init() > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15a5f49c0b6b8769056eb70050a6deb27a9da4d4 --- libavcodec/flashsv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 90e1d43cda..1dc3c710dc 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -551,7 +551,11 @@ static const uint32_t ff_flashsv2_default_palette[128] = { static av_cold int flashsv2_decode_init(AVCodecContext *avctx) { FlashSVContext *s = avctx->priv_data; -flashsv_decode_init(avctx); +int ret; + +ret = flashsv_decode_init(avctx); +if (ret < 0) +return ret; s->pal = ff_flashsv2_default_palette; s->ver = 2; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/fmvc: use correct pixel format on big-endian for 16 bpp
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:33:15 2018 +0200| [1f71f0a3129a7157c886b33d6e3d81c602b82a76] | committer: Paul B Mahol avcodec/fmvc: use correct pixel format on big-endian for 16 bpp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f71f0a3129a7157c886b33d6e3d81c602b82a76 --- libavcodec/fmvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c index a06b90c6fe..5778d7b53f 100644 --- a/libavcodec/fmvc.c +++ b/libavcodec/fmvc.c @@ -530,7 +530,7 @@ static av_cold int decode_init(AVCodecContext *avctx) switch (avctx->bits_per_coded_sample) { case 16: -avctx->pix_fmt = AV_PIX_FMT_RGB555; +avctx->pix_fmt = AV_PIX_FMT_RGB555LE; break; case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/fic: change class name to more correct one
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:25:47 2018 +0200| [ae227fa1f27e43e2541434e5fa94521d9deda86f] | committer: Paul B Mahol avcodec/fic: change class name to more correct one > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae227fa1f27e43e2541434e5fa94521d9deda86f --- libavcodec/fic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index c288c9771b..dcf0777674 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -469,7 +469,7 @@ static const AVOption options[] = { }; static const AVClass fic_decoder_class = { -.class_name = "FIC encoder", +.class_name = "FIC decoder", .item_name = av_default_item_name, .option = options, .version= LIBAVUTIL_VERSION_INT, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mscc: decoders supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 20:55:59 2018 +0200| [e8b27b82d07794c59edefd163fccdb21c01326e7] | committer: Paul B Mahol avcodec/mscc: decoders supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8b27b82d07794c59edefd163fccdb21c01326e7 --- libavcodec/mscc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c index 14480cbe13..86e4e88ed3 100644 --- a/libavcodec/mscc.c +++ b/libavcodec/mscc.c @@ -261,6 +261,7 @@ AVCodec ff_mscc_decoder = { .close= decode_close, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal= FF_CODEC_CAP_INIT_CLEANUP, }; AVCodec ff_srgc_decoder = { @@ -273,4 +274,5 @@ AVCodec ff_srgc_decoder = { .close= decode_close, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal= FF_CODEC_CAP_INIT_CLEANUP, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/tscc: check av_frame_alloc() for failure
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 21:17:26 2018 +0200| [86e7e7816b24b9ae1605735a790c2cef251c8210] | committer: Paul B Mahol avcodec/tscc: check av_frame_alloc() for failure > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86e7e7816b24b9ae1605735a790c2cef251c8210 --- libavcodec/tscc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 31e7caeeeb..35f7ad05dd 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -169,6 +169,8 @@ static av_cold int decode_init(AVCodecContext *avctx) } c->frame = av_frame_alloc(); +if (!c->frame) +return AVERROR(ENOMEM); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ulti: fix minor style issue
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 21:21:50 2018 +0200| [337b9e190ba0d822efe3325c612ddce1d769c75b] | committer: Paul B Mahol avcodec/ulti: fix minor style issue > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=337b9e190ba0d822efe3325c612ddce1d769c75b --- libavcodec/ulti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index 9e4c088b10..9318af064b 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -62,7 +62,8 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx) return 0; } -static av_cold int ulti_decode_end(AVCodecContext *avctx){ +static av_cold int ulti_decode_end(AVCodecContext *avctx) +{ UltimotionDecodeContext *s = avctx->priv_data; av_frame_free(&s->frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/zmbv: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 21:30:54 2018 +0200| [6e15495bcb2004e4e648160b22383ef72cc0e14c] | committer: Paul B Mahol avcodec/zmbv: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e15495bcb2004e4e648160b22383ef72cc0e14c --- libavcodec/zmbv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index b01ce1bcf6..9e27a2caad 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -647,4 +647,5 @@ AVCodec ff_zmbv_decoder = { .close = decode_end, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/tscc: decoder supports init_cleanup capability
ffmpeg | branch: master | Paul B Mahol | Sat Sep 8 21:18:47 2018 +0200| [51a087771bd723fbcac1e2adbf559b3d8206fe5f] | committer: Paul B Mahol avcodec/tscc: decoder supports init_cleanup capability > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51a087771bd723fbcac1e2adbf559b3d8206fe5f --- libavcodec/tscc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 35f7ad05dd..fc1ec4de0d 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -197,4 +197,5 @@ AVCodec ff_tscc_decoder = { .close = decode_end, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, +.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mov: factor out setting codec_id
ffmpeg | branch: master | John Stebbins | Fri Aug 31 09:00:39 2018 -0700| [3318ac5b9a7c3f3b37163e1a048841648845ab35] | committer: James Almer lavf/mov: factor out setting codec_id Since it is performed in all cases now. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3318ac5b9a7c3f3b37163e1a048841648845ab35 --- libavformat/mov.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index aa8022ae52..02c8ec66ed 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2494,22 +2494,19 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) "size=%"PRId64" 4CC=%s codec_type=%d\n", size, av_fourcc2str(format), st->codecpar->codec_type); +st->codecpar->codec_id = id; if (st->codecpar->codec_type==AVMEDIA_TYPE_VIDEO) { -st->codecpar->codec_id = id; mov_parse_stsd_video(c, pb, st, sc); } else if (st->codecpar->codec_type==AVMEDIA_TYPE_AUDIO) { -st->codecpar->codec_id = id; mov_parse_stsd_audio(c, pb, st, sc); if (st->codecpar->sample_rate < 0) { av_log(c->fc, AV_LOG_ERROR, "Invalid sample rate %d\n", st->codecpar->sample_rate); return AVERROR_INVALIDDATA; } } else if (st->codecpar->codec_type==AVMEDIA_TYPE_SUBTITLE){ -st->codecpar->codec_id = id; mov_parse_stsd_subtitle(c, pb, st, sc, size - (avio_tell(pb) - start_pos)); } else { -st->codecpar->codec_id = id; ret = mov_parse_stsd_data(c, pb, st, sc, size - (avio_tell(pb) - start_pos)); if (ret < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/movenc: Add GoPro metadata to permitted mp4 "codecs"
ffmpeg | branch: master | John Stebbins | Mon Aug 27 12:57:08 2018 -0700| [981178f3b0b547a228804ff36641b2237eb75a16] | committer: James Almer lavf/movenc: Add GoPro metadata to permitted mp4 "codecs" Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=981178f3b0b547a228804ff36641b2237eb75a16 --- libavformat/movenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 72a6e12d52..8a3b651514 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6778,6 +6778,7 @@ const AVCodecTag codec_mp4_tags[] = { { AV_CODEC_ID_EVRC, MKTAG('m', 'p', '4', 'a') }, { AV_CODEC_ID_DVD_SUBTITLE, MKTAG('m', 'p', '4', 's') }, { AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') }, +{ AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') }, { AV_CODEC_ID_NONE,0 }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mov: add AVCodecTag entry for GoPro metadata
ffmpeg | branch: master | John Stebbins | Mon Aug 27 12:57:07 2018 -0700| [c9a992d931440f87882771532b7178477c5b0ebe] | committer: James Almer lavf/mov: add AVCodecTag entry for GoPro metadata This allows for validation of the track type Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9a992d931440f87882771532b7178477c5b0ebe --- libavformat/isom.c | 5 + libavformat/isom.h | 1 + libavformat/mov.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index ce66d1bcd4..ca9d22e4f7 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -374,6 +374,11 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = { { AV_CODEC_ID_NONE, 0 }, }; +const AVCodecTag ff_codec_movdata_tags[] = { +{ AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') }, +{ AV_CODEC_ID_NONE, 0 }, +}; + /* map numeric codes from mdhd atom to ISO 639 */ /* cf. QTFileFormat.pdf p253, qtff.pdf p205 */ /* http://developer.apple.com/documentation/mac/Text/Text-368.html */ diff --git a/libavformat/isom.h b/libavformat/isom.h index 51abea52de..f3a7a8633d 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -41,6 +41,7 @@ extern const AVCodecTag ff_mp4_obj_type[]; extern const AVCodecTag ff_codec_movvideo_tags[]; extern const AVCodecTag ff_codec_movaudio_tags[]; extern const AVCodecTag ff_codec_movsubtitle_tags[]; +extern const AVCodecTag ff_codec_movdata_tags[]; int ff_mov_iso639_to_lang(const char lang[4], int mp4); int ff_mov_lang_to_iso639(unsigned code, char to[4]); diff --git a/libavformat/mov.c b/libavformat/mov.c index d922e0f173..aa8022ae52 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2034,6 +2034,8 @@ static int mov_codec_id(AVStream *st, uint32_t format) id = ff_codec_get_id(ff_codec_movsubtitle_tags, format); if (id > 0) st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; +else +id = ff_codec_get_id(ff_codec_movdata_tags, format); } } @@ -2507,6 +2509,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) mov_parse_stsd_subtitle(c, pb, st, sc, size - (avio_tell(pb) - start_pos)); } else { +st->codecpar->codec_id = id; ret = mov_parse_stsd_data(c, pb, st, sc, size - (avio_tell(pb) - start_pos)); if (ret < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/movenc: Fail when codec tag is invalid for format
ffmpeg | branch: master | John Stebbins | Mon Aug 27 14:11:14 2018 -0700| [4cfb01d6ae545cec4a507113a6cbcf3b6e727e94] | committer: James Almer lavf/movenc: Fail when codec tag is invalid for format Fixes ticket #6897 Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4cfb01d6ae545cec4a507113a6cbcf3b6e727e94 --- libavformat/movenc.c | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 8a3b651514..3ebc7abd8b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1535,9 +1535,9 @@ static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track) return tag; } -static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) +static unsigned int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) { -int tag = track->par->codec_tag; +unsigned int tag = track->par->codec_tag; if (!tag || (s->strict_std_compliance >= FF_COMPLIANCE_NORMAL && (track->par->codec_id == AV_CODEC_ID_DVVIDEO || @@ -1589,31 +1589,45 @@ static const AVCodecTag codec_cover_image_tags[] = { { AV_CODEC_ID_NONE, 0 }, }; -static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) +static unsigned int validate_codec_tag(const AVCodecTag *const *tags, + unsigned int tag, int codec_id) { -int tag; +int i; + +/** + * Check that tag + id is in the table + */ +for (i = 0; tags && tags[i]; i++) { +const AVCodecTag *codec_tags = tags[i]; +while (codec_tags->id != AV_CODEC_ID_NONE) { +if (avpriv_toupper4(codec_tags->tag) == avpriv_toupper4(tag) && +codec_tags->id == codec_id) +return codec_tags->tag; +codec_tags++; +} +} +return 0; +} + +static unsigned int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) +{ +unsigned int tag; if (is_cover_image(track->st)) return ff_codec_get_tag(codec_cover_image_tags, track->par->codec_id); -if (track->mode == MODE_MP4 || track->mode == MODE_PSP) -tag = track->par->codec_tag; -else if (track->mode == MODE_ISM) -tag = track->par->codec_tag; -else if (track->mode == MODE_IPOD) { +if (track->mode == MODE_IPOD) if (!av_match_ext(s->url, "m4a") && !av_match_ext(s->url, "m4v") && !av_match_ext(s->url, "m4b")) av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v " "Quicktime/Ipod might not play the file\n"); -tag = track->par->codec_tag; -} else if (track->mode & MODE_3GP) -tag = track->par->codec_tag; -else if (track->mode == MODE_F4V) -tag = track->par->codec_tag; -else -tag = mov_get_codec_tag(s, track); +if (track->mode == MODE_MOV) +tag = mov_get_codec_tag(s, track); +else +tag = validate_codec_tag(s->oformat->codec_tag, track->par->codec_tag, + track->par->codec_id); return tag; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog