[FFmpeg-cvslog] lavc/proresdec2: Do not mix variable declaration and statement.

2017-10-12 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Oct 12 
12:43:09 2017 +0200| [ce508f0bcc371c5e4399f14dd5e9f5b2aca16ab5] | committer: 
Carl Eugen Hoyos

lavc/proresdec2: Do not mix variable declaration and statement.

Fixes ticket #6728.

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

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

diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 0f791de97b..e9e0153ee9 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -598,8 +598,9 @@ static int decode_slice_thread(AVCodecContext *avctx, void 
*arg, int jobnr, int
 }
 else {
 size_t mb_max_x = slice->mb_count << (mb_x_shift - 1);
-for (size_t i = 0; i < 16; ++i)
-for (size_t j = 0; j < mb_max_x; ++j) {
+size_t i, j;
+for (i = 0; i < 16; ++i)
+for (j = 0; j < mb_max_x; ++j) {
 *(uint16_t*)(dest_u + (i * chroma_stride) + (j << 1)) = 511;
 *(uint16_t*)(dest_v + (i * chroma_stride) + (j << 1)) = 511;
 }

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


[FFmpeg-cvslog] configure: add missing OpenCL dependency to libavutil

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 12:27:48 
2017 -0300| [25bd2f4f368ac350d635aaa50860ee642233dcc9] | committer: James Almer

configure: add missing OpenCL dependency to libavutil

Tested-by: wm4
Signed-off-by: James Almer 

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

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

diff --git a/configure b/configure
index 9f95d58c6e..2de19fab0f 100755
--- a/configure
+++ b/configure
@@ -3340,7 +3340,7 @@ avformat_deps="avcodec avutil"
 avformat_suggest="libm network"
 avresample_deps="avutil"
 avresample_suggest="libm"
-avutil_suggest="libm libdrm libmfx user32 vaapi videotoolbox wincrypt"
+avutil_suggest="libm libdrm libmfx opencl user32 vaapi videotoolbox wincrypt"
 postproc_deps="avutil gpl"
 postproc_suggest="libm"
 swresample_deps="avutil"

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


[FFmpeg-cvslog] nvenc: Remove qmin and qmax constraints for nvenc vbr

2017-10-12 Thread Ganapathy Kasi
ffmpeg | branch: master | Ganapathy Kasi  | Wed Mar  1 
15:04:47 2017 -0800| [3303f86467efa99f23c670707f5be094cc9ce547] | committer: 
Luca Barbato

nvenc: Remove qmin and qmax constraints for nvenc vbr

qmin and qmax are not necessary for nvenc vbr.

Also fix for using 2 pass vbr mode for slow preset through ctx->flag 
NVENC_TWO_PASSES.

Signed-off-by: Luca Barbato 

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

 libavcodec/nvenc.c | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index fcd496b93f..738a77ebc2 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -559,12 +559,8 @@ static void nvenc_override_rate_control(AVCodecContext 
*avctx,
 return;
 case NV_ENC_PARAMS_RC_2_PASS_VBR:
 case NV_ENC_PARAMS_RC_VBR:
-if (avctx->qmin < 0 && avctx->qmax < 0) {
-av_log(avctx, AV_LOG_WARNING,
-   "The variable bitrate rate-control requires "
-   "the 'qmin' and/or 'qmax' option set.\n");
-return;
-}
+set_vbr(avctx, rc);
+break;
 case NV_ENC_PARAMS_RC_VBR_MINQP:
 if (avctx->qmin < 0) {
 av_log(avctx, AV_LOG_WARNING,
@@ -606,8 +602,11 @@ static void nvenc_setup_rate_control(AVCodecContext *avctx)
 set_lossless(avctx, rc);
 } else if (avctx->global_quality > 0) {
 set_constqp(avctx, rc);
-} else if (avctx->qmin >= 0 && avctx->qmax >= 0) {
-rc->rateControlMode = NV_ENC_PARAMS_RC_VBR;
+} else {
+if (ctx->flags & NVENC_TWO_PASSES)
+rc->rateControlMode = NV_ENC_PARAMS_RC_2_PASS_VBR;
+else
+rc->rateControlMode = NV_ENC_PARAMS_RC_VBR;
 set_vbr(avctx, rc);
 }
 

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


[FFmpeg-cvslog] Merge commit '3303f86467efa99f23c670707f5be094cc9ce547'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 13:39:39 
2017 -0300| [65c11f1bbac6e8f3ac2b3f9cde0ce5a06d574f54] | committer: James Almer

Merge commit '3303f86467efa99f23c670707f5be094cc9ce547'

* commit '3303f86467efa99f23c670707f5be094cc9ce547':
  nvenc: Remove qmin and qmax constraints for nvenc vbr

[10:06:59 CEST]  jamrial, 3303f86467 is a no-op. 
NV_ENC_PARAMS_RC_2_PASS_VBR is a deprecated rc 
mode(http://git.videolan.org/?p=ffmpeg.git;a=blob;f=compat/nvenc/nvEncodeAPI.h;h=c3a829421282d5f22f82fc285723f13eb660f053;hb=HEAD#l268).
[10:07:14 CEST]  And the first hunk with qmin/qmax was applied to ffmpeg 
quite a while ago already.
[10:07:49 CEST]  In a slightly different fashion, but with the same effect
[10:07:58 CEST]  Came as a patch from nvidia iirc

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit '6eef263aca281fb582e1fa3d841ac20ef747a252'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 13:48:08 
2017 -0300| [b78bb51a7cdd85ecb88e00fd96276071c092e8f9] | committer: James Almer

Merge commit '6eef263aca281fb582e1fa3d841ac20ef747a252'

* commit '6eef263aca281fb582e1fa3d841ac20ef747a252':
  x86: Merge align directives into SECTION_RODATA declarations where possible

Merged-by: James Almer 

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

 libavcodec/x86/dct32.asm   | 6 ++
 libavcodec/x86/imdct36.asm | 1 -
 libavcodec/x86/rv40dsp.asm | 1 -
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
index 4e657b5460..21e2f21c97 100644
--- a/libavcodec/x86/dct32.asm
+++ b/libavcodec/x86/dct32.asm
@@ -23,7 +23,8 @@
 
 SECTION_RODATA 32
 
-align 32
+ps_p1p1m1m1: dd 0, 0, 0x8000, 0x8000, 0, 0, 0x8000, 0x8000
+
 ps_cos_vec: dd   0.500603,  0.505471,  0.515447,  0.531043
 dd   0.553104,  0.582935,  0.622504,  0.674808
 dd -10.190008, -3.407609, -2.057781, -1.484165
@@ -38,9 +39,6 @@ ps_cos_vec: dd   0.500603,  0.505471,  0.515447,  0.531043
 dd   1.00,  0.707107,  1.00, -0.707107
 dd   0.707107,  0.707107,  0.707107,  0.707107
 
-align 32
-ps_p1p1m1m1: dd 0, 0, 0x8000, 0x8000, 0, 0, 0x8000, 0x8000
-
 %macro BUTTERFLY 4
 subps  %4, %1, %2
 addps  %2, %2, %1
diff --git a/libavcodec/x86/imdct36.asm b/libavcodec/x86/imdct36.asm
index 960eabdda5..b386ab95fc 100644
--- a/libavcodec/x86/imdct36.asm
+++ b/libavcodec/x86/imdct36.asm
@@ -23,7 +23,6 @@
 
 SECTION_RODATA
 
-align 16
 ps_mask:  dd 0, ~0, ~0, ~0
 ps_mask2: dd 0, ~0,  0, ~0
 ps_mask3: dd 0,  0,  0, ~0
diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm
index d0c3af0f8d..bcad1aee80 100644
--- a/libavcodec/x86/rv40dsp.asm
+++ b/libavcodec/x86/rv40dsp.asm
@@ -25,7 +25,6 @@
 
 SECTION_RODATA
 
-align 16
 pw_1024:   times 8 dw 1 << (16 - 6) ; pw_1024
 
 sixtap_filter_hb_m:  times 8 db   1, -5


==

diff --cc libavcodec/x86/imdct36.asm
index 960eabdda5,ddb71749a5..b386ab95fc
--- a/libavcodec/x86/imdct36.asm
+++ b/libavcodec/x86/imdct36.asm
@@@ -21,9 -21,8 +21,8 @@@
  
  %include "libavutil/x86/x86util.asm"
  
 -SECTION_RODATA 16
 +SECTION_RODATA
  
- align 16
  ps_mask:  dd 0, ~0, ~0, ~0
  ps_mask2: dd 0, ~0,  0, ~0
  ps_mask3: dd 0,  0,  0, ~0
diff --cc libavcodec/x86/rv40dsp.asm
index d0c3af0f8d,4949842e8f..bcad1aee80
--- a/libavcodec/x86/rv40dsp.asm
+++ b/libavcodec/x86/rv40dsp.asm
@@@ -23,9 -23,8 +23,8 @@@
  
  %include "libavutil/x86/x86util.asm"
  
 -SECTION_RODATA 16
 +SECTION_RODATA
  
- align 16
  pw_1024:   times 8 dw 1 << (16 - 6) ; pw_1024
  
  sixtap_filter_hb_m:  times 8 db   1, -5

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


[FFmpeg-cvslog] x86: Merge align directives into SECTION_RODATA declarations where possible

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Mar  1 
19:04:03 2017 +0100| [6eef263aca281fb582e1fa3d841ac20ef747a252] | committer: 
Diego Biurrun

x86: Merge align directives into SECTION_RODATA declarations where possible

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

 libavcodec/x86/dct32.asm   | 6 ++
 libavcodec/x86/fft.asm | 3 +--
 libavcodec/x86/imdct36.asm | 3 +--
 libavcodec/x86/rv40dsp.asm | 3 +--
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
index 2c4c32eb11..cfd5f52ba8 100644
--- a/libavcodec/x86/dct32.asm
+++ b/libavcodec/x86/dct32.asm
@@ -23,7 +23,8 @@
 
 SECTION_RODATA 32
 
-align 32
+ps_p1p1m1m1: dd 0, 0, 0x8000, 0x8000, 0, 0, 0x8000, 0x8000
+
 ps_cos_vec: dd   0.500603,  0.505471,  0.515447,  0.531043
 dd   0.553104,  0.582935,  0.622504,  0.674808
 dd -10.190008, -3.407609, -2.057781, -1.484165
@@ -38,9 +39,6 @@ ps_cos_vec: dd   0.500603,  0.505471,  0.515447,  0.531043
 dd   1.00,  0.707107,  1.00, -0.707107
 dd   0.707107,  0.707107,  0.707107,  0.707107
 
-align 32
-ps_p1p1m1m1: dd 0, 0, 0x8000, 0x8000, 0, 0, 0x8000, 0x8000
-
 %macro BUTTERFLY 4
 subps  %4, %1, %2
 addps  %2, %2, %1
diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
index ef007f4eec..2c7438134c 100644
--- a/libavcodec/x86/fft.asm
+++ b/libavcodec/x86/fft.asm
@@ -51,13 +51,12 @@ struc FFTContext
 .imdcthalf:pointer 1
 endstruc
 
-SECTION_RODATA
+SECTION_RODATA 32
 
 %define M_SQRT1_2 0.70710678118654752440
 %define M_COS_PI_1_8 0.923879532511287
 %define M_COS_PI_3_8 0.38268343236509
 
-align 32
 ps_cos16_1: dd 1.0, M_COS_PI_1_8, M_SQRT1_2, M_COS_PI_3_8, 1.0, M_COS_PI_1_8, 
M_SQRT1_2, M_COS_PI_3_8
 ps_cos16_2: dd 0, M_COS_PI_3_8, M_SQRT1_2, M_COS_PI_1_8, 0, -M_COS_PI_3_8, 
-M_SQRT1_2, -M_COS_PI_1_8
 
diff --git a/libavcodec/x86/imdct36.asm b/libavcodec/x86/imdct36.asm
index f85e2e4cc3..ddb71749a5 100644
--- a/libavcodec/x86/imdct36.asm
+++ b/libavcodec/x86/imdct36.asm
@@ -21,9 +21,8 @@
 
 %include "libavutil/x86/x86util.asm"
 
-SECTION_RODATA
+SECTION_RODATA 16
 
-align 16
 ps_mask:  dd 0, ~0, ~0, ~0
 ps_mask2: dd 0, ~0,  0, ~0
 ps_mask3: dd 0,  0,  0, ~0
diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm
index 77f6ddb25d..4949842e8f 100644
--- a/libavcodec/x86/rv40dsp.asm
+++ b/libavcodec/x86/rv40dsp.asm
@@ -23,9 +23,8 @@
 
 %include "libavutil/x86/x86util.asm"
 
-SECTION_RODATA
+SECTION_RODATA 16
 
-align 16
 pw_1024:   times 8 dw 1 << (16 - 6) ; pw_1024
 
 sixtap_filter_hb_m:  times 8 db   1, -5

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


[FFmpeg-cvslog] configure: fix libxavs check

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Oct 11 22:28:29 
2017 -0300| [6fb580e7d3c4cead297620a7b982b2975c56b166] | committer: James Almer

configure: fix libxavs check

libxavs may require pthreads and libm at link time, and without
said ldflags available as global extralibs, the check will fail.

Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8.

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

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

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

diff --git a/configure b/configure
index 2de19fab0f..6deef0a1ec 100755
--- a/configure
+++ b/configure
@@ -6098,7 +6098,7 @@ enabled libx264   && { use_pkg_config libx264 
x264 "stdint.h x264.h" x26
enable libx262; }
 enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get &&
  require_cpp_condition x265.h "X265_BUILD >= 68"
-enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode -lxavs
+enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
 enabled libzimg   && require_pkg_config libzimg "zimg >= 2.3.0" zimg.h 
zimg_get_api_version
 enabled libzmq&& require_pkg_config libzmq libzmq zmq.h zmq_ctx_new

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


[FFmpeg-cvslog] build: Explicitly set 32-bit/64-bit object formats for nasm/yasm

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Mar  1 
19:42:21 2017 +0100| [808ef43597b1e3d6e69a5b9abe2237c8ddb97b44] | committer: 
Diego Biurrun

build: Explicitly set 32-bit/64-bit object formats for nasm/yasm

Consistently use object format names with "32" suffix and set object format
to "win64" on Windows x86_64, which fixes assembling with nasm.

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

 configure | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index 7e788befc9..397d19c923 100755
--- a/configure
+++ b/configure
@@ -2563,7 +2563,6 @@ cc_default="gcc"
 host_cc_default="gcc"
 ln_s="ln -s -f"
 nm_default="nm -g"
-objformat="elf"
 pkg_config_default=pkg-config
 ranlib="ranlib"
 strip="strip"
@@ -3883,6 +3882,8 @@ esac
 enable $subarch
 enabled spic && enable_weak pic
 
+enabled x86_64 && objformat=elf64 || objformat="elf32"
+
 # OS specific
 case $target_os in
 aix)
@@ -3947,8 +3948,7 @@ case $target_os in
 SLIBSUF=".dylib"
 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
-objformat="macho"
-enabled x86_64 && objformat="macho64"
+enabled x86_64 && objformat="macho64" || objformat="macho32"
 enabled_any pic shared ||
 { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
 check_header dispatch/dispatch.h &&
@@ -3982,7 +3982,7 @@ case $target_os in
 SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
 SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) 
$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
 SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.orig.def) 
-Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) 
-Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
-objformat="win32"
+enabled x86_64 && objformat="win64" || objformat="win32"
 dlltool="${cross_prefix}dlltool"
 ranlib=:
 enable dos_paths
@@ -4007,7 +4007,7 @@ case $target_os in
 SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
 SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
 SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) 
-implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
-objformat="win32"
+enabled x86_64 && objformat="win64" || objformat="win32"
 ranlib=:
 enable dos_paths
 ;;
@@ -4022,7 +4022,7 @@ case $target_os in
 SLIB_INSTALL_LINKS=
 SLIB_INSTALL_EXTRA_LIB='lib$(NAME).dll.a'
 SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(NAME).dll.a'
-objformat="win32"
+enabled x86_64 && objformat="win64" || objformat="win32"
 enable dos_paths
 ;;
 *-dos|freedos|opendos)
@@ -4376,7 +4376,8 @@ EOF
 EOF
 
 # llvm's integrated assembler supports .object_arch from llvm 3.5
-[ "$objformat" = elf ] && check_as 

[FFmpeg-cvslog] Merge commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 14:58:34 
2017 -0300| [e4ad3e6f6449f41685d0a640a06c24202c3b5a6e] | committer: James Almer

Merge commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44'

* commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44':
  build: Explicitly set 32-bit/64-bit object formats for nasm/yasm

See d44935cbf4e42e842c11b1eeeaa28377dc8fd6d2

Merged-by: James Almer 

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

 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index 6deef0a1ec..7a1f4ba959 100755
--- a/configure
+++ b/configure
@@ -5032,7 +5032,6 @@ case $target_os in
 SLIBSUF=".dylib"
 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
-objformat="macho"
 enabled x86_64 && objformat="macho64" || objformat="macho32"
 enabled_any pic shared x86_64 ||
 { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }


==

diff --cc configure
index 6deef0a1ec,397d19c923..7a1f4ba959
--- a/configure
+++ b/configure
@@@ -5024,17 -3942,14 +5024,16 @@@ case $target_os i
  ;;
  darwin)
  enabled ppc && add_asflags -force_cpusubtype_ALL
 -SHFLAGS='-dynamiclib -Wl,-single_module 
-Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
 +install_name_dir_default='$(SHLIBDIR)'
 +SHFLAGS='-dynamiclib -Wl,-single_module 
-Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
  enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
 +strip="${strip} -x"
  add_ldflags -Wl,-dynamic,-search_paths_first
  SLIBSUF=".dylib"
 -SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
 -SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
 +SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
 +SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
