[FFmpeg-devel] [PATCHv2 0/6] On2 VP7 decoder
Ronald S. Bultje
rsbultje at gmail.com
Fri Feb 14 13:21:51 CET 2014
On Fri, Feb 14, 2014 at 6:57 AM, Peter Ross <pross at xvid.org> wrote:
> The introduction of VP7 degrades the VP8 decoder performance by <=1%
> Data supporting this claim (Core2 Q9400) below.
> I have tried moving the 'int vp7' field further towards the beginning of
> the VP8Context data structure. This field is evaluated many times
> for each macroblock. No performance improvement was observed for my
> test streams.
> parkjoy.ivf - single thread
> VP8 orig, 9.384, 9.384, 9.385, 9.388, 9.409, AVG:, 9.390
> VP8+VP7, 9.524, 9.492, 9.684, 9.460, 9.472, AVG:, 9.526
So that kind of sucks, and is probably entirely related to the vp7 field in
VP8Context, as you mention. The rest wouldn't have much of an impact.
So given that, do you think it makes sense to restructure the changes
somewhat and basically duplicate the decoder in binary? What I mean with
that is that for each function that is called more often than once per
frame and differs between vp7 and vp8, have two versions in the binary, one
for vp7 and one for vp8 (probably all the way up to vp8_decode_frame), and
then the decision of which to call would simply be made by the decode_frame
pointer in AVCodec. That way, binary size increases somewhat, but
performance won't degrade because the vp7 == 1 is evaluated at compile-time
and inlined, rather than done at runtime.
More information about the ffmpeg-devel