[FFmpeg-cvslog] doc/filters: add one lowpass filter example

2017-04-29 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sat Apr 29 11:44:21 
2017 +0200| [b8b0cece794d8338ec79833c55e77d53888f800f] | committer: Paul B Mahol

doc/filters: add one lowpass filter example

Signed-off-by: Paul B Mahol 

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

 doc/filters.texi | 9 +
 1 file changed, 9 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 2fe7ff7b8c..d49fec1264 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3002,6 +3002,15 @@ The default is 0.707q and gives a Butterworth response.
 Specify which channels to filter, by default all available are filtered.
 @end table
 
+@subsection Examples
+@itemize
+@item
+Lowpass only LFE channel, it LFE is not present it does nothing:
+@example
+lowpass=c=LFE
+@end example
+@end itemize
+
 @anchor{pan}
 @section pan
 

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


[FFmpeg-cvslog] Merge commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66'

2017-04-29 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Apr 29 12:43:37 
2017 +0200| [fe86fa7c0abfd37b26f1015510d2412735c91ea9] | committer: Clément 
Bœsch

Merge commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66'

* commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66':
  Changelog: add some missing entries

Merged-by: Clément Bœsch 

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

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

diff --git a/Changelog b/Changelog
index f1fb014cdb..6deda6d64d 100644
--- a/Changelog
+++ b/Changelog
@@ -39,6 +39,7 @@ version 3.3:
 - MPEG-7 Video Signature filter
 - Removed asyncts filter (use af_aresample instead)
 - Intel QSV-accelerated VP8 video decoding
+- VAAPI-accelerated deinterlacing
 
 
 version 3.2:


==

diff --cc Changelog
index f1fb014cdb,ab7f1b6bb0..6deda6d64d
--- a/Changelog
+++ b/Changelog
@@@ -2,297 -2,24 +2,298 @@@ Entries are sorted chronologically fro
  releases are sorted from youngest to oldest.
  
  version :
 +- deflicker video filter
 +- doubleweave video filter
 +- lumakey video filter
 +
 +version 3.3:
 +- CrystalHD decoder moved to new decode API
 +- add internal ebur128 library, remove external libebur128 dependency
 +- Pro-MPEG CoP #3-R2 FEC protocol
 +- premultiply video filter
  - Support for spherical videos
 -- Intel QSV-accelerated VP8 and VC-1 decoding
 -- VAAPI-accelerated VP8 decoding
 +- configure now fails if autodetect-libraries are requested but not found
 +- PSD Decoder
 +- 16.8 floating point pcm decoder
 +- 24.0 floating point pcm decoder
 +- Apple Pixlet decoder
 +- QDMC audio decoder
 +- NewTek SpeedHQ decoder
 +- MIDI Sample Dump Standard demuxer
 +- readeia608 filter
 +- Sample Dump eXchange demuxer
 +- abitscope multimedia filter
 +- Scenarist Closed Captions demuxer and muxer
 +- threshold filter
 +- midequalizer filter
 +- Optimal Huffman tables for (M)JPEG encoding
 +- VAAPI-accelerated MPEG-2 and VP8 encoding
 +- FM Screen Capture Codec decoder
 +- native Opus encoder
 +- ScreenPressor decoder
 +- incomplete ClearVideo decoder
 +- Intel QSV video scaling and deinterlacing filters
 +- Support MOV with multiple sample description tables
 +- XPM decoder
 +- Removed the legacy X11 screen grabber, use XCB instead
 +- MPEG-7 Video Signature filter
 +- Removed asyncts filter (use af_aresample instead)
 +- Intel QSV-accelerated VP8 video decoding
