[FFmpeg-cvslog] lavc/mediacodec: use ternary operator to set slice-height value

2016-03-28 Thread Matthieu Bouron
ffmpeg | branch: master | Matthieu Bouron  | Mon 
Mar 28 10:10:21 2016 +0200| [308d3ed5aa3a7bb61b1e417bfd6801136c955b39] | 
committer: Matthieu Bouron

lavc/mediacodec: use ternary operator to set slice-height value

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

 libavcodec/mediacodecdec.c |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index d385651..5c1368f 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -255,11 +255,7 @@ static int mediacodec_dec_parse_format(AVCodecContext 
*avctx, MediaCodecDecConte
 av_freep(&format);
 return AVERROR_EXTERNAL;
 }
-if (value > 0) {
-s->slice_height = value;
-} else {
-s->slice_height = s->height;
-}
+s->slice_height = value > 0 ? value : s->height;
 
 if (strstr(s->codec_name, "OMX.Nvidia.")) {
 s->slice_height = FFALIGN(s->height, 16);

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


[FFmpeg-cvslog] avcodec: add dca core extraction bsf

2016-03-28 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Mar 27 13:02:33 
2016 +0200| [ff982e02b5478ee244d5763d14a55b4215f9939b] | committer: Paul B Mahol

avcodec: add dca core extraction bsf

Signed-off-by: Paul B Mahol 

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

 Changelog  |1 +
 doc/bitstream_filters.texi |4 +++
 libavcodec/Makefile|1 +
 libavcodec/allcodecs.c |1 +
 libavcodec/dca_core_bsf.c  |   60 
 libavcodec/version.h   |2 +-
 6 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 74c497d..7b0187d 100644
--- a/Changelog
+++ b/Changelog
@@ -17,6 +17,7 @@ version :
 - AudioToolbox audio encoders
 - coreimage filter (GPU based image filtering on OSX)
 - libdcadec removed
+- bitstream filter for extracting DTS core
 
 version 3.0:
 - Common Encryption (CENC) MP4 encoding and decoding support
diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index 563049e..6c58d02 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -67,6 +67,10 @@ the header stored in extradata to the key packets:
 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra 
out.ts
 @end example
 
+@section dca_core
+
+Extract DCA core from DTS-HD streams.
+
 @section h264_mp4toannexb
 
 Convert an H.264 bitstream from length prefixed mode to start code
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index b926b79..8c14268 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -924,6 +924,7 @@ OBJS-$(CONFIG_AAC_ADTSTOASC_BSF)  += 
aac_adtstoasc_bsf.o aacadtsdec.o \
  mpeg4audio.o
 OBJS-$(CONFIG_CHOMP_BSF)  += chomp_bsf.o
 OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o
+OBJS-$(CONFIG_DCA_CORE_BSF)   += dca_core_bsf.o
 OBJS-$(CONFIG_H264_MP4TOANNEXB_BSF)   += h264_mp4toannexb_bsf.o
 OBJS-$(CONFIG_HEVC_MP4TOANNEXB_BSF)   += hevc_mp4toannexb_bsf.o
 OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF)+= imx_dump_header_bsf.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index e3c4f07..f498041 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -670,6 +670,7 @@ void avcodec_register_all(void)
 REGISTER_BSF(AAC_ADTSTOASC, aac_adtstoasc);
 REGISTER_BSF(CHOMP, chomp);
 REGISTER_BSF(DUMP_EXTRADATA,dump_extradata);
+REGISTER_BSF(DCA_CORE,  dca_core);
 REGISTER_BSF(H264_MP4TOANNEXB,  h264_mp4toannexb);
 REGISTER_BSF(HEVC_MP4TOANNEXB,  hevc_mp4toannexb);
 REGISTER_BSF(IMX_DUMP_HEADER,   imx_dump_header);
diff --git a/libavcodec/dca_core_bsf.c b/libavcodec/dca_core_bsf.c
new file mode 100644
index 000..7d37236
--- /dev/null
+++ b/libavcodec/dca_core_bsf.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2016 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 "avcodec.h"
+#include "bytestream.h"
+#include "dca_syncwords.h"
+#include "libavutil/mem.h"
+
+static int dca_core(AVBitStreamFilterContext *bsfc,
+AVCodecContext *avctx, const char *args,
+uint8_t **poutbuf, int *poutbuf_size,
+const uint8_t *buf, int buf_size,
+int keyframe)
+{
+GetByteContext gb;
+uint32_t syncword;
+int core_size = 0;
+
+bytestream2_init(&gb, buf, buf_size);
+syncword = bytestream2_get_be32(&gb);
+bytestream2_skip(&gb, 1);
+
+switch (syncword) {
+case DCA_SYNCWORD_CORE_BE:
+core_size = ((bytestream2_get_be24(&gb) >> 4) & 0x3fff) + 1;
+break;
+}
+
+*poutbuf = (uint8_t *)buf;
+
+if (core_size > 0 && core_size <= buf_size) {
+*poutbuf_size = core_size;
+} else {
+*poutbuf_size = buf_size;
+}
+
+return 0;
+}
+
+AVBitStreamFilter ff_dca_core_bsf = {
+.name   = "dca_core",
+.filter = dca_core,
+};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index af4f101..13371a5 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSI

[FFmpeg-cvslog] Update for 3.0.1

2016-03-28 Thread Michael Niedermayer
ffmpeg | branch: refs/remotes/origin/release/3.0 | Michael Niedermayer 
 | Sat Mar 26 22:37:41 2016 +0100| 
[526c7b21865f8547fb425eeeb093f0765f1f9918] | committer: Michael Niedermayer

Update for 3.0.1

Signed-off-by: Michael Niedermayer 

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

 Changelog |   40 
 RELEASE   |2 +-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 2e1cd36..fe379b7 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,46 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version 3.0.1:
+avcodec/libutvideodec: copy frame so it has reference counters when 
refcounted_frames is set
+avformat/rtpdec_jpeg: fix low contrast image on low quality setting
+avformat/mpegtsenc: Fix used service
+avformat/mpegtsenc: Keep track of the program for each service
+avformat/file: Add crypto to default whitelist
+avcodec/mjpegenc_common: Store approximate aspect if exact cannot be stored
+lavc/hevc: Allow arbitrary garbage in bytestream as long as at least one NAL 
unit is found.
+avcodec/resample: Remove disabled and faulty code
+indeo2: Fix banding artefacts
+indeo2data: K&R formatting cosmetics
+avformat/hlsenc: Fix passing options, regression since 
bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce
+avutil/random_seed: Add the runtime in cycles of the main loop to the entropy 
pool
+avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing
+avformat/concatdec: set safe mode to enabled instead of auto
+avformat/utils: fix dts from pts code in compute_pkt_fields() during ascending 
delay
+avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMAT
+avcodec/dca: clear X96 channels if nothing was decoded
+fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson
+avformat/cache: Fix memleak of tree entries
+lavf/mov: downgrade sidx errors to non-fatal warnings; fixes trac #5216
+lavf/mov: fix sidx with edit lists
+avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg
+swscale/utils: Fix chrSrcHSubSample for GBRAP16
+swscale/input: Fix GBRAP16 input
+avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
+avcodec/h264: Execute error concealment before marking the frame as done.
+swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
+swscale/x86/output: Move code into yuv2planeX_mainloop
+MAINTAINERS: add myself as an OS/2 maintainer
+libwebpenc_animencoder: print library messages in verbose log levels
+libwebpenc_animencoder: zero initialize the WebPAnimEncoderOptions struct
+configure: check for SEC_I_CONTEXT_EXPIRED before enabling SChannel
+lavf/http: Add httpproxy to the default protocol whitelist.
+doc/utils: fix typo for min() description
+ffserver&ffm: Fixed issues preventing ffserver write_index and files_size from 
being set correctly which was breaking ffserver streaming.
+postproc: fix unaligned access
+vc2enc: fix use of uninitialized variables in the rate control system
+
+
 version 3.0:
 - Common Encryption (CENC) MP4 encoding and decoding support
 - DXV decoding
diff --git a/RELEASE b/RELEASE
index 9f55b2c..cb2b00e 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-3.0
+3.0.1

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


[FFmpeg-cvslog] lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed value

2016-03-28 Thread Ganesh Ajjanagadde
ffmpeg | branch: release/3.0 | Ganesh Ajjanagadde  | Mon 
Feb 29 22:16:16 2016 -0500| [7c2576e15d3265ff8205923049fc371a3d229d06] | 
committer: Rostislav Pehlivanov

lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed value

It makes no sense whatsoever to do this at each function call; we
already have a table for this.

Yields a 2x improvement in find_min_book (x86-64, Haswell+GCC):
ffmpeg -i sin.flac -acodec aac -y sin.aac
find_min_book
old
605 decicycles in find_min_book, 8388453 runs,155 skips.9x
606 decicycles in find_min_book,16776912 runs,304 skips.9x
607 decicycles in find_min_book,33553819 runs,613 skips.2x
607 decicycles in find_min_book,67107668 runs,   1196 skips.3x
607 decicycles in find_min_book,134215360 runs,   2368 skips3x

new
359 decicycles in find_min_book, 8388552 runs, 56 skips.3x
360 decicycles in find_min_book,16777112 runs,104 skips.1x
361 decicycles in find_min_book,33554218 runs,214 skips.4x
361 decicycles in find_min_book,67108381 runs,483 skips.5x
361 decicycles in find_min_book,134216725 runs,   1003 skips5x

and more importantly a non-negligible speedup (~ 8%) to overall AAC encoding:
old:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_new.aac  6.82s user 0.03s 
system 104% cpu 6.565 total
new:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_old.aac  6.24s user 0.03s 
system 104% cpu 5.993 total

This also improves accuracy of the expression by ~ 2 ulp in some cases.

Reviewed-by: Derek Buitenhuis 
Reviewed-by: Rostislav Pehlivanov 
Signed-off-by: Ganesh Ajjanagadde 
(cherry picked from commit bd9c58756a50b52e495b748d6ea6b0aafe397c25)

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

 libavcodec/aacenc_utils.h |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h
index cb5bc8d..c2a2c2e 100644
--- a/libavcodec/aacenc_utils.h
+++ b/libavcodec/aacenc_utils.h
@@ -90,8 +90,7 @@ static inline float find_max_val(int group_len, int swb_size, 
const float *scale
 
 static inline int find_min_book(float maxval, int sf)
 {
-float Q = ff_aac_pow2sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - 
SCALE_DIV_512];
-float Q34 = sqrtf(Q * sqrtf(Q));
+float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - 
SCALE_DIV_512];
 int qmaxval, cb;
 qmaxval = maxval * Q34 + C_QUANT;
 if (qmaxval >= (FF_ARRAY_ELEMS(aac_maxval_cb)))

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


[FFmpeg-cvslog] aacenc_utils: Use temporary variable.

2016-03-28 Thread Reimar Döffinger
ffmpeg | branch: release/3.0 | Reimar Döffinger  | 
Sun Mar  6 21:25:11 2016 +0100| [b176ab0556914a734932e934a5e904dad091ad71] | 
committer: Rostislav Pehlivanov

aacenc_utils: Use temporary variable.

This ensures gcc does not create unnecessary
loads or stores and possibly even does not vectorize
the negation.
Speeds up mp3 to aac transcoding with default settings
by 10% when using "gcc (Debian 5.3.1-10) 5.3.1 20160224".

