Commit 8fb87147 authored by Fiona Glaser's avatar Fiona Glaser

Double the base framerate for frame-sequential 3D files

A 60fps frame-sequential 3D file is really only 30 FPS, just alternating between eyes.
Accordingly, ratecontrol should treat it as if it was really 30 FPS.
This will increase the bitrate at the same CRF level for such videos when --frame-packing 5 is used.
parent b2bf3f99
......@@ -28,12 +28,14 @@
#define X264_RATECONTROL_H
/* Completely arbitrary. Ratecontrol lowers relative quality at higher framerates
* and the reverse at lower framerates; this serves as the center of the curve. */
#define BASE_FRAME_DURATION (0.04f)
* and the reverse at lower framerates; this serves as the center of the curve.
* Halve all the values for frame-packed 3D to compensate for the "doubled"
* framerate. */
#define BASE_FRAME_DURATION (0.04f / ((h->param.i_frame_packing == 5)+1))
/* Arbitrary limitations as a sanity check. */
#define MAX_FRAME_DURATION 1.00f
#define MIN_FRAME_DURATION 0.01f
#define MAX_FRAME_DURATION (1.00f / ((h->param.i_frame_packing == 5)+1))
#define MIN_FRAME_DURATION (0.01f / ((h->param.i_frame_packing == 5)+1))
#define CLIP_DURATION(f) x264_clip3f(f,MIN_FRAME_DURATION,MAX_FRAME_DURATION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment