[FFmpeg-devel,14/20] tests/fate-run: Set bitexact flag for output, too

Message ID AM7PR03MB6660CEDA2AB20095B9E25C538FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 2f4dfe861dbb82634388896e396411f93380093d
Headers
Series [FFmpeg-devel,01/20] libpostproc/postprocess_template: Don't reimplement FFSWAP |

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 1, 2021, 9:08 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
One could also do this more generically in the ffmpeg function.

 tests/fate-run.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

James Almer Oct. 7, 2021, 3:42 p.m. UTC | #1
On 10/1/2021 6:08 PM, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> One could also do this more generically in the ffmpeg function.
> 
>   tests/fate-run.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
> index bc1efa22d7..a16ce28a45 100755
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -178,7 +178,7 @@ pcm(){
>   fmtstdout(){
>       fmt=$1
>       shift 1
> -    ffmpeg -bitexact "$@" -f $fmt -
> +    ffmpeg -bitexact "$@" -bitexact -f $fmt -

Looking at ffmpeg_opt.c, -bitexact is a global option and applies to all 
inputs and outputs, be it de/encoders or de/muxers.

>   }
>   
>   enc_dec_pcm(){
>
  
Andreas Rheinhardt Oct. 7, 2021, 3:45 p.m. UTC | #2
James Almer:
> On 10/1/2021 6:08 PM, Andreas Rheinhardt wrote:
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>> One could also do this more generically in the ffmpeg function.
>>
>>   tests/fate-run.sh | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
>> index bc1efa22d7..a16ce28a45 100755
>> --- a/tests/fate-run.sh
>> +++ b/tests/fate-run.sh
>> @@ -178,7 +178,7 @@ pcm(){
>>   fmtstdout(){
>>       fmt=$1
>>       shift 1
>> -    ffmpeg -bitexact "$@" -f $fmt -
>> +    ffmpeg -bitexact "$@" -bitexact -f $fmt -
> 
> Looking at ffmpeg_opt.c, -bitexact is a global option and applies to all
> inputs and outputs, be it de/encoders or de/muxers.
> 

No. It is documented as input/output specific ("-bitexact
(input/output)") and it is: Without this change, the lrcenc test would
contain LIBAVFORMAT_VERSION.

- Andreas
  
Andreas Rheinhardt Oct. 7, 2021, 3:47 p.m. UTC | #3
Andreas Rheinhardt:
> James Almer:
>> On 10/1/2021 6:08 PM, Andreas Rheinhardt wrote:
>>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>>> ---
>>> One could also do this more generically in the ffmpeg function.
>>>
>>>   tests/fate-run.sh | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
>>> index bc1efa22d7..a16ce28a45 100755
>>> --- a/tests/fate-run.sh
>>> +++ b/tests/fate-run.sh
>>> @@ -178,7 +178,7 @@ pcm(){
>>>   fmtstdout(){
>>>       fmt=$1
>>>       shift 1
>>> -    ffmpeg -bitexact "$@" -f $fmt -
>>> +    ffmpeg -bitexact "$@" -bitexact -f $fmt -
>>
>> Looking at ffmpeg_opt.c, -bitexact is a global option and applies to all
>> inputs and outputs, be it de/encoders or de/muxers.
>>
> 
> No. It is documented as input/output specific ("-bitexact
> (input/output)") and it is: Without this change, the lrcenc test would
> contain LIBAVFORMAT_VERSION.
> 

If it were a global option, it would be applied to a global variable,
but it isn't; it is per-optionscontext (and therefore has the OPT_OFFSET
flag).

- Andreas
  
James Almer Oct. 8, 2021, 12:25 p.m. UTC | #4
On 10/7/2021 12:47 PM, Andreas Rheinhardt wrote:
> Andreas Rheinhardt:
>> James Almer:
>>> On 10/1/2021 6:08 PM, Andreas Rheinhardt wrote:
>>>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>>>> ---
>>>> One could also do this more generically in the ffmpeg function.
>>>>
>>>>    tests/fate-run.sh | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
>>>> index bc1efa22d7..a16ce28a45 100755
>>>> --- a/tests/fate-run.sh
>>>> +++ b/tests/fate-run.sh
>>>> @@ -178,7 +178,7 @@ pcm(){
>>>>    fmtstdout(){
>>>>        fmt=$1
>>>>        shift 1
>>>> -    ffmpeg -bitexact "$@" -f $fmt -
>>>> +    ffmpeg -bitexact "$@" -bitexact -f $fmt -
>>>
>>> Looking at ffmpeg_opt.c, -bitexact is a global option and applies to all
>>> inputs and outputs, be it de/encoders or de/muxers.
>>>
>>
>> No. It is documented as input/output specific ("-bitexact
>> (input/output)") and it is: Without this change, the lrcenc test would
>> contain LIBAVFORMAT_VERSION.
>>
> 
> If it were a global option, it would be applied to a global variable,
> but it isn't; it is per-optionscontext (and therefore has the OPT_OFFSET
> flag).
> 
> - Andreas

Ok, LGTM then.
  

Patch

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index bc1efa22d7..a16ce28a45 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -178,7 +178,7 @@  pcm(){
 fmtstdout(){
     fmt=$1
     shift 1
-    ffmpeg -bitexact "$@" -f $fmt -
+    ffmpeg -bitexact "$@" -bitexact -f $fmt -
 }
 
 enc_dec_pcm(){