[FFmpeg-cvslog] lavf/flacdec: Return maximum score if the streaminfo header is valid.

2017-03-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Mar  2 
09:29:10 2017 +0100| [3733039610d76231e404ebf089f0ff2b9d8e5490] | committer: 
Carl Eugen Hoyos

lavf/flacdec: Return maximum score if the streaminfo header is valid.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3733039610d76231e404ebf089f0ff2b9d8e5490
---

 libavformat/flacdec.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 66baba5..fee46fc 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -233,7 +233,14 @@ static int flac_probe(AVProbeData *p)
 return raw_flac_probe(p);
 if (p->buf_size < 4 || memcmp(p->buf, "fLaC", 4))
 return 0;
-return AVPROBE_SCORE_EXTENSION;
+if (   p->buf[4] & 0x7f != FLAC_METADATA_TYPE_STREAMINFO
+|| AV_RB24(p->buf + 5) != FLAC_STREAMINFO_SIZE
+|| AV_RB16(p->buf + 8) < 16
+|| AV_RB16(p->buf + 8) > AV_RB16(p->buf + 10)
+|| !(AV_RB24(p->buf + 18) >> 4)
+|| AV_RB24(p->buf + 18) >> 4 > 655350)
+return AVPROBE_SCORE_EXTENSION;
+return AVPROBE_SCORE_MAX;
 }
 
 static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int 
stream_index,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec, avutil, avformat: remove AVOption requirement for some fields

2017-03-02 Thread wm4
ffmpeg | branch: master | wm4  | Mon Feb 13 11:40:22 
2017 +0100| [554bc4eea8aa71d5c017289a036b49313882f7e6] | committer: wm4

avcodec, avutil, avformat: remove AVOption requirement for some fields

Allow all struct fields to be accessed directly, as long as they're
public.

Before this change, many fields were "public", but could be accessed via
AVOption only. This meant they were effectively not public, but were
present for documentation purposes, which was incredibly confusing at
best.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=554bc4eea8aa71d5c017289a036b49313882f7e6
---

 doc/APIchanges |  5 +
 libavcodec/avcodec.h   | 25 +
 libavcodec/version.h   |  2 +-
 libavformat/avformat.h | 50 ++
 libavformat/version.h  |  2 +-
 libavutil/frame.h  | 32 +++-
 libavutil/version.h|  2 +-
 7 files changed, 42 insertions(+), 76 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index d739895..cd5f926 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,11 @@ libavutil: 2015-08-28
 
 API changes, most recent first:
 
