~q3cpma/motion-prediction

An old toy P-frame creation tool

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~q3cpma/motion-prediction
read/write
git@git.sr.ht:~q3cpma/motion-prediction

You can also use your local clone with git send-email.

							motion-prediction
							=================

					DISCLAIMER
					----------

This is an old and abandoned student project, just for reference. Its code
quality and usefulness is at best limited.


					Description
					-----------

A toy program to experiment with traditional block-based video coding
techniques.
It creates an I-frame/P-frame pair from two images and decode a P-frame and its
corresponding I-frame to a PGM image. Takes uncompressed (plain) grayscale
8-bits PGM (P2).

					Dependencies
					------------

GNU Make and gcc.

					Compilation
					-----------

-march=native is already in the CFLAGS, so beware if you want to move the
binary between computers. To build:
$ make -j$(nproc)

					Usage
					-----

To encode a P-frame:
	$ bin/motion-prediction [OPTIONS] frame1 frame2 pframe
To decode a P-frame:
	$ bin/motion-prediction -d [OPTIONS] frame1 pframe out.bmp

Example:
	$ bin/motion-prediction test/akira_1.pgm test/akira_2.pgm out.pfr
	$ bin/motion-prediction -d test/akira_1.pgm out.pfr out.pgm

					Protip
					------

To easily convert your files to adequate PGMs, use Imagemagick:
	$ convert -grayscale rec601luma -compress none image.jpg out.pgm