Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-16 Thread Carl Eugen Hoyos
2017-03-10 6:26 GMT+01:00 Wang Bin :

[...]

Patch applied.

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-13 Thread Paul B Mahol
On 3/13/17, Carl Eugen Hoyos  wrote:
> 2017-03-13 10:08 GMT+01:00 Paul B Mahol :
>> On 3/13/17, Carl Eugen Hoyos  wrote:
>>> 2017-03-13 3:16 GMT+01:00 Wang Bin :
 How to benchmark codecs?
>>>
>>> You could benchmark running fate but I wonder why.
>>
>> So speed is not really important at all here.
>
> On the contrary!
>
> But assuming a user who specifies --enable-small wants
> smaller binaries seems natural to me and the decrease
> in size looks impressive.

If this is only for --enable-small its OK.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-13 Thread Wang Bin
http://stackoverflow.com/questions/15548023/clang-optimization-levels

-Oz disables -slp-vectorizer and -vectorize-loops
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-13 Thread Carl Eugen Hoyos
2017-03-13 10:08 GMT+01:00 Paul B Mahol :
> On 3/13/17, Carl Eugen Hoyos  wrote:
>> 2017-03-13 3:16 GMT+01:00 Wang Bin :
>>> How to benchmark codecs?
>>
>> You could benchmark running fate but I wonder why.
>
> So speed is not really important at all here.

On the contrary!

But assuming a user who specifies --enable-small wants
smaller binaries seems natural to me and the decrease
in size looks impressive.

> But if it is libav merge than it suddenly is.
>
> What a double standards!

I have no idea about the relation here, I believe it is known
that I am strongly opposed to continue doing unreviewed
merges - especially if nobody is interested in fixing the
unavoidable regressions - but this is most likely unrelated.

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-13 Thread Paul B Mahol
On 3/13/17, Carl Eugen Hoyos  wrote:
> 2017-03-13 3:16 GMT+01:00 Wang Bin :
>> How to benchmark codecs?
>
> You could benchmark running fate but I wonder why.

So speed is not really important at all here.

But if it is libav merge than it suddenly is.

What a double standards!
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-13 Thread Carl Eugen Hoyos
2017-03-13 3:16 GMT+01:00 Wang Bin :
> How to benchmark codecs?

You could benchmark running fate but I wonder why.

> Here is my configuration and result size.  The total size of -Oz
> static or dynamic libraries is about 1M smaller.

This seems to be sufficient reason to apply the patch, I can confirm
it does not break clang 3.4.

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-12 Thread Wang Bin
How to benchmark codecs?
Here is my configuration and result size.  The total size of -Oz static or
dynamic libraries is about 1M smaller.

configure --disable-debug --enable-shared --enable-runtime-cpudetect
--enable-hwaccels --enable-avresample --disable-postproc
--install_name_dir=@rpath --enable-pic
--extra-cflags="-mmacosx-version-min=10.7"
--extra-ldflags="-mmacosx-version-min=10.7 -Wl,-rpath,@loader_path
-Wl,-rpath,@loader_path/../Frameworks -Wl,-rpath,@loader_path/lib
-Wl,-rpath,@loader_path/../lib" --enable-small

-Os
-rwxr-xr-x  1 501  20  10545284  3 10 11:11 ./libavcodec.57.64.101.dylib
-rw-r--r--  1 501  20  13434432  3 10 11:11 ./libavcodec.a
-rwxr-xr-x  1 501  20  57784  3 10 11:11 ./libavdevice.57.1.100.dylib
-rw-r--r--  1 501  20  53464  3 10 11:11 ./libavdevice.a
-rwxr-xr-x  1 501  20  1564396  3 10 11:11 ./libavfilter.6.65.100.dylib
-rw-r--r--  1 501  20  2268040  3 10 11:11 ./libavfilter.a
-rwxr-xr-x  1 501  20  1774664  3 10 11:11 ./libavformat.57.56.101.dylib
-rw-r--r--  1 501  20  2823792  3 10 11:11 ./libavformat.a
-rwxr-xr-x  1 501  20  117700  3 10 11:11 ./libavresample.3.1.0.dylib
-rw-r--r--  1 501  20  162760  3 10 11:11 ./libavresample.a
-rwxr-xr-x  1 501  20  298520  3 10 11:11 ./libavutil.55.34.101.dylib
-rw-r--r--  1 501  20  395512  3 10 11:11 ./libavutil.a
-rwxr-xr-x  1 501  20  106968  3 10 11:11 ./libswresample.2.3.100.dylib
-rw-r--r--  1 501  20  153400  3 10 11:11 ./libswresample.a
-rwxr-xr-x  1 501  20  497460  3 10 11:11 ./libswscale.4.2.100.dylib
-rw-r--r--  1 501  20  614184  3 10 11:11 ./libswscale.a

