Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-27 Thread Michael Niedermayer
On Fri, Jan 22, 2016 at 05:54:30PM +, John Cox wrote: > Hi > > >Hi, > > > >2016-01-22 14:29 GMT+01:00 John Cox : > >>>This is a big slowdown on Win64 and UHD-bluray like sequences, but > >>>that can be switched off in that case. > >> > >> I'm a bit surprised that it

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-22 Thread Christophe Gisquet
Hi, 2016-01-20 15:27 GMT+01:00 John Cox : > The by22 code gained me an overall factor of two in the abs level decode > - the gains do depend a lot on the quantity of residual - you gain a lot > more on I-frames than you do otherwise as they tend to have much longer >

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-22 Thread John Cox
On Fri, 22 Jan 2016 12:18:29 +0100, you wrote: >Hi, > >2016-01-20 15:27 GMT+01:00 John Cox : >> The by22 code gained me an overall factor of two in the abs level decode >> - the gains do depend a lot on the quantity of residual - you gain a lot >> more on I-frames than you do

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-22 Thread Christophe Gisquet
Hi, 2016-01-22 14:29 GMT+01:00 John Cox : >>This is a big slowdown on Win64 and UHD-bluray like sequences, but >>that can be switched off in that case. > > I'm a bit surprised that it generated a big slowdown - some cache must > be running just on the edge, but yes if you

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-22 Thread John Cox
Hi >Hi, > >2016-01-22 14:29 GMT+01:00 John Cox : >>>This is a big slowdown on Win64 and UHD-bluray like sequences, but >>>that can be switched off in that case. >> >> I'm a bit surprised that it generated a big slowdown - some cache must >> be running just on the edge, but yes

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-20 Thread John Cox
On Wed, 20 Jan 2016 13:26:05 +0100, you wrote: >Hi, > >2016-01-19 13:46 GMT+01:00 John Cox : >> I've just done a fair bit of work on hevc_cabac decode for the Rasberry >> Pi2 and I think that the patch is generally applicable. Patch is >> attached but you may prefer to take

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-20 Thread Christophe Gisquet
Hi, 2016-01-19 13:46 GMT+01:00 John Cox : > I've just done a fair bit of work on hevc_cabac decode for the Rasberry > Pi2 and I think that the patch is generally applicable. Patch is > attached but you may prefer to take it from git: This work is certainly impressive, and

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-20 Thread John Cox
On Wed, 20 Jan 2016 13:26:05 +0100, you wrote: >Hi, > >2016-01-19 13:46 GMT+01:00 John Cox : >> I've just done a fair bit of work on hevc_cabac decode for the Rasberry >> Pi2 and I think that the patch is generally applicable. Patch is >> attached but you may prefer to take

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
>On 1/19/2016 2:24 PM, John Cox wrote: >> On Tue, 19 Jan 2016 14:09:22 -0300, you wrote: >> >>> On 1/19/2016 2:05 PM, John Cox wrote: > On 1/19/2016 9:46 AM, John Cox wrote: >> +// Helper fns >> +#ifndef hevc_mem_bits32 >> +static av_always_inline uint32_t hevc_mem_bits32(const

[FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
Hi I've just done a fair bit of work on hevc_cabac decode for the Rasberry Pi2 and I think that the patch is generally applicable. Patch is attached but you may prefer to take it from git: https://github.com/jc-kynesim/rpi-ffmpeg.git branch: test/ff_hevc_cabac_3 commit:

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Ronald S. Bultje
Hi, On Tue, Jan 19, 2016 at 7:46 AM, John Cox wrote: > Hi > > I've just done a fair bit of work on hevc_cabac decode for the Rasberry > Pi2 and I think that the patch is generally applicable. Patch is > attached but you may prefer to take it from git: Cool! Two

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Mats Peterson
On 01/19/2016 02:40 PM, Ronald S. Bultje wrote: We tend to indent the second line so it aligns with the opening bracket of the first line. Excuse me if i chime in here, Ronald, yes, I've noticed that as well. However, sometimes it can be quite awkward to do this alignment when having a lot

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Mats Peterson
On 01/19/2016 03:05 PM, Mats Peterson wrote: from "normal" indentations of 4 columns. But I'll try to stick to what's stick with ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Ronald S. Bultje
Hi, On Tue, Jan 19, 2016 at 8:42 AM, Mats Peterson < matsp888-at-yahoo@ffmpeg.org> wrote: > On 01/19/2016 02:40 PM, Ronald S. Bultje wrote: > >> We tend to indent the second line so it aligns with the opening bracket of >> the first line. >> > > Excuse me if i chime in here, Ronald, yes,

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Mats Peterson
On 01/19/2016 02:51 PM, Ronald S. Bultje wrote: What I did in vp8 (if I remember correctly) in those cases is to split the top line: static av_always_inline long_return_type_name far_too_long_function_name(type arg1, type arg2, type arg3, type arg4) { .. } May

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
Hi >On Tue, Jan 19, 2016 at 7:46 AM, John Cox wrote: > >> Hi >> >> I've just done a fair bit of work on hevc_cabac decode for the Rasberry >> Pi2 and I think that the patch is generally applicable. Patch is >> attached but you may prefer to take it from git: > > >Cool! Two

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Carl Eugen Hoyos
John Cox kynesim.co.uk> writes: > >> +#define UNCHECKED_BITSTREAM_READER 1 > > > >I don't think that's right, and is a security issue. > > I added that line as (nearly) every other decoder in > liavcodec has it - Sure? > in particular h264_cabac.c has it. Extensive testing was done before

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
On Tue, 19 Jan 2016 15:59:39 + (UTC), you wrote: >John Cox kynesim.co.uk> writes: > >> >> +#define UNCHECKED_BITSTREAM_READER 1 >> > >> >I don't think that's right, and is a security issue. >> >> I added that line as (nearly) every other decoder in >> liavcodec has it - > >Sure? OK - not

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread Carl Eugen Hoyos
John Cox kynesim.co.uk> writes: > On Tue, 19 Jan 2016 15:59:39 + (UTC), you wrote: > > >John Cox kynesim.co.uk> writes: > > > >> >> +#define UNCHECKED_BITSTREAM_READER 1 > >> > > >> >I don't think that's right, and is a security issue. > >> > >> I added that line as (nearly) every other

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
>John Cox kynesim.co.uk> writes: > >> On Tue, 19 Jan 2016 15:59:39 + (UTC), you wrote: >> >> >John Cox kynesim.co.uk> writes: >> > >> >> >> +#define UNCHECKED_BITSTREAM_READER 1 >> >> > >> >> >I don't think that's right, and is a security issue. >> >> >> >> I added that line as (nearly)

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread James Almer
On 1/19/2016 9:46 AM, John Cox wrote: > +// Helper fns > +#ifndef hevc_mem_bits32 > +static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const > unsigned int offset) > +{ > +return AV_RB32((const uint8_t *)buf + (offset >> 3)) << (offset & 7); > +} > +#endif > + > +#if

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
>On 1/19/2016 9:46 AM, John Cox wrote: >> +// Helper fns >> +#ifndef hevc_mem_bits32 >> +static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const >> unsigned int offset) >> +{ >> +return AV_RB32((const uint8_t *)buf + (offset >> 3)) << (offset & 7); >> +} >> +#endif >> + >>

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread James Almer
On 1/19/2016 2:05 PM, John Cox wrote: >> On 1/19/2016 9:46 AM, John Cox wrote: >>> +// Helper fns >>> +#ifndef hevc_mem_bits32 >>> +static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const >>> unsigned int offset) >>> +{ >>> +return AV_RB32((const uint8_t *)buf + (offset >>

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread John Cox
On Tue, 19 Jan 2016 14:09:22 -0300, you wrote: >On 1/19/2016 2:05 PM, John Cox wrote: >>> On 1/19/2016 9:46 AM, John Cox wrote: +// Helper fns +#ifndef hevc_mem_bits32 +static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const unsigned int offset) +{

Re: [FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)

2016-01-19 Thread James Almer
On 1/19/2016 2:24 PM, John Cox wrote: > On Tue, 19 Jan 2016 14:09:22 -0300, you wrote: > >> On 1/19/2016 2:05 PM, John Cox wrote: On 1/19/2016 9:46 AM, John Cox wrote: > +// Helper fns > +#ifndef hevc_mem_bits32 > +static av_always_inline uint32_t hevc_mem_bits32(const void *