<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jumpyshoes</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jumpyshoes"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Jumpyshoes/"/>
	<updated>2026-11-04T20:57:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=X264_TODO&amp;diff=18667</id>
		<title>X264 TODO</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=X264_TODO&amp;diff=18667"/>
		<updated>2011-01-28T01:02:03Z</updated>

		<summary type="html">&lt;p&gt;Jumpyshoes: Emergency VBV mode completed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains an incomplete list of things available in x264 for you to do.  It&#039;s organized into sections covering various parts of x264.&lt;br /&gt;
&lt;br /&gt;
Some useful resources: [http://www.x264.nl/developers/Dark_Shikari/?dir=./src Dark Shikari&#039;s pile of junk], [http://akuvian.org/src/x264/ Pengvado&#039;s pile of junk].&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in doing any of this, drop by #x264dev on Freenode IRC.  There are no experience or educational requirements for doing any of this, though you are expected to know how to code.&lt;br /&gt;
&lt;br /&gt;
Bolded features may have companies willing to sponsor or provide bounties.  This is not complete either; just because it&#039;s not bolded doesn&#039;t mean there aren&#039;t resources out there.  If your company is interested in offering a bounty, drop by IRC.&lt;br /&gt;
&lt;br /&gt;
===Motion Estimation===&lt;br /&gt;
* Sequential elimination (SEA), used for exhaustive search, might be more generally applicable to algorithms like UMH, by letting us skip a lot of SADs.  The downside is we won&#039;t be able to use SAD_X4 anymore.&lt;br /&gt;
* (T)ESA is currently wrong for motion searches done on weightp duplicates.  This effect is miniscule, but it still should be fixed.&lt;br /&gt;
* Hierarchical motion estimation might be a useful way to catch very long motion vectors without the cost of UMH or ESA.  It might also help regularize motion.&lt;br /&gt;
* Somehow take into account the effect of motion vector decision on future blocks.&lt;br /&gt;
** Hierarchical motion estimation&lt;br /&gt;
** Approximations from lookahead MVs&lt;br /&gt;
** Iterative ME (as per Snow)&lt;br /&gt;
** Trellis motion estimation&lt;br /&gt;
* We don&#039;t need to check all 11 predictors all the time for 16x16 fullpel motion search.&lt;br /&gt;
** But how do we know which ones we can afford to skip, and when?&lt;br /&gt;
** Xvid and libtheora have algorithms for this, but the former&#039;s is almost surely 100% useless and the latter doesn&#039;t seem impressive either.&lt;br /&gt;
* libtheora does fullpel motion estimation on the source pixels instead of decoded pixels.  Does this give a better starting point for the subpel search and discourage &amp;quot;weird&amp;quot; MVs?&lt;br /&gt;
* With extremely fast encoding settings (subme 0), can we rip off lookahead MVs instead of doing a real search?&lt;br /&gt;
* Try sub-8x8 partitions in B-frames.  Is it at all useful?&lt;br /&gt;
* Try bidir motion estimation for fullpel.  That is, considering L1&#039;s MV when doing L0 (or vice versa).  Xvid does this.  How much does it help?&lt;br /&gt;
* Fullpel chroma ME?&lt;br /&gt;
** For TESA?&lt;br /&gt;
&lt;br /&gt;
===Intra Analysis===&lt;br /&gt;
* Make the early terminations smarter.  Currently they&#039;re just hacks -- some statistical analysis might be useful.&lt;br /&gt;
* SAD (subme 1) i8x8 vs i4x4 decision is a bit bad.  Can it be improved without significant speed loss?&lt;br /&gt;
&lt;br /&gt;
===Mode Decision===&lt;br /&gt;
* Can we find more ways to skip more motion searches in multiref?&lt;br /&gt;
* On extremely fast encoding settings, fast skip is actually kind of slow.  But anything dumber (e.g. SAD) is completely useless.  Is there some better balance that can be achieved here?&lt;br /&gt;
* See the TODOs for deblock-aware RD in common/deblock.c.&lt;br /&gt;
* Is there a faster way than SA8D/SATD to do 8x8dct vs 4x4dct mode decision?  At very fast settings, the time this uses is nontrivial.&lt;br /&gt;
* Is there a faster way than RD to do 8x8dct vs 4x4dct mode decision that&#039;s still better than SATD?  RD takes over an order of magnitude more time than SATD, so it might be useful to have something in the middle.&lt;br /&gt;
* Is there some value to swapping the mode decision metric from SATD to SA8D if we think that the macroblock will use 8x8dct?  [http://akuvian.org/src/x264/x264_dct8_guess.diff This has been tried before], but only helped if our guess was extremely good (better than we could get in reality).&lt;br /&gt;
* With trellis 2, can we skip most of CABAC and CAVLC bit cost calculation?&lt;br /&gt;
* How about a &amp;quot;brute force&amp;quot; mode decision that takes no shortcuts (no early ref termination in p8x8, no SATD thresholds, etc)?&lt;br /&gt;
&lt;br /&gt;
===Psy===&lt;br /&gt;
* Psy-RD is a hack.  It works, but it&#039;s a hack.  If you apply QNS with Psy-RD as the metric, it goes way overboard and gives terrible results.  This means that Psy-RD only works because normal mode decision is limited in the way it can modify the image to better suit the metric.  Is there a way to make it better?&lt;br /&gt;
* Should RD be linear at all?  Perhaps we should weight more heavily against low quality blocks and also try to ignore minuscule distortion that viewers can&#039;t see.&lt;br /&gt;
* Psy-trellis (and maybe psy-RD?) are too strong at very high QPs.&lt;br /&gt;
* Psy-trellis should be merged with Psy-RD.  There are patches for this, but they probably won&#039;t be committed until psy-RD itself is fixed.&lt;br /&gt;
* RD should take into account local variance.&lt;br /&gt;
* Lambda should be varied on a per-DCT-block basis instead of a per-macroblock basis.&lt;br /&gt;
* Lambda should be picked independent of quantizer (i.e. with greater precision).&lt;br /&gt;
* Classic problem: a block is mostly high complexity but has a small area of low complexity.  How do we judge whether that area is important?  Good example: sharp text on background with film grain; grain gets blurred out because of the text.&lt;br /&gt;
** If we think it&#039;s important all the time, we ruin the quality of many clips that rely on raising complexity on edges (Touhou).&lt;br /&gt;
* Should motion estimation lambda be as high as it is at very high quantizers?  There&#039;s some value to capturing &amp;quot;true motion&amp;quot;...&lt;br /&gt;
* Macroblock tree correlates pretty well with visual perception in that its concept of a &amp;quot;high complexity&amp;quot; matches well with the visual concept.  Except for local illumination changes.  Talk to Dark Shikari for a patch.&lt;br /&gt;
&lt;br /&gt;
===Lookahead===&lt;br /&gt;
* &#039;&#039;&#039;Lookahead should be multithreaded, either by splitting the frame (sliced threads) or running multiple frame analysis calls at once.&#039;&#039;&#039;&lt;br /&gt;
* Temporal MV predictors in lookahead?  There&#039;s a patch for these somewhere, but they biased heavily in favor of B-frames, likely by improving the motion search.&lt;br /&gt;
* Should lookahead use variable lambda based on quantizer (esp. due to adaptive quant)?  If so, should it take into account estimated ratecontrol quantizer, too?  If so, how?&lt;br /&gt;
&lt;br /&gt;
===Quantization===&lt;br /&gt;
* CAVLC &amp;quot;trellis&amp;quot; is a hack.  It works, but it&#039;s a hack.  Make it better.  See the TODOs in encoder/rdo.c.&lt;br /&gt;
* There&#039;s room for something between trellis and deadzone in terms of complexity.  libvpx has a good example -- it biases towards zero-runs in its &amp;quot;medium speed&amp;quot; quantizer.  This can&#039;t be SIMD&#039;d easily, but is still vastly faster than trellis.  A nonlinear quantizer (be more likely to round up larger coefficients) might also be useful.&lt;br /&gt;
* Floyd-Steinberg for quantization?  Try pushing quantization error to nearby DCT coefficients.  Should this go from high to low or low to high?&lt;br /&gt;
* Energy-preserving quantizer -- maintain L1 (or maybe L2?  I&#039;m not sure) energy.  Should we maintain it in the spatial domain (post-iDCT) or residual domain?  Probably the former.&lt;br /&gt;
* Decimation is currently just a ripoff of the JVT recommended algorithm.  Can we do this more optimally?  With RD?&lt;br /&gt;
&lt;br /&gt;
===Transform===&lt;br /&gt;
* Analyze the error characteristics of the fDCT.  Is there any way to make it more accurate without much speed loss?  Particularly at extremely low quantizers, this might help.&lt;br /&gt;
* Before forward transform, run a &amp;quot;blocking filter&amp;quot; that acts as the approximate inverse of the deblock filter.  See [http://akuvian.org/src/x264/Shwang_loopfilter_thesis.pdf this paper].&lt;br /&gt;
&lt;br /&gt;
===Interlacing===&lt;br /&gt;
* &#039;&#039;&#039;Finish adaptive MBAFF.  Talk to horlicks about this one.&#039;&#039;&#039;&lt;br /&gt;
* Make slice-max-mbs/slice-max-size work with interlacing.  Pretty much requires a good portion of adaptive MBAFF.&lt;br /&gt;
* Lookahead currently blend-deinterlaces to get the lowres.  Is this a good idea?  Is there something better that isn&#039;t much slower?&lt;br /&gt;
* Constrained intra + adaptive MBAFF.  Does anyone care about this?&lt;br /&gt;
* PAFF + MBAFF adaptive - PAFF performs better than Adaptive MBAFF on high motion scenes because it can predict from the previous field.&lt;br /&gt;
&lt;br /&gt;
===Weighted Prediction===&lt;br /&gt;
* &#039;&#039;&#039;Make weightp work with interlacing.  Preferably abuse reference duplication to make it useful for MBAFF.&#039;&#039;&#039;&lt;br /&gt;
* Finish K-means decision for weightp.  Talk to DylanZA about getting his current patch for this one.&lt;br /&gt;
* Add explicit weighting for B-frames, too.  This helps in nonlinear fades, among other cases.&lt;br /&gt;
&lt;br /&gt;
===Ratecontrol===&lt;br /&gt;
* VBV might be able to utilize the ability to re-encode a row of the frame for improved accuracy.&lt;br /&gt;
** Maybe re-encode everything in case of an underflow that row-reencoding can&#039;t fix?  This might be better than underflowing.&lt;br /&gt;
* Current per-frame VBV is a hack.  It only adapts per row and is O(N^2), where N is the number of rows.  An O(N) solution would be able to react more often and thus be more accurate.&lt;br /&gt;
* Make the frame size and row size predictors better.  They currently are kind of crappy.&lt;br /&gt;
* Ratecontrol code as a whole is a bit of a mess.  It could be improved.  There&#039;s a lot of cruft left over that is probably not needed now, like qblur.&lt;br /&gt;
* 2-pass VBV is actually more likely to underflow than 1-pass because it doesn&#039;t adapt as aggressively and trusts first pass data a lot.  This trust is often misplaced if the first pass was a fast one.  This should be improved.&lt;br /&gt;
* 2-pass macroblock-tree: if we added the ability to do macroblock-tree on real encoded data, we&#039;d get better results (particularly with repeating patterns and multiref, such as an anime character&#039;s mouth moving).&lt;br /&gt;
* Macroblock-tree: make it more psy-aware.  Maybe we should cap how much it lowers the quantizer on extremely static scenes?  This might tie into the &amp;quot;just-noticeable error&amp;quot; issue in RD.&lt;br /&gt;
&lt;br /&gt;
===GPU===&lt;br /&gt;
* Motion estimation?&lt;br /&gt;
** Methods&lt;br /&gt;
*** Hierarchical?&lt;br /&gt;
*** 2D Wave?&lt;br /&gt;
*** Something else?&lt;br /&gt;
** &amp;quot;Easy&amp;quot;: lookahead motion estimation&lt;br /&gt;
*** Extremely high parallelism, hundreds of frame searches (each with thousands of searches) at once.&lt;br /&gt;
** &amp;quot;Hard&amp;quot;: main motion estimation&lt;br /&gt;
*** Difficult synchronization issues, not as heavily parallel in terms of number of macroblocks, but far more partition sizes and refs to search.&lt;br /&gt;
*** But potentially more useful...&lt;br /&gt;
* Other things?&lt;br /&gt;
&lt;br /&gt;
===x86 assembly===&lt;br /&gt;
* Port functions (where useful) to AVX, talk to Daniel Kang for a patch.&lt;br /&gt;
* Optimize more for the Phenom.&lt;br /&gt;
* Optimize for the upcoming Sandy Bridge.&lt;br /&gt;
* Work more on 10-bit asm.&lt;br /&gt;
* If you read this, join #x264dev on irc://irc.freenode.net and ping holger to commit his local patches.&lt;br /&gt;
* Make a merged SA8D/SATD for the 8x8dct mode decision, since the two share most of their calculation.  Hadamard_ac already does this, but slightly differently.&lt;br /&gt;
&lt;br /&gt;
===Other assembly===&lt;br /&gt;
* NEON assembly is nowhere near complete.&lt;br /&gt;
** Chroma MC needs to be rewritten for NV12 support.&lt;br /&gt;
* Altivec assembly is very lacking.&lt;br /&gt;
* SPARC VIS assembly is only available when high bit-depth is disabled.&lt;br /&gt;
&lt;br /&gt;
===Other CPU optimizations===&lt;br /&gt;
* x264 needs more prefetching.  How many L1 and L2 cache misses (particularly L1) can we get rid of via smart prefetching in the right places?  Warning: this is often hard to benchmark.&lt;br /&gt;
* Different CPUs take different relative times for some functions.  Is this enough (particularly across architectures) to justify different encoding settings for different CPUs?&lt;br /&gt;
&lt;br /&gt;
===Other features===&lt;br /&gt;
* MPEG-2 encoding support&lt;br /&gt;
* VP8 encoding support&lt;br /&gt;
* &#039;&#039;&#039;4:2:2 and 4:4:4 colorspace support&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;RGB?&#039;&#039;&#039;&lt;br /&gt;
* Support for timecodes&lt;br /&gt;
* Merge speedcontrol&lt;br /&gt;
&lt;br /&gt;
===x264CLI===&lt;br /&gt;
* Finish audio support.  Talk to Kovensky about this one.&lt;br /&gt;
* Make the filtering system aware of fullrange vs TV range.&lt;br /&gt;
* Make the filtering system aware of BT.601 vs BT.709.&lt;br /&gt;
* Add more filters.&lt;br /&gt;
** Deinterlacers (YADIF).&lt;br /&gt;
** Denoisers (HQDN3D?).&lt;br /&gt;
** IVTC, decomb?&lt;br /&gt;
* Merge L-SMASH mp4 muxer.&lt;br /&gt;
* Add TS muxing support using HRD.  Talk to kierank about this one.&lt;br /&gt;
* Add --device support.&lt;br /&gt;
* Add automatic --level restriction support.&lt;/div&gt;</summary>
		<author><name>Jumpyshoes</name></author>
	</entry>
</feed>