Skip to content

Instantly share code, notes, and snippets.



This benchmark evaluates the different presets options offered by x264, using medium as reference, and providing size and time differences (relative and not).

##benchmark Tests run with latest x264 (12139) and FFmpeg, configured to run with threading enabled. The slower and veryslow presets have been modified to keep the number of refs constant and compatible with most decoders. All results represent an average over 10 runs computed by perf.

View file.c
uint32_t max_coord = (uint32_t) -1;
size_t orig_width = (size_t) sc->width * max_coord / (max_coord - r - l);
size_t orig_height = (size_t) sc->height * max_coord / (max_coord - b - t);
sc->spherical->left_bound = ceil(orig_width * l / max_coord);
sc->spherical->top_bound = ceil(orig_height * t / max_coord);
sc->spherical->right_bound = orig_width - sc->width - sc->spherical->left_bound;
sc->spherical->bottom_bound = orig_height - sc->height - sc->spherical->top_bound;
View gist:9389e55ef839fc7aa12fc8330a14bb92
* @name Initial orientation
* @{
* There fields describe additional rotations applied to the sphere after
* the video frame is mapped onto it. The sphere is rotated around the
* viewer, who remains stationary.
* A positive yaw moves the left half of the frame forward.
* A positive pitch moves the bottom half of the frame upward.
* A positive roll moves the left half of the frame downward.
View notes on opus in mp4 in ffmpeg
[6:04pm] Paranoialmaniac:
[6:04pm] Paranoialmaniac: opus can have variable pre-roll size
[6:04pm] Paranoialmaniac: since opus can vary its frame-size by frame by frame
[6:10pm] Paranoialmaniac: he misunderstands units of roll_distance
[6:13pm] Paranoialmaniac: roll_distance is in units of Opus samples not PCM samples