[x264-devel] Get good quality MV in a fast way

孫偉程 dmvictor at gmail.com
Wed Mar 24 11:48:18 UTC 2021


Hi x264 developers,

I want to dump the Motion Vector(MV) during x264 encodes the video. I don't
care about the output video's quality. Instead, I care about the MV's
quality and speed. Ideally, I want the program to only do the motion
estimation. Using input frame n for the current frame, and input frame n-1
for the reference frame. Other stuff such as DCT, quantization, entropy
encoding is not important to me. Like the top left part of this picture(*).

>From the H.264 standard, I knew we use the reconstructed frame instead of
the original frame as the reference frame. Instead of modifying x264's
execution flow, I suppose set qp to 0 could be a workaround. Lossless
compressed and decompressed the input frame, getting the reconstructed
frame as the reference frame, to get better quality MV than lossy
compression.

For the speed, I want to execute only the necessary part of the program. I
studied all options of x264, referring to the "ultrafast" preset, and
generated the following command.

./x264 --log-level debug --input-res 64x64 -b 0 --partitions none --ref 1
--keyint infinite --no-scenecut --qp 0 --me tesa --merange 16
--rc-lookahead 0 --lookahead-threads 1 --subme 0 --no-chroma-me --weightp 0
-o /dev/null /path/to/the/video/input.yuv

Does the option of my setting achieve my goal, getting good quality MVs as
fast as possible? Without commenting out the unnecessary code, is there any
improvement I can do? Thank you!

*:
https://drive.google.com/file/d/1XyKxiJfu_Ixf300fc_xVE5QVsVCKGMl2/view?usp=sharing

- dmvictor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20210324/427cef89/attachment.html>


More information about the x264-devel mailing list