-Oz
-rwxr-xr-x  1 501  20  9665732  3 10 11:39 ./libavcodec.57.64.101.dylib
-rw-r--r--  1 501  20  12597816  3 10 11:39 ./libavcodec.a
-rwxr-xr-x  1 501  20  57736  3 10 11:39 ./libavdevice.57.1.100.dylib
-rw-r--r--  1 501  20  53376  3 10 11:39 ./libavdevice.a
-rwxr-xr-x  1 501  20  1515268  3 10 11:39 ./libavfilter.6.65.100.dylib
-rw-r--r--  1 501  20  2223024  3 10 11:39 ./libavfilter.a
-rwxr-xr-x  1 501  20  1733824  3 10 11:39 ./libavformat.57.56.101.dylib
-rw-r--r--  1 501  20  2787728  3 10 11:39 ./libavformat.a
-rwxr-xr-x  1 501  20  113652  3 10 11:39 ./libavresample.3.1.0.dylib
-rw-r--r--  1 501  20  160920  3 10 11:39 ./libavresample.a
-rwxr-xr-x  1 501  20  294424  3 10 11:39 ./libavutil.55.34.101.dylib
-rw-r--r--  1 501  20  390624  3 10 11:39 ./libavutil.a
-rwxr-xr-x  1 501  20  102864  3 10 11:39 ./libswresample.2.3.100.dylib
-rw-r--r--  1 501  20  148336  3 10 11:39 ./libswresample.a
-rwxr-xr-x  1 501  20  481020  3 10 11:39 ./libswscale.4.2.100.dylib
-rw-r--r--  1 501  20  599000  3 10 11:39 ./libswscale.a
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread James Almer
On 3/10/2017 12:43 PM, Paul B Mahol wrote:
> On 3/10/17, James Almer  wrote:
>> On 3/10/2017 10:50 AM, Paul B Mahol wrote:
>>> On 3/10/17, wm4  wrote:
 On Fri, 10 Mar 2017 13:47:38 +0100
 Paul B Mahol  wrote:

> On 3/10/17, Wang Bin  wrote:
>>
>>
>
> I don't think this is good idea.

 Why not?
>>>
>>> Because it changes something that was working before.
>>
>> The only valid reason i could see to not go with this change is
>> if the size gains are minimal and the speed loss considerable.
>> Otherwise, if the end result is smaller than -Os then there's no
>> reason to not use it.
> 
> OP didn't posted results at all, so applying this would be blind move
> IMHO.

Agree. Some numbers would be good (resulting binary size, benchmarks
of at least popular codecs, etc).

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread Paul B Mahol
On 3/10/17, James Almer  wrote:
> On 3/10/2017 10:50 AM, Paul B Mahol wrote:
>> On 3/10/17, wm4  wrote:
>>> On Fri, 10 Mar 2017 13:47:38 +0100
>>> Paul B Mahol  wrote:
>>>
 On 3/10/17, Wang Bin  wrote:
>
>

 I don't think this is good idea.
>>>
>>> Why not?
>>
>> Because it changes something that was working before.
>
> The only valid reason i could see to not go with this change is
> if the size gains are minimal and the speed loss considerable.
> Otherwise, if the end result is smaller than -Os then there's no
> reason to not use it.

OP didn't posted results at all, so applying this would be blind move
IMHO.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread James Almer
On 3/10/2017 10:50 AM, Paul B Mahol wrote:
> On 3/10/17, wm4  wrote:
>> On Fri, 10 Mar 2017 13:47:38 +0100
>> Paul B Mahol  wrote:
>>
>>> On 3/10/17, Wang Bin  wrote:


>>>
>>> I don't think this is good idea.
>>
>> Why not?
> 
> Because it changes something that was working before.

The only valid reason i could see to not go with this change is
if the size gains are minimal and the speed loss considerable.
Otherwise, if the end result is smaller than -Os then there's no
reason to not use it.

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread wm4
On Fri, 10 Mar 2017 14:50:32 +0100
Paul B Mahol  wrote:

> On 3/10/17, wm4  wrote:
> > On Fri, 10 Mar 2017 13:47:38 +0100
> > Paul B Mahol  wrote:
> >  
> >> On 3/10/17, Wang Bin  wrote:  
> >> >
> >> >  
> >>
> >> I don't think this is good idea.  
> >
> > Why not?  
> 
> Because it changes something that was working before.

That's not a good reason at all.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread Paul B Mahol
On 3/10/17, wm4  wrote:
> On Fri, 10 Mar 2017 13:47:38 +0100
> Paul B Mahol  wrote:
>
>> On 3/10/17, Wang Bin  wrote:
>> >
>> >
>>
>> I don't think this is good idea.
>
> Why not?

Because it changes something that was working before.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread wm4
On Fri, 10 Mar 2017 13:47:38 +0100
Paul B Mahol  wrote:

> On 3/10/17, Wang Bin  wrote:
> >
> >  
> 
> I don't think this is good idea.

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


Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-10 Thread Paul B Mahol
On 3/10/17, Wang Bin  wrote:
>
>

I don't think this is good idea.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

2017-03-09 Thread Wang Bin



0001-configure-clang-Oz-for-small-size-build-to-reduce-si.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel