JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
126 stars 53 forks source link

Try to introduce align to fix issue #243 #245

Closed yiyuezhuo closed 4 years ago

yiyuezhuo commented 4 years ago

Fix #243

Maybe performance will be damaged.

yiyuezhuo commented 4 years ago

Performance comparsion using given video:

Original (wrong):

BenchmarkTools.Trial: 
  memory estimate:  243.42 KiB
  allocs estimate:  1326
  --------------
  minimum time:     21.015 ms (0.00% GC)
  median time:      21.151 ms (0.00% GC)
  mean time:        21.196 ms (0.06% GC)
  maximum time:     25.371 ms (0.00% GC)
  --------------
  samples:          236
  evals/sample:     1

fix_align:

BenchmarkTools.Trial: 
  memory estimate:  242.86 KiB
  allocs estimate:  1320
  --------------
  minimum time:     22.293 ms (0.00% GC)
  median time:      22.447 ms (0.00% GC)
  mean time:        22.489 ms (0.06% GC)
  maximum time:     25.591 ms (11.94% GC)
  --------------
  samples:          223
  evals/sample:     1
IanButterworth commented 4 years ago

Sorry for the delay on this. I'm hoping to get at least one more set of eyes on it, given it's core to the read functionality. If I don't by the end of this week, I'll merge and release