#include "theme.h"
#include <assert.h>
+#include <bmusb/bmusb.h>
+#include <epoxy/gl.h>
#include <lauxlib.h>
#include <lua.hpp>
#include <movit/effect.h>
#include <movit/effect_chain.h>
#include <movit/image_format.h>
#include <movit/mix_effect.h>
+#include <movit/multiply_effect.h>
#include <movit/overlay_effect.h>
#include <movit/padding_effect.h>
#include <movit/resample_effect.h>
#include <movit/resize_effect.h>
-#include <movit/multiply_effect.h>
#include <movit/util.h>
#include <movit/white_balance_effect.h>
#include <movit/ycbcr.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstddef>
+#include <memory>
#include <new>
#include <utility>
-#include <memory>
#include "defs.h"
+#include "deinterlace_effect.h"
#include "flags.h"
#include "image_input.h"
-#include "mixer.h"
+#include "input.h"
+#include "input_state.h"
+#include "pbo_frame_allocator.h"
+
+class Mixer;
namespace movit {
class ResourcePool;
if (is_main_chain) {
YCbCrFormat output_ycbcr_format;
- // We actually output 4:2:0 in the end, but chroma subsampling
- // happens in a pass not run by Movit (see Mixer::subsample_chroma()).
+ // We actually output 4:2:0 and/or 4:2:2 in the end, but chroma subsampling
+ // happens in a pass not run by Movit (see ChromaSubsampler::subsample_chroma()).
output_ycbcr_format.chroma_subsampling_x = 1;
output_ycbcr_format.chroma_subsampling_y = 1;
-
- // Rec. 709 would be the sane thing to do, but it seems many players
- // (e.g. MPlayer and VLC) just default to BT.601 coefficients no matter
- // what (see discussions in e.g. https://trac.ffmpeg.org/ticket/4978).
- // We _do_ set the right flags, though, so that a player that works
- // properly doesn't have to guess.
- output_ycbcr_format.luma_coefficients = YCBCR_REC_601;
+ if (global_flags.ycbcr_rec709_coefficients) {
+ output_ycbcr_format.luma_coefficients = YCBCR_REC_709;
+ } else {
+ output_ycbcr_format.luma_coefficients = YCBCR_REC_601;
+ }
output_ycbcr_format.full_range = false;
output_ycbcr_format.num_levels = 256;
}
for (unsigned i = 0; i < num_inputs; ++i) {
if (override_bounce) {
- inputs.push_back(new NonBouncingYCbCrInput(inout_format, input_ycbcr_format, WIDTH, HEIGHT, YCBCR_INPUT_SPLIT_Y_AND_CBCR));
+ inputs.push_back(new NonBouncingYCbCrInput(inout_format, input_ycbcr_format, global_flags.width, global_flags.height, YCBCR_INPUT_SPLIT_Y_AND_CBCR));
} else {
- inputs.push_back(new YCbCrInput(inout_format, input_ycbcr_format, WIDTH, HEIGHT, YCBCR_INPUT_SPLIT_Y_AND_CBCR));
+ inputs.push_back(new YCbCrInput(inout_format, input_ycbcr_format, global_flags.width, global_flags.height, YCBCR_INPUT_SPLIT_Y_AND_CBCR));
}
chain->add_input(inputs.back());
}