+2017-03-02 - xxx - lavu 55.47.101, lavc 57.81.102, lavf 57.66.103
+  Remove requirement to use AVOption or accessors to access certain fields
+  in AVFrame, AVCodecContext, and AVFormatContext that were previously
+  documented as "no direct access" allowed.
+
 2017-02-13 - xxx - lavc 57.80.100 - avcodec.h
   Add AVCodecContext.hw_device_ctx.
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 925a8c7..298b914 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1680,7 +1680,7 @@ enum AVFieldOrder {
  * New fields can be added to the end with minor version bumps.
  * Removal, reordering and changes to existing fields require a major
  * version bump.
- * Please use AVOptions (av_opt* / av_set/get*()) to access these fields from 
user
+ * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from 
user
  * applications.
  * The name string for AVOptions options matches the associated command line
  * parameter name and can be found in libavcodec/options_table.h
@@ -2951,8 +2951,8 @@ typedef struct AVCodecContext {
 #define FF_DEBUG_MMCO0x0800
 #define FF_DEBUG_BUGS0x1000
 #if FF_API_DEBUG_MV
-#define FF_DEBUG_VIS_QP  0x2000 ///< only access through AVOptions 
from outside libavcodec
-#define FF_DEBUG_VIS_MB_TYPE 0x4000 ///< only access through AVOptions 
from outside libavcodec
+#define FF_DEBUG_VIS_QP  0x2000
+#define FF_DEBUG_VIS_MB_TYPE 0x4000
 #endif
 #define FF_DEBUG_BUFFERS 0x8000
 #define FF_DEBUG_THREADS 0x0001
@@ -2962,7 +2962,6 @@ typedef struct AVCodecContext {
 #if FF_API_DEBUG_MV
 /**
  * debug
- * Code outside libavcodec should access this field using AVOptions
  * - encoding: Set by user.
  * - decoding: Set by user.
  */
@@ -3097,8 +3096,6 @@ typedef struct AVCodecContext {
  * low resolution decoding, 1-> 1/2 size, 2->1/4 size
  * - encoding: unused
  * - decoding: Set by user.
- * Code outside libavcodec should access this field using:
- * av_codec_{get,set}_lowres(avctx)
  */
  int lowres;
 #endif
@@ -3399,8 +3396,6 @@ typedef struct AVCodecContext {
 
 /**
  * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
- * Code outside libavcodec should access this field using:
- * av_codec_{get,set}_pkt_timebase(avctx)
  * - encoding unused.
  * - decoding set by user.
  */
@@ -3408,8 +3403,6 @@ typedef struct AVCodecContext {
 
 /**
  * AVCodecDescriptor
- * Code outside libavcodec should access this field using:
- * av_codec_{get,set}_codec_descriptor(avctx)
  * - encoding: unused.
  * - decoding: set by libavcodec.
  */
@@ -3420,8 +3413,6 @@ typedef struct AVCodecContext {
  * low resolution decoding, 1-> 1/2 size, 2->1/4 size
  * - encoding: unused
  * - decoding: Set by user.
- * Code outside libavcodec should access this field using:
- * av_codec_{get,set}_lowres(avctx)
  */
  int lowres;
 #endif
@@ -3462,7 +3453,6 @@ typedef struct AVCodecContext {
  * However for formats that do not use pre-multiplied alpha
  * there might be serious artefacts (though e.g. libswscale currently
  * assumes pre-multiplied alpha anyway).
- * Code outside libavcodec should access this field using AVOptions
  *
  * - decoding: set by user
  * - encoding: unused
@@ -3479,7 +3469,6 @@ typedef struct AVCodecContext {
 #if !FF_API_DEBUG_MV
 /**
  * debug motion vectors
- * Code outside libavcodec should access this field using AVOptions
  * - encoding: Set by user.
  * - decoding: Set by user.
  */
@@ -3491,7 +3480,6 @@ typedef struct AVCodecContext {
 
 /**
  * custom intra quantization matrix
- * Code outside libavcodec should access this 

[FFmpeg-cvslog] avformat: fix AVStream private fields marker

2017-03-02 Thread wm4
ffmpeg | branch: master | wm4  | Mon Feb 13 11:50:54 
2017 +0100| [227f6e1e8d4bd23734db9769bb52cc9896e253b5] | committer: wm4

avformat: fix AVStream private fields marker

Public fields were added after the private fields (negating the entire
point of this). New private fields go into AVStreamInternal anyway.

The new marker was set by guessing which fields are supposed to be
private and wshich not. recommended_encoder_configuration is accessed by
ffserver_config.c directly, and is supposed to use the public API.

ffmpeg.c accesses AVStream.cur_dts, even though it's a private field,
but that seems to be an older error.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=227f6e1e8d4bd23734db9769bb52cc9896e253b5
---

 libavformat/avformat.h | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 64180bc..4c1b18e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1005,7 +1005,9 @@ typedef struct AVStream {
  * All fields below this line are not part of the public API. They
  * may not be used outside of libavformat and can be changed and
  * removed at will.
- * New public fields should be added right above.
+ * Internal note: be aware that physically removing these fields
+ * will break ABI. Replace removed fields with dummy fields, and
+ * add new fields to AVStreamInternal.
  *
  */
 
@@ -1201,6 +1203,12 @@ typedef struct AVStream {
  */
 int inject_global_side_data;
 
+/*
+ * All fields above this line are not part of the public API.
+ * Fields below are part of the public API and ABI again.
+ *
+ */
+
 /**
  * String containing paris of key and values describing recommended 
encoder configuration.
  * Paris are separated by ','.

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

2017-03-02 Thread wm4
ffmpeg | branch: master | wm4  | Fri Feb 24 10:48:13 
2017 +0100| [f07492e7fb6601948649ea09a25a493b3da0b75b] | committer: wm4

avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

Makes sure the output can be mapped as OpenGL texture.
This is what at least video players normally want.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f07492e7fb6601948649ea09a25a493b3da0b75b
---

 libavcodec/videotoolbox.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 2ebe60f..824f2d8 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -477,6 +477,7 @@ static CFDictionaryRef 
videotoolbox_buffer_attributes_create(int width,
 CFDictionarySetValue(buffer_attributes, 
kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties);
 CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w);
 CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h);
+CFDictionarySetValue(buffer_attributes, 
kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue);
 
 CFRelease(io_surface_properties);
 CFRelease(cv_pix_fmt);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/videotoolbox: allow not setting the kCVPixelBufferPixelFormatTypeKey

2017-03-02 Thread wm4
ffmpeg | branch: master | wm4  | Fri Feb 24 10:17:34 
2017 +0100| [ade7c1a2326e2bb9be5e60a48b9968eb1d16bfaf] | committer: wm4

avcodec/videotoolbox: allow not setting the kCVPixelBufferPixelFormatTypeKey

If AVVideotoolboxContext.cv_pix_fmt_type is set to 0, don't set the
kCVPixelBufferPixelFormatTypeKey value on the VT decoder.

This makes VT output its native format, which can be much faster on
some hardware iterations (if the native format does not match with
the requested format, it will be converted, which is slow).

The default is still forcing nv12.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ade7c1a2326e2bb9be5e60a48b9968eb1d16bfaf
---

 doc/APIchanges| 4 
 libavcodec/version.h  | 2 +-
 libavcodec/videotoolbox.c | 3 ++-
 libavcodec/videotoolbox.h | 3 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index cd5f926..6922ea5 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2015-08-28
 
 API changes, most recent first:
 
+2017-03-02 - xxx - lavc 57.81.104 - videotoolbox.h
+  AVVideotoolboxContext.cv_pix_fmt_type can now be set to 0 to output the
+  native decoder format. (The default value is not changed.)
+
 2017-03-02 - xxx - lavu 55.47.101, lavc 57.81.102, lavf 57.66.103
   Remove requirement to use AVOption or accessors to access certain fields
   in AVFrame, AVCodecContext, and AVFormatContext that were previously
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3b4c253..5d8b22c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  57
 #define LIBAVCODEC_VERSION_MINOR  81
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MICRO 103
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 1288aa5..2ebe60f 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -472,7 +472,8 @@ static CFDictionaryRef 
videotoolbox_buffer_attributes_create(int width,
   
&kCFTypeDictionaryKeyCallBacks,
   
&kCFTypeDictionaryValueCallBacks);
 
-CFDictionarySetValue(buffer_attributes, kCVPixelBufferPixelFormatTypeKey, 
cv_pix_fmt);
+if (pix_fmt)
+CFDictionarySetValue(buffer_attributes, 
kCVPixelBufferPixelFormatTypeKey, cv_pix_fmt);
 CFDictionarySetValue(buffer_attributes, 
kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties);
 CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w);
 CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h);
diff --git a/libavcodec/videotoolbox.h b/libavcodec/videotoolbox.h
index a48638e..af2db0d 100644
--- a/libavcodec/videotoolbox.h
+++ b/libavcodec/videotoolbox.h
@@ -58,7 +58,8 @@ typedef struct AVVideotoolboxContext {
 
 /**
  * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.
- * set by the caller.
+ * set by the caller. If this is set to 0, then no specific format is
+ * requested from the decoder, and its native format is output.
  */
 OSType cv_pix_fmt_type;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool

2017-03-02 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Fri Nov 25 12:36:05 
2016 +| [2b8151c80690a71db2cf8009855b4ae1a6abdd4c] | committer: wm4

hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool

Cherry-picked from Libav d30719e62de68975cbc7ffd318df03a183037563.

Signed-off-by: wm4 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b8151c80690a71db2cf8009855b4ae1a6abdd4c
---

 libavutil/hwcontext_vaapi.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 6176bdc..da15f89 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -397,6 +397,10 @@ static AVBufferRef *vaapi_pool_alloc(void *opaque, int 
size)
 VAStatus vas;
 AVBufferRef *ref;
 
+if (hwfc->initial_pool_size > 0 &&
+avfc->nb_surfaces >= hwfc->initial_pool_size)
+return NULL;
+
 vas = vaCreateSurfaces(hwctx->display, ctx->rt_format,
hwfc->width, hwfc->height,
&surface_id, 1,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec: add ClearVideo decoder

2017-03-02 Thread Kostya Shishkov
ffmpeg | branch: master | Kostya Shishkov  | Thu Mar 
 2 11:21:48 2017 +0100| [a63496cc882428aefafc85d2f60e0908b020bffe] | committer: 
Paul B Mahol

avcodec: add ClearVideo decoder

Only I-frames are decoded for now.

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a63496cc882428aefafc85d2f60e0908b020bffe
---

 Changelog   |   1 +
 doc/general.texi|   1 +
 libavcodec/Makefile |   1 +
 libavcodec/allcodecs.c  |   1 +
 libavcodec/avcodec.h|   1 +
 libavcodec/clearvideo.c | 387 
 libavcodec/codec_desc.c |   7 +
 libavcodec/version.h|   4 +-
 libavformat/riff.c  |   1 +
 libavformat/rm.c|   1 +
 10 files changed, 403 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index beb3486..13628ca 100644
--- a/Changelog
+++ b/Changelog
@@ -25,6 +25,7 @@ version :
 - FM Screen Capture Codec decoder
 - native Opus encoder
 - ScreenPressor decoder
+- incomplete ClearVideo decoder
 
 version 3.2:
 - libopenmpt demuxer
diff --git a/doc/general.texi b/doc/general.texi
index 626590c..30450c0 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -342,6 +342,7 @@ library:
 @item iLBC  @tab X @tab X
 @item Interplay MVE @tab   @tab X
 @tab Format used in various Interplay computer games.
+@item Iterated Systems ClearVideo @tab @tab  X
 @item IV8   @tab   @tab X
 @tab A format generated by IndigoVision 8000 video server.
 @item IVF (On2) @tab X @tab X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1bea44a..65ccbad 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -228,6 +228,7 @@ OBJS-$(CONFIG_CDXL_DECODER)+= cdxl.o
 OBJS-$(CONFIG_CFHD_DECODER)+= cfhd.o cfhddata.o
 OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
 OBJS-$(CONFIG_CINEPAK_ENCODER) += cinepakenc.o elbg.o
+OBJS-$(CONFIG_CLEARVIDEO_DECODER)  += clearvideo.o
 OBJS-$(CONFIG_CLJR_DECODER)+= cljrdec.o
 OBJS-$(CONFIG_CLJR_ENCODER)+= cljrenc.o
 OBJS-$(CONFIG_CLLC_DECODER)+= cllc.o canopus.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index eee322b..a265ce5 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -157,6 +157,7 @@ void avcodec_register_all(void)
 REGISTER_DECODER(CDXL,  cdxl);
 REGISTER_DECODER(CFHD,  cfhd);
 REGISTER_ENCDEC (CINEPAK,   cinepak);
+REGISTER_DECODER(CLEARVIDEO,clearvideo);
 REGISTER_ENCDEC (CLJR,  cljr);
 REGISTER_DECODER(CLLC,  cllc);
 REGISTER_ENCDEC (COMFORTNOISE,  comfortnoise);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 298b914..af054f3 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -416,6 +416,7 @@ enum AVCodecID {
 AV_CODEC_ID_SPEEDHQ,
 AV_CODEC_ID_FMVC,
 AV_CODEC_ID_SCPR,
+AV_CODEC_ID_CLEARVIDEO,
 
 /* various PCM "codecs" */
 AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the 
start of audio codecs
diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c
new file mode 100644
index 000..91f37e1
--- /dev/null
+++ b/libavcodec/clearvideo.c
@@ -0,0 +1,387 @@
+/*
+ * ClearVideo decoder
+ * Copyright (c) 2012 Konstantin Shishkov
+ *
+ * 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
+ * ClearVideo decoder
+ */
+
+#include "avcodec.h"
+#include "idctdsp.h"
+#include "internal.h"
+#include "get_bits.h"
+#include "bytestream.h"
+
+#define NUM_DC_CODES 127
+#define NUM_AC_CODES 103
+
+static const uint8_t clv_dc_codes[NUM_DC_CODES] = {
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x07, 0x0B,
+0x0C, 0x08, 0x08, 0x09, 0x04, 0x06, 0x07, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x05, 0x06, 0x07, 0x05,
+0x06, 0x07, 0x06, 0x07, 0x08, 0x06, 0x07, 0x08,
+0x09, 0x0A, 0x0B, 0x07, 0x08, 0x09, 0x07, 0x08,
+0x06, 0x07, 0x08, 0x06, 0x04, 0x05, 0x02, 0x01,
+0x03, 0x06, 0x07, 0x07, 0x09, 0x0A, 0x0B, 0x09,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x0D, 0x0C, 0x09,
+0x0D, 0x0A, 0x0B, 0x0

[FFmpeg-cvslog] doc: Link to "Resampler Options" in the aresample documentation.

2017-03-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Mar  2 
18:05:58 2017 +0100| [d1bfd19ad196b33d6fde07dbb9060946368ec2c1] | committer: 
Carl Eugen Hoyos

doc: Link to "Resampler Options" in the aresample documentation.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1bfd19ad196b33d6fde07dbb9060946368ec2c1
---

 doc/filters.texi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 3b444c7..b5265d9 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1413,7 +1413,9 @@ The filter accepts the syntax
 [@var{sample_rate}:]@var{resampler_options}, where @var{sample_rate}
 expresses a sample rate and @var{resampler_options} is a list of
 @var{key}=@var{value} pairs, separated by ":". See the
-ffmpeg-resampler manual for the complete list of supported options.
+@ref{Resampler Options,,the "Resampler Options" section in the
+ffmpeg-resampler(1) manual,ffmpeg-resampler}
+for the complete list of supported options.
 
 @subsection Examples
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc/sheervideo: Fix Y prediction for interlaced frames with transparency.

2017-03-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Wed Mar  1 
23:45:10 2017 +0100| [46082c2b3f2158ca3a69b7cd2b105cc763e9c3e7] | committer: 
Carl Eugen Hoyos

lavc/sheervideo: Fix Y prediction for interlaced frames with transparency.

Based on 260de8a2 by Paul B Mahol.
Fixes ticket #6210.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46082c2b3f2158ca3a69b7cd2b105cc763e9c3e7
---

 libavcodec/sheervideo.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index e8f008b..9d2da7f 100644
--- a/libavcodec/sheervideo.c
+++ b/libavcodec/sheervideo.c
@@ -2185,7 +2185,7 @@ static void decode_aybri(AVCodecContext *avctx, AVFrame 
*p, GetBitContext *gb)
 dst_v[x] = get_bits(gb, 8);
 }
 } else {
-int pred[4] = { 125, 125, -128, -128 };
+int pred[4] = { 125, s->alt ? 125 : -146, -128, -128 };
 
 for (x = 0; x < avctx->width; x++) {
 int a, y, u, v;
@@ -2263,7 +2263,7 @@ static void decode_aybr(AVCodecContext *avctx, AVFrame 
*p, GetBitContext *gb)
 dst_v[x] = get_bits(gb, 8);
 }
 } else {
-int pred[4] = { 125, 125, -128, -128 };
+int pred[4] = { 125, s->alt ? 125 : -146, -128, -128 };
 
 for (x = 0; x < avctx->width; x++) {
 int a, y, u, v;
@@ -2959,6 +2959,7 @@ static int decode_frame(AVCodecContext *avctx,
 }
 break;
 case MKTAG('A', 'Y', 'B', 'R'):
+s->alt = 1;
 case MKTAG('A', 'Y', 'b', 'R'):
 avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
 s->decode_frame = decode_aybr;
@@ -2968,6 +2969,7 @@ static int decode_frame(AVCodecContext *avctx,
 }
 break;
 case MKTAG('A', 'y', 'B', 'R'):
+s->alt = 1;
 case MKTAG('A', 'y', 'b', 'R'):
 avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
 s->decode_frame = decode_aybri;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/mpegaudiodec_template: Fix runtime error: signed integer overflow: 2053224902 + 2053224902 cannot be represented in type 'int'

2017-03-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Mar  1 16:35:58 2017 +0100| [3b0b35150df4a9da75105662d145603151de6714] | 
committer: Michael Niedermayer

avcodec/mpegaudiodec_template: Fix runtime error: signed integer overflow: 
2053224902 + 2053224902 cannot be represented in type 'int'

Fixes: 696/clusterfuzz-testcase-5853632270434304

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b0b35150df4a9da75105662d145603151de6714
---

 libavcodec/mpegaudiodec_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegaudiodec_template.c 
b/libavcodec/mpegaudiodec_template.c
index a389318..a3729a9 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -457,7 +457,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
 
 /* 12 points IMDCT. We compute it "by hand" by factorizing obvious
cases. */
-static void imdct12(INTFLOAT *out, INTFLOAT *in)
+static void imdct12(INTFLOAT *out, SUINTFLOAT *in)
 {
 SUINTFLOAT in0, in1, in2, in3, in4, in5, t1, t2;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/mjpegdec: Fix runtime error: left shift of negative value -511

2017-03-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Mar  1 16:32:09 2017 +0100| [4b72d5cd6f9341dcafdbc1b9030166aa987b8304] | 
committer: Michael Niedermayer

avcodec/mjpegdec: Fix runtime error: left shift of negative value -511

Fixes: 693/clusterfuzz-testcase-6109776066904064

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b72d5cd6f9341dcafdbc1b9030166aa987b8304
---

 libavcodec/mjpegdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 69469c5..2b5adfc 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1157,7 +1157,7 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, 
int predictor,
 if (s->interlaced && s->bottom_field)
 ptr16 += linesize >> 1;
 pred &= mask;
-*ptr16= pred + (dc << point_transform);
+*ptr16= pred + ((unsigned)dc << point_transform);
 }
 if (++x == h) {
 x = 0;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Revert "avutil/frame: Disallow zero sized frame side data"

2017-03-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Mar  1 13:02:11 2017 +0100| [55196e5d10af7c295352bb9a2d7565efe07ce46b] | 
committer: Michael Niedermayer

Revert "avutil/frame: Disallow zero sized frame side data"

Found a case where we use size==0, the other related commits
remain needed, and should be sufficient to fix the original issue

This reverts commit 7e4f32f4e4b93c95dcc872cb844c5548e69f352e.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55196e5d10af7c295352bb9a2d7565efe07ce46b
---

 libavutil/frame.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 69ee240..8811dcd 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -668,8 +668,6 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
 enum AVFrameSideDataType type,
 int size)
 {
-if (size <= 0)
-return NULL;
 
 return frame_new_side_data(frame, type, av_buffer_alloc(size));
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/interplayvideo: Fix timeout from lack of bitstream end check

2017-03-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Mar  1 17:56:23 2017 +0100| [6191198c216e0ca38d6e65270d2f1b054584a0a9] | 
committer: Michael Niedermayer

avcodec/interplayvideo: Fix timeout from lack of bitstream end check

Fixes: 697/clusterfuzz-testcase-6111250582863872

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6191198c216e0ca38d6e65270d2f1b054584a0a9
---

 libavcodec/interplayvideo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 8d2f3ab..df3314d 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -928,6 +928,8 @@ static void ipvideo_decode_opcodes(IpvideoContext *s, 
AVFrame *frame)
 init_get_bits(&gb, s->decoding_map, s->decoding_map_size * 8);
 for (y = 0; y < s->avctx->height; y += 8) {
 for (x = 0; x < s->avctx->width; x += 8) {
+if (get_bits_left(&gb) < 4)
+return;
 opcode = get_bits(&gb, 4);
 
 ff_tlog(s->avctx,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavf/matroska: Support codec ID V_FFV1 for demuxing.

2017-03-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Wed Mar  1 
23:40:35 2017 +0100| [9ae762da7e256aa4d3b645c614fcd1959e1cbb8d] | committer: 
Carl Eugen Hoyos

lavf/matroska: Support codec ID V_FFV1 for demuxing.

Fixes ticket #6206.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ae762da7e256aa4d3b645c614fcd1959e1cbb8d
---

 libavformat/matroska.c| 1 +
 libavformat/matroskaenc.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index fda96fb..7905fd1 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -77,6 +77,7 @@ const CodecTags ff_mkv_codec_tags[]={
 {"S_HDMV/TEXTST", AV_CODEC_ID_HDMV_TEXT_SUBTITLE},
 
 {"V_DIRAC"  , AV_CODEC_ID_DIRAC},
+{"V_FFV1"   , AV_CODEC_ID_FFV1},
 {"V_MJPEG"  , AV_CODEC_ID_MJPEG},
 {"V_MPEG1"  , AV_CODEC_ID_MPEG1VIDEO},
 {"V_MPEG2"  , AV_CODEC_ID_MPEG2VIDEO},
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 7cb8893..1622b44 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1138,7 +1138,7 @@ static int mkv_write_track(AVFormatContext *s, 
MatroskaMuxContext *mkv,
 // if none are found, use AVI codes
 if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag) {
 for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
-if (ff_mkv_codec_tags[j].id == par->codec_id) {
+if (ff_mkv_codec_tags[j].id == par->codec_id && par->codec_id 
!= AV_CODEC_ID_FFV1) {
 put_ebml_string(pb, MATROSKA_ID_CODECID, 
ff_mkv_codec_tags[j].str);
 native_id = 1;
 break;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog