Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

January 18, 2016

Fast YUV to RGB conversion in Python 3

This Python scripts implements fast matrix-based conversion from YUV to RGB colospace. Conversion from YV12 (YUV420) requires one extra line of code to perform up-sampling of chroma planes.

July 12, 2015

A Python script evaluating PSNR metric of two YUV420 frames

A script evaluating PSNR metric of two YUV420 frames.
usage: psnr.py filename1.yuv filename2.yuv frame_width frame_height
Alternatively if filename1 contains width and height in the form file-1200x1600.yuv,
the script will extract width and height of a frame from the filename. Then usage even simplier:
psnr.py filename1-1200x1600.yuv filename2.yuv