+ - VAAPI-accelerated deinterlacing
  
  
 -version 12:
 -- aliases and defaults for Ogg subtypes (opus, spx)
 -- HEVC/H.265 RTP payload format (draft v6) packetizer and depacketizer
 -- avplay now exits by default at the end of playback
 -- XCB-based screen-grabber
 -- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
 -- H.261 RTP payload format (RFC 4587) depacketizer and experimental packetizer
 +version 3.2:
 +- libopenmpt demuxer
 +- tee protocol
 +- Changed metadata print option to accept general urls
 +- Alias muxer for Ogg Video (.ogv)
 +- VP8 in Ogg muxing
 +- curves filter doesn't automatically insert points at x=0 and x=1 anymore
 +- 16-bit support in curves filter and selectivecolor filter
 +- OpenH264 decoder wrapper
 +- MediaCodec H.264/HEVC/MPEG-4/VP8/VP9 hwaccel
 +- True Audio (TTA) muxer
 +- crystalizer audio filter
 +- acrusher audio filter
 +- bitplanenoise video filter
 +- floating point support in als decoder
 +- fifo muxer
 +- maskedclamp filter
 +- hysteresis filter
 +- lut2 filter
 +- yuvtestsrc filter
 +- CUDA CUVID H.263/VP8/VP9/10 bit HEVC (Dithered) Decoding
 +- vaguedenoiser filter
 +- added threads option per filter instance
 +- weave filter
 +- gblur filter
 +- avgblur filter
 +- sobel and prewitt filter
 +- MediaCodec HEVC/MPEG-4/VP8/VP9 decoding
 +- Meridian Lossless Packing (MLP) / TrueHD encoder
 +- Non-Local Means (nlmeans) denoising filter
 +- sdl2 output device and ffplay support
 +- sdl1 output device and sdl1 support removed
 +- extended mov edit list support
 +- libfaac encoder removed
 +- Matroska muxer now writes CRC32 elements by default in all Level 1 elements
 +- sidedata video and asidedata audio filter
 +- Changed mapping of rtp MIME type G726 to codec g726le.
 +- spec compliant VAAPI/DXVA2 VC-1 decoding of slices in frame-coded images
 +
 +
 +version 3.1:
 +- DXVA2-accelerated HEVC Main10 decoding
 +- fieldhint filter
 +- loop video filter and aloop audio filter
 +- Bob Weaver deinterlacing filter
 +- firequalizer filter
 +- datascope filter
 +- bench and abench filters
 +- ciescope filter
 +- protocol blacklisting API
 +- MediaCodec H264 decoding
 +- VC-2 HQ RTP payload format (draft v1) depacketizer and packetizer
 +- VP9 RTP payload format (draft v2) packetizer
 +- AudioToolbox audio decoders
 +- AudioToolbox audio encoders
 +- coreimage filter (GPU based image filtering on OSX)
 +- libdcadec removed
 +- bitstream filter for extracting DTS core
 +- ADPCM IMA DAT4 decoder
 +- musx demuxer
 +- aix demuxer
 +

[FFmpeg-cvslog] Changelog: add some missing entries

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Thu Dec 15 
10:23:26 2016 +0100| [1783d7ec03d730c5bd96c07bc5fa7aa566f85c66] | committer: 
Anton Khirnov

Changelog: add some missing entries

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

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

diff --git a/Changelog b/Changelog
index feb151cf3c..ab7f1b6bb0 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,9 @@ releases are sorted from youngest to oldest.
 
 version :
 - Support for spherical videos
+- Intel QSV-accelerated VP8 and VC-1 decoding
+- VAAPI-accelerated VP8 decoding
+- VAAPI-accelerated deinterlacing
 
 
 version 12:

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


[FFmpeg-cvslog] hevcdec: add a VAAPI hwaccel

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sun Oct  2 
08:51:32 2016 +0200| [ea8b730d8e67152107d7fcdd5590bbb51ec236b1] | committer: 
Anton Khirnov

hevcdec: add a VAAPI hwaccel

Partially based on a patch by Timo Rothenpieler .
Additional scaling list handling fix by Jun Zhao .

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

 Changelog |   2 +-
 configure |   3 +
 libavcodec/Makefile   |   1 +
 libavcodec/allcodecs.c|   1 +
 libavcodec/hevcdec.c  |   6 +-
 libavcodec/vaapi_decode.c |   1 +
 libavcodec/vaapi_hevc.c   | 439 ++
 libavcodec/version.h  |   2 +-
 8 files changed, 452 insertions(+), 3 deletions(-)

diff --git a/Changelog b/Changelog
index ab7f1b6bb0..e17ef204a6 100644
--- a/Changelog
+++ b/Changelog
@@ -4,7 +4,7 @@ releases are sorted from youngest to oldest.
 version :
 - Support for spherical videos
 - Intel QSV-accelerated VP8 and VC-1 decoding
-- VAAPI-accelerated VP8 decoding
+- VAAPI-accelerated VP8 and HEVC decoding
 - VAAPI-accelerated deinterlacing
 
 
diff --git a/configure b/configure
index 365bbb2bf2..d30d38445e 100755
--- a/configure
+++ b/configure
@@ -2157,6 +2157,8 @@ hevc_d3d11va_hwaccel_select="hevc_decoder"
 hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
 hevc_dxva2_hwaccel_select="hevc_decoder"
 hevc_qsv_hwaccel_deps="libmfx"
+hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC"
+hevc_vaapi_hwaccel_select="hevc_decoder"
 hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC"
 hevc_vdpau_hwaccel_select="hevc_decoder"
 mpeg1_vdpau_hwaccel_deps="vdpau"
@@ -4569,6 +4571,7 @@ check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" 
-DWINAPI_FAMILY=WINAPI_FAMIL
 check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
 check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
 
+check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
 check_type "va/va.h va/va_dec_vp8.h" "VAPictureParameterBufferVP8"
 check_type "va/va.h va/va_vpp.h" "VAProcPipelineParameterBuffer"
 check_type "va/va.h va/va_enc_h264.h" "VAEncPictureParameterBufferH264"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index f07253a84d..239a4c0f0a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -629,6 +629,7 @@ OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
 OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL)   += dxva2_hevc.o
 OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o
 OBJS-$(CONFIG_HEVC_QSV_HWACCEL)   += qsvdec_h2645.o
+OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL) += vaapi_hevc.o
 OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o
 OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL)+= vdpau_mpeg12.o
 OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL)  += dxva2_mpeg2.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 591fd87339..74cbc8ff03 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -79,6 +79,7 @@ void avcodec_register_all(void)
 REGISTER_HWACCEL(HEVC_D3D11VA,  hevc_d3d11va);
 REGISTER_HWACCEL(HEVC_DXVA2,hevc_dxva2);
 REGISTER_HWACCEL(HEVC_QSV,  hevc_qsv);
+REGISTER_HWACCEL(HEVC_VAAPI,hevc_vaapi);
 REGISTER_HWACCEL(HEVC_VDPAU,hevc_vdpau);
 REGISTER_HWACCEL(MPEG1_VDPAU,   mpeg1_vdpau);
 REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va);
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 147243e3fe..8326690038 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -382,7 +382,8 @@ static void export_stream_params(AVCodecContext *avctx, 
const HEVCParamSets *ps,
 
 static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
 {
-#define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + 
CONFIG_HEVC_D3D11VA_HWACCEL + CONFIG_HEVC_VDPAU_HWACCEL)
+#define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + 
CONFIG_HEVC_D3D11VA_HWACCEL + \
+ CONFIG_HEVC_VAAPI_HWACCEL + CONFIG_HEVC_VDPAU_HWACCEL)
 enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
 
 if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == 
AV_PIX_FMT_YUVJ420P ||
@@ -390,6 +391,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const 
HEVCSPS *sps)
 #if CONFIG_HEVC_DXVA2_HWACCEL
 *fmt++ = AV_PIX_FMT_DXVA2_VLD;
 #endif
+#if CONFIG_HEVC_VAAPI_HWACCEL
+*fmt++ = AV_PIX_FMT_VAAPI;
+#endif
 }
 if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == 
