[FFmpeg-devel] Sponsoring feature for H.264 decoding with scaling factor (1/2, 1/4...) (if possible)

Eric Beuque eric.beuque at gmail.com
Sun Jun 19 23:42:42 CEST 2016


2016-06-19 16:14 GMT+02:00 Michael Niedermayer <michael at niedermayer.cc>:

> On Sun, Jun 19, 2016 at 09:59:22AM +0200, Eric Beuque wrote:
> > 2016-06-18 13:46 GMT+02:00 Michael Niedermayer <michael at niedermayer.cc>:
> >
> > > On Fri, Jun 17, 2016 at 07:26:59PM +0200, Eric Beuque wrote:
> > > > 2016-06-17 19:16 GMT+02:00 Michael Niedermayer
> <michael at niedermayer.cc>:
> > > >
> > > > > On Fri, Jun 17, 2016 at 05:39:23PM +0200, Eric Beuque wrote:
> > > > > > Hi,
> > > > > >
> > > > > > i'm posting here for a feature that is missing in ffmpeg (or may
> be i
> > > > > > missed something), which consist of decoding H.264 frame with a
> > > scaling
> > > > > > factor of 1/2, 1/4, 1/8...
> > > > > >
> > > > > > I found the parameter lowres, which works well with MJPEG stream
> but
> > > it's
> > > > > > not working with the H.264 decoder.
> > > > > >
> > > > > > I don't know if it's something possible to implement in the
> decoder,
> > > but
> > > > > if
> > > > > > yes, my compagny agreed to sponsor the feature (depending on the
> > > cost of
> > > > > > course), if a developer qualified is interested to do it.
> > > > > >
> > > > > > Is someone know if it is possible, and if it can exist someone
> > > interested
> > > > > > to develop this feature?
> > > > >
> > > > > is it acceptable if the encoder enforces some restrictions on the
> used
> > > > > features ?
> > > > >
> > > > > most general h264 likely cannot efficiently be decoded in lower
> > > > > resolution with acceptable quality
> > > > > Restricting the used intra modes may make it possible to do it
> though
> > > > > i dont know what the quality would be but better than without
> > > > > restrictions
> > > > >
> > > > > [...]
> > > > >
> > > >
> > > >
> > > > Actually, the main goal is for motion detection algorithm, so we need
> > > small
> > > > resolution and best quality is not required. We just need good
> estimation
> > > > for the moving pixel.
> > > >
> > > > For now, we decode in H.264, and scale it close 320x240, the then we
> > > > perform motion detection on it. The goal is to speed up the process
> and
> > > > reduce the memory usage since decoding a 2048x1536 picture lead
> around a
> > > 5
> > > > MB for the decoded image in memory.
> > > >
> > > > So i think it could be OK.
> > >
> > > i dont think that withut restrictions it would be good enough for
> > > motion detection
> > >
> >
> > I don't really understand what will be changed in the decoder with or
> > without restriction...
>
> some of the features of h.264 will not decode "right" without the
> full resolution
>

Ok what features do you mean? Maybe it's out of our scope.


>
>
> > But do you think it is possible to get (with or
> > without the restriction) an acceptable result with saving memory and/or
> CPU
> > time?
>
> memory usage should be reduced, cpu probably less so, the whole
> bitstream still needs to be decoded.
>
> also if you are in control of the encoder to restrict what it does
> it may be simpler to use mpeg4-asp, H.263 or mpeg2 which have lowres
> support in FFmpeg without these problems
>
>
No i can't. I'm using stream from IP camera which can work only with MJPEG
or H.264 stream. We need to use often H.264 to save network bandwidth. In
that case if we are for example 80 stream with a resolution of 3 millions
pixels, it can lead to a memory overflow. We would like to reduce the
memory usage. CPU is less a problem but if we can win something, it will be
also good.

Generally we use a secondary stream with lower resolution, but sometimes
it's not possible.

So we are interested in improvement that can gain any memory usage and
working with our environment.






> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The misfortune of the wise is better than the prosperity of the fool.
> -- Epicurus
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list