[FFmpeg-cvslog] ffmpeg: replace "flush Media" with "flush_media" in benchmark_all output

2016-01-29 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Wed Jan 27 
12:46:36 2016 +0100| [b91093a4111ffc947f3387325a377bb1694a87dd] | committer: 
Stefano Sabatini

ffmpeg: replace "flush Media" with "flush_media" in benchmark_all output

Simplify parsing and consistency.

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

 ffmpeg.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 97aca10..a5ec3c3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1711,11 +1711,11 @@ static void flush_encoders(void)
 switch (enc->codec_type) {
 case AVMEDIA_TYPE_AUDIO:
 encode = avcodec_encode_audio2;
-desc   = "Audio";
+desc   = "audio";
 break;
 case AVMEDIA_TYPE_VIDEO:
 encode = avcodec_encode_video2;
-desc   = "Video";
+desc   = "video";
 break;
 default:
 stop_encoding = 1;
@@ -1731,7 +1731,7 @@ static void flush_encoders(void)
 
 update_benchmark(NULL);
 ret = encode(enc, &pkt, NULL, &got_packet);
-update_benchmark("flush %s %d.%d", desc, ost->file_index, 
ost->index);
+update_benchmark("flush_%s %d.%d", desc, ost->file_index, 
ost->index);
 if (ret < 0) {
 av_log(NULL, AV_LOG_FATAL, "%s encoding failed: %s\n",
desc,

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


[FFmpeg-cvslog] avcodec/huffyuvenc: Remove duplicate include

2016-01-29 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Jan 29 11:27:43 2016 +0100| [2d163cbdabae0a5966a9fd4063af83599f3146d5] | 
committer: Michael Niedermayer

avcodec/huffyuvenc: Remove duplicate include

Signed-off-by: Michael Niedermayer 

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

 libavcodec/huffyuvenc.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index febb71f..c70f1fe 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -28,8 +28,6 @@
  * huffyuv encoder
  */
 
-#include "libavutil/opt.h"
-
 #include "avcodec.h"
 #include "huffyuv.h"
 #include "huffman.h"

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


[FFmpeg-cvslog] libavdevice/decklink_common.h: fix broken build due to missing `/`

2016-01-29 Thread Michael Ira Krufky
ffmpeg | branch: master | Michael Ira Krufky  | Fri Jan 29 
06:49:46 2016 -0500| [44a50feebe1fa9ce16aaeedafde6e66fb770330e] | committer: 
Michael Niedermayer

libavdevice/decklink_common.h: fix broken build due to missing `/`

Signed-off-by: Michael Ira Krufky 

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

 libavdevice/decklink_common.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 1e266d5..dff4fc1 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -106,4 +106,4 @@ int ff_decklink_set_format(AVFormatContext *avctx, 
decklink_direction_t directio
 int ff_decklink_list_devices(AVFormatContext *avctx);
 int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t 
direction = DIRECTION_OUT);
 
-#endif /* AVDEVICE_DECKLINK_COMMON_H *
+#endif /* AVDEVICE_DECKLINK_COMMON_H */

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


[FFmpeg-cvslog] lavc/rawdec: Use AV_PIX_FMT_PAL8 for raw 1 bpp video in AVI

2016-01-29 Thread Mats Peterson
ffmpeg | branch: master | Mats Peterson  | 
Thu Jan 28 06:15:29 2016 +0100| [b34c9d1b9d935b77dac10ba7f82e5184e0c7ba7f] | 
committer: Michael Niedermayer

lavc/rawdec: Use AV_PIX_FMT_PAL8 for raw 1 bpp video in AVI

 From
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318229%28v=vs.85%29.aspx:

"If biCompression equals BI_RGB and the bitmap uses 8 bpp or less, the
bitmap has a color table immediatelly following the BITMAPINFOHEADER
structure. The color table consists of an array of RGBQUAD values. The
size of the array is given by the biClrUsed member. If biClrUsed is
zero, the array contains the maximum number of colors for the given
bitdepth; that is, 2^biBitCount colors."

Nothing about "monochrome" here. Unfortunately, pal8 to monow conversion
seems a bit flaky, but that's another story.

Signed-off-by: Michael Niedermayer 

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

 libavcodec/raw.c  |2 +-
 tests/ref/vsynth/vsynth1-bpp1 |4 ++--
 tests/ref/vsynth/vsynth2-bpp1 |4 ++--
 tests/ref/vsynth/vsynth3-bpp1 |4 ++--
 tests/ref/vsynth/vsynth_lena-bpp1 |4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index 888f554..4f7417a 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -282,7 +282,7 @@ unsigned int avcodec_pix_fmt_to_codec_tag(enum 
AVPixelFormat fmt)
 }
 
 const PixelFormatTag avpriv_pix_fmt_bps_avi[] = {
-{ AV_PIX_FMT_MONOWHITE, 1 },
+{ AV_PIX_FMT_PAL8,1 },
 { AV_PIX_FMT_PAL8,2 },
 { AV_PIX_FMT_PAL8,4 },
 { AV_PIX_FMT_PAL8,8 },
diff --git a/tests/ref/vsynth/vsynth1-bpp1 b/tests/ref/vsynth/vsynth1-bpp1
index 32dab11..378f990 100644
--- a/tests/ref/vsynth/vsynth1-bpp1
+++ b/tests/ref/vsynth/vsynth1-bpp1
@@ -1,4 +1,4 @@
 3e5e0f4afb3a0350440e86b1ea56cec9 *tests/data/fate/vsynth1-bpp1.avi
 640452 tests/data/fate/vsynth1-bpp1.avi
-ccef5f5d5b0392f1d01c200499dac657 *tests/data/fate/vsynth1-bpp1.out.rawvideo
-stddev:   97.30 PSNR:  8.37 MAXDIFF:  237 bytes:  7603200/  7603200
+853694f3c1aa3ef3807ab1fccbeefe7b *tests/data/fate/vsynth1-bpp1.out.rawvideo
+stddev:   84.44 PSNR:  9.60 MAXDIFF:  221 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-bpp1 b/tests/ref/vsynth/vsynth2-bpp1
index d010bbd..ae8fd27 100644
--- a/tests/ref/vsynth/vsynth2-bpp1
+++ b/tests/ref/vsynth/vsynth2-bpp1
@@ -1,4 +1,4 @@
 771437c9038b44f4e2d4ff764c1c3821 *tests/data/fate/vsynth2-bpp1.avi
 640452 tests/data/fate/vsynth2-bpp1.avi
-ba70b5aebc786e625af6bd7f7ec82717 *tests/data/fate/vsynth2-bpp1.out.rawvideo
-stddev:   81.63 PSNR:  9.89 MAXDIFF:  237 bytes:  7603200/  7603200
+94261fc8aa20130cbd4361e15b742ef7 *tests/data/fate/vsynth2-bpp1.out.rawvideo
+stddev:   70.29 PSNR: 11.19 MAXDIFF:  221 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-bpp1 b/tests/ref/vsynth/vsynth3-bpp1
index f84808a..6f71248 100644
--- a/tests/ref/vsynth/vsynth3-bpp1
+++ b/tests/ref/vsynth/vsynth3-bpp1
@@ -1,4 +1,4 @@
 a5e6d1eff2f6fc3bba31e3bb8753b905 *tests/data/fate/vsynth3-bpp1.avi
 15352 tests/data/fate/vsynth3-bpp1.avi
-75e8ee0c0b0ada4515455d9f29377a16 *tests/data/fate/vsynth3-bpp1.out.rawvideo
-stddev:   97.70 PSNR:  8.33 MAXDIFF:  248 bytes:86700/86700
+79076b5fc43ee2a2284c0cde991d21f3 *tests/data/fate/vsynth3-bpp1.out.rawvideo
+stddev:   84.88 PSNR:  9.55 MAXDIFF:  232 bytes:86700/86700
diff --git a/tests/ref/vsynth/vsynth_lena-bpp1 
b/tests/ref/vsynth/vsynth_lena-bpp1
index d4570c7..3e250a8 100644
--- a/tests/ref/vsynth/vsynth_lena-bpp1
+++ b/tests/ref/vsynth/vsynth_lena-bpp1
@@ -1,4 +1,4 @@
 d53d08c755ffde5fca744f0f941bfcb1 *tests/data/fate/vsynth_lena-bpp1.avi
 640452 tests/data/fate/vsynth_lena-bpp1.avi
-9a66df9009670b0a593d889975246c00 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
-stddev:   96.36 PSNR:  8.45 MAXDIFF:  233 bytes:  7603200/  7603200
+dce624117fcd2b16f38e0a0a62b13fa7 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
+stddev:   83.18 PSNR:  9.73 MAXDIFF:  217 bytes:  7603200/  7603200

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


[FFmpeg-cvslog] avcodec/dvaudio: add missing header include

2016-01-29 Thread James Almer
ffmpeg | branch: master | James Almer  | Fri Jan 29 13:57:15 
2016 -0300| [6cc156793d4f15d75b0498b34bf12e8cd6a0d7e0] | committer: James Almer

avcodec/dvaudio: add missing header include

Should fix make checkheaders

Signed-off-by: James Almer 

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

 libavcodec/dvaudio.h |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dvaudio.h b/libavcodec/dvaudio.h
index 577183c..e7f70c5 100644
--- a/libavcodec/dvaudio.h
+++ b/libavcodec/dvaudio.h
@@ -19,6 +19,8 @@
 #ifndef AVCODEC_DVAUDIO_H
 #define AVCODEC_DVAUDIO_H
 
+#include 
+
 static inline int dv_get_audio_sample_count(const uint8_t *buffer, int dsf)
 {
 int samples = buffer[0] & 0x3f; /* samples in this frame - min samples */

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


[FFmpeg-cvslog] libavutil/mastering_display_metadata.h: change fields to be rationals as this is how they are typically coded.

2016-01-29 Thread Neil Birkbeck
ffmpeg | branch: master | Neil Birkbeck  | Tue Jan 26 
14:14:20 2016 -0800| [c323c98ee34861de1ef21a5d20fa1dec3eb436d9] | committer: 
Michael Niedermayer

libavutil/mastering_display_metadata.h: change fields to be rationals as this 
is how they are typically coded.

(this structure is not referenced anywhere yet)

Signed-off-by: Neil Birkbeck 
Signed-off-by: Michael Niedermayer 

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

 libavutil/mastering_display_metadata.h |   10 ++
 libavutil/version.h|3 +--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/libavutil/mastering_display_metadata.h 
b/libavutil/mastering_display_metadata.h
index 781c1fd..936533f 100644
--- a/libavutil/mastering_display_metadata.h
+++ b/libavutil/mastering_display_metadata.h
@@ -22,6 +22,8 @@
 #define AVUTIL_MASTERING_DISPLAY_METADATA_H
 
 #include "frame.h"
+#include "rational.h"
+
 
 /**
  * Mastering display metadata capable of representing the color volume of
@@ -37,22 +39,22 @@ typedef struct AVMasteringDisplayMetadata {
 /**
  * CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
  */
-float display_primaries[3][2];
+AVRational display_primaries[3][2];
 
 /**
  * CIE 1931 xy chromaticity coords of white point.
  */
-float white_point[2];
+AVRational white_point[2];
 
 /**
  * Min luminance of mastering display (cd/m^2).
  */
-float min_luminance;
+AVRational min_luminance;
 
 /**
  * Max luminance of mastering display (cd/m^2).
  */
-float max_luminance;
+AVRational max_luminance;
 
 /**
  * Flag indicating whether the display primaries (and white point) are set.
diff --git a/libavutil/version.h b/libavutil/version.h
index b3127ff..8e1963c 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -65,7 +65,7 @@
 
 #define LIBAVUTIL_VERSION_MAJOR  55
 #define LIBAVUTIL_VERSION_MINOR  16
-#define LIBAVUTIL_VERSION_MICRO 100
+#define LIBAVUTIL_VERSION_MICRO 101
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
@@ -126,4 +126,3 @@
  */
 
 #endif /* AVUTIL_VERSION_H */
-

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


[FFmpeg-cvslog] avformat/avio: free url/avio options

2016-01-29 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Jan 28 23:49:06 2016 +0100| [8fac0d640341f1b26fed8c9af4c31cb9485d5fd5] | 
committer: Michael Niedermayer

avformat/avio: free url/avio options

Signed-off-by: Michael Niedermayer 

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

 libavformat/avio.c|1 +
 libavformat/aviobuf.c |1 +
 2 files changed, 2 insertions(+)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 05d0557..96b18fd 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -412,6 +412,7 @@ int ffurl_closep(URLContext **hh)
 av_opt_free(h->priv_data);
 av_freep(&h->priv_data);
 }
+av_opt_free(h);
 av_freep(hh);
 return ret;
 }
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index b56d113..9851981 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -956,6 +956,7 @@ int avio_close(AVIOContext *s)
 av_log(s, AV_LOG_DEBUG, "Statistics: %d seeks, %d writeouts\n", 
s->seek_count, s->writeout_count);
 else
 av_log(s, AV_LOG_DEBUG, "Statistics: %"PRId64" bytes read, %d 
seeks\n", s->bytes_read, s->seek_count);
+av_opt_free(s);
 av_free(s);
 return ffurl_close(h);
 }

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


[FFmpeg-cvslog] libavformat/network: use defined constant in poll

2016-01-29 Thread Zhao Zhili
ffmpeg | branch: master | Zhao Zhili  | Wed Jan 27 11:00:17 
2016 +0800| [1e2c2622120cd4dfb2a2cf32ee957807cee1e3f3] | committer: Michael 
Niedermayer

libavformat/network: use defined constant in poll

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/network.c b/libavformat/network.c
index 7a326d2..2fb1c8b 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -75,7 +75,7 @@ int ff_network_wait_fd(int fd, int write)
 int ev = write ? POLLOUT : POLLIN;
 struct pollfd p = { .fd = fd, .events = ev, .revents = 0 };
 int ret;
-ret = poll(&p, 1, 100);
+ret = poll(&p, 1, POLLING_TIME);
 return ret < 0 ? ff_neterrno() : p.revents & (ev | POLLERR | POLLHUP) ? 0 
: AVERROR(EAGAIN);
 }
 

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


[FFmpeg-cvslog] mpegtsenc: Do not fail ADTS AAC muxing if the first frame is not ADTS

2016-01-29 Thread Hagen Schmidt
ffmpeg | branch: master | Hagen Schmidt  | Tue Dec 
15 08:00:48 2015 +0100| [583a6431460ac62bd91328a8856fb07a445124ea] | committer: 
Michael Niedermayer

mpegtsenc: Do not fail ADTS AAC muxing if the first frame is not ADTS

Fixes ticket 279.

Signed-off-by: Michael Niedermayer 

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

 libavformat/mpegtsenc.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index a20e229..7656720 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1523,8 +1523,6 @@ static int mpegts_write_packet_internal(AVFormatContext 
*s, AVPacket *pkt)
 if (!ts_st->amux) {
 av_log(s, AV_LOG_ERROR, "AAC bitstream not in ADTS format "
 "and extradata missing\n");
-if (!st->nb_frames)
-return AVERROR_INVALIDDATA;
 } else {
 av_init_packet(&pkt2);
 pkt2.data = pkt->data;

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


[FFmpeg-cvslog] lavf/flvdec: Allow files where the PreviousTagSize is not set according to the spec.

2016-01-29 Thread Thierry Foucu
ffmpeg | branch: master | Thierry Foucu  | Fri Jan 29 
10:47:49 2016 -0800| [9a099526954962893f95d90ce202d07ea90d300c] | committer: 
Michael Niedermayer

lavf/flvdec: Allow files where the PreviousTagSize is not set according to the 
spec.

Some muxer use the FLV field PreviousTagSize to be the sum of tag
length. Without this change, the flv demuxer think the file is broken
and the re-sync will fail.

Signed-off-by: Michael Niedermayer 

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

 libavformat/flvdec.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e72bc81..5090ac2 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -60,6 +60,7 @@ typedef struct FLVContext {
 uint8_t resync_buffer[2*RESYNC_BUFFER_SIZE];
 
 int broken_sizes;
+int sum_flv_tag_size;
 } FLVContext;
 
 static int probe(AVProbeData *p, int live)
@@ -629,6 +630,7 @@ static int flv_read_metabody(AVFormatContext *s, int64_t 
next_pos)
 static int flv_read_header(AVFormatContext *s)
 {
 int offset, flags;
+FLVContext *flv = s->priv_data;
 
 avio_skip(s->pb, 4);
 flags = avio_r8(s->pb);
@@ -649,6 +651,7 @@ static int flv_read_header(AVFormatContext *s)
 avio_skip(s->pb, 4);
 
 s->start_time = 0;
+flv->sum_flv_tag_size = 0;
 
 return 0;
 }
@@ -857,6 +860,7 @@ retry:
 type = (avio_r8(s->pb) & 0x1F);
 orig_size =
 size = avio_rb24(s->pb);
+flv->sum_flv_tag_size += size + 11;
 dts  = avio_rb24(s->pb);
 dts |= (unsigned)avio_r8(s->pb) << 24;
 av_log(s, AV_LOG_TRACE, "type:%d, size:%d, last:%d, dts:%"PRId64" 
pos:%"PRId64"\n", type, size, last, dts, avio_tell(s->pb));
@@ -1141,7 +1145,7 @@ retry_duration:
 leave:
 last = avio_rb32(s->pb);
 if (last != orig_size + 11 &&
-(last != orig_size || !last) &&
+(last != orig_size || !last) && last != flv->sum_flv_tag_size &&
 !flv->broken_sizes) {
 av_log(s, AV_LOG_ERROR, "Packet mismatch %d %d\n", last, orig_size + 
11);
 avio_seek(s->pb, pos + 1, SEEK_SET);

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


[FFmpeg-cvslog] avcodec/amrwbdec: use av_mod_uintp2

2016-01-29 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Jan 18 18:36:48 
2016 -0300| [8514f6dcfd29191d9ec5768eb647326a0cd4e761] | committer: James Almer

avcodec/amrwbdec: use av_mod_uintp2

Reviewed-by: Michael Niedermayer 
Signed-off-by: James Almer 

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

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

diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index b73b700..a99dbd1 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -358,7 +358,7 @@ static void decode_pitch_vector(AMRWBContext *ctx,
 }
 
 /** Get x bits in the index interval [lsb,lsb+len-1] inclusive */
-#define BIT_STR(x,lsb,len) (((x) >> (lsb)) & ((1 << (len)) - 1))
+#define BIT_STR(x,lsb,len) av_mod_uintp2((x) >> (lsb), (len))
 
 /** Get the bit at specified position */
 #define BIT_POS(x, p) (((x) >> (p)) & 1)

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


[FFmpeg-cvslog] avcodec/pngdec: use av_mod_uintp2

2016-01-29 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Jan 18 18:37:36 
2016 -0300| [1bb3b90db8332dfc387c7bfecb98e53583596de1] | committer: James Almer

avcodec/pngdec: use av_mod_uintp2

Reviewed-by: Michael Niedermayer 
Signed-off-by: James Almer 

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

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

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 3059087..61857d0 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -787,7 +787,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, 
PNGDecContext *s,
 
 for (i = 0; i < length / 2; i++) {
 /* only use the least significant bits */
-v = bytestream2_get_be16(&s->gb) & ((1 << s->bit_depth) - 1);
+v = av_mod_uintp2(bytestream2_get_be16(&s->gb), s->bit_depth);
 
 if (s->bit_depth > 8)
 AV_WB16(&s->transparent_color_be[2 * i], v);

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


[FFmpeg-cvslog] avcodec/proresdec_lgpl: use av_mod_uintp2

2016-01-29 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Jan 18 18:37:55 
2016 -0300| [5893e8753702765ec4c2f775d7beef6afe7265e7] | committer: James Almer

avcodec/proresdec_lgpl: use av_mod_uintp2

Reviewed-by: Michael Niedermayer 
Signed-off-by: James Almer 

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

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

diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index 9e5674e..467a423 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -251,7 +251,7 @@ static int decode_picture_header(ProresContext *ctx, const 
uint8_t *buf,
   (1 << (4 + ctx->frame->interlaced_frame)) - 1) >>
  (4 + ctx->frame->interlaced_frame);
 
-remainder= ctx->num_x_mbs & ((1 << slice_width_factor) - 1);
+remainder= av_mod_uintp2(ctx->num_x_mbs, slice_width_factor);
 num_x_slices = (ctx->num_x_mbs >> slice_width_factor) + (remainder & 1) +
((remainder >> 1) & 1) + ((remainder >> 2) & 1);
 

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


[FFmpeg-cvslog] avcodec: Remove libaacplus

2016-01-29 Thread Timothy Gu
ffmpeg | branch: master | Timothy Gu  | Sun Jan 24 
09:49:12 2016 -0800| [9ba54c1b82a81581e5283da75c153a76f04324c0] | committer: 
Timothy Gu

avcodec: Remove libaacplus

TODO: bump minor

It's inferior in quality to fdk-aac and has an arguably more problematic
license.

As early as 2012, a HydrogenAudio user reported:

> It has however one huge advantage: much better quality at low bitrates than
> faac and libaacplus.

(https://hydrogenaud.io/index.php?PHPSESSID=ckiq394pdglka0kj2fin6ij8t7&topic=95989.msg804633#msg804633)

I myself have made a few spectrograms for a comparison of the two
encoders as well. The FDK output is consistently better than the
libaacplus one, in all bitrates I tested.

libaacplus license is 3GPP + LGPLv2. 3GPP copyright notice is completely
proprietory, as follows:

> No part may be reproduced except as authorized by written permission.
>
> The copyright and the foregoing restriction extend to reproduction in
> all media.
>
> © 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
>
> All rights reserved.

(The latest 26410-d00 zip from 3GPP has the same notice, but the copyright
year is changed to 2015)

The copyright part of the FDK AAC license (section 2) is a copyleft
license that permits redistribution under certain conditions (and
therefore the LGPL + libfdk-aac combination is not prohibited by
configure):

> Redistribution and use in source and binary forms, with or without
> modification, are permitted without payment of copyright license fees
> provided that you satisfy the following conditions:
>
> You must retain the complete text of this software license in
> redistributions of the FDK AAC Codec or your modifications thereto in
> source code form.
>
> You must retain the complete text of this software license in the
> documentation and/or other materials provided with redistributions of
> the FDK AAC Codec or your modifications thereto in binary form.
>
> You must make available free of charge copies of the complete source
> code of the FDK AAC Codec and your modifications thereto to recipients
> of copies in binary form.
>
> The name of Fraunhofer may not be used to endorse or promote products
> derived from this library without prior written permission.
>
> You may not charge copyright license fees for anyone to use, copy or
> distribute the FDK AAC Codec software or your modifications thereto.
>
> Your modified versions of the FDK AAC Codec must carry prominent
> notices stating that you changed the software and the date of any
> change. For modified versions of the FDK AAC Codec, the term
> "Fraunhofer FDK AAC Codec Library for Android" must be replaced by the
> term "Third-Party Modified Version of the Fraunhofer FDK AAC Codec
> Library for Android."

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

 Changelog   |1 +
 LICENSE.md  |2 +-
 configure   |5 --
 doc/general.texi|6 +-
 doc/platform.texi   |2 +-
 libavcodec/Makefile |1 -
 libavcodec/allcodecs.c  |1 -
 libavcodec/libaacplus.c |  150 ---
 8 files changed, 6 insertions(+), 162 deletions(-)

diff --git a/Changelog b/Changelog
index c2ae768..bd058ff 100644
--- a/Changelog
+++ b/Changelog
@@ -60,6 +60,7 @@ version :
 - convolution filter
 - libquvi support removed
 - support for dvaudio in wav and avi
+- libaacplus support removed
 
 
 version 2.8:
diff --git a/LICENSE.md b/LICENSE.md
index 4c4a845..0c53d0f 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -104,7 +104,7 @@ license version needs to be upgraded by passing 
`--enable-version3` to configure
 incompatible libraries
 --
 
-The Fraunhofer AAC library, FAAC and aacplus are under licenses which
+The Fraunhofer AAC library and FAAC are under licenses which
 are incompatible with the GPLv2 and v3. We do not know for certain if their
 licenses are compatible with the LGPL.
 If you wish to enable these libraries, pass `--enable-nonfree` to configure.
diff --git a/configure b/configure
index 4fceaaa..aff9666 100755
--- a/configure
+++ b/configure
@@ -207,7 +207,6 @@ External library support:
if openssl is not used [no]
   --disable-iconv  disable iconv [autodetect]
   --enable-ladspa  enable LADSPA audio filtering [no]
-  --enable-libaacplus  enable AAC+ encoding via libaacplus [no]
   --enable-libass  enable libass subtitles rendering,
needed for subtitles and ass filter [no]
   --enable-libbluray   enable BluRay reading using libbluray [no]
@@ -1435,7 +1434,6 @@ EXTERNAL_LIBRARY_LIST="
 gnutls
 iconv
 ladspa
-libaacplus
 libass
 libbluray
 libbs2b
@@ -2604,7 +2602,6 @@ mjpeg2jpeg_bsf_select="jpegtables"
 
 # external libraries
 chromaprint_muxer_deps="chromaprint"
-libaacplus_encoder_deps="libaacplus"
 libcelt_decoder_deps="libcelt"
 lib

[FFmpeg-cvslog] avcodec: Remove libvo-aacenc support.

2016-01-29 Thread Kieran Kunhya
ffmpeg | branch: master | Kieran Kunhya  | Fri Jan 29 
17:23:33 2016 -0800| [e07e88cd82f78644ddcb10d7d3e0dd624fffe274] | committer: 
Timothy Gu

avcodec: Remove libvo-aacenc support.

The internal encoder is superior to libvo-aacenc.

Signed-off-by: Timothy Gu 

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

 Changelog |2 +-
 configure |6 --
 doc/encoders.texi |   25 --
 doc/general.texi  |   12 +--
 libavcodec/Makefile   |1 -
 libavcodec/allcodecs.c|1 -
 libavcodec/libvo-aacenc.c |  200 -
 libavcodec/version.h  |4 +-
 8 files changed, 5 insertions(+), 246 deletions(-)

diff --git a/Changelog b/Changelog
index bd058ff..8de4fd7 100644
--- a/Changelog
+++ b/Changelog
@@ -60,7 +60,7 @@ version :
 - convolution filter
 - libquvi support removed
 - support for dvaudio in wav and avi
-- libaacplus support removed
+- libaacplus and libvo-aacenc support removed
 
 
 version 2.8:
diff --git a/configure b/configure
index aff9666..dba8180 100755
--- a/configure
+++ b/configure
@@ -254,7 +254,6 @@ External library support:
   --enable-libutvideo  enable Ut Video encoding and decoding via 
libutvideo [no]
   --enable-libv4l2 enable libv4l2/v4l-utils [no]
   --enable-libvidstab  enable video stabilization using vid.stab [no]
-  --enable-libvo-aacencenable AAC encoding via libvo-aacenc [no]
   --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
   --enable-libvorbis   enable Vorbis en/decoding via libvorbis,
native implementation exists [no]
@@ -1479,7 +1478,6 @@ EXTERNAL_LIBRARY_LIST="
 libutvideo
 libv4l2
 libvidstab
-libvo_aacenc
 libvo_amrwbenc
 libvorbis
 libvpx
@@ -2641,8 +2639,6 @@ libtheora_encoder_deps="libtheora"
 libtwolame_encoder_deps="libtwolame"
 libutvideo_decoder_deps="libutvideo"
 libutvideo_encoder_deps="libutvideo"
-libvo_aacenc_encoder_deps="libvo_aacenc"
-libvo_aacenc_encoder_select="audio_frame_queue"
 libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
 libvorbis_decoder_deps="libvorbis"
 libvorbis_encoder_deps="libvorbis"
@@ -4894,7 +4890,6 @@ die_license_disabled version3 gmp
 die_license_disabled version3 libopencore_amrnb
 die_license_disabled version3 libopencore_amrwb
 die_license_disabled version3 libsmbclient
-die_license_disabled version3 libvo_aacenc
 die_license_disabled version3 libvo_amrwbenc
 
 enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
@@ -5519,7 +5514,6 @@ enabled libtwolame&& require libtwolame twolame.h 
twolame_init -ltwolame
 enabled libutvideo&& require_cpp utvideo "stdint.h stdlib.h 
utvideo/utvideo.h utvideo/Codec.h" 'CCodec*' -lutvideo -lstdc++
 enabled libv4l2   && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
 enabled libvidstab&& require_pkg_config "vidstab >= 0.98" 
vid.stab/libvidstab.h vsMotionDetectInit
-enabled libvo_aacenc  && require libvo_aacenc vo-aacenc/voAAC.h 
voGetAACEncAPI -lvo-aacenc
 enabled libvo_amrwbenc&& require libvo_amrwbenc vo-amrwbenc/enc_if.h 
E_IF_init -lvo-amrwbenc
 enabled libvorbis && require libvorbis vorbis/vorbisenc.h 
vorbis_info_init -lvorbisenc -lvorbis -logg
 
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 33699df..c485f90 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1075,31 +1075,6 @@ Set MPEG audio original flag when set to 1. The default 
value is 0
 
 @end table
 
-@anchor{libvo-aacenc}
-@section libvo-aacenc
-
-VisualOn AAC encoder.
-
-Requires the presence of the libvo-aacenc headers and library during
-configuration. You need to explicitly configure the build with
-@code{--enable-libvo-aacenc --enable-version3}.
-
-This encoder is considered to be worse than the
-@ref{aacenc,,native FFmpeg AAC encoder}, according to
-multiple sources.
-
-@subsection Options
-
-The VisualOn AAC encoder only support encoding AAC-LC and up to 2
-channels. It is also CBR-only.
-
-@table @option
-
-@item b
-Set bit rate in bits/s.
-
-@end table
-
 @section libvo-amrwbenc
 
 VisualOn Adaptive Multi-Rate Wideband encoder.
diff --git a/doc/general.texi b/doc/general.texi
index d66e60a..4e6698c 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -53,14 +53,6 @@ instructions for installing the libraries.
 Then pass @code{--enable-libopencore-amrnb} and/or
 @code{--enable-libopencore-amrwb} to configure to enable them.
 
-@subsection VisualOn AAC encoder library
-
-FFmpeg can make use of the VisualOn AACenc library for AAC encoding.
-
-Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
-instructions for installing the library.
-Then pass @code{--enable-libvo-aacenc} to configure to enable it.
-
 @subsection VisualOn AMR-WB encoder library
 
 FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
@@ -881,8 +873,8 @@ following image format