AV_PIX_FMT_YUVJ420P) {
 #if CONFIG_HEVC_D3D11VA_HWACCEL
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index b02f2b8cf3..88bd889515 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -250,6 +250,7 @@ static const struct {
 MAP(H264,H264_HIGH,   H264High),
 #if VA_CHECK_VERSION(0, 37, 0)
 MAP(HEVC,HEVC_MAIN,   HEVCMain),
+MAP(HEVC,HEVC_MAIN_10,HEVCMain10  ),
 #endif
 MAP(WMV3,VC1_SIMPLE,  VC1

[FFmpeg-cvslog] Merge commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1'

2017-04-29 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Apr 29 12:45:21 
2017 +0200| [b893f3f54333eebd4909d447852e98615af785a9] | committer: Clément 
Bœsch

Merge commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1'

* commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1':
  hevcdec: add a VAAPI hwaccel

This commit is a noop, see adb54e59c18db347f39e55832104fc3e40a3c42b

Merged-by: Clément Bœsch 

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



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


[FFmpeg-cvslog] Merge commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9'

2017-04-29 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Apr 29 12:46:00 
2017 +0200| [5729acee8214170f212b6409ac363428152d05ff] | committer: Clément 
Bœsch

Merge commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9'

* commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9':
  vaapi_decode: use the correct logging context

This commit is a noop, see 79307ae56374b35cf12563a7c8e3e759658f847e

Merged-by: Clément Bœsch 

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



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


[FFmpeg-cvslog] vaapi_decode: use the correct logging context

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Mon Dec 19 
08:13:28 2016 +0100| [cfa4eb4fba782f3f37a33be997b27a91a07053c9] | committer: 
Anton Khirnov

vaapi_decode: use the correct logging context

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

 libavcodec/vaapi_decode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 88bd889515..42f03ab141 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -306,7 +306,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
 vas = vaQueryConfigProfiles(ctx->hwctx->display,
 profile_list, &profile_count);
 if (vas != VA_STATUS_SUCCESS) {
-av_log(ctx, AV_LOG_ERROR, "Failed to query profiles: "
+av_log(avctx, AV_LOG_ERROR, "Failed to query profiles: "
"%d (%s).\n", vas, vaErrorStr(vas));
 err = AVERROR(ENOSYS);
 goto fail;
@@ -338,7 +338,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
 av_freep(&profile_list);
 
 if (profile == VAProfileNone) {
-av_log(ctx, AV_LOG_ERROR, "No support for codec %s "
+av_log(avctx, AV_LOG_ERROR, "No support for codec %s "
"profile %d.\n", codec_desc->name, avctx->profile);
 err = AVERROR(ENOSYS);
 goto fail;
@@ -390,7 +390,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
 avctx->coded_height < constraints->min_height ||
 avctx->coded_width  > constraints->max_width  ||
 avctx->coded_height > constraints->max_height) {
-av_log(ctx, AV_LOG_ERROR, "Hardware does not support image "
+av_log(avctx, AV_LOG_ERROR, "Hardware does not support image "
"size %dx%d (constraints: width %d-%d height %d-%d).\n",
avctx->coded_width, avctx->coded_height,
constraints->min_width,  constraints->max_width,

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


[FFmpeg-cvslog] mov: fix a possible invalid read in mov_read_mac_string()

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sat Dec 17 
14:17:20 2016 +0100| [46191a2da16f751e53d93646ae1388d421d12bee] | committer: 
Anton Khirnov

mov: fix a possible invalid read in mov_read_mac_string()

When the input string is too large, so the second condition in if ()
fails, the code will erroneously execute the else branch, indexing the
mac_to_unicode table with a negative index.

CC: libav-sta...@libav.org
Bug-Id: 1000
Found-By: Kamil Frankowicz

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7fe639dd5e..ed10a15625 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -161,7 +161,11 @@ static int mov_read_mac_string(MOVContext *c, AVIOContext 
*pb, int len,
 
 for (i = 0; i < len; i++) {
 uint8_t t, c = avio_r8(pb);
-if (c < 0x80 && p < end)
+
+if (p >= end)
+continue;
+
+if (c < 0x80)
 *p++ = c;
 else
 PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);

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


[FFmpeg-cvslog] Merge commit '46191a2da16f751e53d93646ae1388d421d12bee'

2017-04-29 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Apr 29 12:46:48 
2017 +0200| [e166fe2e1f0ae175a6b7f1f4b137c1366fd7f633] | committer: Clément 
Bœsch

Merge commit '46191a2da16f751e53d93646ae1388d421d12bee'

* commit '46191a2da16f751e53d93646ae1388d421d12bee':
  mov: fix a possible invalid read in mov_read_mac_string()

Merged-by: Clément Bœsch 

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 03fd90e3d3..afef53b79a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -162,7 +162,11 @@ static int mov_read_mac_string(MOVContext *c, AVIOContext 
*pb, int len,
 
 for (i = 0; i < len; i++) {
 uint8_t t, c = avio_r8(pb);
-if (c < 0x80 && p < end)
+
+if (p >= end)
+continue;
+
+if (c < 0x80)
 *p++ = c;
 else if (p < end)
 PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);


==

diff --cc libavformat/mov.c
index 03fd90e3d3,ed10a15625..afef53b79a
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@@ -162,9 -161,13 +162,13 @@@ static int mov_read_mac_string(MOVConte
  
  for (i = 0; i < len; i++) {
  uint8_t t, c = avio_r8(pb);
- if (c < 0x80 && p < end)
+ 
+ if (p >= end)
+ continue;
+ 
+ if (c < 0x80)
  *p++ = c;
 -else
 +else if (p < end)
  PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);
  }
  *p = 0;

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


[FFmpeg-cvslog] mpegvideo_parser: avoid signed overflow in bitrate calculation

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sat Dec 17 
15:07:51 2016 +0100| [58405de0951a843765625159402870c1eea3c3b1] | committer: 
Anton Khirnov

mpegvideo_parser: avoid signed overflow in bitrate calculation

CC: libav-sta...@libav.org
Bug-Id: 981
Found-By: Agostino Sarubbo

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

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

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 27f2985509..500d1240ef 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -97,7 +97,14 @@ static void mpegvideo_extract_headers(AVCodecParserContext 
*s,
 
 pc->width  |=(horiz_size_ext << 12);
 pc->height |=( vert_size_ext << 12);
-avctx->bit_rate += (bit_rate_ext << 18) * 400;
+
+bit_rate_ext <<= 18;
+if (bit_rate_ext < INT_MAX / 400 &&
+bit_rate_ext * 400 < INT_MAX - avctx->bit_rate) {
+avctx->bit_rate += bit_rate_ext * 400;
+} else
+avctx->bit_rate = 0;
+
 if(did_set_size)
 ff_set_dimensions(avctx, pc->width, pc->height);
 avctx->framerate.num = pc->frame_rate.num * 
(frame_rate_ext_n + 1) * 2;

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


[FFmpeg-cvslog] mpeg12dec: avoid signed overflow in bitrate calculation

2017-04-29 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Sat Dec 17 
15:07:51 2016 +0100| [e807491fc6a336e4becc0cbc981274a8fde18aba] | committer: 
Anton Khirnov

mpeg12dec: avoid signed overflow in bitrate calculation

CC: libav-sta...@libav.org
Bug-Id: 981
Found-By: Agostino Sarubbo

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

 libavcodec/mpeg12dec.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 2d9c99d63f..310169becc 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1358,8 +1358,17 @@ static void mpeg_decode_sequence_extension(Mpeg1Context 
*s1)
 vert_size_ext   = get_bits(&s->gb, 2);
 s->width  |= (horiz_size_ext << 12);
 s->height |= (vert_size_ext  << 12);
-bit_rate_ext = get_bits(&s->gb, 12);  /* XXX: handle it */
-s->bit_rate += (bit_rate_ext << 18) * 400;
+
+bit_rate_ext = get_bits(&s->gb, 12) << 18;
+if (bit_rate_ext < INT_MAX / 400 &&
+bit_rate_ext * 400 < INT_MAX - s->bit_rate) {
+s->bit_rate += bit_rate_ext * 400;
+} else {
+av_log(s->avctx, AV_LOG_WARNING, "Invalid bit rate extension value: 
%d\n",
+   bit_rate_ext >> 18);
+s->bit_rate = 0;
+}
+
 skip_bits1(&s->gb); /* marker */
 s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10;
 

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


[FFmpeg-cvslog] Merge commit 'e807491fc6a336e4becc0cbc981274a8fde18aba'

2017-04-29 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Apr 29 13:49:06 
2017 +0200| [85452f9ab7aaa6417e8c8b1b2eb285e7dce55a9c] | committer: Clément 
Bœsch

Merge commit 'e807491fc6a336e4becc0cbc981274a8fde18aba'

* commit 'e807491fc6a336e4becc0cbc981274a8fde18aba':
  mpeg12dec: avoid signed overflow in bitrate calculation
  mpegvideo_parser: avoid signed overflow in bitrate calculation

This merge is a noop.

2017-04-29 12:54:15 @ubitux michaelni: is 
740959fdbfbf804ccd8a6e426b1b1ba321fe5cfb enough to fix the overflow fixed in 
58405de0951a843765625159402870c1eea3c3b1?
2017-04-29 12:55:53 @ubitux same question with 
e807491fc6a336e4becc0cbc981274a8fde18aba
2017-04-29 13:21:45 michaelni   ubitux, the libav code refered to is 
wrong for us and i doubt the problem it fixes applies to us.
2017-04-29 13:24:29 @ubitux michaelni: ok, for both commits?
2017-04-29 13:33:55 michaelni   yes, they do more or less the same thing

Merged-by: Clément Bœsch 

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



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


[FFmpeg-cvslog] avfilter: add video oscilloscope filter

2017-04-29 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Tue Apr 25 19:31:05 
2017 +0200| [399c7ab9c6bc9e683c5a60b34d50290ae563e2f1] | committer: Paul B Mahol

avfilter: add video oscilloscope filter

Signed-off-by: Paul B Mahol 

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

 Changelog  |   2 +
 doc/filters.texi   |  78 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_datascope.c | 381 +
 5 files changed, 463 insertions(+)

diff --git a/Changelog b/Changelog
index 6deda6d64d..faaaf8a493 100644
--- a/Changelog
+++ b/Changelog
@@ -5,6 +5,8 @@ version :
 - deflicker video filter
 - doubleweave video filter
 - lumakey video filter
+- pixscope video filter
+- oscilloscope video filter
 
 version 3.3:
 - CrystalHD decoder moved to new decode API
diff --git a/doc/filters.texi b/doc/filters.texi
index 773ab246b2..119e7474a5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10233,6 +10233,84 @@ other parameters is 0.
 These parameters correspond to the parameters assigned to the
 libopencv function @code{cvSmooth}.
 
+@section oscilloscope
+
+2D Video Oscilloscope.
+
+Useful to measure spatial impulse, step responses, chroma delays, etc.
+
+It accepts the following parameters:
+
+@table @option
+@item x
+Set scope center x position.
+
+@item y
+Set scope center y position.
+
+@item s
+Set scope size, relative to frame diagonal.
+
+@item t
+Set scope tilt/rotation.
+
+@item o
+Set trace opacity.
+
+@item tx
+Set trace center x position.
+
+@item ty
+Set trace center y position.
+
+@item tw
+Set trace width, relative to width of frame.
+
+@item th
+Set trace height, relative to height of frame.
+
+@item c
+Set which components to trace. By default it traces first three components.
+
+@item g
+Draw trace grid. By default is enabled.
+
+@item st
+Draw some statistics. By default is enabled.
+
+@item sc
+Draw scope. By default is enabled.
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Inspect full first row of video frame.
+@example
+oscilloscope=x=0.5:y=0:s=1
+@end example
+
+@item
+Inspect full last row of video frame.
+@example
+oscilloscope=x=0.5:y=1:s=1
+@end example
+
+@item
+Inspect full 5th line of video frame of height 1080.
+@example
+oscilloscope=x=0.5:y=5/1080:s=1
+@end example
+
+@item
+Inspect full last column of video frame.
+@example
+oscilloscope=x=1:y=0.5:s=1:t=1
+@end example
+
+@end itemize
+
 @anchor{overlay}
 @section overlay
 
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index e40c6fea32..66c36e4d1d 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -236,6 +236,7 @@ OBJS-$(CONFIG_NULL_FILTER)   += vf_null.o
 OBJS-$(CONFIG_OCR_FILTER)+= vf_ocr.o
 OBJS-$(CONFIG_OCV_FILTER)+= vf_libopencv.o
 OBJS-$(CONFIG_OPENCL)+= deshake_opencl.o 
unsharp_opencl.o
+OBJS-$(CONFIG_OSCILLOSCOPE_FILTER)   += vf_datascope.o
 OBJS-$(CONFIG_OVERLAY_FILTER)+= vf_overlay.o dualinput.o 
framesync.o
 OBJS-$(CONFIG_OWDENOISE_FILTER)  += vf_owdenoise.o
 OBJS-$(CONFIG_PAD_FILTER)+= vf_pad.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 0852b54e6f..8fb87eb81e 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -246,6 +246,7 @@ static void register_all(void)
 REGISTER_FILTER(NULL,   null,   vf);
 REGISTER_FILTER(OCR,ocr,vf);
 REGISTER_FILTER(OCV,ocv,vf);
+REGISTER_FILTER(OSCILLOSCOPE,   oscilloscope,   vf);
 REGISTER_FILTER(OVERLAY,overlay,vf);
 REGISTER_FILTER(OWDENOISE,  owdenoise,  vf);
 REGISTER_FILTER(PAD,pad,vf);
diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c
index 37425b4508..476e65f6c6 100644
--- a/libavfilter/vf_datascope.c
+++ b/libavfilter/vf_datascope.c
@@ -641,3 +641,384 @@ AVFilter ff_vf_pixscope = {
 .inputs= pixscope_inputs,
 .outputs   = pixscope_outputs,
 };
+
+typedef struct PixelValues {
+uint16_t p[4];
+} PixelValues;
+
+typedef struct OscilloscopeContext {
+const AVClass *class;
+
+float xpos, ypos;
+float tx, ty;
+float size;
+float tilt;
+float theight, twidth;
+float o;
+int components;
+int grid;
+int statistics;
+int scope;
+
+int x1, y1, x2, y2;
+int ox, oy;
+int height, width;
+
+int max;
+int nb_planes;
+int nb_comps;
+int is_rgb;
+uint8_t rgba_map[4];
+FFDrawContext draw;
+FFDrawColor   dark;
+FFDrawColor   black;
+FFDrawColor   white;
+FFDrawColor   green;
+FFDrawColor   blue;
+FFDrawColor   red;
+FFDrawColor   cyan;
+FFDrawColor   magenta;
+FFDrawColor   gray;
+FFDrawColor  *colors[4];
+
+int nb_values;
+PixelVa

[FFmpeg-cvslog] avfilter: add pixscope filter

2017-04-29 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sat Apr 22 22:02:49 
2017 +0200| [8341d0dd0e5fe5aecc2f4aca7e8447e6aeb7c124] | committer: Paul B Mahol

avfilter: add pixscope filter

Signed-off-by: Paul B Mahol 

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

 doc/filters.texi   |  23 +
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/version.h  |   2 +-
 libavfilter/vf_datascope.c | 236 +++--
 5 files changed, 255 insertions(+), 8 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index d49fec1264..773ab246b2 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10925,6 +10925,29 @@ format=monow, pixdesctest
 
 can be used to test the monowhite pixel format descriptor definition.
 
+@section pixscope
+
+Display sample values of color channels. Mainly useful for checking color and 
levels.
+
+The filters accept the following options:
+
+@table @option
+@item x
+Set scope X position, offset on X axis.
+
+@item y
+Set scope Y position, offset on Y axis.
+
+@item w
+Set scope width.
+
+@item h
+Set scope height.
+
+@item o
+Set window opacity. This window also holds statistics about pixel area.
+@end table
+
 @section pp
 
 Enable the specified chain of postprocessing subfilters using libpostproc. This
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 074c6907ef..e40c6fea32 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -245,6 +245,7 @@ OBJS-$(CONFIG_PERMS_FILTER)  += f_perms.o
 OBJS-$(CONFIG_PERSPECTIVE_FILTER)+= vf_perspective.o
 OBJS-$(CONFIG_PHASE_FILTER)  += vf_phase.o
 OBJS-$(CONFIG_PIXDESCTEST_FILTER)+= vf_pixdesctest.o
+OBJS-$(CONFIG_PIXSCOPE_FILTER)   += vf_datascope.o
 OBJS-$(CONFIG_PP_FILTER) += vf_pp.o
 OBJS-$(CONFIG_PP7_FILTER)+= vf_pp7.o
 OBJS-$(CONFIG_PREMULTIPLY_FILTER)+= vf_premultiply.o framesync.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index c69f79e6ac..0852b54e6f 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -255,6 +255,7 @@ static void register_all(void)
 REGISTER_FILTER(PERSPECTIVE,perspective,vf);
 REGISTER_FILTER(PHASE,  phase,  vf);
 REGISTER_FILTER(PIXDESCTEST,pixdesctest,vf);
+REGISTER_FILTER(PIXSCOPE,   pixscope,   vf);
 REGISTER_FILTER(PP, pp, vf);
 REGISTER_FILTER(PP7,pp7,vf);
 REGISTER_FILTER(PREMULTIPLY,premultiply,vf);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 2fa8dbda95..fb232c8e8a 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   6
-#define LIBAVFILTER_VERSION_MINOR  87
+#define LIBAVFILTER_VERSION_MINOR  88
 #define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c
index 01a5d992b0..37425b4508 100644
--- a/libavfilter/vf_datascope.c
+++ b/libavfilter/vf_datascope.c
@@ -76,7 +76,7 @@ static int query_formats(AVFilterContext *ctx)
 return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
 }
 
-static void draw_text(DatascopeContext *s, AVFrame *frame, FFDrawColor *color,
+static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color,
   int x0, int y0, const uint8_t *text, int vertical)
 {
 int x = x0;
@@ -87,7 +87,7 @@ static void draw_text(DatascopeContext *s, AVFrame *frame, 
FFDrawColor *color,
 y0 += 8;
 continue;
 }
-ff_blend_mask(&s->draw, color, frame->data, frame->linesize,
+ff_blend_mask(draw, color, frame->data, frame->linesize,
   frame->width, frame->height,
   avpriv_cga_font + *text * 8, 1, 8, 8, 0, 0, x, y0);
 if (vertical) {
@@ -201,7 +201,7 @@ static int filter_color2(AVFilterContext *ctx, void *arg, 
int jobnr, int nb_jobs
 char text[256];
 
 snprintf(text, sizeof(text), format[C>>2], value[p]);
-draw_text(s, out, &reverse, xoff + x * C * 10 + 2, yoff + y * 
P * 12 + p * 10 + 2, text, 0);
+draw_text(&s->draw, out, &reverse, xoff + x * C * 10 + 2, yoff 
+ y * P * 12 + p * 10 + 2, text, 0);
 }
 }
 }
@@ -239,7 +239,7 @@ static int filter_color(AVFilterContext *ctx, void *arg, 
int jobnr, int nb_jobs)
 char text[256];
 
 snprintf(text, sizeof(text), format[C>>2], value[p]);
-draw_text(s, out, &color, xoff + x * C * 10 + 2, yoff + y * P 
* 12 + p * 10 + 2, text, 0);
+draw_text(&s->draw, out, &color, xoff + x * C * 10 + 2, yoff + 
y * P * 

[FFmpeg-cvslog] avcodec/pthread_frame, decode: allow errors to happen on draining

2017-04-29 Thread Muhammad Faiz
ffmpeg | branch: master | Muhammad Faiz  | Fri Apr 28 
17:19:13 2017 +0700| [d535e0c14004a15bb38ea288fa9a4f2e27d26f6b] | committer: 
Muhammad Faiz

avcodec/pthread_frame, decode: allow errors to happen on draining

So, all frames and errors are correctly reported in order.
Also limit the numbers of error during draining to prevent infinite loop.

This fix fate failure with THREADS>=4:
  make fate-h264-attachment-631 THREADS=4
This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f.

Suggested-by: wm4, Ronald S. Bultje, Marton Balint
Reviewed-by: w4 
Reviewed-by: Ronald S. Bultje 
Reviewed-by: Michael Niedermayer 
Signed-off-by: Muhammad Faiz 

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

 libavcodec/decode.c| 21 +++--
 libavcodec/internal.h  |  3 +++
 libavcodec/pthread_frame.c | 15 +++
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 6ff3c401ba..edfae5583c 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -568,8 +568,24 @@ FF_ENABLE_DEPRECATION_WARNINGS
 avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, 
(AVRational){avctx->ticks_per_frame, 1}));
 #endif
 
-if (avctx->internal->draining && !got_frame)
-avci->draining_done = 1;
+/* do not stop draining when got_frame != 0 or ret < 0 */
+if (avctx->internal->draining && !got_frame) {
+if (ret < 0) {
+/* prevent infinite loop if a decoder wrongly always return error 
on draining */
+/* reasonable nb_errors_max = maximum b frames + thread count */
+int nb_errors_max = 20 + (HAVE_THREADS && 
avctx->active_thread_type & FF_THREAD_FRAME ?
+avctx->thread_count : 1);
+
+if (avci->nb_draining_errors++ >= nb_errors_max) {
+av_log(avctx, AV_LOG_ERROR, "Too many errors when draining, 
this is a bug. "
+   "Stop draining and force EOF.\n");
+avci->draining_done = 1;
+ret = AVERROR_BUG;
+}
+} else {
+avci->draining_done = 1;
+}
+}
 
 avci->compat_decode_consumed += ret;
 
@@ -1659,6 +1675,7 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
 {
 avctx->internal->draining  = 0;
 avctx->internal->draining_done = 0;
+avctx->internal->nb_draining_errors = 0;
 av_frame_unref(avctx->internal->buffer_frame);
 av_frame_unref(avctx->internal->compat_decode_frame);
 av_packet_unref(avctx->internal->buffer_pkt);
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 84d3362f39..caa46dcb92 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -200,6 +200,9 @@ typedef struct AVCodecInternal {
 int showed_multi_packet_warning;
 
 int skip_samples_multiplier;
+
+/* to prevent infinite loop on errors when draining */
+int nb_draining_errors;
 } AVCodecInternal;
 
 struct AVCodecDefault {
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 13d682842d..363b139f71 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -509,8 +509,8 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
 /*
  * Return the next available frame from the oldest thread.
  * If we're at the end of the stream, then we have to skip threads that
- * didn't output a frame, because we don't want to accidentally signal
- * EOF (avpkt->size == 0 && *got_picture_ptr == 0).
+ * didn't output a frame/error, because we don't want to accidentally 
signal
+ * EOF (avpkt->size == 0 && *got_picture_ptr == 0 && err >= 0).
  */
 
 do {
@@ -526,20 +526,19 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
 av_frame_move_ref(picture, p->frame);
 *got_picture_ptr = p->got_frame;
 picture->pkt_dts = p->avpkt.dts;
-
-if (p->result < 0)
-err = p->result;
+err = p->result;
 
 /*
  * A later call with avkpt->size == 0 may loop over all threads,
- * including this one, searching for a frame to return before being
+ * including this one, searching for a frame/error to return before 
being
  * stopped by the "finished != fctx->next_finished" condition.
- * Make sure we don't mistakenly return the same frame again.
+ * Make sure we don't mistakenly return the same frame/error again.
  */
 p->got_frame = 0;
+p->result = 0;
 
 if (finished >= avctx->thread_count) finished = 0;
-} while (!avpkt->size && !*got_picture_ptr && finished != 
fctx->next_finished);
+} while (!avpkt->size && !*got_picture_ptr && err >= 0 && finished != 
fctx->next_finished);
 
 update_context_from_thread(avctx, p->avctx, 1);
 

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