Re: [FFmpeg-devel] [PATCH 3/3] avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()

2016-01-13 Thread Rostislav Pehlivanov
On Tue, 2016-01-12 at 23:32 +0100, Michael Niedermayer wrote:
> From: Michael Niedermayer 
> 
> encoding changes from 17 to 20 fps
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/diracdec.c |   18 --
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 

LGTM,

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


Re: [FFmpeg-devel] [PATCH 3/3] avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()

2016-01-13 Thread Michael Niedermayer
On Wed, Jan 13, 2016 at 04:12:17PM +, Rostislav Pehlivanov wrote:
> On Tue, 2016-01-12 at 23:32 +0100, Michael Niedermayer wrote:
> > From: Michael Niedermayer 
> > 
> > encoding changes from 17 to 20 fps
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavcodec/diracdec.c |   18 --
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> 
> LGTM,

applied

thx

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

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


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


Re: [FFmpeg-devel] [PATCH 3/3] avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()

2016-01-12 Thread Ronald S. Bultje
Hi,

On Tue, Jan 12, 2016 at 5:32 PM, Michael Niedermayer 
wrote:

> From: Michael Niedermayer 
>
> encoding changes from 17 to 20 fps


decoding, right?

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


[FFmpeg-devel] [PATCH 3/3] avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()

2016-01-12 Thread Michael Niedermayer
From: Michael Niedermayer 

encoding changes from 17 to 20 fps

Signed-off-by: Michael Niedermayer 
---
 libavcodec/diracdec.c |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index bbe6d87..942376b 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -491,6 +491,12 @@ static inline int coeff_unpack_golomb(GetBitContext *gb, 
int qfactor, int qoffse
 UPDATE_CACHE(re, gb);
 buf = GET_CACHE(re, gb);
 
+if (buf & 0x8000) {
+LAST_SKIP_BITS(re,gb,1);
+CLOSE_READER(re, gb);
+return 0;
+}
+
 if (buf & 0xAA80) {
 buf >>= 32 - 8;
 SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
@@ -516,12 +522,12 @@ static inline int coeff_unpack_golomb(GetBitContext *gb, 
int qfactor, int qoffse
 
 coeff = ret - 1;
 }
-if (coeff) {
-coeff = (coeff * qfactor + qoffset) >> 2;
-sign  = SHOW_SBITS(re, gb, 1);
-LAST_SKIP_BITS(re, gb, 1);
-coeff = (coeff ^ sign) - sign;
-}
+
+coeff = (coeff * qfactor + qoffset) >> 2;
+sign  = SHOW_SBITS(re, gb, 1);
+LAST_SKIP_BITS(re, gb, 1);
+coeff = (coeff ^ sign) - sign;
+
 CLOSE_READER(re, gb);
 return coeff;
 }
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH 3/3] avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()

2016-01-12 Thread Michael Niedermayer
On Tue, Jan 12, 2016 at 05:48:21PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Tue, Jan 12, 2016 at 5:32 PM, Michael Niedermayer 
> wrote:
> 
> > From: Michael Niedermayer 
> >
> > encoding changes from 17 to 20 fps
> 
> 
> decoding, right?

yes i cant write :)

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

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


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