[FFmpeg-devel] avcodec/imc: cast float to int prior to comparing with int variable

Submitted by Paul B Mahol on June 26, 2017, 10:44 a.m.

Details

Message ID 20170626104448.19378-1-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol June 26, 2017, 10:44 a.m.
From: Kostya Shishkov <kostya.shishkov@gmail.com>

Fixes #3886.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/imc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer June 26, 2017, 9:06 p.m.
On Mon, Jun 26, 2017 at 12:44:48PM +0200, Paul B Mahol wrote:
> From: Kostya Shishkov <kostya.shishkov@gmail.com>
> 
> Fixes #3886.
> 
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavcodec/imc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

breaks fate-imc

[...]
Paul B Mahol June 26, 2017, 9:07 p.m.
On 6/26/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
> On Mon, Jun 26, 2017 at 12:44:48PM +0200, Paul B Mahol wrote:
>> From: Kostya Shishkov <kostya.shishkov@gmail.com>
>>
>> Fixes #3886.
>>
>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>> ---
>>  libavcodec/imc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> breaks fate-imc
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> If you think the mosad wants you dead since a long time then you are either
> wrong or dead since a long time.
>

Yes I know. Are you willing to add new file based on new output?
Paul B Mahol June 27, 2017, 7:45 a.m.
On 6/26/17, Paul B Mahol <onemda@gmail.com> wrote:
> On 6/26/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
>> On Mon, Jun 26, 2017 at 12:44:48PM +0200, Paul B Mahol wrote:
>>> From: Kostya Shishkov <kostya.shishkov@gmail.com>
>>>
>>> Fixes #3886.
>>>
>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>> ---
>>>  libavcodec/imc.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> breaks fate-imc
>>
>> [...]
>>
>> --
>> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> If you think the mosad wants you dead since a long time then you are
>> either
>> wrong or dead since a long time.
>>
>
> Yes I know. Are you willing to add new file based on new output?
>
Hello?
Michael Niedermayer June 27, 2017, 12:58 p.m.
On Tue, Jun 27, 2017 at 09:45:38AM +0200, Paul B Mahol wrote:
> On 6/26/17, Paul B Mahol <onemda@gmail.com> wrote:
> > On 6/26/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
> >> On Mon, Jun 26, 2017 at 12:44:48PM +0200, Paul B Mahol wrote:
> >>> From: Kostya Shishkov <kostya.shishkov@gmail.com>
> >>>
> >>> Fixes #3886.
> >>>
> >>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> >>> ---
> >>>  libavcodec/imc.c | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> breaks fate-imc
> >>
> >> [...]
> >>
> >> --
> >> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >>
> >> If you think the mosad wants you dead since a long time then you are
> >> either
> >> wrong or dead since a long time.
> >>
> >
> > Yes I know. Are you willing to add new file based on new output?
> >
> Hello?

you lack patience

uploaded to imc/imc-201706.pcm
but it still needs 24h to propagate to all fate clients

[...9

Patch hide | download patch | download mbox

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index ac20920..7cd6db9 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -828,7 +828,7 @@  static void imc_refine_bit_allocation(IMCContext *q, IMCChannel *chctx)
         for (j = band_tab[i]; j < band_tab[i + 1]; j++)
             chctx->sumLenArr[i] += chctx->CWlengthT[j];
         if (chctx->bandFlagsBuf[i])
-            if ((((band_tab[i + 1] - band_tab[i]) * 1.5) > chctx->sumLenArr[i]) && (chctx->sumLenArr[i] > 0))
+            if (((int)((band_tab[i + 1] - band_tab[i]) * 1.5) > chctx->sumLenArr[i]) && (chctx->sumLenArr[i] > 0))
                 chctx->skipFlagRaw[i] = 1;
     }