Re: [FFmpeg-devel] [PATCH 1/2] configure: update api version of libdavs2

2018-11-17 Thread hwren









At 2018-11-18 02:45:23, "Michael Niedermayer"  wrote:
>On Sun, Nov 18, 2018 at 12:54:09AM +0800, hwren wrote:
>> From: hwrenx  
>> 
>> api version update.
>> 
>> detials could be found in davs2-git 
>> https://github.com/pkuvcl/davs2 
>> 
>> Signed-off-by: hwrenx  
>> --- 
>> configure | 2 +- 
>> 1 file changed, 1 insertion(+), 1 deletion(-) 
>> 
>> diff --git a/configure b/configure 
>> index 9bc4cf3..d2159db 100755 
>> --- a/configure 
>> +++ b/configure 
>> @@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt 
>> celt/celt.h celt_decode -lcelt0 && 
>> enabled libcaca   && require_pkg_config libcaca caca caca.h 
>> caca_create_canvas 
>> enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
>> -lcodec2 
>> enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1" 
>> "dav1d/dav1d.h" dav1d_version 
>> -enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115" 
>> davs2.h davs2_decoder_open 
>> +enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
>> davs2.h davs2_decoder_open 
>> enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
>> dc1394/dc1394.h dc1394_new 
>
>this patch is malformed and cannot be applied automatically

I'm not sure what happened cause my patch-email generated by "git send-email" 
were identified as spams.
But it worked if I just  pasted the message into a new email.
Anyway, the new patches were submitted through another stmp server.

Thanks.

>
>[...]
>-- 
>Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
>When you are offended at any man's fault, turn to yourself and study your
>own failings. Then you will forget your anger. -- Epictetus
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2 3/3] lavc/libdavs2: add disable_avx into decoder parameter

2018-11-17 Thread hwrenx
From: hwrenx 

Signed-off-by: hwrenx 
---
 libavcodec/libdavs2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
index cadf995..8cef49d 100644
--- a/libavcodec/libdavs2.c
+++ b/libavcodec/libdavs2.c
@@ -42,11 +42,14 @@ typedef struct DAVS2Context {
 static av_cold int davs2_init(AVCodecContext *avctx)
 {
 DAVS2Context *cad = avctx->priv_data;
+int cpu_flags = av_get_cpu_flags();
 
 /* init the decoder */
 cad->param.threads  = avctx->thread_count;
 cad->param.info_level   = 0;
 cad->decoder= davs2_decoder_open(&cad->param);
+cad->param.disable_avx  = !(cpu_flags & AV_CPU_FLAG_AVX &&
+cpu_flags & AV_CPU_FLAG_AVX2);
 
 if (!cad->decoder) {
 av_log(avctx, AV_LOG_ERROR, "decoder created error.");
-- 
2.7.4

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


[FFmpeg-devel] [PATCH v2 1/3] configure: update api version of libxavs2

2018-11-17 Thread hwrenx
From: hwrenx 

abolish parameter IntraPeriod &&
replaced by IntraPeriodMax/Min
...

more detials could be found in xavs2-git
https://github.com/pkuvcl/xavs2

Signed-off-by: hwrenx 
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 9bc4cf3..dee901d 100755
--- a/configure
+++ b/configure
@@ -6191,7 +6191,7 @@ enabled libx264   && { check_pkg_config libx264 
x264 "stdint.h x264.h" x
 enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get &&
  require_cpp_condition libx265 x265.h "X265_BUILD 
>= 68"
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
-enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >= 1.2.77" 
"stdint.h xavs2.h" xavs2_api_get
+enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >= 1.3.0" 
"stdint.h xavs2.h" xavs2_api_get
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
 enabled libzimg   && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h 
zimg_get_api_version
 enabled libzmq&& require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
-- 
2.7.4

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


[FFmpeg-devel] [PATCH v2 2/3] configure: update api version of libdavs2

2018-11-17 Thread hwrenx
From: hwrenx 

add parameter disable_avx
...

more detials could be found in davs2-git
https://github.com/pkuvcl/davs2

Signed-off-by: hwrenx 
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index dee901d..fb70181 100755
--- a/configure
+++ b/configure
@@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt celt/celt.h 
celt_decode -lcelt0 &&
 enabled libcaca   && require_pkg_config libcaca caca caca.h 
caca_create_canvas
 enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
-lcodec2
 enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1" 
"dav1d/dav1d.h" dav1d_version
-enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115" 
davs2.h davs2_decoder_open
+enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
davs2.h davs2_decoder_open
 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
dc1394/dc1394.h dc1394_new
 enabled libdrm&& require_pkg_config libdrm libdrm xf86drm.h 
drmGetVersion
 enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac 
"fdk-aac/aacenc_lib.h" aacEncOpen ||
-- 
2.7.4

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


Re: [FFmpeg-devel] [PATCH 1/2] configure: update api version of libdavs2

2018-11-17 Thread hwren









At 2018-11-18 01:01:36, "Carl Eugen Hoyos"  wrote:
>2018-11-17 17:54 GMT+01:00, hwren :
>> From: hwrenx 
>>
>> api version update.
>>
>> detials could be found in davs2-git
>> https://github.com/pkuvcl/davs2
>>
>> Signed-off-by: hwrenx 
>> ---
>> configure | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 9bc4cf3..d2159db 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt
>> celt/celt.h celt_decode -lcelt0 &&
>> enabled libcaca   && require_pkg_config libcaca caca caca.h
>> caca_create_canvas
>> enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create
>> -lcodec2
>> enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1"
>> "dav1d/dav1d.h" dav1d_version
>> -enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115"
>> davs2.h davs2_decoder_open
>> +enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0"
>> davs2.h davs2_decoder_open
>
>Does this fix a regression in FFmpeg? If yes, please mention it in the
>commit message.
>(If not, what does this patch do?)

I'm sorry for the missing message. New api enable avx option.
New patches would be submitted soon. Thanks.

>
>Carl Eugen
>___
>ffmpeg-devel mailing list
>ffmpeg-devel@ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]configure: Add -Wno-char-subscripts

2018-11-17 Thread Carl Eugen Hoyos
Hi!

On systems with signed char, the compiler cannot distinguish between
(intended) int8_t used as subscript and unintended char, therefore the
warning doesn't help.

Please comment, Carl Eugen
From dbe60ba171e5ab207b8abda44a9d3236f3079c01 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Sun, 18 Nov 2018 04:32:07 +0100
Subject: [PATCH] configure: Add -Wno-char-subscripts.

Silences many warnings on systems with signed char where
the compiler cannot distinguish between char and int8_t.
---
 configure |1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 9bc4cf3..ac06f11 100755
--- a/configure
+++ b/configure
@@ -6506,6 +6506,7 @@ check_disable_warning -Wno-format-zero-length
 check_disable_warning -Wno-pointer-sign
 check_disable_warning -Wno-unused-const-variable
 check_disable_warning -Wno-bool-operation
+check_disable_warning -Wno-char-subscripts
 
 check_disable_warning_headers(){
 warning_flag=-W${1#-Wno-}
-- 
1.7.10.4

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


[FFmpeg-devel] [PATCH]configure: Disable direct stripping on sunos.

2018-11-17 Thread Carl Eugen Hoyos
Hi!

Attached patch simplifies building on sunos (which is currently broken
due to the sed call).

Please comment, Carl Eugen
From 1f0b943b5f9573990a0f5c6a608b1fbd65c62687 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Sun, 18 Nov 2018 04:25:29 +0100
Subject: [PATCH] configure: Disable direct stripping on sunos.

Sunos strip doesn't know -o.
Reported-by: Michael Kostylev
---
 configure |1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 9bc4cf3..fa13db2 100755
--- a/configure
+++ b/configure
@@ -5141,6 +5141,7 @@ case $target_os in
 echo "hwcap_1 = OVERRIDE;" > mapfile &&
 add_ldflags -Wl,-M,mapfile
 nm_default='nm -P -g'
+striptype=""
 version_script='-M'
 VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
 ;;
-- 
1.7.10.4

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


Re: [FFmpeg-devel] [PATCH] Add CUDA function cuMemAllocPitch

2018-11-17 Thread Timo Rothenpieler

applied



smime.p7s
Description: S/MIME Cryptographic Signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avcodec/proresdec : add 12b decoding support

2018-11-17 Thread Carl Eugen Hoyos
2018-11-18 0:28 GMT+01:00, Martin Vignali :

> 012 : Add 12b support for 444 by default,

Is it slower?
I believe that once 12 bit decoding is not slower, it should
be the default for 422.

> and add user option for setting decoding precision

I wonder if this is necessary and correct: Calling applications
should choose the bit depth depending on their use case, if
ffmpeg (the cli) really doesn't support that, it is a missing
feature, different pix_fmts for one decoder (and input file) is
not new in FFmpeg, MPlayer had used this feature since
forever.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avcodec/proresdec : add 12b decoding support

2018-11-17 Thread Kieran O Leary
Hi

On Sat, 17 Nov 2018, 23:28 Martin Vignali  Hello,
>
> Patchs in attach add 12b decoding for prores
> Theses patch are based on patch by Kieran Kunhya
> https://pastebin.com/mYNJkdMH
>
> After theses patch by default Prores 422 are decode in 10b and 444 in 12b
> I add a user option, to force 10b or 12b decoding
>

Are all 444(4?) Encodings 12-bit? Also is there a way to verify if your
file should be decoded as 10 or 12-bit? Or does this code automate this
detection?

This all looks very cool.

Thanks,

Kieran O Leary
Irish Film Institute
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2] swscale/output: Altivec-optimize yuv2plane1_8

2018-11-17 Thread Michael Niedermayer
On Sat, Nov 17, 2018 at 10:12:14AM +0200, Lauri Kasanen wrote:
> ./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p 
> \
> -f null -vframes 100 -v error -nostats -
> 
> 1158 UNITS in planar1,   65528 runs,  8 skips
> 
> -cpuflags 0
> 
> 19082 UNITS in planar1,   65533 runs,  3 skips
> 
> 16.48 speedup ratio. On x86, SSE2 is ~7. Curiously, the Power C version
> takes as many cycles as the x86 SSE2 version, yikes it's fast.
> 
> Note that this function uses VSX instructions, but is not marked so.
> This is because several existing functions also make that mistake.
> I'll submit a patch moving them once this is reviewed.
> 
> v2: Remove !BE check
> Signed-off-by: Lauri Kasanen 
> ---
>  libswscale/ppc/swscale_altivec.c | 53 
> 
>  1 file changed, 53 insertions(+)

iam no altivec guy, just wanted to reply primarly so people dont wait for
a review from me as i normally review swscale patches.
if someone who knows altivec ok-es this then its ok with me too.
assuming this was tested (fate and some real world test)

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avutil - swscale : add YUVA444P12 and YUVA422P12

2018-11-17 Thread Michael Niedermayer
On Sat, Nov 17, 2018 at 04:41:26PM +0100, Martin Vignali wrote:
> Hello,
> 
> Patch in attach add new pix fmt YUVA444P12 and YUVA422P12
> 
> In order to add 12b decoding for prores
> 
> 
> Martin

>  libavutil/pixdesc.c  |   52 
> +++
>  libavutil/pixfmt.h   |7 +
>  libavutil/version.h  |2 -
>  tests/ref/fate/sws-pixdesc-query |   22 
>  4 files changed, 82 insertions(+), 1 deletion(-)
> 779ef6c966151c1007e56f8b170c36386f3e7a5c  
> 0001-avutil-add-YUVA444P12-and-YUVA422P12.patch
> From f2fea009730a0ddd5351e14fe21598fec863393c Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sat, 17 Nov 2018 16:27:30 +0100
> Subject: [PATCH 1/2] avutil : add YUVA444P12 and YUVA422P12
> 
> ---
>  libavutil/pixdesc.c  | 52 
> 
>  libavutil/pixfmt.h   |  7 ++
>  libavutil/version.h  |  2 +-
>  tests/ref/fate/sws-pixdesc-query | 22 +
>  4 files changed, 82 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
> index 1c36577289..fe38344d73 100644
> --- a/libavutil/pixdesc.c
> +++ b/libavutil/pixdesc.c
> @@ -2268,6 +2268,58 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>  .flags = AV_PIX_FMT_FLAG_FLOAT,
>  .alias = "yf32le",
>  },
> +[AV_PIX_FMT_YUVA422P12BE] = {
> +.name = "yuva422p12be",
> +.nb_components = 4,
> +.log2_chroma_w = 1,
> +.log2_chroma_h = 0,
> +.comp = {
> +{ 0, 2, 0, 0, 12, 1, 11, 1 },/* Y */
> +{ 1, 2, 0, 0, 12, 1, 11, 1 },/* U */
> +{ 2, 2, 0, 0, 12, 1, 11, 1 },/* V */
> +{ 3, 2, 0, 0, 12, 1, 11, 1 },/* A */
> +},
> +.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
> +},
> +[AV_PIX_FMT_YUVA422P12LE] = {
> +.name = "yuva422p12le",
> +.nb_components = 4,
> +.log2_chroma_w = 1,
> +.log2_chroma_h = 0,
> +.comp = {
> +{ 0, 2, 0, 0, 12, 1, 11, 1 },/* Y */
> +{ 1, 2, 0, 0, 12, 1, 11, 1 },/* U */
> +{ 2, 2, 0, 0, 12, 1, 11, 1 },/* V */
> +{ 3, 2, 0, 0, 12, 1, 11, 1 },/* A */
> +},
> +.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
> +},
> +[AV_PIX_FMT_YUVA444P12BE] = {
> +.name = "yuva444p12be",
> +.nb_components = 4,
> +.log2_chroma_w = 0,
> +.log2_chroma_h = 0,
> +.comp = {
> +{ 0, 2, 0, 0, 12, 1, 11, 1 },/* Y */
> +{ 1, 2, 0, 0, 12, 1, 11, 1 },/* U */
> +{ 2, 2, 0, 0, 12, 1, 11, 1 },/* V */
> +{ 3, 2, 0, 0, 12, 1, 11, 1 },/* A */
> +},
> +.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
> +},
> +[AV_PIX_FMT_YUVA444P12LE] = {
> +.name = "yuva444p12le",
> +.nb_components = 4,
> +.log2_chroma_w = 0,
> +.log2_chroma_h = 0,
> +.comp = {
> +{ 0, 2, 0, 0, 12, 1, 11, 1 },/* Y */
> +{ 1, 2, 0, 0, 12, 1, 11, 1 },/* U */
> +{ 2, 2, 0, 0, 12, 1, 11, 1 },/* V */
> +{ 3, 2, 0, 0, 12, 1, 11, 1 },/* A */
> +},
> +.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
> +},
>  };
>  #if FF_API_PLUS1_MINUS1
>  FF_ENABLE_DEPRECATION_WARNINGS
> diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
> index 6815f8dc7b..bcc344a4ea 100644
> --- a/libavutil/pixfmt.h
> +++ b/libavutil/pixfmt.h
> @@ -340,6 +340,11 @@ enum AVPixelFormat {
>  AV_PIX_FMT_GRAYF32BE,  ///< IEEE-754 single precision Y, 32bpp, 
> big-endian
>  AV_PIX_FMT_GRAYF32LE,  ///< IEEE-754 single precision Y, 32bpp, 
> little-endian
>  

> +AV_PIX_FMT_YUVA422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample 
> per 2x1 Y samples), 12b alpha, big-endian
> +AV_PIX_FMT_YUVA422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample 
> per 2x1 Y samples), 12b alpha,  little-endian
> +AV_PIX_FMT_YUVA444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample 
> per 1x1 Y samples), 12b alpha,  big-endian
> +AV_PIX_FMT_YUVA444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample 
> per 1x1 Y samples), 12b alpha,  little-endian

vertical align


[...]
>  libswscale/input.c |8 
>  libswscale/utils.c |4 
>  tests/ref/fate/filter-pixdesc-yuva422p12be |1 +
>  tests/ref/fate/filter-pixdesc-yuva422p12le |1 +
>  tests/ref/fate/filter-pixdesc-yuva444p12be |1 +
>  tests/ref/fate/filter-pixdesc-yuva444p12le |1 +
>  tests/ref/fate/filter-pixfmts-copy |4 
>  tests/ref/fate/filter-pixfmts-crop |4 
>  tests/ref/fate/filter-pixfmts-field 

[FFmpeg-devel] avcodec/proresdec : add 12b decoding support

2018-11-17 Thread Martin Vignali
Hello,

Patchs in attach add 12b decoding for prores
Theses patch are based on patch by Kieran Kunhya
https://pastebin.com/mYNJkdMH

After theses patch by default Prores 422 are decode in 10b and 444 in 12b
I add a user option, to force 10b or 12b decoding

Need to be apply after patch "avutil - swscale : add YUVA444P12 and
YUVA422P12"

003 : cosmetic, remove unused value
004 : move dsp init after codec tag check (in order to set later decoding
precision based on codec_tag by default)
005/006 : rename dsp part for 10b
007/008/009 : reorganize unpack alpha and add 12b alpha decoding
010 : Add 12b idct for prores (keep the 10b version)
011 : In 12b, i have a segfault, for file with non multiple of 16 height.
Don't understand why doesn't appear in 10b mode. But like several func,
seems to write after the last visible line. I increase buffer height, and
set crop bottom.
012 : Add 12b support for 444 by default, and add user option for setting
decoding precision
013 : Add fate test for prores with 12b decoding precision

Comments welcome

Martin


0004-avcodec-proresdec-move-dsp-init-after-codec-tag-chec.patch
Description: Binary data


0007-avcodec-proresdec-put-unpack-alpha-func-in-prores-ct.patch
Description: Binary data


0003-avcodec-proresdsp-remove-unused-value.patch
Description: Binary data


0006-avcodec-proresdsp-indent-after-prev-commit.patch
Description: Binary data


0005-avcodec-proresdec-rename-dsp-part-for-10b-and-check.patch
Description: Binary data


0008-avcodec-proresdec-make-inline-func-for-unpack-alpha.patch
Description: Binary data


0012-avcodec-proresdec-add-12b-decoding.patch
Description: Binary data


0011-avcodec-proresdec-align-height-buffer-to-16-avoid.patch
Description: Binary data


0009-avcodec-proresdec-add-unpack-alpha-12-func.patch
Description: Binary data


0010-avcodec-proresdec-add-12b-prores-idct.patch
Description: Binary data


0013-fate-proresdec-add-test-for-12b-decoding.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/vf_freezedetect: add filter to detect frozen input

2018-11-17 Thread Marton Balint



On Sat, 17 Nov 2018, Paul B Mahol wrote:


On 11/17/18, Marton Balint  wrote:


On Sun, 11 Nov 2018, Paul B Mahol wrote:


On 11/11/18, Marton Balint  wrote:

Signed-off-by: Marton Balint 
---
 Changelog |   1 +
 configure |   1 +
 doc/filters.texi  |  29 +
 libavfilter/Makefile  |   1 +
 libavfilter/allfilters.c  |   1 +
 libavfilter/version.h |   2 +-
 libavfilter/vf_freezedetect.c | 282
++
 7 files changed, 316 insertions(+), 1 deletion(-)
 create mode 100644 libavfilter/vf_freezedetect.c

diff --git a/Changelog b/Changelog
index e38a607025..0eba82b477 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
 version :
 - tpad filter
 - AV1 decoding support through libdav1d
+- freezedetect filter



[...]


+AVFILTER_DEFINE_CLASS(freezedetect);
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pix_fmts[] = {
+AV_PIX_FMT_YUV420P,
+AV_PIX_FMT_YUYV422,
+AV_PIX_FMT_RGB24,
+AV_PIX_FMT_BGR24,
+AV_PIX_FMT_YUV422P,
+AV_PIX_FMT_YUV444P,
+AV_PIX_FMT_YUV410P,
+AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_GRAY8,
+AV_PIX_FMT_YUVJ420P,
+AV_PIX_FMT_YUVJ422P,
+AV_PIX_FMT_YUVJ444P,
+AV_PIX_FMT_UYVY422,
+AV_PIX_FMT_NV12,
+AV_PIX_FMT_NV21,
+AV_PIX_FMT_ARGB,
+AV_PIX_FMT_RGBA,
+AV_PIX_FMT_ABGR,
+AV_PIX_FMT_BGRA,
+AV_PIX_FMT_GRAY16,
+AV_PIX_FMT_YUV440P,
+AV_PIX_FMT_YUVJ440P,
+AV_PIX_FMT_YUVA420P,
+AV_PIX_FMT_YUV420P16,
+AV_PIX_FMT_YUV422P16,
+AV_PIX_FMT_YUV444P16,
+AV_PIX_FMT_YA8,
+AV_PIX_FMT_YUV420P9,
+AV_PIX_FMT_YUV420P10,
+AV_PIX_FMT_YUV422P10,
+AV_PIX_FMT_YUV444P9,
+AV_PIX_FMT_YUV444P10,
+AV_PIX_FMT_YUV422P9,
+AV_PIX_FMT_GBRP,
+AV_PIX_FMT_GBRP9,
+AV_PIX_FMT_GBRP10,
+AV_PIX_FMT_GBRP16,
+AV_PIX_FMT_YUVA422P,
+AV_PIX_FMT_YUVA444P,
+AV_PIX_FMT_YUVA420P9,
+AV_PIX_FMT_YUVA422P9,
+AV_PIX_FMT_YUVA444P9,
+AV_PIX_FMT_YUVA420P10,
+AV_PIX_FMT_YUVA422P10,
+AV_PIX_FMT_YUVA444P10,
+AV_PIX_FMT_YUVA420P16,
+AV_PIX_FMT_YUVA422P16,
+AV_PIX_FMT_YUVA444P16,
+AV_PIX_FMT_NV16,
+AV_PIX_FMT_YVYU422,
+AV_PIX_FMT_GBRAP,
+AV_PIX_FMT_GBRAP16,
+AV_PIX_FMT_YUV420P12,
+AV_PIX_FMT_YUV420P14,
+AV_PIX_FMT_YUV422P12,
+AV_PIX_FMT_YUV422P14,
+AV_PIX_FMT_YUV444P12,
+AV_PIX_FMT_YUV444P14,
+AV_PIX_FMT_GBRP12,
+AV_PIX_FMT_GBRP14,
+AV_PIX_FMT_YUVJ411P,
+AV_PIX_FMT_YUV440P10,
+AV_PIX_FMT_YUV440P12,
+AV_PIX_FMT_GBRAP12,
+AV_PIX_FMT_GBRAP10,
+AV_PIX_FMT_GRAY12,
+AV_PIX_FMT_GRAY10,
+AV_PIX_FMT_GRAY9,
+AV_PIX_FMT_GRAY14,
+AV_PIX_FMT_NONE


Please make this list more compact, make use of several items per line.


Ok. I will apply the patch soon.


You sure that packed and semi-planar formats like nv21 work with filter?


Yes, because every plane they use have continous data and every component 
is calculated equally into the sum of absolute differences.


Regards,
Marton
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter: add mcompensate filter

2018-11-17 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
Works only after mestimate or when motion vectors are exported.
---
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/vf_mcompensate.c | 173 +++
 3 files changed, 175 insertions(+)
 create mode 100644 libavfilter/vf_mcompensate.c

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 6058fb97bc..8a3fc541d2 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -278,6 +278,7 @@ OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
 OBJS-$(CONFIG_MASKEDCLAMP_FILTER)+= vf_maskedclamp.o framesync.o
 OBJS-$(CONFIG_MASKEDMERGE_FILTER)+= vf_maskedmerge.o framesync.o
 OBJS-$(CONFIG_MCDEINT_FILTER)+= vf_mcdeint.o
+OBJS-$(CONFIG_MCOMPENSATE_FILTER)+= vf_mcompensate.o
 OBJS-$(CONFIG_MERGEPLANES_FILTER)+= vf_mergeplanes.o framesync.o
 OBJS-$(CONFIG_MESTIMATE_FILTER)  += vf_mestimate.o 
motion_estimation.o
 OBJS-$(CONFIG_METADATA_FILTER)   += f_metadata.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 8dfa572fde..35afafb364 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -264,6 +264,7 @@ extern AVFilter ff_vf_lutyuv;
 extern AVFilter ff_vf_maskedclamp;
 extern AVFilter ff_vf_maskedmerge;
 extern AVFilter ff_vf_mcdeint;
+extern AVFilter ff_vf_mcompensate;
 extern AVFilter ff_vf_mergeplanes;
 extern AVFilter ff_vf_mestimate;
 extern AVFilter ff_vf_metadata;
diff --git a/libavfilter/vf_mcompensate.c b/libavfilter/vf_mcompensate.c
new file mode 100644
index 00..3fc2ca3947
--- /dev/null
+++ b/libavfilter/vf_mcompensate.c
@@ -0,0 +1,173 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "motion_estimation.h"
+#include "libavcodec/mathops.h"
+#include "libavutil/avassert.h"
+#include "libavutil/common.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/motion_vector.h"
+#include "avfilter.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+
+typedef struct MCContext {
+const AVClass *class;
+int direction;
+
+int width[4], height[4];
+int hsub, vsub;
+int nb_planes;
+int depth;
+} MCContext;
+
+#define OFFSET(x) offsetof(MCContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, 
{.i64=val}, 0, 0, FLAGS, unit }
+
+static const AVOption mcompensate_options[] = {
+{ "dir", "set compensate direction", OFFSET(direction), AV_OPT_TYPE_INT, 
{.i64=0}, -1, 1, FLAGS, "dir" },
+{ "forward",   0,  0, AV_OPT_TYPE_CONST, {.i64= 1}, .unit = "dir" },
+{ "backward",  0,  0, AV_OPT_TYPE_CONST, {.i64=-1}, .unit = "dir" },
+{ NULL }
+};
+
+AVFILTER_DEFINE_CLASS(mcompensate);
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pix_fmts[] = {
+AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
+AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P,
+AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
+AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P,
+AV_PIX_FMT_YUVJ411P,
+AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
+AV_PIX_FMT_GRAY8,
+AV_PIX_FMT_NONE
+};
+
+AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
+if (!fmts_list)
+return AVERROR(ENOMEM);
+return ff_set_common_formats(ctx, fmts_list);
+}
+
+static int config_input(AVFilterLink *inlink)
+{
+AVFilterContext *ctx = inlink->dst;
+MCContext *s = ctx->priv;
+const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
+
+s->nb_planes = av_pix_fmt_count_planes(inlink->format);
+
+s->hsub = desc->log2_chroma_w;
+s->vsub = desc->log2_chroma_h;
+s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, s->vsub);
+s->height[0] = s->height[3] = inlink->h;
+s->width[1]  = s->width[2]  = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+s->width[0]  = s->width[3]  = inlink->w;
+
+s->depth = desc->comp[0].depth;
+
+return 0;
+}
+
+static int filter_frame(AVFilterLink *inlink, AVFrame *in)

Re: [FFmpeg-devel] [PATCH] avfilter/vf_freezedetect: add filter to detect frozen input

2018-11-17 Thread Paul B Mahol
On 11/17/18, Marton Balint  wrote:
>
> On Sun, 11 Nov 2018, Paul B Mahol wrote:
>
>> On 11/11/18, Marton Balint  wrote:
>>> Signed-off-by: Marton Balint 
>>> ---
>>>  Changelog |   1 +
>>>  configure |   1 +
>>>  doc/filters.texi  |  29 +
>>>  libavfilter/Makefile  |   1 +
>>>  libavfilter/allfilters.c  |   1 +
>>>  libavfilter/version.h |   2 +-
>>>  libavfilter/vf_freezedetect.c | 282
>>> ++
>>>  7 files changed, 316 insertions(+), 1 deletion(-)
>>>  create mode 100644 libavfilter/vf_freezedetect.c
>>>
>>> diff --git a/Changelog b/Changelog
>>> index e38a607025..0eba82b477 100644
>>> --- a/Changelog
>>> +++ b/Changelog
>>> @@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
>>>  version :
>>>  - tpad filter
>>>  - AV1 decoding support through libdav1d
>>> +- freezedetect filter
>>>
>
> [...]
>
>>> +AVFILTER_DEFINE_CLASS(freezedetect);
>>> +
>>> +static int query_formats(AVFilterContext *ctx)
>>> +{
>>> +static const enum AVPixelFormat pix_fmts[] = {
>>> +AV_PIX_FMT_YUV420P,
>>> +AV_PIX_FMT_YUYV422,
>>> +AV_PIX_FMT_RGB24,
>>> +AV_PIX_FMT_BGR24,
>>> +AV_PIX_FMT_YUV422P,
>>> +AV_PIX_FMT_YUV444P,
>>> +AV_PIX_FMT_YUV410P,
>>> +AV_PIX_FMT_YUV411P,
>>> +AV_PIX_FMT_GRAY8,
>>> +AV_PIX_FMT_YUVJ420P,
>>> +AV_PIX_FMT_YUVJ422P,
>>> +AV_PIX_FMT_YUVJ444P,
>>> +AV_PIX_FMT_UYVY422,
>>> +AV_PIX_FMT_NV12,
>>> +AV_PIX_FMT_NV21,
>>> +AV_PIX_FMT_ARGB,
>>> +AV_PIX_FMT_RGBA,
>>> +AV_PIX_FMT_ABGR,
>>> +AV_PIX_FMT_BGRA,
>>> +AV_PIX_FMT_GRAY16,
>>> +AV_PIX_FMT_YUV440P,
>>> +AV_PIX_FMT_YUVJ440P,
>>> +AV_PIX_FMT_YUVA420P,
>>> +AV_PIX_FMT_YUV420P16,
>>> +AV_PIX_FMT_YUV422P16,
>>> +AV_PIX_FMT_YUV444P16,
>>> +AV_PIX_FMT_YA8,
>>> +AV_PIX_FMT_YUV420P9,
>>> +AV_PIX_FMT_YUV420P10,
>>> +AV_PIX_FMT_YUV422P10,
>>> +AV_PIX_FMT_YUV444P9,
>>> +AV_PIX_FMT_YUV444P10,
>>> +AV_PIX_FMT_YUV422P9,
>>> +AV_PIX_FMT_GBRP,
>>> +AV_PIX_FMT_GBRP9,
>>> +AV_PIX_FMT_GBRP10,
>>> +AV_PIX_FMT_GBRP16,
>>> +AV_PIX_FMT_YUVA422P,
>>> +AV_PIX_FMT_YUVA444P,
>>> +AV_PIX_FMT_YUVA420P9,
>>> +AV_PIX_FMT_YUVA422P9,
>>> +AV_PIX_FMT_YUVA444P9,
>>> +AV_PIX_FMT_YUVA420P10,
>>> +AV_PIX_FMT_YUVA422P10,
>>> +AV_PIX_FMT_YUVA444P10,
>>> +AV_PIX_FMT_YUVA420P16,
>>> +AV_PIX_FMT_YUVA422P16,
>>> +AV_PIX_FMT_YUVA444P16,
>>> +AV_PIX_FMT_NV16,
>>> +AV_PIX_FMT_YVYU422,
>>> +AV_PIX_FMT_GBRAP,
>>> +AV_PIX_FMT_GBRAP16,
>>> +AV_PIX_FMT_YUV420P12,
>>> +AV_PIX_FMT_YUV420P14,
>>> +AV_PIX_FMT_YUV422P12,
>>> +AV_PIX_FMT_YUV422P14,
>>> +AV_PIX_FMT_YUV444P12,
>>> +AV_PIX_FMT_YUV444P14,
>>> +AV_PIX_FMT_GBRP12,
>>> +AV_PIX_FMT_GBRP14,
>>> +AV_PIX_FMT_YUVJ411P,
>>> +AV_PIX_FMT_YUV440P10,
>>> +AV_PIX_FMT_YUV440P12,
>>> +AV_PIX_FMT_GBRAP12,
>>> +AV_PIX_FMT_GBRAP10,
>>> +AV_PIX_FMT_GRAY12,
>>> +AV_PIX_FMT_GRAY10,
>>> +AV_PIX_FMT_GRAY9,
>>> +AV_PIX_FMT_GRAY14,
>>> +AV_PIX_FMT_NONE
>>
>> Please make this list more compact, make use of several items per line.
>
> Ok. I will apply the patch soon.

You sure that packed and semi-planar formats like nv21 work with filter?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/vf_freezedetect: add filter to detect frozen input

2018-11-17 Thread Marton Balint


On Sun, 11 Nov 2018, Paul B Mahol wrote:


On 11/11/18, Marton Balint  wrote:

Signed-off-by: Marton Balint 
---
 Changelog |   1 +
 configure |   1 +
 doc/filters.texi  |  29 +
 libavfilter/Makefile  |   1 +
 libavfilter/allfilters.c  |   1 +
 libavfilter/version.h |   2 +-
 libavfilter/vf_freezedetect.c | 282
++
 7 files changed, 316 insertions(+), 1 deletion(-)
 create mode 100644 libavfilter/vf_freezedetect.c

diff --git a/Changelog b/Changelog
index e38a607025..0eba82b477 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
 version :
 - tpad filter
 - AV1 decoding support through libdav1d
+- freezedetect filter



[...]


+AVFILTER_DEFINE_CLASS(freezedetect);
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pix_fmts[] = {
+AV_PIX_FMT_YUV420P,
+AV_PIX_FMT_YUYV422,
+AV_PIX_FMT_RGB24,
+AV_PIX_FMT_BGR24,
+AV_PIX_FMT_YUV422P,
+AV_PIX_FMT_YUV444P,
+AV_PIX_FMT_YUV410P,
+AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_GRAY8,
+AV_PIX_FMT_YUVJ420P,
+AV_PIX_FMT_YUVJ422P,
+AV_PIX_FMT_YUVJ444P,
+AV_PIX_FMT_UYVY422,
+AV_PIX_FMT_NV12,
+AV_PIX_FMT_NV21,
+AV_PIX_FMT_ARGB,
+AV_PIX_FMT_RGBA,
+AV_PIX_FMT_ABGR,
+AV_PIX_FMT_BGRA,
+AV_PIX_FMT_GRAY16,
+AV_PIX_FMT_YUV440P,
+AV_PIX_FMT_YUVJ440P,
+AV_PIX_FMT_YUVA420P,
+AV_PIX_FMT_YUV420P16,
+AV_PIX_FMT_YUV422P16,
+AV_PIX_FMT_YUV444P16,
+AV_PIX_FMT_YA8,
+AV_PIX_FMT_YUV420P9,
+AV_PIX_FMT_YUV420P10,
+AV_PIX_FMT_YUV422P10,
+AV_PIX_FMT_YUV444P9,
+AV_PIX_FMT_YUV444P10,
+AV_PIX_FMT_YUV422P9,
+AV_PIX_FMT_GBRP,
+AV_PIX_FMT_GBRP9,
+AV_PIX_FMT_GBRP10,
+AV_PIX_FMT_GBRP16,
+AV_PIX_FMT_YUVA422P,
+AV_PIX_FMT_YUVA444P,
+AV_PIX_FMT_YUVA420P9,
+AV_PIX_FMT_YUVA422P9,
+AV_PIX_FMT_YUVA444P9,
+AV_PIX_FMT_YUVA420P10,
+AV_PIX_FMT_YUVA422P10,
+AV_PIX_FMT_YUVA444P10,
+AV_PIX_FMT_YUVA420P16,
+AV_PIX_FMT_YUVA422P16,
+AV_PIX_FMT_YUVA444P16,
+AV_PIX_FMT_NV16,
+AV_PIX_FMT_YVYU422,
+AV_PIX_FMT_GBRAP,
+AV_PIX_FMT_GBRAP16,
+AV_PIX_FMT_YUV420P12,
+AV_PIX_FMT_YUV420P14,
+AV_PIX_FMT_YUV422P12,
+AV_PIX_FMT_YUV422P14,
+AV_PIX_FMT_YUV444P12,
+AV_PIX_FMT_YUV444P14,
+AV_PIX_FMT_GBRP12,
+AV_PIX_FMT_GBRP14,
+AV_PIX_FMT_YUVJ411P,
+AV_PIX_FMT_YUV440P10,
+AV_PIX_FMT_YUV440P12,
+AV_PIX_FMT_GBRAP12,
+AV_PIX_FMT_GBRAP10,
+AV_PIX_FMT_GRAY12,
+AV_PIX_FMT_GRAY10,
+AV_PIX_FMT_GRAY9,
+AV_PIX_FMT_GRAY14,
+AV_PIX_FMT_NONE


Please make this list more compact, make use of several items per line.


Ok. I will apply the patch soon.

Regards,
Marton
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec/mpeg_er: fix clearing chroma blocks for 422 and 444

2018-11-17 Thread Marton Balint
Fixes ticket #7494.

Signed-off-by: Marton Balint 
---
 libavcodec/mpeg_er.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c
index ada1a1692f..f54cb8548b 100644
--- a/libavcodec/mpeg_er.c
+++ b/libavcodec/mpeg_er.c
@@ -78,6 +78,8 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int 
mv_dir, int mv_type,
 ff_update_block_index(s);
 
 s->bdsp.clear_blocks(s->block[0]);
+if (!s->chroma_y_shift)
+s->bdsp.clear_blocks(s->block[6]);
 
 s->dest[0] = s->current_picture.f->data[0] +
  s->mb_y * 16 * s->linesize +
-- 
2.16.4

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


Re: [FFmpeg-devel] [PATCH 1/2] configure: update api version of libdavs2

2018-11-17 Thread Michael Niedermayer
On Sun, Nov 18, 2018 at 12:54:09AM +0800, hwren wrote:
> From: hwrenx  
> 
> api version update.
> 
> detials could be found in davs2-git 
> https://github.com/pkuvcl/davs2 
> 
> Signed-off-by: hwrenx  
> --- 
> configure | 2 +- 
> 1 file changed, 1 insertion(+), 1 deletion(-) 
> 
> diff --git a/configure b/configure 
> index 9bc4cf3..d2159db 100755 
> --- a/configure 
> +++ b/configure 
> @@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt 
> celt/celt.h celt_decode -lcelt0 && 
> enabled libcaca   && require_pkg_config libcaca caca caca.h 
> caca_create_canvas 
> enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
> -lcodec2 
> enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1" 
> "dav1d/dav1d.h" dav1d_version 
> -enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115" 
> davs2.h davs2_decoder_open 
> +enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
> davs2.h davs2_decoder_open 
> enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
> dc1394/dc1394.h dc1394_new 

this patch is malformed and cannot be applied automatically

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec/truemotion2rt: Fix rounding in input size check

2018-11-17 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 
11332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2RT_fuzzer-5678456612847616

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/truemotion2rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/truemotion2rt.c b/libavcodec/truemotion2rt.c
index 9df0b527bb..e3ab998fda 100644
--- a/libavcodec/truemotion2rt.c
+++ b/libavcodec/truemotion2rt.c
@@ -116,7 +116,7 @@ static int truemotion2rt_decode_frame(AVCodecContext 
*avctx, void *data,
 if (ret < 0)
 return ret;
 
-if (avctx->width / s->hscale * avctx->height * s->delta_size > avpkt->size 
* 8LL * 4)
+if ((avctx->width + s->hscale - 1)/ s->hscale * avctx->height * 
s->delta_size > avpkt->size * 8LL * 4)
 return AVERROR_INVALIDDATA;
 
 ret = init_get_bits8(gb, avpkt->data + ret, avpkt->size - ret);
-- 
2.19.1

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


Re: [FFmpeg-devel] [PATCH] swscale/output: Altivec-optimize yuv2plane1_8

2018-11-17 Thread Lauri Kasanen
On Sat, 17 Nov 2018 15:20:08 +0100
Carl Eugen Hoyos  wrote:

> 2018-11-17 9:09 GMT+01:00, Lauri Kasanen :
> > Carl Eugen Hoyos  wrote:
> >> (This is less important atm, but I believe all functions currently
> >> in libswscale/ppc compile and run fine on - old - 32bit be hardware
> >> as your new function does.
> >> My completely inexperienced suspicion is that the instruction that
> >> you call "VSX" also exists on Altivec.)
> >
> > Ref
> > http://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html#PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06
> >
> > VSX functions such as vec_vsx_ld were added in ISA 2.06, aka POWER7.
> 
> The instruction vec_vsx_ld is currently only used for little-endian ppc
> which I thought did not exist before power7, am I wrong?

Looks like there were LE Powers like the 440 already in 1999:
https://lwn.net/Articles/408051/
datasheets.chipdb.org/IBM/PowerPC/440/PowerPC-440-Core.pdf

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


[FFmpeg-devel] [PATCH 3/4] lavf/dashdec: Add webm to the list of allowed extensions.

2018-11-17 Thread Andrey Semashev
This is in coherence with dashenc, which can now generate segments with
webm file name extension by default. Dashdec should be able to handle
such streams by default as well.
---
 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 497e7e469c..cf603bf075 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -2242,7 +2242,7 @@ static int dash_probe(AVProbeData *p)
 static const AVOption dash_options[] = {
 {"allowed_extensions", "List of file extensions that dash is allowed to 
access",
 OFFSET(allowed_extensions), AV_OPT_TYPE_STRING,
-{.str = "aac,m4a,m4s,m4v,mov,mp4"},
+{.str = "aac,m4a,m4s,m4v,mov,mp4,webm"},
 INT_MIN, INT_MAX, FLAGS},
 {NULL}
 };
-- 
2.19.1

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


[FFmpeg-devel] [PATCH 2/4] lavf/dashenc: Add support for format-specific file extensions.

2018-11-17 Thread Andrey Semashev
The file name template options now support a new "$ext$" placeholder,
which is replaced with a filename extension specific for the selected
file format. This is useful for the new "auto" format mode, when
different streams may use different file formats, and it is not
possible to specify the correct file name extension exactly.

Resolves warnings in the log about webm segments not having webm extensions.
---
 doc/muxers.texi   |  6 +++---
 libavformat/dashenc.c | 48 +++
 2 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 2fed5cf3d4..a02ac01b55 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -245,11 +245,11 @@ Enable (1) or disable (0) use of SegmentTimeline in 
SegmentTemplate.
 @item -single_file @var{single_file}
 Enable (1) or disable (0) storing all segments in one file, accessed using 
byte ranges.
 @item -single_file_name @var{file_name}
-DASH-templated name to be used for baseURL. Implies @var{single_file} set to 
"1".
+DASH-templated name to be used for baseURL. Implies @var{single_file} set to 
"1". In the template, "$ext$" is replaced with the file name extension specific 
for the segment format.
 @item -init_seg_name @var{init_name}
-DASH-templated name to used for the initialization segment. Default is 
"init-stream$RepresentationID$.m4s"
+DASH-templated name to used for the initialization segment. Default is 
"init-stream$RepresentationID$.$ext$". "$ext$" is replaced with the file name 
extension specific for the segment format.
 @item -media_seg_name @var{segment_name}
-DASH-templated name to used for the media segments. Default is 
"chunk-stream$RepresentationID$-$Number%05d$.m4s"
+DASH-templated name to used for the media segments. Default is 
"chunk-stream$RepresentationID$-$Number%05d$.$ext$". "$ext$" is replaced with 
the file name extension specific for the segment format.
 @item -utc_timing_url @var{utc_url}
 URL of the page that will return the UTC timestamp in ISO format. Example: 
"https://time.akamai.com/?iso";
 @item method @var{method}
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 0af7b85c5f..f552503564 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -87,6 +87,9 @@ typedef struct OutputStream {
 int bit_rate;
 SegmentType segment_type;  /* segment type selected for this particular 
stream */
 const char *format_name;
+const char *single_file_name;  /* file names selected for this particular 
stream */
+const char *init_seg_name;
+const char *media_seg_name;
 
 char codec_str[100];
 int written_len;
@@ -119,7 +122,7 @@ typedef struct DASHContext {
 int64_t total_duration;
 char availability_start_time[100];
 char dirname[1024];
-const char *single_file_name;
+const char *single_file_name;  /* file names as specified in options */
 const char *init_seg_name;
 const char *media_seg_name;
 const char *utc_timing_url;
@@ -200,7 +203,7 @@ static const char *get_format_str(SegmentType segment_type) 
{
 return NULL;
 }
 
-static inline SegmentType select_segment_type(SegmentType segment_type, 
AVCodecID codec_id)
+static inline SegmentType select_segment_type(SegmentType segment_type, enum 
AVCodecID codec_id)
 {
 if (segment_type == SEGMENT_TYPE_AUTO) {
 if (codec_id == AV_CODEC_ID_OPUS || codec_id == AV_CODEC_ID_VORBIS ||
@@ -425,6 +428,9 @@ static void dash_free(AVFormatContext *s)
 for (j = 0; j < os->nb_segments; j++)
 av_free(os->segments[j]);
 av_free(os->segments);
+av_freep(&os->single_file_name);
+av_freep(&os->init_seg_name);
+av_freep(&os->media_seg_name);
 }
 av_freep(&c->streams);
 
@@ -451,7 +457,7 @@ static void output_segment_list(OutputStream *os, 
AVIOContext *out, AVFormatCont
 avio_printf(out, "availabilityTimeOffset=\"%.3f\" ",
 os->availability_time_offset);
 }
-avio_printf(out, "initialization=\"%s\" media=\"%s\" 
startNumber=\"%d\">\n", c->init_seg_name, c->media_seg_name, c->use_timeline ? 
start_number : 1);
+avio_printf(out, "initialization=\"%s\" media=\"%s\" 
startNumber=\"%d\">\n", os->init_seg_name, os->media_seg_name, c->use_timeline 
? start_number : 1);
 if (c->use_timeline) {
 int64_t cur_time = 0;
 avio_printf(out, "\t\t\t\t\t\n");
@@ -1056,10 +1062,26 @@ static int dash_init(AVFormatContext *s)
 if (!ctx)
 return AVERROR(ENOMEM);
 
+if (c->init_seg_name) {
+os->init_seg_name = av_strireplace(c->init_seg_name, "$ext$", 
os->format_name);
+if (!os->init_seg_name)
+return AVERROR(ENOMEM);
+}
+if (c->media_seg_name) {
+os->media_seg_name = av_strireplace(c->media_seg_name, "$ext$", 
os->format_name);
+if (!os->media_seg_name)
+return AVERROR(ENOMEM);
+   

[FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.

2018-11-17 Thread Andrey Semashev
---
 libavformat/dashenc.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index f552503564..2c872f93a1 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -833,12 +833,12 @@ static int write_manifest(AVFormatContext *s, int final)
 snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : 
"%s", s->url);
 set_http_options(&opts, c);
 ret = dashenc_io_open(s, &c->mpd_out, temp_filename, &opts);
+av_dict_free(&opts);
 if (ret < 0) {
 av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
temp_filename);
 return ret;
 }
 out = c->mpd_out;
-av_dict_free(&opts);
 avio_printf(out, "\n");
 avio_printf(out, "http://www.w3.org/2001/XMLSchema-instance\"\n";
 "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n"
@@ -924,11 +924,11 @@ static int write_manifest(AVFormatContext *s, int final)
 
 set_http_options(&opts, c);
 ret = dashenc_io_open(s, &c->m3u8_out, temp_filename, &opts);
+av_dict_free(&opts);
 if (ret < 0) {
 av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
temp_filename);
 return ret;
 }
-av_dict_free(&opts);
 
 ff_hls_write_playlist_version(c->m3u8_out, 7);
 
@@ -1122,9 +1122,9 @@ static int dash_init(AVFormatContext *s)
 snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile);
 set_http_options(&opts, c);
 ret = s->io_open(s, &os->out, filename, AVIO_FLAG_WRITE, &opts);
+av_dict_free(&opts);
 if (ret < 0)
 return ret;
-av_dict_free(&opts);
 os->init_start_pos = 0;
 
 if (c->format_options_str) {
@@ -1145,11 +1145,12 @@ static int dash_init(AVFormatContext *s)
 av_dict_set_int(&opts, "dash_track_number", i + 1, 0);
 av_dict_set_int(&opts, "live", 1, 0);
 }
-if ((ret = avformat_init_output(ctx, &opts)) < 0)
+ret = avformat_init_output(ctx, &opts);
+av_dict_free(&opts);
+if (ret < 0)
 return ret;
 os->ctx_inited = 1;
 avio_flush(ctx->pb);
-av_dict_free(&opts);
 
 av_log(s, AV_LOG_VERBOSE, "Representation %d init segment will be 
written to: %s\n", i, filename);
 
@@ -1553,9 +1554,9 @@ static int dash_write_packet(AVFormatContext *s, AVPacket 
*pkt)
  use_rename ? "%s.tmp" : "%s", os->full_path);
 set_http_options(&opts, c);
 ret = dashenc_io_open(s, &os->out, os->temp_path, &opts);
+av_dict_free(&opts);
 if (ret < 0)
 return ret;
-av_dict_free(&opts);
 }
 
 //write out the data immediately in streaming mode
-- 
2.19.1

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


[FFmpeg-devel] [PATCH 1/4] lavf/dashenc: Add DASH segment type auto and make it the default

2018-11-17 Thread Andrey Semashev
This commit restores the ability to create DASH streams with codecs
that require different containers that was lost after commit
2efdbf7367989cf9d296c25fa3d2aff8d6e25fdd. It adds a new "auto" value for
the dash_segment_type option and makes it the default. When in this mode,
the segment format will be chosen based on the codec used in the stream:
webm for Vorbis, Opus, VP8 or VP9, mp4 otherwise.
---
 doc/muxers.texi   |  7 +++--
 libavformat/dashenc.c | 72 ---
 2 files changed, 59 insertions(+), 20 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 62f4091e31..2fed5cf3d4 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -289,10 +289,13 @@ Set container format (mp4/webm) options using a @code{:} 
separated list of
 key=value parameters. Values containing @code{:} special characters must be
 escaped.
 
-@item dash_segment_type @var{dash_segment_type}
+@item -dash_segment_type @var{dash_segment_type}
 Possible values:
+@item auto
+If this flag is set, the dash segment files format will be selected based on 
the stream codec. This is the default mode.
+
 @item mp4
-If this flag is set, the dash segment files will be in in ISOBMFF format. This 
is the default format.
+If this flag is set, the dash segment files will be in in ISOBMFF format.
 
 @item webm
 If this flag is set, the dash segment files will be in in WebM format.
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index d151921175..0af7b85c5f 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -49,7 +49,8 @@
 #include "dash.h"
 
 typedef enum {
-SEGMENT_TYPE_MP4 = 0,
+SEGMENT_TYPE_AUTO = 0,
+SEGMENT_TYPE_MP4,
 SEGMENT_TYPE_WEBM,
 SEGMENT_TYPE_NB
 } SegmentType;
@@ -84,6 +85,8 @@ typedef struct OutputStream {
 int64_t first_pts, start_pts, max_pts;
 int64_t last_dts, last_pts;
 int bit_rate;
+SegmentType segment_type;  /* segment type selected for this particular 
stream */
+const char *format_name;
 
 char codec_str[100];
 int written_len;
@@ -131,8 +134,7 @@ typedef struct DASHContext {
 int64_t timeout;
 int index_correction;
 char *format_options_str;
-SegmentType segment_type;
-const char *format_name;
+SegmentType segment_type_option;  /* segment type as specified in options 
*/
 } DASHContext;
 
 static struct codec_string {
@@ -151,6 +153,7 @@ static struct format_string {
 SegmentType segment_type;
 const char *str;
 } formats[] = {
+{ SEGMENT_TYPE_AUTO, "auto" },
 { SEGMENT_TYPE_MP4, "mp4" },
 { SEGMENT_TYPE_WEBM, "webm" },
 { 0, NULL }
@@ -197,6 +200,38 @@ static const char *get_format_str(SegmentType 
segment_type) {
 return NULL;
 }
 
+static inline SegmentType select_segment_type(SegmentType segment_type, 
AVCodecID codec_id)
+{
+if (segment_type == SEGMENT_TYPE_AUTO) {
+if (codec_id == AV_CODEC_ID_OPUS || codec_id == AV_CODEC_ID_VORBIS ||
+codec_id == AV_CODEC_ID_VP8 || codec_id == AV_CODEC_ID_VP9) {
+segment_type = SEGMENT_TYPE_WEBM;
+} else {
+segment_type = SEGMENT_TYPE_MP4;
+}
+}
+
+return segment_type;
+}
+
+static int init_segment_types(AVFormatContext *s)
+{
+DASHContext *c = s->priv_data;
+for (int i = 0; i < s->nb_streams; ++i) {
+OutputStream *os = &c->streams[i];
+SegmentType segment_type = select_segment_type(
+c->segment_type_option, s->streams[i]->codecpar->codec_id);
+os->segment_type = segment_type;
+os->format_name = get_format_str(segment_type);
+if (!os->format_name) {
+av_log(s, AV_LOG_ERROR, "Could not select DASH segment type for 
stream %d\n", i);
+return AVERROR_MUXER_NOT_FOUND;
+}
+}
+
+return 0;
+}
+
 static int check_file_extension(const char *filename, const char *extension) {
 char *dot;
 if (!filename || !extension)
@@ -622,13 +657,13 @@ static int write_adaptation_set(AVFormatContext *s, 
AVIOContext *out, int as_ind
 if (as->media_type == AVMEDIA_TYPE_VIDEO) {
 AVStream *st = s->streams[i];
 avio_printf(out, "\t\t\tformat_name, os->codec_str, bandwidth_str, 
s->streams[i]->codecpar->width, s->streams[i]->codecpar->height);
+i, os->format_name, os->codec_str, bandwidth_str, 
s->streams[i]->codecpar->width, s->streams[i]->codecpar->height);
 if (st->avg_frame_rate.num)
 avio_printf(out, " frameRate=\"%d/%d\"", 
st->avg_frame_rate.num, st->avg_frame_rate.den);
 avio_printf(out, ">\n");
 } else {
 avio_printf(out, "\t\t\t\n",
-i, c->format_name, os->codec_str, bandwidth_str, 
s->streams[i]->codecpar->sample_rate);
+i, os->format_name, os->codec_str, bandwidth_str, 
s->streams[i]->codecpar->sample_rate);
 avio_printf(out, "\t\t\t\t\n",
 s->streams[i]->codecpar->channels);
 }
@@ 

Re: [FFmpeg-devel] [PATCH 1/2] configure: update api version of libdavs2

2018-11-17 Thread Carl Eugen Hoyos
2018-11-17 17:54 GMT+01:00, hwren :
> From: hwrenx 
>
> api version update.
>
> detials could be found in davs2-git
> https://github.com/pkuvcl/davs2
>
> Signed-off-by: hwrenx 
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 9bc4cf3..d2159db 100755
> --- a/configure
> +++ b/configure
> @@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt
> celt/celt.h celt_decode -lcelt0 &&
> enabled libcaca   && require_pkg_config libcaca caca caca.h
> caca_create_canvas
> enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create
> -lcodec2
> enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1"
> "dav1d/dav1d.h" dav1d_version
> -enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115"
> davs2.h davs2_decoder_open
> +enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0"
> davs2.h davs2_decoder_open

Does this fix a regression in FFmpeg? If yes, please mention it in the
commit message.
(If not, what does this patch do?)

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] configure: update api version of libxavs2

2018-11-17 Thread hwren
From: hwrenx  

api version update.

more detials could be found in xavs2-git 
https://github.com/pkuvcl/xavs2 

Signed-off-by: hwrenx  
--- 
configure | 2 +- 
1 file changed, 1 insertion(+), 1 deletion(-) 

diff --git a/configure b/configure 
index d2159db..fb70181 100755 
--- a/configure 
+++ b/configure 
@@ -6191,7 +6191,7 @@ enabled libx264   && { check_pkg_config libx264 
x264 "stdint.h x264.h" x 
enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get && 
 require_cpp_condition libx265 x265.h "X265_BUILD 
>= 68" 
enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" 
-enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >= 1.2.77" 
"stdint.h xavs2.h" xavs2_api_get 
+enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >= 1.3.0" 
"stdint.h xavs2.h" xavs2_api_get 
enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore 
enabled libzimg   && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h 
zimg_get_api_version 
enabled libzmq&& require_pkg_config libzmq libzmq zmq.h zmq_ctx_new 
-- 
2.7.4 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] configure: update api version of libdavs2

2018-11-17 Thread hwren
From: hwrenx  

api version update.

detials could be found in davs2-git 
https://github.com/pkuvcl/davs2 

Signed-off-by: hwrenx  
--- 
configure | 2 +- 
1 file changed, 1 insertion(+), 1 deletion(-) 

diff --git a/configure b/configure 
index 9bc4cf3..d2159db 100755 
--- a/configure 
+++ b/configure 
@@ -6075,7 +6075,7 @@ enabled libcelt   && require libcelt celt/celt.h 
celt_decode -lcelt0 && 
enabled libcaca   && require_pkg_config libcaca caca caca.h 
caca_create_canvas 
enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
-lcodec2 
enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1" 
"dav1d/dav1d.h" dav1d_version 
-enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115" 
davs2.h davs2_decoder_open 
+enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
davs2.h davs2_decoder_open 
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
dc1394/dc1394.h dc1394_new 
enabled libdrm&& require_pkg_config libdrm libdrm xf86drm.h 
drmGetVersion 
enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac 
"fdk-aac/aacenc_lib.h" aacEncOpen || 
-- 
2.7.4 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] vf_blend : use av_clip_uintp2 instead of av_clip for 10b and 12b

2018-11-17 Thread Paul B Mahol
On 11/17/18, Paul B Mahol  wrote:
> On 11/17/18, Martin Vignali  wrote:
>> Hello,
>>
>> Patch in attach fix make fate-source error in vf_blend
>>
>> Untested
>
> I tried that approach and compiler miscompiles code for 8 < bitdpeth < 16.
>

Actually, bug happens because of unsigned integer overflow.
Dunno why it does not happen for 8 and 16 case.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] fate-source : add cuda_check to ignore files list

2018-11-17 Thread Philip Langdale
On Sat, 17 Nov 2018 17:05:00 +0100
Martin Vignali  wrote:

> Hello,
> 
> Patch in attach fix make fate-source error for cuda_check files
> 
> Martin

Thanks for pointing this out. I've pushed a slightly different fix
where I made the inclusion guards follow the standard pattern.

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


Re: [FFmpeg-devel] vf_blend : use av_clip_uintp2 instead of av_clip for 10b and 12b

2018-11-17 Thread Paul B Mahol
On 11/17/18, Martin Vignali  wrote:
> Hello,
>
> Patch in attach fix make fate-source error in vf_blend
>
> Untested

I tried that approach and compiler miscompiles code for 8 < bitdpeth < 16.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] fate-source : add cuda_check to ignore files list

2018-11-17 Thread Martin Vignali
Hello,

Patch in attach fix make fate-source error for cuda_check files

Martin


0004-fate-source-add-cuda_check-file-to.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] vf_blend : use av_clip_uintp2 instead of av_clip for 10b and 12b

2018-11-17 Thread Martin Vignali
Hello,

Patch in attach fix make fate-source error in vf_blend

Untested


Martin


0003-vf_blend-use-av_clip_uintp2-instead-of-av_clip.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] avutil - swscale : add YUVA444P12 and YUVA422P12

2018-11-17 Thread Martin Vignali
Hello,

Patch in attach add new pix fmt YUVA444P12 and YUVA422P12

In order to add 12b decoding for prores


Martin


0001-avutil-add-YUVA444P12-and-YUVA422P12.patch
Description: Binary data


0002-swscale-add-support-for-YUVA444p12-and-YUVA422P12.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter: add chromashift filter

2018-11-17 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
 doc/filters.texi |  17 +++
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/vf_chromashift.c | 251 +++
 4 files changed, 270 insertions(+)
 create mode 100644 libavfilter/vf_chromashift.c

diff --git a/doc/filters.texi b/doc/filters.texi
index a697d3db14..77f57bfcd6 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6253,6 +6253,23 @@ ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 
-shortest -filter_compl
 @end example
 @end itemize
 
+@section chromashift
+Shift chroma pixels horizontally and/or vertically.
+
+The filter accepts the following options:
+@table @option
+@item cbh
+Set amount to shift chroma-blue horizontally.
+@item cbv
+Set amount to shift chroma-blue vertically.
+@item crh
+Set amount to shift chroma-red horizontally.
+@item crv
+Set amount to shift chroma-red vertically.
+@item edge
+Set edge mode, can be @var{smear}, default, or @var{warp}.
+@end table
+
 @section ciescope
 
 Display CIE color diagram with pixels overlaid onto it.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 6058fb97bc..8f3fde8c27 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -169,6 +169,7 @@ OBJS-$(CONFIG_BOXBLUR_OPENCL_FILTER) += 
vf_avgblur_opencl.o opencl.o \
 OBJS-$(CONFIG_BWDIF_FILTER)  += vf_bwdif.o
 OBJS-$(CONFIG_CHROMAHOLD_FILTER) += vf_chromakey.o
 OBJS-$(CONFIG_CHROMAKEY_FILTER)  += vf_chromakey.o
+OBJS-$(CONFIG_CHROMASHIFT_FILTER)+= vf_chromashift.o
 OBJS-$(CONFIG_CIESCOPE_FILTER)   += vf_ciescope.o
 OBJS-$(CONFIG_CODECVIEW_FILTER)  += vf_codecview.o
 OBJS-$(CONFIG_COLORBALANCE_FILTER)   += vf_colorbalance.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 8dfa572fde..6f392b5632 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -158,6 +158,7 @@ extern AVFilter ff_vf_boxblur_opencl;
 extern AVFilter ff_vf_bwdif;
 extern AVFilter ff_vf_chromahold;
 extern AVFilter ff_vf_chromakey;
+extern AVFilter ff_vf_chromashift;
 extern AVFilter ff_vf_ciescope;
 extern AVFilter ff_vf_codecview;
 extern AVFilter ff_vf_colorbalance;
diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
new file mode 100644
index 00..458afa71e4
--- /dev/null
+++ b/libavfilter/vf_chromashift.c
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2018 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/avstring.h"
+#include "libavutil/eval.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+
+#include "avfilter.h"
+#include "formats.h"
+#include "internal.h"
+#include "framesync.h"
+#include "video.h"
+
+typedef struct ChromaShiftContext {
+const AVClass *class;
+int cbh, cbv;
+int crh, crv;
+int edge;
+
+int depth;
+int height[4];
+int width[4];
+int linesize[4];
+
+AVFrame *in;
+
+int (*filter_slice)(AVFilterContext *ctx, void *arg, int jobnr, int 
nb_jobs);
+} ChromaShiftContext;
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pix_fmts[] = {
+AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P,
+AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, 
AV_PIX_FMT_YUVJ422P,AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ411P,
+AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, 
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
+AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, 
AV_PIX_FMT_YUV440P10,
+AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
+AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, 
AV_PIX_FMT_YUV440P12,
+AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16,
+AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
+AV_PIX_FMT_NONE
+};
+
+AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
+if (!fmts_list)
+return AVERROR(ENOMEM);
+return ff_set_common_formats(ctx, fmts_list);
+}
+
+#define DEFINE_SMEAR(depth, type, div)   

Re: [FFmpeg-devel] [PATCH] [HLS] Add LANGUAGE attribute to #EXT-X-MEDIA tag for audio-only variant streams.

2018-11-17 Thread Moritz Barsnick
On Thu, Nov 15, 2018 at 00:29:00 +0100, Philippe Symons wrote:
> Here is the new version of the patch in which the comments on the curly
> braces have been resolved as well.

Style-wise, there are other issues. (I'm not judging technically here.)

> Subject: [PATCH] [HLS] Add LANGUAGE attribute to #EXT-X-MEDIA tag for 
>  audio-only variant streams.

The project prefers:
avformat/hls,dash: add LANGUAGE attribute to #EXT-X-MEDIA tag for audio-only 
variant streams

(i.e. source hierarchy, no trailing dot, ...)

>  set_http_options(s, &options, hls);
> -
>  ret = hlsenc_io_open(s, &hls->m3u8_out, hls->master_m3u8_url, &options);

Don't add extra lines, please.

>  for (i = 0; i < hls->nb_varstreams; i++) {
> +AVFormatContext* var_context;
> +char* language = NULL;

Please read
https://www.ffmpeg.org/developer.html#Coding-Rules-1

abouts brackets and indentation, and look at other code sections..
Furthermore, the "pointer specifier" (or whatever that's called) sticks
to the variable, not the type, in ffmpeg declarations:

char *language = NULL;

Same in other places.

> +if(var_context && var_context->nb_streams > 0) {

Bracket / whitspace style: "if (var_context [...]"

> +if(langEntry) {
Same here: if (langEntry)
And in other places.

> +language = langEntry->value;
> +}

Some developers prefer you to drop the curly brackets around one-liner
blocks.

No review of the technical implications, sorry.

Cheers,
Moritz
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] swscale/output: Altivec-optimize yuv2plane1_8

2018-11-17 Thread Lauri Kasanen
./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p \
-f null -vframes 100 -v error -nostats -

1158 UNITS in planar1,   65528 runs,  8 skips

-cpuflags 0

19082 UNITS in planar1,   65533 runs,  3 skips

16.48 speedup ratio. On x86, SSE2 is ~7. Curiously, the Power C version
takes as many cycles as the x86 SSE2 version, yikes it's fast.

Note that this function uses VSX instructions, but is not marked so.
This is because several existing functions also make that mistake.
I'll submit a patch moving them once this is reviewed.

v2: Remove !BE check
Signed-off-by: Lauri Kasanen 
---
 libswscale/ppc/swscale_altivec.c | 53 
 1 file changed, 53 insertions(+)

diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c
index 2fb2337..8c6056d 100644
--- a/libswscale/ppc/swscale_altivec.c
+++ b/libswscale/ppc/swscale_altivec.c
@@ -324,6 +324,53 @@ static void hScale_altivec_real(SwsContext *c, int16_t 
*dst, int dstW,
 }
 }
 }
+
+static void yuv2plane1_8_u(const int16_t *src, uint8_t *dest, int dstW,
+   const uint8_t *dither, int offset, int start)
+{
+int i;
+for (i = start; i < dstW; i++) {
+int val = (src[i] + dither[(i + offset) & 7]) >> 7;
+dest[i] = av_clip_uint8(val);
+}
+}
+
+static void yuv2plane1_8_altivec(const int16_t *src, uint8_t *dest, int dstW,
+   const uint8_t *dither, int offset)
+{
+const int dst_u = -(uintptr_t)dest & 15;
+int i, j;
+LOCAL_ALIGNED(16, int16_t, val, [16]);
+const vector uint16_t shifts = (vector uint16_t) {7, 7, 7, 7, 7, 7, 7, 7};
+vector int16_t vi, vileft, ditherleft, ditherright;
+vector uint8_t vd;
+
+for (j = 0; j < 16; j++) {
+val[j] = dither[(dst_u + offset + j) & 7];
+}
+
+ditherleft = vec_ld(0, val);
+ditherright = vec_ld(0, &val[8]);
+
+yuv2plane1_8_u(src, dest, dst_u, dither, offset, 0);
+
+for (i = dst_u; i < dstW - 15; i += 16) {
+
+vi = vec_vsx_ld(0, &src[i]);
+vi = vec_adds(ditherleft, vi);
+vileft = vec_sra(vi, shifts);
+
+vi = vec_vsx_ld(0, &src[i + 8]);
+vi = vec_adds(ditherright, vi);
+vi = vec_sra(vi, shifts);
+
+vd = vec_packsu(vileft, vi);
+vec_st(vd, 0, &dest[i]);
+}
+
+yuv2plane1_8_u(src, dest, dstW, dither, offset, i);
+}
+
 #endif /* HAVE_ALTIVEC */
 
 av_cold void ff_sws_init_swscale_ppc(SwsContext *c)
@@ -367,6 +414,12 @@ av_cold void ff_sws_init_swscale_ppc(SwsContext *c)
 c->yuv2packedX = ff_yuv2rgb24_X_altivec;
 break;
 }
+
+switch (c->dstBpc) {
+case 8:
+c->yuv2plane1 = yuv2plane1_8_altivec;
+break;
+}
 }
 #endif /* HAVE_ALTIVEC */
 }
-- 
2.6.2

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


Re: [FFmpeg-devel] [PATCH] swscale/output: Altivec-optimize yuv2plane1_8

2018-11-17 Thread Lauri Kasanen
On Fri, 16 Nov 2018 22:09:25 +0100
Carl Eugen Hoyos  wrote:

> (This is less important atm, but I believe all functions currently
> in libswscale/ppc compile and run fine on - old - 32bit be hardware
> as your new function does.
> My completely inexperienced suspicion is that the instruction that
> you call "VSX" also exists on Altivec.)

Ref
http://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html#PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06

VSX functions such as vec_vsx_ld were added in ISA 2.06, aka POWER7.
They shouldn't compile on earlier PPC like Apple G4/G5. Is your machine
at least POWER7?

> I wanted to write that this hunk breaks compilation on big-endian
> (you should be able to test with "#if 0" instead of "#if !HAVE_BIGENDIAN")
> but the good news is that your patch works fine on big-endian,
> just remove the if-endif block. (Tested visually with lena on 32 and 64bit 
> be.)

Thanks, will do.

> Are you aware of the bounty that is offered for this task?
> https://trac.ffmpeg.org/ticket/5568
> (and #5569, #5570)

Yes, I admit that's why I started. Looking to make some extra, and
helping IBM is not a bad way to do so. I'm considering getting a Raptor
Blackbird when it comes out next year.

> There is a bug report about one altivec routine that works on
> big-endian but breaks the output visually on little-endian while
> many other functions work on both, could you have a look?
> https://trac.ffmpeg.org/ticket/7124

I'll try. This patch was my first time playing with Power vectors.

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