Signed-off-by: Reimar Döffinger 
(cherry picked from commit b60dfae7af65c4c7d255ef599352f2c54964303d)

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

 libavcodec/aacenc_utils.h |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h
index b9bd6bf..41a6296 100644
--- a/libavcodec/aacenc_utils.h
+++ b/libavcodec/aacenc_utils.h
@@ -68,10 +68,11 @@ static inline void quantize_bands(int *out, const float 
*in, const float *scaled
 int i;
 for (i = 0; i < size; i++) {
 float qc = scaled[i] * Q34;
-out[i] = (int)FFMIN(qc + rounding, (float)maxval);
+int tmp = (int)FFMIN(qc + rounding, (float)maxval);
 if (is_signed && in[i] < 0.0f) {
-out[i] = -out[i];
+tmp = -tmp;
 }
+out[i] = tmp;
 }
 }
 

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


[FFmpeg-cvslog] lavc/aacenc_utils: replace powf(x, y) by expf(logf(x), y)

2016-03-28 Thread Ganesh Ajjanagadde
ffmpeg | branch: release/3.0 | Ganesh Ajjanagadde  | Mon 
Mar  7 21:16:29 2016 -0500| [f281cb4ea93dc4c27ce93870eafffbe490b25247] | 
committer: Rostislav Pehlivanov

lavc/aacenc_utils: replace powf(x,y) by expf(logf(x), y)

This is ~2x faster for y not an integer on Haswell+GCC, and should
generally be faster due to the fact that anyway powf essentially does
this under the hood. Made an inline function in lavu/internal.h for this
purpose.

Note that there are some accuracy differences, that should generally be
negligible. In particular, FATE still passes on this platform.

Results in ~ 7% speedup in aac encoding with -march=native, Haswell+GCC.
before:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  6.05s user 0.06s system 104% cpu 
5.821 total

after:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  5.67s user 0.03s system 105% cpu 
5.416 total

This is also faster than an alternative approach that pulls in powf, gets rid of
the crufty NaN checks and other special cases, exploits knowledge about the 
intervals, etc.
This of course does not exclude smarter approaches; just suggests that
there would need to be significant work on this front of lower utility than
searches for hotspots elsewhere.

Reviewed-by: Reimar Döffinger 
Reviewed-by: Ronald S. Bultje 
Signed-off-by: Ganesh Ajjanagadde 
(cherry picked from commit bccc81dfa08e6561df6ed37860e3a08f7d983825)

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

 libavcodec/aacenc_utils.h |6 +-
 libavutil/internal.h  |   16 
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h
index 41a6296..07f7337 100644
--- a/libavcodec/aacenc_utils.h
+++ b/libavcodec/aacenc_utils.h
@@ -28,6 +28,7 @@
 #ifndef AVCODEC_AACENC_UTILS_H
 #define AVCODEC_AACENC_UTILS_H
 
+#include "libavutil/internal.h"
 #include "aac.h"
 #include "aacenctab.h"
 #include "aactab.h"
@@ -122,7 +123,10 @@ static inline float find_form_factor(int group_len, int 
swb_size, float thresh,
 if (s >= ethresh) {
 nzl += 1.0f;
 } else {
-nzl += powf(s / ethresh, nzslope);
+if (nzslope == 2.f)
+nzl += (s / ethresh) * (s / ethresh);
+else
+nzl += ff_fast_powf(s / ethresh, nzslope);
 }
 }
 if (e2 > thresh) {
diff --git a/libavutil/internal.h b/libavutil/internal.h
index c4bcf37..44f8c1e 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -314,6 +314,22 @@ static av_always_inline float ff_exp10f(float x)
 }
 
 /**
+ * Compute x^y for floating point x, y. Note: this function is faster than the
+ * libm variant due to mainly 2 reasons:
+ * 1. It does not handle any edge cases. In particular, this is only guaranteed
+ * to work correctly for x > 0.
+ * 2. It is not as accurate as a standard nearly "correctly rounded" libm 
variant.
+ * @param x base
+ * @param y exponent
+ * @return x^y
+ */
+static av_always_inline float ff_fast_powf(float x, float y)
+{
+return expf(logf(x) * y);
+}
+
+
+/**
  * A wrapper for open() setting O_CLOEXEC.
  */
 av_warn_unused_result

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


[FFmpeg-cvslog] aacenc: avoid double in quantize_bands.

2016-03-28 Thread Reimar Döffinger
ffmpeg | branch: release/3.0 | Reimar Döffinger  | 
Tue Mar  1 22:53:18 2016 +0100| [1cbe4ff2acdd1f166ac7ac912c1b00da9fbf0dd1] | 
committer: Rostislav Pehlivanov

aacenc: avoid double in quantize_bands.

I cannot see any point whatsoever to use
double here instead of float, the results
are likely identical in all cases..
Using float allows for much more
efficient use of SIMD.

Signed-off-by: Reimar Döffinger 
(cherry picked from commit 0a04c2885f02f7db6b410b6d43d120e5eb48dc18)

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

 libavcodec/aacenc_utils.h |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h
index c2a2c2e..b9bd6bf 100644
--- a/libavcodec/aacenc_utils.h
+++ b/libavcodec/aacenc_utils.h
@@ -66,10 +66,9 @@ static inline void quantize_bands(int *out, const float *in, 
const float *scaled
   const float rounding)
 {
 int i;
-double qc;
 for (i = 0; i < size; i++) {
-qc = scaled[i] * Q34;
-out[i] = (int)FFMIN(qc + rounding, (double)maxval);
+float qc = scaled[i] * Q34;
+out[i] = (int)FFMIN(qc + rounding, (float)maxval);
 if (is_signed && in[i] < 0.0f) {
 out[i] = -out[i];
 }

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


[FFmpeg-cvslog] Changelog: update for 3.0.1's aacenc optimizations

2016-03-28 Thread Rostislav Pehlivanov
ffmpeg | branch: release/3.0 | Rostislav Pehlivanov  | Mon 
Mar 28 16:59:14 2016 +0100| [6cb5bbc66024572a5310717c03ce3227ec8f4c2c] | 
committer: Rostislav Pehlivanov

Changelog: update for 3.0.1's aacenc optimizations

Signed-off-by: Rostislav Pehlivanov 

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

 Changelog |1 +
 1 file changed, 1 insertion(+)

diff --git a/Changelog b/Changelog
index fe379b7..ce07285 100644
--- a/Changelog
+++ b/Changelog
@@ -39,6 +39,7 @@ doc/utils: fix typo for min() description
 ffserver&ffm: Fixed issues preventing ffserver write_index and files_size from 
being set correctly which was breaking ffserver streaming.
 postproc: fix unaligned access
 vc2enc: fix use of uninitialized variables in the rate control system
+aacenc: optimize encoding speed
 
 
 version 3.0:

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


[FFmpeg-cvslog] vc2enc: correctly zero out coefficient array padding

2016-03-28 Thread Rostislav Pehlivanov
ffmpeg | branch: release/3.0 | Rostislav Pehlivanov  | Fri 
Feb 26 12:21:36 2016 +| [f01919b57af0ff99820b6e8285d6fe546d3ed938] | 
committer: Rostislav Pehlivanov

vc2enc: correctly zero out coefficient array padding

Credit for figuring this out goes to James Darnley.

Signed-off-by: Rostislav Pehlivanov 
(cherry picked from commit 3ef10406e19663a78791ed1b38178fb00d4c7d88)

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

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

diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index f42b10f..bf3f3a9 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -867,7 +867,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg)
 }
 }
 
-memset(buf, 0, (p->coef_stride*p->dwt_height - 
p->height*p->width)*sizeof(dwtcoef));
+memset(buf, 0, p->coef_stride * (p->dwt_height - p->height) * 
sizeof(dwtcoef));
 
 for (level = s->wavelet_depth-1; level >= 0; level--) {
 const SubBand *b = &p->band[level][0];

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


[FFmpeg-cvslog] Changelog: update for 3.0.1's vc2enc fixes

2016-03-28 Thread Rostislav Pehlivanov
ffmpeg | branch: release/3.0 | Rostislav Pehlivanov  | Mon 
Mar 28 17:04:23 2016 +0100| [3d9ebfd27264d0d2f5a379d76375d267fc98d616] | 
committer: Rostislav Pehlivanov

Changelog: update for 3.0.1's vc2enc fixes

Signed-off-by: Rostislav Pehlivanov 

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

 Changelog |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index ce07285..c0ac96b 100644
--- a/Changelog
+++ b/Changelog
@@ -38,7 +38,7 @@ lavf/http: Add httpproxy to the default protocol whitelist.
 doc/utils: fix typo for min() description
 ffserver&ffm: Fixed issues preventing ffserver write_index and files_size from 
being set correctly which was breaking ffserver streaming.
 postproc: fix unaligned access
-vc2enc: fix use of uninitialized variables in the rate control system
+vc2enc: fix use of uninitialized variables in the rate control system, 
correctly zero out coefficient array padding
 aacenc: optimize encoding speed
 
 

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


[FFmpeg-cvslog] avfilter/vf_waveform: optimize 16bit lowpass filter

2016-03-28 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Mar 28 12:28:03 
2016 +0200| [c2bbcf16077b30ce1d8d004c9a7cd21b15d02a15] | committer: Paul B Mahol

avfilter/vf_waveform: optimize 16bit lowpass filter

Signed-off-by: Paul B Mahol 

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

 libavfilter/vf_waveform.c |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index 5041f95..62fba6c 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -651,6 +651,22 @@ static av_always_inline void lowpass16(WaveformContext *s,
 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
 }
 
+#define LOWPASS16_FUNC(name, column, mirror)   \
+static void lowpass16_##name(WaveformContext *s,   \
+ AVFrame *in, AVFrame *out,\
+ int component, int intensity, \
+ int offset_y, int offset_x,   \
+ int unused1, int unused2) \
+{  \
+lowpass16(s, in, out, component, intensity,\
+  offset_y, offset_x, column, mirror); \
+}
+
+LOWPASS16_FUNC(column_mirror, 1, 1)
+LOWPASS16_FUNC(column,1, 0)
+LOWPASS16_FUNC(row_mirror,0, 1)
+LOWPASS16_FUNC(row,   0, 0)
+
 static av_always_inline void lowpass(WaveformContext *s,
  AVFrame *in, AVFrame *out,
  int component, int intensity,
@@ -2424,10 +2440,10 @@ static int config_input(AVFilterLink *inlink)
 case 0x1000: s->waveform = lowpass_row_mirror;break;
 case 0x0100: s->waveform = lowpass_column;break;
 case 0x: s->waveform = lowpass_row;   break;
-case 0x1110:
-case 0x1010:
-case 0x0110:
-case 0x0010: s->waveform = lowpass16; break;
+case 0x1110: s->waveform = lowpass16_column_mirror; break;
+case 0x1010: s->waveform = lowpass16_row_mirror;break;
+case 0x0110: s->waveform = lowpass16_column;break;
+case 0x0010: s->waveform = lowpass16_row;   break;
 case 0x1101:
 case 0x1001:
 case 0x0101:

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


[FFmpeg-cvslog] lavc/mediacodec: fix zero stride for OMX.allwinner.video.decoder.avc

2016-03-28 Thread Kirill Gavrilov
ffmpeg | branch: master | Kirill Gavrilov  | Mon Mar 28 
19:51:24 2016 +0300| [f3ec8ac0f42242ff9a5c94cf143058ee772caa61] | committer: 
Matthieu Bouron

lavc/mediacodec: fix zero stride for OMX.allwinner.video.decoder.avc

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

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

diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index 5c1368f..c21ceba 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -247,7 +247,7 @@ static int mediacodec_dec_parse_format(AVCodecContext 
*avctx, MediaCodecDecConte
 av_freep(&format);
 return AVERROR_EXTERNAL;
 }
-s->stride = value >= 0 ? value : s->width;
+s->stride = value > 0 ? value : s->width;
 
 if (!ff_AMediaFormat_getInt32(s->format, "slice-height", &value)) {
 format = ff_AMediaFormat_toString(s->format);

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


[FFmpeg-cvslog] avfilter/af_sofalizer: allow user to setup custom virtual speakers positions

2016-03-28 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Mar 28 18:07:45 
2016 +0200| [a55c953ef00cb89dabb49af6b3296d60da764c85] | committer: Paul B Mahol

avfilter/af_sofalizer: allow user to setup custom virtual speakers positions

Signed-off-by: Paul B Mahol 

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

 doc/filters.texi   |   10 ++
 libavfilter/af_sofalizer.c |   77 
 2 files changed, 87 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 528e0f8..6cb2ed2 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3220,6 +3220,16 @@ Set processing type. Can be @var{time} or @var{freq}. 
@var{time} is
 processing audio in time domain which is slow but gives high quality output.
 @var{freq} is processing audio in frequency domain which is fast but gives
 mediocre output. Default is @var{freq}.
+
+@item speakers
+Set custom positions of virtual loudspeakers. Syntax for this option is:
+  [|  |...].
+Each virtual loudspeaker is described with short channel name following with
+azimuth and elevation in degreees.
+Each virtual loudspeaker description is separated by '|'.
+For example to override front left and front right channel positions use:
+'speakers=FL 45 15|FR 345 15'.
+Descriptions with unrecognised channel names are ignored.
 @end table
 
 @section stereotools
diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index e2553b6..7558f57 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -29,6 +29,8 @@
 #include 
 
 #include "libavcodec/avfft.h"
+#include "libavutil/avstring.h"
+#include "libavutil/channel_layout.h"
 #include "libavutil/float_dsp.h"
 #include "libavutil/intmath.h"
 #include "libavutil/opt.h"
@@ -52,6 +54,12 @@ typedef struct NCSofa {  /* contains data of one SOFA file */
 float *data_ir;  /* IRs (time-domain) */
 } NCSofa;
 
+typedef struct VirtualSpeaker {
+uint8_t set;
+float azim;
+float elev;
+} VirtualSpeaker;
+
 typedef struct SOFAlizerContext {
 const AVClass *class;
 
@@ -61,6 +69,7 @@ typedef struct SOFAlizerContext {
 int sample_rate;/* sample rate from SOFA file */
 float *speaker_azim;/* azimuth of the virtual loudspeakers */
 float *speaker_elev;/* elevation of the virtual loudspeakers */
+char *speakers_pos; /* custom positions of the virtual 
loudspeakers */
 float gain_lfe; /* gain applied to LFE channel */
 int lfe_channel;/* LFE channel position in channel layout */
 
@@ -89,6 +98,8 @@ typedef struct SOFAlizerContext {
 float radius;/* distance virtual loudspeakers to listener (in 
metres) */
 int type;/* processing type */
 
+VirtualSpeaker vspkrpos[64];
+
 FFTContext *fft[2], *ifft[2];
 FFTComplex *data_hrtf[2];
 
@@ -362,6 +373,62 @@ error:
 return ret;
 }
 
+static int parse_channel_name(char **arg, int *rchannel)
+{
+char buf[8];
+int len, i, channel_id = 0;
+int64_t layout, layout0;
+
+/* try to parse a channel name, e.g. "FL" */
+if (sscanf(*arg, "%7[A-Z]%n", buf, &len)) {
+layout0 = layout = av_get_channel_layout(buf);
+/* channel_id <- first set bit in layout */
+for (i = 32; i > 0; i >>= 1) {
+if (layout >= (int64_t)1 << i) {
+channel_id += i;
+layout >>= i;
+}
+}
+/* reject layouts that are not a single channel */
+if (channel_id >= 64 || layout0 != (int64_t)1 << channel_id)
+return AVERROR(EINVAL);
+*rchannel = channel_id;
+*arg += len;
+return 0;
+}
+return AVERROR(EINVAL);
+}
+
+static void parse_speaker_pos(AVFilterContext *ctx, int64_t in_channel_layout)
+{
+SOFAlizerContext *s = ctx->priv;
+char *arg, *tokenizer, *p, *args = av_strdup(s->speakers_pos);
+
+if (!args)
+return;
+p = args;
+
+while ((arg = av_strtok(p, "|", &tokenizer))) {
+float azim, elev;
+int out_ch_id;
+
+p = NULL;
+if (parse_channel_name(&arg, &out_ch_id))
+continue;
+if (sscanf(arg, "%f %f", &azim, &elev) == 2) {
+s->vspkrpos[out_ch_id].set = 1;
+s->vspkrpos[out_ch_id].azim = azim;
+s->vspkrpos[out_ch_id].elev = elev;
+} else if (sscanf(arg, "%f", &azim) == 1) {
+s->vspkrpos[out_ch_id].set = 1;
+s->vspkrpos[out_ch_id].azim = azim;
+s->vspkrpos[out_ch_id].elev = 0;
+}
+}
+
+av_free(args);
+}
+
 static int get_speaker_pos(AVFilterContext *ctx,
float *speaker_azim, float *speaker_elev)
 {
@@ -376,6 +443,9 @@ static int get_speaker_pos(AVFilterContext *ctx,
 
 s->lfe_channel = -1;
 
+if (s->speakers_pos)
+parse_speaker_pos(ctx, channels_layout);
+
 /* set speaker positions according to input 

[FFmpeg-cvslog] lavd/dshow_crossbar: remove trailing whitespace

2016-03-28 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Sat Mar 26 20:58:52 2016 
-0800| [cd76eb8f4adbf4c22b0dee3acaf5d42047b5941b] | committer: Lou Logan

lavd/dshow_crossbar: remove trailing whitespace

Signed-off-by: Lou Logan 

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

 libavdevice/dshow_crossbar.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c
index c0739da..95fb466 100644
--- a/libavdevice/dshow_crossbar.c
+++ b/libavdevice/dshow_crossbar.c
@@ -167,7 +167,7 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 
*graph_builder2,
 }
 
 if (devtype == VideoDevice && ctx->show_analog_tv_tuner_dialog) {
-hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, 
&LOOK_UPSTREAM_ONLY, NULL, 
+hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, 
&LOOK_UPSTREAM_ONLY, NULL,
  device_filter, &IID_IAMTVTuner, (void**) &tv_tuner_filter);
 if (hr == S_OK) {
 hr = IAMCrossbar_QueryInterface(tv_tuner_filter, &IID_IBaseFilter, 
(void **) &tv_tuner_base_filter);
@@ -179,7 +179,7 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 
*graph_builder2,
 }
 }
 if (devtype == AudioDevice && ctx->show_analog_tv_tuner_audio_dialog) {
-hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, 
&LOOK_UPSTREAM_ONLY, NULL, 
+hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, 
&LOOK_UPSTREAM_ONLY, NULL,
  device_filter, &IID_IAMTVAudio, (void**) &tv_audio_filter);
 if (hr == S_OK) {
 hr = IAMCrossbar_QueryInterface(tv_audio_filter, &IID_IBaseFilter, 
(void **) &tv_audio_base_filter);

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


[FFmpeg-cvslog] avcodec/utils: fix packet duration of frames with discarded paddings

2016-03-28 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Mar 20 14:48:08 
2016 +0100| [99f2a59c2f298c2a8c0d1058759fd0ae81bc8c2e] | committer: Marton 
Balint

avcodec/utils: fix packet duration of frames with discarded paddings

Reviewed-by: Hendrik Leppkes 
Signed-off-by: Marton Balint 

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

 libavcodec/utils.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c625bbc..073c6fa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2337,8 +2337,7 @@ int attribute_align_arg 
avcodec_decode_audio4(AVCodecContext *avctx,
 int64_t diff_ts = av_rescale_q(frame->nb_samples - 
discard_padding,
(AVRational){1, 
avctx->sample_rate},
avctx->pkt_timebase);
-if (av_frame_get_pkt_duration(frame) >= diff_ts)
-av_frame_set_pkt_duration(frame, 
av_frame_get_pkt_duration(frame) - diff_ts);
+av_frame_set_pkt_duration(frame, diff_ts);
 } else {
 av_log(avctx, AV_LOG_WARNING, "Could not update timestamps 
for discarded samples.\n");
 }

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


[FFmpeg-cvslog] fix some a/an typos

2016-03-28 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Mon Mar 28 14:07:47 2016 
-0800| [06eef96b69d73a31f2b390955d1be0537214a0c8] | committer: Lou Logan

fix some a/an typos

Signed-off-by: Lou Logan 

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

 doc/Doxyfile   |2 +-
 doc/codecs.texi|2 +-
 doc/examples/filtering_audio.c |2 +-
 doc/snow.txt   |2 +-
 ffmpeg_filter.c|2 +-
 libavcodec/ass_split.h |2 +-
 libavcodec/avcodec.h   |2 +-
 libavcodec/bitstream.c |2 +-
 libavcodec/cpia.c  |2 +-
 libavcodec/ituh263dec.c|4 ++--
 libavcodec/mpegaudiodec_template.c |2 +-
 libavcodec/mpegvideo.c |8 
 libavfilter/graphparser.c  |2 +-
 libavfilter/vf_mcdeint.c   |2 +-
 libavformat/asfdec_f.c |2 +-
 libavformat/avformat.h |4 ++--
 libavformat/movenc.c   |2 +-
 libavformat/mxfdec.c   |2 +-
 libavformat/oggdec.c   |2 +-
 libavformat/utils.c|2 +-
 libavformat/yuv4mpegenc.c  |2 +-
 libavutil/avstring.h   |2 +-
 libavutil/cpu.h|2 +-
 libavutil/tree.h   |4 ++--
 libswscale/swscale_internal.h  |2 +-
 tools/dvd2concat   |2 +-
 26 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/doc/Doxyfile b/doc/Doxyfile
index 1ad9f30..0c1604e 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -1429,7 +1429,7 @@ PERL_PATH  = /usr/bin/perl
 #---
 
 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# generate an inheritance diagram (in HTML, RTF and LaTeX) for classes with 
base
 # or super classes. Setting the tag to NO turns the diagrams off. Note that
 # this option is superseded by the HAVE_DOT option below. This is only a
 # fallback. It is recommended to install and use dot, since it yields more
diff --git a/doc/codecs.texi b/doc/codecs.texi
index b481b4a..ad99fa6 100644
--- a/doc/codecs.texi
+++ b/doc/codecs.texi
@@ -257,7 +257,7 @@ Specify how strictly to follow the standards.
 Possible values:
 @table @samp
 @item very
-strictly conform to a older more strict version of the spec or reference 
software
+strictly conform to an older more strict version of the spec or reference 
software
 @item strict
 strictly conform to all the things in the spec no matter what consequences
 @item normal
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 89c80cf..6bb24a4 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -65,7 +65,7 @@ static int open_input_file(const char *filename)
 /* select the audio stream */
 ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0);
 if (ret < 0) {
-av_log(NULL, AV_LOG_ERROR, "Cannot find a audio stream in the input 
file\n");
+av_log(NULL, AV_LOG_ERROR, "Cannot find an audio stream in the input 
file\n");
 return ret;
 }
 audio_stream_index = ret;
diff --git a/doc/snow.txt b/doc/snow.txt
index 9d5778d..bbf28bc 100644
--- a/doc/snow.txt
+++ b/doc/snow.txt
@@ -527,7 +527,7 @@ Wavelet Transform:
 ==
 
 Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integer
-transform and a integer approximation of the symmetric biorthogonal 9/7
+transform and an integer approximation of the symmetric biorthogonal 9/7
 daubechies wavelet.
 
 2D IDWT (inverse discrete wavelet transform)
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 6896a78..458f3ae 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -656,7 +656,7 @@ int configure_output_filter(FilterGraph *fg, OutputFilter 
*ofilter, AVFilterInOu
 DESCRIBE_FILTER_LINK(ofilter, out, 0);
 
 if (!ofilter->ost) {
-av_log(NULL, AV_LOG_FATAL, "Filter %s has a unconnected output\n", 
ofilter->name);
+av_log(NULL, AV_LOG_FATAL, "Filter %s has an unconnected output\n", 
ofilter->name);
 exit_program(1);
 }
 
diff --git a/libavcodec/ass_split.h b/libavcodec/ass_split.h
index abb6e58..30ce772 100644
--- a/libavcodec/ass_split.h
+++ b/libavcodec/ass_split.h
@@ -111,7 +111,7 @@ ASSSplitContext *ff_ass_split(const char *buf);
 
 /**
  * Split one or several ASS "Dialogue" lines from a string buffer and store
- * them in a already initialized context.
+ * them in an already initialized context.
  *
  * @param ctx Context previously initialized by ff_ass_split().
  * @param buf String containing the ASS "Dialogue" lines.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 637984b..eb8b921 100644
--- a/libavcodec/avcodec.h
+++

[FFmpeg-cvslog] avformat/svag: fix division by zero

2016-03-28 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Mar 28 21:34:08 
2016 -0300| [d5a3578350a3901a26df39df196bb085760ec46f] | committer: James Almer

avformat/svag: fix division by zero

Fixes ticket #5386

Signed-off-by: James Almer 

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

 libavformat/svag.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/svag.c b/libavformat/svag.c
index ab7f36c..08fc06b 100644
--- a/libavformat/svag.c
+++ b/libavformat/svag.c
@@ -48,7 +48,7 @@ static int svag_read_header(AVFormatContext *s)
 if (st->codec->sample_rate <= 0)
 return AVERROR_INVALIDDATA;
 st->codec->channels= avio_rl32(s->pb);
-if (st->codec->channels <= 0)
+if (st->codec->channels <= 0 || st->codec->channels > 8)
 return AVERROR_INVALIDDATA;
 st->duration   = size / (16 * st->codec->channels) * 28;
 align  = avio_rl32(s->pb);

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


[FFmpeg-cvslog] avformat/svag: fix division by zero

2016-03-28 Thread James Almer
ffmpeg | branch: release/3.0 | James Almer  | Mon Mar 28 
21:34:08 2016 -0300| [7b1e020fc5edbc09774d6fe7857d47d29f157a13] | committer: 
James Almer

avformat/svag: fix division by zero

Fixes ticket #5386

Signed-off-by: James Almer 
(cherry picked from commit d5a3578350a3901a26df39df196bb085760ec46f)

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

 libavformat/svag.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/svag.c b/libavformat/svag.c
index ab7f36c..08fc06b 100644
--- a/libavformat/svag.c
+++ b/libavformat/svag.c
@@ -48,7 +48,7 @@ static int svag_read_header(AVFormatContext *s)
 if (st->codec->sample_rate <= 0)
 return AVERROR_INVALIDDATA;
 st->codec->channels= avio_rl32(s->pb);
-if (st->codec->channels <= 0)
+if (st->codec->channels <= 0 || st->codec->channels > 8)
 return AVERROR_INVALIDDATA;
 st->duration   = size / (16 * st->codec->channels) * 28;
 align  = avio_rl32(s->pb);

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


[FFmpeg-cvslog] avcodec/h264_slice: Check PPS more extensively when its not copied

2016-03-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Fri Mar 25 15:29:26 2016 +0100| [26d29f0c3dc200bbbf066f55a90738398b6013be] | 
committer: Michael Niedermayer

avcodec/h264_slice: Check PPS more extensively when its not copied

Fixes Ticket5371
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer 
(cherry picked from commit c50be7a52bc1e8e18a0059e489743ec12a43f257)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/h264_slice.c |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 2131338..0b3e040 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1282,9 +1282,13 @@ int ff_h264_decode_slice_header(H264Context *h, 
H264SliceContext *sl)
 
 if (first_slice) {
 h->pps = *h->pps_buffers[pps_id];
-} else if (h->setup_finished && h->dequant_coeff_pps != pps_id) {
-av_log(h->avctx, AV_LOG_ERROR, "PPS changed between slices\n");
-return AVERROR_INVALIDDATA;
+} else {
+if (h->pps.sps_id != pps->sps_id ||
+h->pps.transform_8x8_mode != pps->transform_8x8_mode ||
+(h->setup_finished && h->dequant_coeff_pps != pps_id)) {
+av_log(h->avctx, AV_LOG_ERROR, "PPS changed between slices\n");
+return AVERROR_INVALIDDATA;
+}
 }
 
 if (pps->sps_id != h->sps.sps_id ||

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


[FFmpeg-cvslog] avcodec/diracdec: check bitstream size related fields for overflows

2016-03-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Mon Mar 28 04:01:08 2016 +0200| [00b54d4625b088b40b3547d55b6c990f3c8fd6c9] | 
committer: Michael Niedermayer

avcodec/diracdec: check bitstream size related fields for overflows

Fixes segfault
Fixes Ticket5333

Regression since bfc8a4dabe5a0154b31128b59dca575010176441
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 8f2a1990c06df73cf58401c8ba193711eb8947e7)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/diracdec.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index e530a05..05c7900 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -173,7 +173,7 @@ typedef struct DiracContext {
 
 struct {
 unsigned prefix_bytes;
-unsigned size_scaler;
+uint64_t size_scaler;
 } highquality;
 
 struct {
@@ -826,9 +826,15 @@ static int decode_hq_slice(AVCodecContext *avctx, void 
*arg)
 
 /* Luma + 2 Chroma planes */
 for (i = 0; i < 3; i++) {
-int length = s->highquality.size_scaler * get_bits(gb, 8);
-int bits_left = 8 * length;
-int bits_end = get_bits_count(gb) + bits_left;
+int64_t length = s->highquality.size_scaler * get_bits(gb, 8);
+int64_t bits_left = 8 * length;
+int64_t bits_end = get_bits_count(gb) + bits_left;
+
+if (bits_end >= INT_MAX) {
+av_log(s->avctx, AV_LOG_ERROR, "end too far away\n");
+return AVERROR_INVALIDDATA;
+}
+
 for (level = 0; level < s->wavelet_depth; level++) {
 for (orientation = !!level; orientation < 4; orientation++) {
 decode_subband(s, gb, quants[level][orientation], 
slice->slice_x, slice->slice_y, bits_end,
@@ -848,7 +854,8 @@ static int decode_hq_slice(AVCodecContext *avctx, void *arg)
 static int decode_lowdelay(DiracContext *s)
 {
 AVCodecContext *avctx = s->avctx;
-int slice_x, slice_y, bytes = 0, bufsize;
+int slice_x, slice_y, bufsize;
+int64_t bytes = 0;
 const uint8_t *buf;
 DiracSlice *slices;
 int slice_num = 0;
@@ -872,6 +879,11 @@ static int decode_lowdelay(DiracContext *s)
 if (bytes <= bufsize/8)
 bytes += buf[bytes] * s->highquality.size_scaler + 1;
 }
+if (bytes >= INT_MAX) {
+av_log(s->avctx, AV_LOG_ERROR, "too many bytes\n");
+av_free(slices);
+return AVERROR_INVALIDDATA;
+}
 
 slices[slice_num].bytes   = bytes;
 slices[slice_num].slice_x = slice_x;
@@ -1151,6 +1163,10 @@ static int dirac_unpack_idwt_params(DiracContext *s)
 } else if (s->hq_picture) {
 s->highquality.prefix_bytes = svq3_get_ue_golomb(gb);
 s->highquality.size_scaler  = svq3_get_ue_golomb(gb);
+if (s->highquality.prefix_bytes >= INT_MAX / 8) {
+av_log(s->avctx,AV_LOG_ERROR,"too many prefix bytes\n");
+return AVERROR_INVALIDDATA;
+}
 }
 
 /* [DIRAC_STD] 11.3.5 Quantisation matrices (low-delay syntax). 
quant_matrix() */

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


[FFmpeg-cvslog] Changelog: update

2016-03-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Tue Mar 29 03:53:36 2016 +0200| [9b1b674ebefd804192c9fcee2457d4e670683e75] | 
committer: Michael Niedermayer

Changelog: update

Signed-off-by: Michael Niedermayer 

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

 Changelog |2 ++
 1 file changed, 2 insertions(+)

diff --git a/Changelog b/Changelog
index c0ac96b..7556ada 100644
--- a/Changelog
+++ b/Changelog
@@ -40,6 +40,8 @@ ffserver&ffm: Fixed issues preventing ffserver write_index 
and files_size from b
 postproc: fix unaligned access
 vc2enc: fix use of uninitialized variables in the rate control system, 
correctly zero out coefficient array padding
 aacenc: optimize encoding speed
+avcodec/diracdec: check bitstream size related fields for overflows
+avcodec/h264_slice: Check PPS more extensively when its not copied
 
 
 version 3.0:

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


[FFmpeg-cvslog] doc/Doxyfile: update for 3.0.1

2016-03-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Tue Mar 29 04:25:48 2016 +0200| [fda00aa7749326f02a6ca0a7d9bd9bcda1054071] | 
committer: Michael Niedermayer

doc/Doxyfile: update for 3.0.1

Signed-off-by: Michael Niedermayer 

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

 doc/Doxyfile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Doxyfile b/doc/Doxyfile
index 07b4d1f..c001ef7 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME   = FFmpeg
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER = 3.0
+PROJECT_NUMBER = 3.0.1
 
 # With the PROJECT_LOGO tag one can specify a logo or icon that is included
 # in the documentation. The maximum height of the logo should not exceed 55

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


[FFmpeg-cvslog] Tag n3.0.1 : FFmpeg 3.0.1 release

2016-03-28 Thread git
[ffmpeg] [branch: refs/tags/n3.0.1]
Tag:be90ebaef7c0e6e589ebf95aa3efac39cec788d8
> http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=be90ebaef7c0e6e589ebf95aa3efac39cec788d8

Tagger: Michael Niedermayer 
Date:   Tue Mar 29 04:30:14 2016 +0200

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