Commit 0b78956b authored by Raphaël Zumer's avatar Raphaël Zumer

Force 4:2:2/4:4:4 encoding to keyframe-only

parent 08918891
...@@ -510,13 +510,18 @@ impl Context { ...@@ -510,13 +510,18 @@ impl Context {
let mut fi = self.frame_data[&(idx - 1)].clone(); let mut fi = self.frame_data[&(idx - 1)].clone();
// FIXME: inter unsupported with 4:2:2 and 4:4:4 chroma sampling
let chroma_sampling = self.config.enc.chroma_sampling;
let keyframe_only = chroma_sampling == ChromaSampling::Cs444 ||
chroma_sampling == ChromaSampling::Cs422;
// Initially set up the frame as an inter frame. // Initially set up the frame as an inter frame.
// We need to determine what the frame number is before we can // We need to determine what the frame number is before we can
// look up the frame type. If reordering is enabled, the idx // look up the frame type. If reordering is enabled, the idx
// may not match the frame number. // may not match the frame number.
let idx_in_segment = idx - self.segment_start_idx; let idx_in_segment = idx - self.segment_start_idx;
if idx_in_segment > 0 { if idx_in_segment > 0 {
let next_keyframe = self.next_keyframe(); let next_keyframe = if keyframe_only { self.segment_start_frame + 1 } else { self.next_keyframe() };
let (fi_temp, end_of_subgop) = FrameInvariants::new_inter_frame( let (fi_temp, end_of_subgop) = FrameInvariants::new_inter_frame(
&fi, &fi,
self.segment_start_frame, self.segment_start_frame,
......
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