- objformat="macho"
  enabled x86_64 && objformat="macho64" || objformat="macho32"
 -enabled_any pic shared ||
 +enabled_any pic shared x86_64 ||
  { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
  check_header dispatch/dispatch.h &&
  add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'

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


[FFmpeg-cvslog] pixlet: Fix architecture-dependent code and values

2017-10-12 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Mar  1 19:45:31 2017 -0500| [b44bd7ee7f7d834c1e22b5f33674393e5c0267c5] | 
committer: Vittorio Giovara

pixlet: Fix architecture-dependent code and values

The constants used in the decoder used floating point precision,
and this caused different values to be generated on different
architectures. Additionally on big endian machines, the fate test
would output bytes in native order, which is different from the one
hardcoded in the test.

So, eradicate floating point numbers and use fixed point (32.32)
arithmetics everywhere, replacing constants with precomputed integer
values, and force the pixel format output to be the same in the fate
test.

Signed-off-by: Vittorio Giovara 

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

 libavcodec/pixlet.c   | 58 +++
 tests/fate/video.mak  |  2 +-
 tests/ref/fate/pixlet |  2 +-
 3 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index 3b4ff42365..9f7d082fbe 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -39,8 +39,6 @@
 #define H 0
 #define V 1
 
-#define SQR(x) ((x) * (x))
-
 typedef struct SubBand {
 size_t width, height;
 size_t size;
@@ -59,7 +57,7 @@ typedef struct PixletContext {
 
 int16_t *filter[2];
 int16_t *prediction;
-float scaling[4][2][NB_LEVELS];
+int64_t scaling[4][2][NB_LEVELS];
 SubBand band[4][NB_LEVELS * 3 + 1];
 } PixletContext;
 
@@ -364,11 +362,11 @@ static void lowpass_prediction(int16_t *dst, int16_t 
*pred,
 }
 }
 
-static void filterfn(int16_t *dest, int16_t *tmp, size_t size, float SCALE)
+static void filterfn(int16_t *dest, int16_t *tmp, size_t size, int64_t scale)
 {
 int16_t *low, *high, *ll, *lh, *hl, *hh;
 int hsize, i, j;
-float value;
+int64_t value;
 
 hsize = size >> 1;
 low   = tmp + 4;
@@ -389,29 +387,29 @@ static void filterfn(int16_t *dest, int16_t *tmp, size_t 
size, float SCALE)
 }
 
 for (i = 0; i < hsize; i++) {
-value = low [i + 1] * -0.07576144003329376f +
-low [i + 0] *  0.8586296626673486f  +
-low [i - 1] * -0.07576144003329376f +
-high[i + 0] *  0.3535533905932737f  +
-high[i - 1] *  0.3535533905932737f;
-dest[i * 2] = av_clipf(value * SCALE, INT16_MIN, INT16_MAX);
+value = (int64_t) low [i + 1] * -INT64_C(325392907)  +
+(int64_t) low [i + 0] *  INT64_C(3687786320) +
+(int64_t) low [i - 1] * -INT64_C(325392907)  +
+(int64_t) high[i + 0] *  INT64_C(1518500249) +
+(int64_t) high[i - 1] *  INT64_C(1518500249);
+dest[i * 2] = av_clip_int16(((value >> 32) * scale) >> 32);
 }
 
 for (i = 0; i < hsize; i++) {
-value = low [i + 2] * -0.01515228715813062f +
-low [i + 1] *  0.3687056777514043f  +
-low [i + 0] *  0.3687056777514043f  +
-low [i - 1] * -0.01515228715813062f +
-high[i + 1] *  0.07071067811865475f +
-high[i + 0] * -0.8485281374238569f  +
-high[i - 1] *  0.07071067811865475f;
-dest[i * 2 + 1] = av_clipf(value * SCALE, INT16_MIN, INT16_MAX);
+value = (int64_t) low [i + 2] * -INT64_C(65078576)   +
+(int64_t) low [i + 1] *  INT64_C(1583578880) +
+(int64_t) low [i + 0] *  INT64_C(1583578880) +
+(int64_t) low [i - 1] * -INT64_C(65078576)   +
+(int64_t) high[i + 1] *  INT64_C(303700064)  +
+(int64_t) high[i + 0] * -INT64_C(3644400640) +
+(int64_t) high[i - 1] *  INT64_C(303700064);
+dest[i * 2 + 1] = av_clip_int16(((value >> 32) * scale) >> 32);
 }
 }
 
 static void reconstruction(AVCodecContext *avctx, int16_t *dest,
size_t width, size_t height, ptrdiff_t stride,
-   float *scaling_h, float *scaling_v)
+   int64_t *scaling_h, int64_t *scaling_v)
 {
 PixletContext *ctx = avctx->priv_data;
 unsigned scaled_width, scaled_height;
@@ -423,8 +421,8 @@ static void reconstruction(AVCodecContext *avctx, int16_t 
*dest,
 tmp   = ctx->filter[0];
 
 for (i = 0; i < NB_LEVELS; i++) {
-float scale_v = scaling_v[i];
-float scale_h = scaling_h[i];
+int64_t scale_v = scaling_v[i];
+int64_t scale_h = scaling_h[i];
 scaled_width  <<= 1;
 scaled_height <<= 1;
 
@@ -457,12 +455,18 @@ static void postprocess_luma(AVFrame *frame, size_t w, 
size_t h, int depth)
 uint16_t *dsty = (uint16_t *)frame->data[0];
 int16_t *srcy  = (int16_t *)frame->data[0];
 ptrdiff_t stridey = frame->linesize[0] / 2;
-const float factor = 1.0f / ((1 << depth) - 1);
 int i, j;
 
 for (j = 0; j < h; j++) {
-for (i = 0; i

[FFmpeg-cvslog] Merge commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 15:03:23 
2017 -0300| [c54431354a36809aaf09565e413059a859b9e672] | committer: James Almer

Merge commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5'

* commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5':
  pixlet: Fix architecture-dependent code and values

This commit is a noop, see a6b1180e390925c0ceb78fd223fd18f8c1e39c94

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] configure: add missing libfontconfig and libfreetype dependencies to showcqt filter

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 14:17:43 
2017 -0300| [4226c57b2b1f0b04a7d6dd4b1b3bcdab66bff424] | committer: James Almer

configure: add missing libfontconfig and libfreetype dependencies to showcqt 
filter

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

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

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

diff --git a/configure b/configure
index 7a1f4ba959..a44519e178 100755
--- a/configure
+++ b/configure
@@ -3267,6 +3267,7 @@ scale_filter_deps="swscale"
 scale_qsv_filter_deps="libmfx"
 select_filter_select="pixelutils"
 showcqt_filter_deps="avcodec avformat swscale"
+showcqt_filter_suggest="libfontconfig libfreetype"
 showcqt_filter_select="fft"
 showfreqs_filter_deps="avcodec"
 showfreqs_filter_select="fft"

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


[FFmpeg-cvslog] build: Fix logic of clock_gettime() check

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Mon Mar  6 
19:35:12 2017 +0100| [003124ebf4a05f1347c74104216887ddd2e5aad4] | committer: 
Diego Biurrun

build: Fix logic of clock_gettime() check

We should only check for clock_gettime() if _POSIX_MONOTONIC_CLOCK is
available and do a full link check for clock_gettime() in all cases.

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

 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 397d19c923..a8e3926b70 100755
--- a/configure
+++ b/configure
@@ -4572,8 +4572,8 @@ check_func  ${malloc_prefix}memalign&& enable 
memalign
 check_func  ${malloc_prefix}posix_memalign  && enable posix_memalign
 
 check_cpp_condition unistd.h "defined(_POSIX_MONOTONIC_CLOCK)" &&
-check_func_headers time.h clock_gettime ||
-check_lib clock_gettime time.h clock_gettime -lrt
+{ check_lib clock_gettime time.h clock_gettime ||
+  check_lib clock_gettime time.h clock_gettime -lrt; }
 
 check_func  fcntl
 check_func  fork

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


[FFmpeg-cvslog] Merge commit '003124ebf4a05f1347c74104216887ddd2e5aad4'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 17:44:06 
2017 -0300| [583003670f2425a0f102aff3493f77693c44f5f6] | committer: James Almer

Merge commit '003124ebf4a05f1347c74104216887ddd2e5aad4'

* commit '003124ebf4a05f1347c74104216887ddd2e5aad4':
  build: Fix logic of clock_gettime() check

Merged-by: James Almer 

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

 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index a44519e178..ade67a31bb 100755
--- a/configure
+++ b/configure
@@ -3341,7 +3341,7 @@ avformat_deps="avcodec avutil"
 avformat_suggest="libm network"
 avresample_deps="avutil"
 avresample_suggest="libm"
-avutil_suggest="libm libdrm libmfx opencl user32 vaapi videotoolbox wincrypt"
+avutil_suggest="clock_gettime libm libdrm libmfx opencl user32 vaapi 
videotoolbox wincrypt"
 postproc_deps="avutil gpl"
 postproc_suggest="libm"
 swresample_deps="avutil"
@@ -3351,7 +3351,7 @@ swscale_suggest="libm"
 
 avcodec_extralibs="pthreads_extralibs iconv_extralibs"
 avfilter_extralibs="pthreads_extralibs"
-avutil_extralibs="clock_gettime_extralibs nanosleep_extralibs 
pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
+avutil_extralibs="nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs 
vaapi_x11_extralibs vdpau_x11_extralibs"
 
 # programs
 ffmpeg_deps="avcodec avfilter avformat swresample"
@@ -5773,7 +5773,7 @@ check_func  ${malloc_prefix}posix_memalign  && enable 
posix_memalign
 
 check_func  access
 check_func_headers stdlib.h arc4random
-check_func_headers time.h clock_gettime || check_lib clock_gettime time.h 
clock_gettime -lrt
+check_lib   clock_gettime time.h clock_gettime || check_lib clock_gettime 
time.h clock_gettime -lrt
 check_func  fcntl
 check_func  fork
 check_func  gethrtime


==

diff --cc configure
index a44519e178,a8e3926b70..ade67a31bb
--- a/configure
+++ b/configure
@@@ -3331,49 -2511,37 +3331,49 @@@ cws2fws_extralibs="zlib_extralibs
  
  # libraries, in linking order
  avcodec_deps="avutil"
 +avcodec_suggest="libm"
  avcodec_select="null_bsf"
  avdevice_deps="avformat avcodec avutil"
 +avdevice_suggest="libm"
  avfilter_deps="avutil"
 +avfilter_suggest="libm"
  avformat_deps="avcodec avutil"
 -avformat_suggest="network"
 +avformat_suggest="libm network"
  avresample_deps="avutil"
 +avresample_suggest="libm"
- avutil_suggest="libm libdrm libmfx opencl user32 vaapi videotoolbox wincrypt"
++avutil_suggest="clock_gettime libm libdrm libmfx opencl user32 vaapi 
videotoolbox wincrypt"
 +postproc_deps="avutil gpl"
 +postproc_suggest="libm"
 +swresample_deps="avutil"
 +swresample_suggest="libm libsoxr"
  swscale_deps="avutil"
 +swscale_suggest="libm"
  
 -avcodec_extralibs="pthreads_extralibs libm_extralibs"
 -avdevice_extralibs="libm_extralibs"
 -avformat_extralibs="libm_extralibs"
 -avfilter_extralibs="pthreads_extralibs libm_extralibs"
 -avresample_extralibs="libm_extralibs"
 -avutil_extralibs="clock_gettime_extralibs cuda_extralibs libm_extralibs 
libmfx_extralibs nanosleep_extralibs pthreads_extralibs user32_extralibs 
vaapi_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs 
wincrypt_extralibs"
 -swscale_extralibs="libm_extralibs"
 +avcodec_extralibs="pthreads_extralibs iconv_extralibs"
 +avfilter_extralibs="pthreads_extralibs"
- avutil_extralibs="clock_gettime_extralibs nanosleep_extralibs 
pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
++avutil_extralibs="nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs 
vaapi_x11_extralibs vdpau_x11_extralibs"
  
  # programs
 -avconv_deps="avcodec avfilter avformat avresample swscale"
 -avconv_select="aformat_filter anull_filter asyncts_filter atrim_filter 
format_filter
 -   fps_filter null_filter resample_filter scale_filter
 +ffmpeg_deps="avcodec avfilter avformat swresample"
 +ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
 +   null_filter
 trim_filter"
 -avconv_suggest="dxva2_lib ole32 psapi shell32"
 -avplay_deps="avcodec avfilter avformat avresample sdl"
 -avplay_select="rdft format_filter transpose_filter hflip_filter vflip_filter"
 -avplay_suggest="shell32"
 -avprobe_deps="avcodec avformat"
 -avprobe_suggest="shell32"
 +ffmpeg_suggest="ole32 psapi shell32"
 +ffplay_deps="avcodec avformat swscale swresample sdl2"
 +ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter 
rotate_filter"
 +ffplay_suggest="shell32"
 +ffprobe_deps="avcodec avformat"
 +ffprobe_suggest="shell32"
 +ffserver_deps="avformat fork sarestart"
 +ffserver_select="ffm_muxer rtp_protocol rtsp_demuxer"
  
  # documentation
 -pod2man_deps="doc"
 -texi2html_deps="doc"
 +podpages_deps="perl"
 +manpages_deps="perl pod2man"
 +htmlpages_deps="perl"
 +htmlpages_deps_any="makeinfo_html texi2html"
 +txtpages_deps="

[FFmpeg-cvslog] build: Make x86 assembler commandline-selectable

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Tue Feb 28 
19:32:37 2017 +0100| [f54037da8af2f2aeb5e5633b48434211e6a97fe5] | committer: 
Diego Biurrun

build: Make x86 assembler commandline-selectable

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

 configure | 30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 9f339e6af6..77b74dd408 100755
--- a/configure
+++ b/configure
@@ -268,6 +268,7 @@ Toolchain options:
   --objcc=OCC  use ObjC compiler OCC [$cc_default]
   --dep-cc=DEPCC   use dependency generator DEPCC [$cc_default]
   --ld=LD  use linker LD
+  --x86asmexe=X86ASM   use x86 assembler X86ASM
   --pkg-config=PKGCONFIG   use pkg-config tool PKGCONFIG [$pkg_config_default]
   --pkg-config-flags=FLAGS pass additional flags to pkgconf []
   --host-cc=HOSTCC use host C compiler HOSTCC
@@ -1863,6 +1864,7 @@ CMDLINE_SET="
 target_path
 target_samples
 toolchain
+x86asmexe
 "
 
 CMDLINE_APPEND="
@@ -2561,13 +2563,13 @@ shlibdir_default="$libdir_default"
 ar_default="ar"
 cc_default="gcc"
 host_cc_default="gcc"
+x86asmexe_default="yasm"
 ln_s="ln -s -f"
 nm_default="nm -g"
 pkg_config_default=pkg-config
 ranlib="ranlib"
 strip="strip"
 version_script='--version-script'
-x86asmexe="yasm"
 
 # machine
 arch_default=$(uname -m)
@@ -2997,6 +2999,7 @@ fi
 ar_default="${cross_prefix}${ar_default}"
 cc_default="${cross_prefix}${cc_default}"
 objcc_default="${cross_prefix}${objcc_default}"
+x86asmexe_default="${cross_prefix}${x86asmexe_default}"
 nm_default="${cross_prefix}${nm_default}"
 pkg_config_default="${cross_prefix}${pkg_config_default}"
 ranlib="${cross_prefix}${ranlib}"
@@ -3004,7 +3007,7 @@ strip="${cross_prefix}${strip}"
 
 sysinclude_default="${sysroot}/usr/include"
 
-set_default arch cc pkg_config sysinclude target_exec target_os
+set_default arch cc pkg_config sysinclude target_exec target_os x86asmexe
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
@@ -4474,16 +4477,26 @@ EOF
 enabled ssse3  && check_inline_asm ssse3_inline  '"pabsw %xmm0, %xmm0"'
 enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
 
-if ! disabled_any asm mmx x86asm; then
-if check_cmd $x86asmexe --version; then
-x86asm_debug="-g dwarf2"
-X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > 
$(@:.o=.d)'
-elif check_cmd nasm -v; then
-x86asmexe=nasm
+probe_x86asm(){
+x86asmexe_probe=$1
+if check_cmd $x86asmexe_probe -v; then
+x86asmexe=$x86asmexe_probe
+x86asm_type=nasm
 x86asm_debug="-g -F dwarf"
 X86ASM_DEPFLAGS='-MD $(@:.o=.d)'
+elif check_cmd $x86asmexe_probe --version; then
+x86asmexe=$x86asmexe_probe
+x86asm_type=yasm
+x86asm_debug="-g dwarf2"
+X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > 
$(@:.o=.d)'
 fi
+}
 
+if ! disabled_any asm mmx x86asm; then
+for program in $x86asmexe yasm nasm; do
+probe_x86asm $program
+test -n "$x86asm_type" && break
+done
 X86ASMFLAGS="-f $objformat"
 enabled pic   && append X86ASMFLAGS "-DPIC"
 test -n "$extern_prefix"  && append X86ASMFLAGS "-DPREFIX"
@@ -5223,6 +5236,7 @@ echo "big-endian${bigendian-no}"
 echo "runtime cpu detection ${runtime_cpudetect-no}"
 if enabled x86; then
 echo "standalone assembly   ${x86asm-no}"
+echo "x86 assembler ${x86asmexe}"
 echo "MMX enabled   ${mmx-no}"
 echo "MMXEXT enabled${mmxext-no}"
 echo "3DNow! enabled${amd3dnow-no}"

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


[FFmpeg-cvslog] build: Special-case handling of SDL CFLAGS

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Thu Mar  2 
14:54:28 2017 +0100| [51411eb7ffba1437c1019f992990914f60232c39] | committer: 
Diego Biurrun

build: Special-case handling of SDL CFLAGS

SDL adds some "special" CFLAGS that interfere with building normal
binaries. Capture those CFLAGS separately and avoid adding them to
the general CFLAGS.

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

 configure | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index a8e3926b70..9f339e6af6 100755
--- a/configure
+++ b/configure
@@ -4782,7 +4782,13 @@ if enabled nvenc; then
 require_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6"
 fi
 
-check_pkg_config sdl "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent
+# SDL is "special" and adds some CFLAGS that should not pollute anything else.
+if enabled avplay; then
+CFLAGS_SAVE=$CFLAGS
+check_pkg_config sdl "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent 
&&
+sdl_cflags=$pkg_cflags
+CFLAGS=$CFLAGS_SAVE
+fi
 
 ! disabled pod2man   && check_cmd pod2man --help && enable pod2man   || 
disable pod2man
 ! disabled texi2html && check_cmd texi2html -version && enable texi2html || 
disable texi2html

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


[FFmpeg-cvslog] build: Prefer NASM assembler over YASM

2017-10-12 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Thu Oct 13 
20:33:15 2016 +0200| [57b753b445e23363c997a8ec1c556e0b0f6e9da3] | committer: 
Diego Biurrun

build: Prefer NASM assembler over YASM

NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.

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

 .travis.yml  |  4 ++--
 Changelog|  2 ++
 configure|  6 +++---
 doc/optimization.txt |  8 
 doc/platform.texi| 12 ++--
 5 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8e9629a8dd..6f9647a701 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ os:
 addons:
   apt:
 packages:
-  - yasm
+  - nasm
   - diffutils
 compiler:
   - clang
@@ -17,7 +17,7 @@ cache:
 before_install:
   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update --all; fi
 install:
-  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install yasm; fi
+  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install nasm; fi
 script:
   - mkdir -p libav-samples
   - ./configure --samples=libav-samples --cc=$CC
diff --git a/Changelog b/Changelog
index 8e8bbcbf52..cdf073b799 100644
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,8 @@ version :
 - config.log and other configuration files moved into avbuild/ directory
 - VAAPI-accelerated MPEG-2 and VP8 encoding
 - Apple Pixlet decoder
+- The x86 assembler default switched from yasm to nasm, pass
+  --x86asmexe=yasm to configure to restore the old behavior.
 
 
 version 12:
diff --git a/configure b/configure
index 77b74dd408..587b2186cf 100755
--- a/configure
+++ b/configure
@@ -2563,7 +2563,7 @@ shlibdir_default="$libdir_default"
 ar_default="ar"
 cc_default="gcc"
 host_cc_default="gcc"
-x86asmexe_default="yasm"
+x86asmexe_default="nasm"
 ln_s="ln -s -f"
 nm_default="nm -g"
 pkg_config_default=pkg-config
@@ -4493,7 +4493,7 @@ EOF
 }
 
 if ! disabled_any asm mmx x86asm; then
-for program in $x86asmexe yasm nasm; do
+for program in $x86asmexe nasm yasm; do
 probe_x86asm $program
 test -n "$x86asm_type" && break
 done
@@ -4505,7 +4505,7 @@ EOF
 esac
 
 check_x86asm "movbe ecx, [5]" && enable x86asm ||
-die "yasm/nasm not found or too old. Use --disable-x86asm for a 
crippled build."
+die "nasm/yasm not found or too old. Use --disable-x86asm for a 
crippled build."
 check_x86asm "vextracti128 xmm0, ymm0, 0"  || disable avx2_external
 check_x86asm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
 check_x86asm "vfmadd132ps ymm0, ymm1, ymm2"|| disable fma3_external
diff --git a/doc/optimization.txt b/doc/optimization.txt
index be12d85545..3277b9b721 100644
--- a/doc/optimization.txt
+++ b/doc/optimization.txt
@@ -161,8 +161,8 @@ do{
 For x86, mark registers that are clobbered in your asm. This means both
 general x86 registers (e.g. eax) as well as XMM registers. This last one is
 particularly important on Win64, where xmm6-15 are callee-save, and not
-restoring their contents leads to undefined results. In external asm (e.g.
-yasm), you do this by using:
+restoring their contents leads to undefined results. In external asm,
+you do this by using:
 cglobal function_name, num_args, num_regs, num_xmm_regs
 In inline asm, you specify clobbered registers at the end of your asm:
 __asm__(".." ::: "%eax").
@@ -194,12 +194,12 @@ The latter requires a good optimizing compiler which gcc 
is not.
 Inline asm vs. external asm
 ---
 Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc)
-and external asm (.s or .asm files, handled by an assembler such as yasm/nasm)
+and external asm (.s or .asm files, handled by an assembler such as nasm/yasm)
 are accepted in Libav. Which one to use differs per specific case.
 
 - if your code is intended to be inlined in a C function, inline asm is always
better, because external asm cannot be inlined
-- if your code calls external functions, yasm is always better
+- if your code calls external functions, external asm is always better
 - if your code takes huge and complex structs as function arguments (e.g.
MpegEncContext; note that this is not ideal and is discouraged if there
are alternatives), then inline asm is always better, because predicting
diff --git a/doc/platform.texi b/doc/platform.texi
index 74b014e138..dc20d67bb7 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -69,9 +69,9 @@ OS X on PowerPC or ARM (iPhone) requires a preprocessor from
 assembly functions. Put the Perl script somewhere
 in your PATH, Libav's configure will pick it up automatically.
 
-OS X on AMD64 and x86 requires @command{yasm} to build most of the
+OS X on AMD64 and x86 requires @command{nasm} to build most of the
 optimized assembly functions @url{http:

[FFmpeg-cvslog] Merge commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3'

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 18:09:11 
2017 -0300| [fb934f23e1b7af48f96b6ce1d105da89db9ad6f4] | committer: James Almer

Merge commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3'

* commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3':
  build: Prefer NASM assembler over YASM
  build: Make x86 assembler commandline-selectable
  build: Special-case handling of SDL CFLAGS

This commit is a noop, see
fde3bb16f90ac456709c7305b9e230e8327d8625
3cc73d3d6d2a98cd0da3deda90760729c82cdeeb
4f9297ac3b39098547863d28fbc8d2a906d5be49

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] lavc/ppc/fft_init: Fix compilation on ppc64le with --disable-vsx.

2017-10-12 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Oct 12 
23:14:55 2017 +0200| [c87bb9c04af804e2cd6a18110780ffb6d85109e3] | committer: 
Carl Eugen Hoyos

lavc/ppc/fft_init: Fix compilation on ppc64le with --disable-vsx.

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

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

diff --git a/libavcodec/ppc/fft_init.c b/libavcodec/ppc/fft_init.c
index 57d7c80ea4..733e58b4c9 100644
--- a/libavcodec/ppc/fft_init.c
+++ b/libavcodec/ppc/fft_init.c
@@ -42,7 +42,7 @@ void ff_fft_calc_altivec(FFTContext *s, FFTComplex *z);
 void ff_fft_calc_interleave_altivec(FFTContext *s, FFTComplex *z);
 #endif
 
-#if HAVE_GNU_AS && HAVE_ALTIVEC
+#if HAVE_GNU_AS && HAVE_ALTIVEC && (HAVE_BIGENDIAN || HAVE_VSX)
 static void imdct_half_altivec(FFTContext *s, FFTSample *output, const 
FFTSample *input)
 {
 int j, k;
@@ -146,11 +146,11 @@ static void imdct_calc_altivec(FFTContext *s, FFTSample 
*output, const FFTSample
 p1[k]= vec_perm(b, b, vcprm(3,2,1,0));
 }
 }
-#endif /* HAVE_GNU_AS && HAVE_ALTIVEC && HAVE_BIGENDIAN */
+#endif /* HAVE_GNU_AS && HAVE_ALTIVEC && (HAVE_BIGENDIAN || HAVE_VSX) */
 
 av_cold void ff_fft_init_ppc(FFTContext *s)
 {
-#if HAVE_GNU_AS && HAVE_ALTIVEC
+#if HAVE_GNU_AS && HAVE_ALTIVEC && (HAVE_BIGENDIAN || HAVE_VSX)
 if (!PPC_ALTIVEC(av_get_cpu_flags()))
 return;
 

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


[FFmpeg-cvslog] Fix crash if av_vdpau_bind_context() is not used.

2017-10-12 Thread Ivan Kalvachev
ffmpeg | branch: master | Ivan Kalvachev  | Mon Oct  9 
02:40:26 2017 +0300| [3a6ded7cfcb33e06ade98c5791eae06453f65668] | committer: 
Carl Eugen Hoyos

Fix crash if av_vdpau_bind_context() is not used.

The public functions av_alloc_vdpaucontext() and
av_vdpau_alloc_context() are allocating AVVDPAUContext
structure that is supposed to be placed in avctx->hwaccel_context.

However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
as struct VDPAUHWContext, that is bigger and does contain
AVVDPAUContext as first member.

The usage includes write to the new variables in the bigger stuct,
without checking for block size.

Fix by always allocating the bigger structure.

Signed-off-by: Ivan Kalvachev 

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

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

diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 42ebddbeee..4cc51cb79e 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -816,7 +816,7 @@ do {   \
 
 AVVDPAUContext *av_vdpau_alloc_context(void)
 {
-return av_mallocz(sizeof(AVVDPAUContext));
+return av_mallocz(sizeof(VDPAUHWContext));
 }
 
 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,

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


[FFmpeg-cvslog] Fix crash if av_vdpau_bind_context() is not used.

2017-10-12 Thread Ivan Kalvachev
ffmpeg | branch: release/3.4 | Ivan Kalvachev  | Mon Oct  
9 02:40:26 2017 +0300| [7fb85ad3607a3fdde682ea74d6f6bcefe1f582dd] | committer: 
Carl Eugen Hoyos

Fix crash if av_vdpau_bind_context() is not used.

The public functions av_alloc_vdpaucontext() and
av_vdpau_alloc_context() are allocating AVVDPAUContext
structure that is supposed to be placed in avctx->hwaccel_context.

However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
as struct VDPAUHWContext, that is bigger and does contain
AVVDPAUContext as first member.

The usage includes write to the new variables in the bigger stuct,
without checking for block size.

Fix by always allocating the bigger structure.

Signed-off-by: Ivan Kalvachev 
(cherry picked from commit 3a6ded7cfcb33e06ade98c5791eae06453f65668)

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

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

diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 42ebddbeee..4cc51cb79e 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -816,7 +816,7 @@ do {   \
 
 AVVDPAUContext *av_vdpau_alloc_context(void)
 {
-return av_mallocz(sizeof(AVVDPAUContext));
+return av_mallocz(sizeof(VDPAUHWContext));
 }
 
 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,

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


[FFmpeg-cvslog] build: fix builds configured with a suffix

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 17:32:10 
2017 -0300| [4b175913bed8df8c5d4f474d03963a0d99a87b3f] | committer: James Almer

build: fix builds configured with a suffix

Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8

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

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

 ffbuild/common.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index a6b23e029f..63a3c2f2d0 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -119,7 +119,7 @@ FFLIBS:= $($(NAME)_FFLIBS) $(FFLIBS-yes) $(FFLIBS)
 TESTPROGS += $(TESTPROGS-yes)
 
 LDLIBS   = $(FFLIBS:%=%$(BUILDSUF))
-FFEXTRALIBS := $(FFLIBS:%=$(LD_LIB)) $(foreach lib,EXTRALIBS-$(NAME) 
$(FFLIBS:%=EXTRALIBS-%),$($(lib))) $(EXTRALIBS)
+FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(foreach lib,EXTRALIBS-$(NAME) 
$(FFLIBS:%=EXTRALIBS-%),$($(lib))) $(EXTRALIBS)
 
 OBJS  := $(sort $(OBJS:%=$(SUBDIR)%))
 SLIBOBJS  := $(sort $(SLIBOBJS:%=$(SUBDIR)%))

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


[FFmpeg-cvslog] lavc/pixlet: reduce diff with Libav (cosmetics only)

2017-10-12 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Thu Oct 12 20:45:53 
2017 +0200| [368fb74831c037c1a1afd06da64c464c2b40d8b1] | committer: Clément 
Bœsch

lavc/pixlet: reduce diff with Libav (cosmetics only)

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

 libavcodec/pixlet.c | 271 
 1 file changed, 144 insertions(+), 127 deletions(-)

diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index a9cfe085c9..d2a5a1ac5d 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -28,12 +28,14 @@
 #include "avcodec.h"
 #include "bytestream.h"
 #include "get_bits.h"
-#include "unary.h"
 #include "internal.h"
 #include "thread.h"
+#include "unary.h"
 
 #define NB_LEVELS 4
 
+#define PIXLET_MAGIC 0xDEADBEEF
+
 #define H 0
 #define V 1
 
@@ -47,11 +49,11 @@ typedef struct PixletContext {
 AVClass *class;
 
 GetByteContext gb;
-GetBitContext gbit;
+GetBitContext bc;
 
 int levels;
 int depth;
-int h, w;
+int w, h;
 
 int16_t *filter[2];
 int16_t *prediction;
@@ -59,6 +61,31 @@ typedef struct PixletContext {
 SubBand band[4][NB_LEVELS * 3 + 1];
 } PixletContext;
 
+static av_cold int pixlet_init(AVCodecContext *avctx)
+{
+avctx->pix_fmt = AV_PIX_FMT_YUV420P16;
+avctx->color_range = AVCOL_RANGE_JPEG;
+return 0;
+}
+
+static void free_buffers(AVCodecContext *avctx)
+{
+PixletContext *ctx = avctx->priv_data;
+
+av_freep(&ctx->filter[0]);
+av_freep(&ctx->filter[1]);
+av_freep(&ctx->prediction);
+}
+
+static av_cold int pixlet_close(AVCodecContext *avctx)
+{
+PixletContext *ctx = avctx->priv_data;
+free_buffers(avctx);
+ctx->w = 0;
+ctx->h = 0;
+return 0;
+}
+
 static int init_decoder(AVCodecContext *avctx)
 {
 PixletContext *ctx = avctx->priv_data;
@@ -72,19 +99,19 @@ static int init_decoder(AVCodecContext *avctx)
 
 for (plane = 0; plane < 3; plane++) {
 unsigned shift = plane > 0;
-unsigned w = ctx->w >> shift;
-unsigned h = ctx->h >> shift;
+unsigned w = ctx->w >> shift;
+unsigned h = ctx->h >> shift;
 
-ctx->band[plane][0].width  = w >> NB_LEVELS;
-ctx->band[plane][0].height = h >> NB_LEVELS;
-ctx->band[plane][0].size = (w >> NB_LEVELS) * (h >> NB_LEVELS);
+ctx->band[plane][0].width  =  w >> NB_LEVELS;
+ctx->band[plane][0].height =  h >> NB_LEVELS;
+ctx->band[plane][0].size   = (w >> NB_LEVELS) * (h >> NB_LEVELS);
 
 for (i = 0; i < NB_LEVELS * 3; i++) {
 unsigned scale = ctx->levels - (i / 3);
 
-ctx->band[plane][i + 1].width  = w >> scale;
-ctx->band[plane][i + 1].height = h >> scale;
-ctx->band[plane][i + 1].size = (w >> scale) * (h >> scale);
+ctx->band[plane][i + 1].width  =  w >> scale;
+ctx->band[plane][i + 1].height =  h >> scale;
+ctx->band[plane][i + 1].size   = (w >> scale) * (h >> scale);
 
 ctx->band[plane][i + 1].x = (w >> scale) * (((i + 1) % 3) != 2);
 ctx->band[plane][i + 1].y = (h >> scale) * (((i + 1) % 3) != 1);
@@ -94,35 +121,11 @@ static int init_decoder(AVCodecContext *avctx)
 return 0;
 }
 
-static void free_buffers(AVCodecContext *avctx)
+static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size,
+   int width, ptrdiff_t stride)
 {
 PixletContext *ctx = avctx->priv_data;
-
-av_freep(&ctx->filter[0]);
-av_freep(&ctx->filter[1]);
-av_freep(&ctx->prediction);
-}
-
-static av_cold int pixlet_close(AVCodecContext *avctx)
-{
-PixletContext *ctx = avctx->priv_data;
-free_buffers(avctx);
-ctx->w = 0;
-ctx->h = 0;
-return 0;
-}
-
-static av_cold int pixlet_init(AVCodecContext *avctx)
-{
-avctx->pix_fmt = AV_PIX_FMT_YUV420P16;
-avctx->color_range = AVCOL_RANGE_JPEG;
-return 0;
-}
-
-static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int 
width, ptrdiff_t stride)
-{
-PixletContext *ctx = avctx->priv_data;
-GetBitContext *b = &ctx->gbit;
+GetBitContext *bc = &ctx->bc;
 unsigned cnt1, nbits, k, j = 0, i = 0;
 int64_t value, state = 3;
 int rlen, escape, flag = 0;
@@ -130,45 +133,45 @@ static int read_low_coeffs(AVCodecContext *avctx, int16_t 
*dst, int size, int wi
 while (i < size) {
 nbits = FFMIN(ff_clz((state >> 8) + 3) ^ 0x1F, 14);
 
-cnt1 = get_unary(b, 0, 8);
+cnt1 = get_unary(bc, 0, 8);
 if (cnt1 < 8) {
-value = show_bits(b, nbits);
+value = show_bits(bc, nbits);
 if (value <= 1) {
-skip_bits(b, nbits - 1);
+skip_bits(bc, nbits - 1);
 escape = ((1 << nbits) - 1) * cnt1;
 } else {
-skip_bits(b, nbits);
+skip_bits(bc, nbits);
 escape = value + ((1 << nbits) - 1) * cnt1 - 

[FFmpeg-cvslog] lavc/pixlet: remove unecessary intermediate nb_levels variable

2017-10-12 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Oct 13 00:21:11 
2017 +0200| [d1aef7d08a06f4adce747b251a81f8b99650bdca] | committer: Clément 
Bœsch

lavc/pixlet: remove unecessary intermediate nb_levels variable

This is a change imported from Libav.

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

 libavcodec/pixlet.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index d2a5a1ac5d..03a2cdacc8 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -420,7 +420,7 @@ static void filterfn(int16_t *dest, int16_t *tmp, unsigned 
size, int64_t scale)
 }
 
 static void reconstruction(AVCodecContext *avctx, int16_t *dest,
-   unsigned width, unsigned height, ptrdiff_t stride, 
int nb_levels,
+   unsigned width, unsigned height, ptrdiff_t stride,
int64_t *scaling_h, int64_t *scaling_v)
 {
 PixletContext *ctx = avctx->priv_data;
@@ -428,11 +428,11 @@ static void reconstruction(AVCodecContext *avctx, int16_t 
*dest,
 int16_t *ptr, *tmp;
 int i, j, k;
 
-scaled_width  = width  >> nb_levels;
-scaled_height = height >> nb_levels;
+scaled_width  = width  >> NB_LEVELS;
+scaled_height = height >> NB_LEVELS;
 tmp   = ctx->filter[0];
 
-for (i = 0; i < nb_levels; i++) {
+for (i = 0; i < NB_LEVELS; i++) {
 int64_t scale_v = scaling_v[i];
 int64_t scale_h = scaling_h[i];
 scaled_width  <<= 1;
@@ -578,7 +578,7 @@ static int decode_plane(AVCodecContext *avctx, int plane,
ctx->band[plane][0].height, stride);
 
 reconstruction(avctx, (int16_t *)frame->data[plane], ctx->w >> shift,
-   ctx->h >> shift, stride, NB_LEVELS, ctx->scaling[plane][H],
+   ctx->h >> shift, stride, ctx->scaling[plane][H],
ctx->scaling[plane][V]);
 
 return 0;

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


[FFmpeg-cvslog] configure: fix CoreGraphics module name

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 20:05:39 
2017 -0300| [9c0279bc2c7bafee9ef9ef4a5799c0e5ea378239] | committer: James Almer

configure: fix CoreGraphics module name

Signed-off-by: James Almer 

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

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

diff --git a/configure b/configure
index ade67a31bb..ce5ad8a7a4 100755
--- a/configure
+++ b/configure
@@ -5866,7 +5866,7 @@ check_apple_framework CoreVideo
 
 enabled avfoundation && {
 disable coregraphics applicationservices
-check_lib CoreGraphicsCoreGraphics/CoreGraphics.h   
CGGetActiveDisplayList "-framework CoreGraphics" ||
+check_lib coregraphicsCoreGraphics/CoreGraphics.h   
CGGetActiveDisplayList "-framework CoreGraphics" ||
 check_lib applicationservices ApplicationServices/ApplicationServices.h 
CGGetActiveDisplayList "-framework ApplicationServices"; }
 
 enabled videotoolbox && {

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


[FFmpeg-cvslog] configure: fix pthread_cancel check

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 20:24:36 
2017 -0300| [4440bcf6a0cfd47dcd11c378050272dd1e84467e] | committer: James Almer

configure: fix pthread_cancel check

Signed-off-by: James Almer 

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

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

diff --git a/configure b/configure
index ce5ad8a7a4..515d7e25ac 100755
--- a/configure
+++ b/configure
@@ -5931,7 +5931,7 @@ fi
 
 
 if enabled pthreads; then
-  check_func pthread_cancel
+  check_func pthread_cancel $pthreads_extralibs
 fi
 
 enabled pthreads &&

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


[FFmpeg-cvslog] configure: Fix sem_timedwait probe

2017-10-12 Thread Luca Barbato
ffmpeg | branch: master | Luca Barbato  | Thu Oct 12 
19:20:28 2017 -0300| [abb5efca263daff670ebb0a07af4fc902e457ade] | committer: 
James Almer

configure: Fix sem_timedwait probe

(cherry-picked from libav commit 41262498ff89ef48e5ce4823b2fc2dc514a3eb0c)
Signed-off-by: James Almer 

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

 configure | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index 515d7e25ac..f757d767b8 100755
--- a/configure
+++ b/configure
@@ -5750,7 +5750,6 @@ check_builtin atomic_cas_ptr atomic.h "void **ptr; void 
*oldval, *newval; atomic
 check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
 check_builtin MemoryBarrier windows.h "MemoryBarrier()"
 check_builtin sarestart signal.h "SA_RESTART"
-check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); 
sem_timedwait(s,0); sem_destroy(s)" -lpthread
 check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; 
__sync_val_compare_and_swap(ptr, oldval, newval)"
 check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
 check_builtin localtime_r time.h "time_t *time; struct tm *tm; 
localtime_r(time, tm)"
@@ -5935,7 +5934,7 @@ if enabled pthreads; then
 fi
 
 enabled pthreads &&
-check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); 
sem_timedwait(s,0); sem_destroy(s)"
+check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); 
sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs
 
 enabled  zlib && check_lib zlib   zlib.h  zlibVersion-lz
 enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion-lbz2

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


[FFmpeg-cvslog] configure: explicitly list videotoolbox deps for avutil

2017-10-12 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Oct 12 21:04:26 
2017 -0300| [34dbee9f601f30bb41fec5656f94f87ded31f155] | committer: James Almer

configure: explicitly list videotoolbox deps for avutil

There's a bug in configure where they are not being resolved right,
so make them explicit deps for avutil for now.

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

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

diff --git a/configure b/configure
index f757d767b8..1db50df0a4 100755
--- a/configure
+++ b/configure
@@ -3341,7 +3341,7 @@ avformat_deps="avcodec avutil"
 avformat_suggest="libm network"
 avresample_deps="avutil"
 avresample_suggest="libm"
-avutil_suggest="clock_gettime libm libdrm libmfx opencl user32 vaapi 
videotoolbox wincrypt"
+avutil_suggest="clock_gettime libm libdrm libmfx opencl user32 vaapi 
videotoolbox corefoundation corevideo coremedia wincrypt"
 postproc_deps="avutil gpl"
 postproc_suggest="libm"
 swresample_deps="avutil"

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


[FFmpeg-cvslog] avcodec/mips: Improve avc chroma avg horiz mc msa functions

2017-10-12 Thread Kaustubh Raste
ffmpeg | branch: master | Kaustubh Raste  | Wed Oct 
11 14:01:30 2017 +0530| [27a0a8388082c6d4b9e96b7b79a59821c8a56168] | committer: 
Michael Niedermayer

avcodec/mips: Improve avc chroma avg horiz mc msa functions

Replace generic with block size specific function.
Load the specific destination bytes instead of MSA load and pack.

Signed-off-by: Kaustubh Raste 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mips/h264chroma_msa.c | 329 ---
 1 file changed, 169 insertions(+), 160 deletions(-)

diff --git a/libavcodec/mips/h264chroma_msa.c b/libavcodec/mips/h264chroma_msa.c
index b8fcf6d012..2a54675075 100644
--- a/libavcodec/mips/h264chroma_msa.c
+++ b/libavcodec/mips/h264chroma_msa.c
@@ -839,12 +839,11 @@ static void avc_chroma_hv_8w_msa(uint8_t *src, uint8_t 
*dst, int32_t stride,
 }
 }
 
-static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, int32_t 
src_stride,
-   uint8_t *dst, int32_t 
dst_stride,
-   uint32_t coeff0, uint32_t 
coeff1)
+static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
+   int32_t stride, uint32_t coeff0,
+   uint32_t coeff1)
 {
 uint16_t out0, out1;
-uint32_t load0, load1;
 v16i8 src0, src1;
 v16u8 dst_data = { 0 };
 v8u16 res_r;
@@ -856,12 +855,13 @@ static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t 
*src, int32_t src_stride,
 
 mask = LD_SB(&chroma_mask_arr[0]);
 
-LD_SB2(src, src_stride, src0, src1);
+LD_SB2(src, stride, src0, src1);
 
-load0 = LW(dst);
-load1 = LW(dst + dst_stride);
+out0 = LH(dst);
+out1 = LH(dst + stride);
 
-INSERT_W2_UB(load0, load1, dst_data);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 0, out0);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 2, out1);
 
 src0 = __msa_vshf_b(mask, src1, src0);
 
@@ -877,30 +877,34 @@ static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t 
*src, int32_t src_stride,
 out1 = __msa_copy_u_h((v8i16) dst_data, 2);
 
 SH(out0, dst);
-dst += dst_stride;
+dst += stride;
 SH(out1, dst);
 }
 
-static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, int32_t 
src_stride,
-   uint8_t *dst, int32_t 
dst_stride,
-   uint32_t coeff0, uint32_t 
coeff1)
+static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
+   int32_t stride, uint32_t coeff0,
+   uint32_t coeff1)
 {
+uint16_t tp0, tp1, tp2, tp3;
 v16u8 src0, src1, src2, src3;
-v16u8 dst0, dst1, dst2, dst3;
+v16u8 dst0, dst_data = { 0 };
 v8u16 res_r;
-v16i8 res, mask;
+v16i8 mask;
 v16i8 coeff_vec0 = __msa_fill_b(coeff0);
 v16i8 coeff_vec1 = __msa_fill_b(coeff1);
 v16u8 coeff_vec = (v16u8) __msa_ilvr_b(coeff_vec0, coeff_vec1);
 
 mask = LD_SB(&chroma_mask_arr[64]);
 
-LD_UB4(src, src_stride, src0, src1, src2, src3);
-LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
-
-dst0 = (v16u8) __msa_insve_h((v8i16) dst0, 1, (v8i16) dst1);
-dst0 = (v16u8) __msa_insve_h((v8i16) dst0, 2, (v8i16) dst2);
-dst0 = (v16u8) __msa_insve_h((v8i16) dst0, 3, (v8i16) dst3);
+LD_UB4(src, stride, src0, src1, src2, src3);
+tp0 = LH(dst);
+tp1 = LH(dst + stride);
+tp2 = LH(dst + 2 * stride);
+tp3 = LH(dst + 3 * stride);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 0, tp0);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 1, tp1);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 2, tp2);
+dst_data = (v16u8) __msa_insert_h((v8i16) dst_data, 3, tp3);
 
 VSHF_B2_UB(src0, src1, src2, src3, mask, mask, src0, src2);
 
@@ -911,75 +915,26 @@ static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t 
*src, int32_t src_stride,
 res_r = (v8u16) __msa_srari_h((v8i16) res_r, 6);
 res_r = __msa_sat_u_h(res_r, 7);
 
-res = __msa_pckev_b((v16i8) res_r, (v16i8) res_r);
-dst0 = __msa_aver_u_b((v16u8) res, dst0);
-
-ST2x4_UB(dst0, 0, dst, dst_stride);
-}
-
-static void avc_chroma_hz_and_aver_dst_2x8_msa(uint8_t *src, int32_t 
src_stride,
-   uint8_t *dst, int32_t 
dst_stride,
-   uint32_t coeff0, uint32_t 
coeff1)
-{
-v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
-v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
-v8u16 res0_r, res1_r;
-v16u8 res0, res1, mask;
-v16i8 coeff_vec0 = __msa_fill_b(coeff0);
-v16i8 coeff_vec1 = __msa_fill_b(coeff1);
-v16u8 coeff_vec = (v16u8) __msa_ilvr_b(coeff_vec0, coeff_vec1);
-
-mask = LD_UB(&chro

[FFmpeg-cvslog] avcodec/mips: Improve avc put mc 12, 32 and 22 msa functions

2017-10-12 Thread Kaustubh Raste
ffmpeg | branch: master | Kaustubh Raste  | Wed Oct 
11 14:35:21 2017 +0530| [e549933a270dd2cfc36f2cf9bb6b29acf3dc6d08] | committer: 
Michael Niedermayer

avcodec/mips: Improve avc put mc 12, 32 and 22 msa functions

Remove loops and unroll as block sizes are known.
Removed unused functions.

Signed-off-by: Kaustubh Raste 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mips/h264qpel_msa.c | 1013 +---
 1 file changed, 747 insertions(+), 266 deletions(-)

diff --git a/libavcodec/mips/h264qpel_msa.c b/libavcodec/mips/h264qpel_msa.c
index a22a4828c6..f11fce8ff3 100644
--- a/libavcodec/mips/h264qpel_msa.c
+++ b/libavcodec/mips/h264qpel_msa.c
@@ -171,241 +171,6 @@ static const uint8_t luma_mask_arr[16 * 8] = {
 out0_m; \
 } )
 
-static void avc_luma_mid_4w_msa(const uint8_t *src, int32_t src_stride,
-uint8_t *dst, int32_t dst_stride,
-int32_t height)
-{
-uint32_t loop_cnt;
-v16i8 src0, src1, src2, src3, src4;
-v16i8 mask0, mask1, mask2;
-v8i16 hz_out0, hz_out1, hz_out2, hz_out3;
-v8i16 hz_out4, hz_out5, hz_out6, hz_out7, hz_out8;
-v8i16 dst0, dst1, dst2, dst3;
-
-LD_SB3(&luma_mask_arr[48], 16, mask0, mask1, mask2);
-LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
-src += (5 * src_stride);
-
-XORI_B5_128_SB(src0, src1, src2, src3, src4);
-
-hz_out0 = AVC_XOR_VSHF_B_AND_APPLY_6TAP_HORIZ_FILT_SH(src0, src1,
-  mask0, mask1, mask2);
-hz_out2 = AVC_XOR_VSHF_B_AND_APPLY_6TAP_HORIZ_FILT_SH(src2, src3,
-  mask0, mask1, mask2);
-
-PCKOD_D2_SH(hz_out0, hz_out0, hz_out2, hz_out2, hz_out1, hz_out3);
-
-hz_out4 = AVC_HORZ_FILTER_SH(src4, src4, mask0, mask1, mask2);
-
-for (loop_cnt = (height >> 2); loop_cnt--;) {
-LD_SB4(src, src_stride, src0, src1, src2, src3);
-src += (4 * src_stride);
-
-XORI_B4_128_SB(src0, src1, src2, src3);
-
-hz_out5 = AVC_XOR_VSHF_B_AND_APPLY_6TAP_HORIZ_FILT_SH(src0, src1,
-  mask0, mask1,
-  mask2);
-hz_out7 = AVC_XOR_VSHF_B_AND_APPLY_6TAP_HORIZ_FILT_SH(src2, src3,
-  mask0, mask1,
-  mask2);
-
-PCKOD_D2_SH(hz_out5, hz_out5, hz_out7, hz_out7, hz_out6, hz_out8);
-
-dst0 = AVC_CALC_DPADD_H_6PIX_2COEFF_R_SH(hz_out0, hz_out1, hz_out2,
- hz_out3, hz_out4, hz_out5);
-dst1 = AVC_CALC_DPADD_H_6PIX_2COEFF_R_SH(hz_out1, hz_out2, hz_out3,
- hz_out4, hz_out5, hz_out6);
-dst2 = AVC_CALC_DPADD_H_6PIX_2COEFF_R_SH(hz_out2, hz_out3, hz_out4,
- hz_out5, hz_out6, hz_out7);
-dst3 = AVC_CALC_DPADD_H_6PIX_2COEFF_R_SH(hz_out3, hz_out4, hz_out5,
- hz_out6, hz_out7, hz_out8);
-
-PCKEV_B2_SB(dst1, dst0, dst3, dst2, src0, src1);
-XORI_B2_128_SB(src0, src1);
-
-ST4x4_UB(src0, src1, 0, 2, 0, 2, dst, dst_stride);
-
-dst += (4 * dst_stride);
-
-hz_out0 = hz_out4;
-hz_out1 = hz_out5;
-hz_out2 = hz_out6;
-hz_out3 = hz_out7;
-hz_out4 = hz_out8;
-}
-}
-
-static void avc_luma_mid_8w_msa(const uint8_t *src, int32_t src_stride,
-uint8_t *dst, int32_t dst_stride,
-int32_t height)
-{
-uint32_t loop_cnt;
-v16i8 src0, src1, src2, src3, src4;
-v16i8 mask0, mask1, mask2;
-v8i16 hz_out0, hz_out1, hz_out2, hz_out3;
-v8i16 hz_out4, hz_out5, hz_out6, hz_out7, hz_out8;
-v8i16 dst0, dst1, dst2, dst3;
-v16u8 out0, out1;
-
-LD_SB3(&luma_mask_arr[0], 16, mask0, mask1, mask2);
-
-LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
-XORI_B5_128_SB(src0, src1, src2, src3, src4);
-src += (5 * src_stride);
-
-hz_out0 = AVC_HORZ_FILTER_SH(src0, src0, mask0, mask1, mask2);
-hz_out1 = AVC_HORZ_FILTER_SH(src1, src1, mask0, mask1, mask2);
-hz_out2 = AVC_HORZ_FILTER_SH(src2, src2, mask0, mask1, mask2);
-hz_out3 = AVC_HORZ_FILTER_SH(src3, src3, mask0, mask1, mask2);
-hz_out4 = AVC_HORZ_FILTER_SH(src4, src4, mask0, mask1, mask2);
-
-for (loop_cnt = (height >> 2); loop_cnt--;) {
-LD_SB4(src, src_stride, src0, src1, src2, src3);
-XORI_B4_128_SB(src0, src1, src2, src3);
-src += (4 * src_stride);
-
-hz_out5 = AVC_HORZ_FILTER_SH(src0, src0, mask0, mask1, mask2);
-hz_out6 = AVC_HORZ_

[FFmpeg-cvslog] avcodec/mips: Improve hevc bi copy mc msa functions

2017-10-12 Thread Kaustubh Raste
ffmpeg | branch: master | Kaustubh Raste  | Wed Oct 
11 14:37:27 2017 +0530| [e63758468c6420871c883fb96b8b6832adb5b2ee] | committer: 
Michael Niedermayer

avcodec/mips: Improve hevc bi copy mc msa functions

Load the specific destination bytes instead of MSA load and pack.
Use immediate unsigned saturation for clip to max saving one vector register.

Signed-off-by: Kaustubh Raste 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mips/hevc_mc_bi_msa.c | 652 ++-
 1 file changed, 366 insertions(+), 286 deletions(-)

diff --git a/libavcodec/mips/hevc_mc_bi_msa.c b/libavcodec/mips/hevc_mc_bi_msa.c
index 8208be327d..ccc3f8a64f 100644
--- a/libavcodec/mips/hevc_mc_bi_msa.c
+++ b/libavcodec/mips/hevc_mc_bi_msa.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ * Copyright (c) 2015 - 2017 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
  *
  * This file is part of FFmpeg.
  *
@@ -37,6 +37,21 @@
 HEVC_BI_RND_CLIP2(in2, in3, vec2, vec3, rnd_val, out2, out3);  \
 }
 
+#define HEVC_BI_RND_CLIP2_MAX_SATU(in0, in1, vec0, vec1, rnd_val,  \
+   out0, out1) \
+{  \
+ADDS_SH2_SH(vec0, in0, vec1, in1, out0, out1); \
+SRARI_H2_SH(out0, out1, rnd_val);  \
+CLIP_SH2_0_255_MAX_SATU(out0, out1);   \
+}
+
+#define HEVC_BI_RND_CLIP4_MAX_SATU(in0, in1, in2, in3, vec0, vec1, vec2,\
+   vec3,  rnd_val, out0, out1, out2, out3)  \
+{   \
+HEVC_BI_RND_CLIP2_MAX_SATU(in0, in1, vec0, vec1, rnd_val, out0, out1);  \
+HEVC_BI_RND_CLIP2_MAX_SATU(in2, in3, vec2, vec3, rnd_val, out2, out3);  \
+}
+
 static void hevc_bi_copy_4w_msa(uint8_t *src0_ptr,
 int32_t src_stride,
 int16_t *src1_ptr,
@@ -45,71 +60,59 @@ static void hevc_bi_copy_4w_msa(uint8_t *src0_ptr,
 int32_t dst_stride,
 int32_t height)
 {
+uint32_t loop_cnt, tp0, tp1, tp2, tp3;
+uint64_t tpd0, tpd1, tpd2, tpd3;
+v16i8 src0 = { 0 }, src1 = { 0 };
 v16i8 zero = { 0 };
+v8i16 in0 = { 0 }, in1 = { 0 }, in2 = { 0 }, in3 = { 0 };
+v8i16 dst0, dst1, dst2, dst3;
 
 if (2 == height) {
-v16i8 src0, src1;
-v8i16 dst0, in0, in1;
-
-LD_SB2(src0_ptr, src_stride, src0, src1);
-LD_SH2(src1_ptr, src2_stride, in0, in1);
-
-src0 = (v16i8) __msa_ilvr_w((v4i32) src1, (v4i32) src0);
-in0 = (v8i16) __msa_ilvr_d((v2i64) in1, (v2i64) in0);
+LW2(src0_ptr, src_stride, tp0, tp1);
+INSERT_W2_SB(tp0, tp1, src0);
+LD2(src1_ptr, src2_stride, tpd0, tpd1);
+INSERT_D2_SH(tpd0, tpd1, in0);
 
 dst0 = (v8i16) __msa_ilvr_b(zero, src0);
 dst0 <<= 6;
 dst0 += in0;
 dst0 = __msa_srari_h(dst0, 7);
-dst0 = CLIP_SH_0_255(dst0);
+dst0 = CLIP_SH_0_255_MAX_SATU(dst0);
 
 dst0 = (v8i16) __msa_pckev_b((v16i8) dst0, (v16i8) dst0);
 ST4x2_UB(dst0, dst, dst_stride);
 } else if (4 == height) {
-v16i8 src0, src1, src2, src3;
-v8i16 dst0, dst1;
-v8i16 in0, in1, in2, in3;
-
-LD_SB4(src0_ptr, src_stride, src0, src1, src2, src3);
-LD_SH4(src1_ptr, src2_stride, in0, in1, in2, in3);
-ILVR_W2_SB(src1, src0, src3, src2, src0, src1);
-ILVR_D2_SH(in1, in0, in3, in2, in0, in1);
-ILVR_B2_SH(zero, src0, zero, src1, dst0, dst1);
-
-dst0 <<= 6;
-dst1 <<= 6;
-HEVC_BI_RND_CLIP2(in0, in1, dst0, dst1, 7, dst0, dst1);
-
+LW4(src0_ptr, src_stride, tp0, tp1, tp2, tp3);
+INSERT_W4_SB(tp0, tp1, tp2, tp3, src0);
+LD4(src1_ptr, src2_stride, tpd0, tpd1, tpd2, tpd3);
+INSERT_D2_SH(tpd0, tpd1, in0);
+INSERT_D2_SH(tpd2, tpd3, in1);
+ILVRL_B2_SH(zero, src0, dst0, dst1);
+SLLI_2V(dst0, dst1, 6);
+HEVC_BI_RND_CLIP2_MAX_SATU(in0, in1, dst0, dst1, 7, dst0, dst1);
 dst0 = (v8i16) __msa_pckev_b((v16i8) dst1, (v16i8) dst0);
 ST4x4_UB(dst0, dst0, 0, 1, 2, 3, dst, dst_stride);
 } else if (0 == height % 8) {
-uint32_t loop_cnt;
-v16i8 src0, src1, src2, src3, src4, src5, src6, src7;
-v8i16 dst0, dst1, dst2, dst3;
-v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
-
 for (loop_cnt = (height >> 3); loop_cnt--;) {
-LD_SB8(src0_ptr, src_stride,
-   src0, src1, src2, src3, src4, src5, src6, src7);
-src0_ptr += (8 * src_stride);
-
-LD_SH8(src1_ptr, src2_stride,
-   in0, in1, in2, in3, in4, in5, in6, in7);
-s

[FFmpeg-cvslog] avcodec/mips: Improve hevc uni weighted vert mc msa functions

2017-10-12 Thread Kaustubh Raste
ffmpeg | branch: master | Kaustubh Raste  | Wed Oct 
11 14:39:09 2017 +0530| [e5439e272ed1ac17b78f49183cb9ab28519ce015] | committer: 
Michael Niedermayer

avcodec/mips: Improve hevc uni weighted vert mc msa functions

Pack the data to half word before clipping.
Use immediate unsigned saturation for clip to max saving one vector register.

Signed-off-by: Kaustubh Raste 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mips/hevc_mc_uniw_msa.c | 441 +++--
 1 file changed, 222 insertions(+), 219 deletions(-)

diff --git a/libavcodec/mips/hevc_mc_uniw_msa.c 
b/libavcodec/mips/hevc_mc_uniw_msa.c
index 7c01c32d57..28c7062fba 100644
--- a/libavcodec/mips/hevc_mc_uniw_msa.c
+++ b/libavcodec/mips/hevc_mc_uniw_msa.c
@@ -1337,6 +1337,7 @@ static void hevc_vt_uniwgt_8t_4w_msa(uint8_t *src,
  int32_t rnd_val)
 {
 int32_t loop_cnt;
+v16u8 out0, out1;
 v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8;
 v16i8 src9, src10, src11, src12, src13, src14;
 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r;
@@ -1344,21 +1345,27 @@ static void hevc_vt_uniwgt_8t_4w_msa(uint8_t *src,
 v16i8 src1110_r, src1211_r, src1312_r, src1413_r;
 v16i8 src2110, src4332, src6554, src8776, src10998;
 v16i8 src1210, src14131312;
-v8i16 dst10, dst32, dst54, dst76;
+v8i16 filter_vec, dst01, dst23, dst45, dst67;
 v8i16 filt0, filt1, filt2, filt3;
-v8i16 filter_vec, const_vec;
-v4i32 dst0_r, dst1_r, dst2_r, dst3_r, dst0_l, dst1_l, dst2_l, dst3_l;
-v4i32 weight_vec, offset_vec, rnd_vec;
+v8i16 dst0, dst1, dst2, dst3, weight_vec_h, offset_vec, denom_vec;
+v4i32 weight_vec, rnd_vec;
 
 src -= (3 * src_stride);
-const_vec = __msa_ldi_h(128);
-const_vec <<= 6;
 
-weight = weight & 0x;
+
 weight_vec = __msa_fill_w(weight);
-offset_vec = __msa_fill_w(offset);
 rnd_vec = __msa_fill_w(rnd_val);
 
+weight *= 128;
+rnd_val -= 6;
+
+weight_vec_h = __msa_fill_h(weight);
+offset_vec = __msa_fill_h(offset);
+denom_vec = __msa_fill_h(rnd_val);
+
+weight_vec_h = __msa_srar_h(weight_vec_h, denom_vec);
+offset_vec = __msa_adds_s_h(offset_vec, weight_vec_h);
+
 filter_vec = LD_SH(filter);
 SPLATI_H4_SH(filter_vec, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
 
@@ -1387,28 +1394,21 @@ static void hevc_vt_uniwgt_8t_4w_msa(uint8_t *src,
src1413_r, src1312_r,
src8776, src10998, src1210, src14131312);
 XORI_B4_128_SB(src8776, src10998, src1210, src14131312);
+dst01 = HEVC_FILT_8TAP_SH(src2110, src4332, src6554, src8776, filt0,
+  filt1, filt2, filt3);
+dst23 = HEVC_FILT_8TAP_SH(src4332, src6554, src8776, src10998, filt0,
+  filt1, filt2, filt3);
+dst45 = HEVC_FILT_8TAP_SH(src6554, src8776, src10998, src1210,
+  filt0, filt1, filt2, filt3);
+dst67 = HEVC_FILT_8TAP_SH(src8776, src10998, src1210, src14131312,
+  filt0, filt1, filt2, filt3);
 
-dst10 = const_vec;
-DPADD_SB4_SH(src2110, src4332, src6554, src8776, filt0, filt1,
- filt2, filt3, dst10, dst10, dst10, dst10);
-dst32 = const_vec;
-DPADD_SB4_SH(src4332, src6554, src8776, src10998,
- filt0, filt1, filt2, filt3, dst32, dst32, dst32, dst32);
-dst54 = const_vec;
-DPADD_SB4_SH(src6554, src8776, src10998, src1210,
- filt0, filt1, filt2, filt3, dst54, dst54, dst54, dst54);
-dst76 = const_vec;
-DPADD_SB4_SH(src8776, src10998, src1210, src14131312,
- filt0, filt1, filt2, filt3, dst76, dst76, dst76, dst76);
-
-HEVC_UNIW_RND_CLIP4(dst10, dst32, dst54, dst76,
-weight_vec, offset_vec, rnd_vec,
-dst0_r, dst1_r, dst2_r, dst3_r,
-dst0_l, dst1_l, dst2_l, dst3_l);
+HEVC_UNIW_RND_CLIP4_MAX_SATU_H(dst01, dst23, dst45, dst67, weight_vec,
+   offset_vec, rnd_vec, dst0, dst1, dst2,
+   dst3);
 
-HEVC_PCK_SW_SB8(dst0_l, dst0_r, dst1_l, dst1_r,
-dst2_l, dst2_r, dst3_l, dst3_r, dst0_r, dst1_r);
-ST4x8_UB(dst0_r, dst1_r, dst, dst_stride);
+PCKEV_B2_UB(dst1, dst0, dst3, dst2, out0, out1);
+ST4x8_UB(out0, out1, dst, dst_stride);
 dst += (8 * dst_stride);
 
 src2110 = src10998;
@@ -1429,24 +1429,30 @@ static void hevc_vt_uniwgt_8t_8w_msa(uint8_t *src,
  int32_t rnd_val)
 {
 int32_t loop_cnt;
+v16u8 out0, out1;
 v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10

[FFmpeg-cvslog] doc/filters: correct typo and incomplete desc.

2017-10-12 Thread Gyan Doshi
ffmpeg | branch: master | Gyan Doshi  | Thu Oct 12 
19:04:06 2017 +0530| [147c1e008a7baf9c4d4e18e9707765ae686b1521] | committer: 
Michael Niedermayer

doc/filters: correct typo and incomplete desc.

Correct typo in signalstats filter section and qualify description for variable
in select filter.

Signed-off-by: Gyan Doshi 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/doc/filters.texi b/doc/filters.texi
index e26dde4b1a..13eb62b307 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -17679,7 +17679,7 @@ with AV_LOG_INFO loglevel.
 
 @itemize
 @item
-Print all metadata values for frames with key @code{lavfi.singnalstats.YDIF} 
with values
+Print all metadata values for frames with key @code{lavfi.signalstats.YDIF} 
with values
 between 0 and 1.
 @example
 
signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
@@ -17807,7 +17807,7 @@ The PTS of the previously filtered video frame. It's 
NAN if undefined.
 The PTS of the last previously filtered video frame. It's NAN if undefined.
 
 @item prev_selected_t
-The PTS of the last previously selected video frame. It's NAN if undefined.
+The PTS of the last previously selected video frame, expressed in seconds. 
It's NAN if undefined.
 
 @item start_pts
 The PTS of the first video frame in the video. It's NAN if undefined.

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


[FFmpeg-cvslog] avcodec/mips: Improve hevc uni horiz mc msa functions

2017-10-12 Thread Kaustubh Raste
ffmpeg | branch: master | Kaustubh Raste  | Wed Oct 
11 14:38:28 2017 +0530| [6ca821a3e7751b6b24e63ec1b531e3841d4d7bda] | committer: 
Michael Niedermayer

avcodec/mips: Improve hevc uni horiz mc msa functions

Update macros to remove adds.

Signed-off-by: Kaustubh Raste 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mips/hevc_mc_uni_msa.c | 612 --
 1 file changed, 323 insertions(+), 289 deletions(-)

diff --git a/libavcodec/mips/hevc_mc_uni_msa.c 
b/libavcodec/mips/hevc_mc_uni_msa.c
index eead591ff4..3a6c5b0d48 100644
--- a/libavcodec/mips/hevc_mc_uni_msa.c
+++ b/libavcodec/mips/hevc_mc_uni_msa.c
@@ -22,6 +22,85 @@
 #include "libavcodec/mips/hevcdsp_mips.h"
 #include "libavcodec/mips/hevc_macros_msa.h"
 
+static const uint8_t ff_hevc_mask_arr[16 * 3] __attribute__((aligned(0x40))) = 
{
+/* 8 width cases */
+0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
+/* 4 width cases */
+0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20,
+/* 4 width cases */
+8, 9, 9, 10, 10, 11, 11, 12, 24, 25, 25, 26, 26, 27, 27, 28
+};
+
+#define HORIZ_8TAP_4WID_4VECS_FILT(src0, src1, src2, src3,  \
+   mask0, mask1, mask2, mask3,  \
+   filt0, filt1, filt2, filt3,  \
+   out0, out1)  \
+{   \
+v16i8 vec0_m, vec1_m, vec2_m, vec3_m,  vec4_m, vec5_m, vec6_m, vec7_m;  \
+\
+VSHF_B2_SB(src0, src1, src2, src3, mask0, mask0, vec0_m, vec1_m);   \
+DOTP_SB2_SH(vec0_m, vec1_m, filt0, filt0, out0, out1);  \
+VSHF_B2_SB(src0, src1, src2, src3, mask1, mask1, vec2_m, vec3_m);   \
+DPADD_SB2_SH(vec2_m, vec3_m, filt1, filt1, out0, out1); \
+VSHF_B2_SB(src0, src1, src2, src3, mask2, mask2, vec4_m, vec5_m);   \
+DPADD_SB2_SH(vec4_m, vec5_m, filt2, filt2, out0, out1); \
+VSHF_B2_SB(src0, src1, src2, src3, mask3, mask3, vec6_m, vec7_m);   \
+DPADD_SB2_SH(vec6_m, vec7_m, filt3, filt3, out0, out1); \
+}
+
+#define HORIZ_8TAP_8WID_4VECS_FILT(src0, src1, src2, src3,\
+   mask0, mask1, mask2, mask3,\
+   filt0, filt1, filt2, filt3,\
+   out0, out1, out2, out3)\
+{ \
+v16i8 vec0_m, vec1_m, vec2_m, vec3_m, vec4_m, vec5_m, vec6_m, vec7_m; \
+  \
+VSHF_B2_SB(src0, src0, src1, src1, mask0, mask0, vec0_m, vec1_m); \
+VSHF_B2_SB(src2, src2, src3, src3, mask0, mask0, vec2_m, vec3_m); \
+DOTP_SB4_SH(vec0_m, vec1_m, vec2_m, vec3_m, filt0, filt0, filt0, filt0,   \
+out0, out1, out2, out3);  \
+VSHF_B2_SB(src0, src0, src1, src1, mask2, mask2, vec0_m, vec1_m); \
+VSHF_B2_SB(src2, src2, src3, src3, mask2, mask2, vec2_m, vec3_m); \
+DPADD_SB4_SH(vec0_m, vec1_m, vec2_m, vec3_m, filt2, filt2, filt2, filt2,  \
+ out0, out1, out2, out3); \
+VSHF_B2_SB(src0, src0, src1, src1, mask1, mask1, vec4_m, vec5_m); \
+VSHF_B2_SB(src2, src2, src3, src3, mask1, mask1, vec6_m, vec7_m); \
+DPADD_SB4_SH(vec4_m, vec5_m, vec6_m, vec7_m, filt1, filt1, filt1, filt1,  \
+ out0, out1, out2, out3); \
+VSHF_B2_SB(src0, src0, src1, src1, mask3, mask3, vec4_m, vec5_m); \
+VSHF_B2_SB(src2, src2, src3, src3, mask3, mask3, vec6_m, vec7_m); \
+DPADD_SB4_SH(vec4_m, vec5_m, vec6_m, vec7_m, filt3, filt3, filt3, filt3,  \
+ out0, out1, out2, out3); \
+}
+
+#define HORIZ_4TAP_4WID_4VECS_FILT(src0, src1, src2, src3, \
+   mask0, mask1, filt0, filt1, \
+   out0, out1) \
+{  \
+v16i8 vec0_m, vec1_m, vec2_m, vec3_m;  \
+   \
+VSHF_B2_SB(src0, src1, src2, src3, mask0, mask0, vec0_m, vec1_m);  \
+DOTP_SB2_SH(vec0_m, vec1_m, filt0, filt0, out0, out1); \
+VSHF_B2_SB(src0, src1, src2, src3, mask1, mask1, vec2_m, vec3_m);  \
+DPADD_SB2_SH(vec2_m, vec3_m, filt1, filt1, out0, out1);\