[FFmpeg-devel] [PATCH] lavfi/mp/mcdeint: avoid uninited data read

Stefano Sabatini stefasab at gmail.com
Sat Jun 1 12:40:42 CEST 2013


On date Friday 2013-05-31 01:39:40 +0200, Stefano Sabatini encoded:
> On date Thursday 2013-05-30 23:30:35 +0200, Michael Niedermayer encoded:
> > On Thu, May 30, 2013 at 06:57:14PM +0200, Stefano Sabatini wrote:
> > > Always read in-buffer pixels when computing the value for a pixel close
> > > to the image buffer edge.
> > > 
> > > This avoids non visible artifacts which affect the output checksum.
> > > ---
> > >  libavfilter/libmpcodecs/vf_mcdeint.c |   32 +++++++++++++++++++++++---------
> > >  1 file changed, 23 insertions(+), 9 deletions(-)
> > 
> > should be ok if theres no slowdown,
> 
> $ ffmpeg  -f lavfi -i "testsrc=d=100,mp=mcdeint" -f null - -benchmark -nostats
> [...]
> 1547 decicycles in before, 65534 runs, 2 skips
> 1543 decicycles in before, 131070 runs, 2 skips
> 1547 decicycles in before, 262140 runs, 4 skips
> 1545 decicycles in before, 524281 runs, 7 skips
> 1544 decicycles in before, 1048559 runs, 17 skips
> 1542 decicycles in before, 2097112 runs, 40 skips
> 1540 decicycles in before, 4194227 runs, 77 skips
> 1539 decicycles in before, 8388462 runs, 146 skips
> 1539 decicycles in before, 16776934 runs, 282 skips
> 1539 decicycles in before, 33553858 runs, 574 skips
> 1542 decicycles in before, 67107653 runs, 1211 skips
> 1542 decicycles in before, 134214492 runs, 3236 skips
> frame= 2500 fps= 79 q=0.0 Lsize=N/A time=00:01:40.00 bitrate=N/A    
> video:234kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.009167%
> bench: utime=31.610s
> bench: maxrss=22324kB
> 
> $ ffmpeg  -f lavfi -i "testsrc=d=100,mp=mcdeint" -f null - -benchmark -nostats
> [...]
> 1607 decicycles in after, 65533 runs, 3 skips
> 1597 decicycles in after, 131067 runs, 5 skips
> 1594 decicycles in after, 262136 runs, 8 skips
> 1594 decicycles in after, 524268 runs, 20 skips
> 1589 decicycles in after, 1048540 runs, 36 skips
> 1587 decicycles in after, 2097095 runs, 57 skips
> 1585 decicycles in after, 4194211 runs, 93 skips
> 1584 decicycles in after, 8388443 runs, 165 skips
> 1583 decicycles in after, 16776903 runs, 313 skips
> 1584 decicycles in after, 33553812 runs, 620 skips
> 1583 decicycles in after, 67107632 runs, 1232 skips
> 1583 decicycles in after, 134215301 runs, 2427 skips
> frame= 2500 fps= 79 q=0.0 Lsize=N/A time=00:01:40.00 bitrate=N/A    
> video:234kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.009167%
> bench: utime=31.662s
> bench: maxrss=22296kB
> 
> This is as fast as I can get it. I could eventually add a
> fast/non-bitexact option to keep the current speed, but seems a bit
> overkill.

Ping.
-- 
FFmpeg = Faithless Free Martial Peaceful Enlightened Gospel


More information about the ffmpeg-devel mailing list