various: implement sequence pixel aspect ratios and interlacing settings

Implements the following:
- Sequences have pixel aspect ratios that work in tandem with footage PARs
  to render footage correctly. Viewer and export also acknowledge PARs
- Sequences can have interlacing settings. This doesn't do anything yet,
  eventually the renderer will need to interlace/deinterlace/reinterlace
  appropriately in order to conform all the footage to the sequence. Export
  acknowledges interlacing, but this only affects metadata, not the image.
This commit is contained in:
itsmattkc
2020-08-10 01:47:26 +10:00
parent 901f1001af
commit 28dcff10c0
51 changed files with 1201 additions and 605 deletions
+15 -71
View File
@@ -49,71 +49,6 @@ ExportVideoTab::ExportVideoTab(ColorManager* color_manager, QWidget *parent) :
outer_layout->addStretch();
}
ExportCodec::Codec ExportVideoTab::GetSelectedCodec() const
{
return static_cast<ExportCodec::Codec>(codec_combobox()->currentData().toInt());
}
QComboBox *ExportVideoTab::codec_combobox() const
{
return codec_combobox_;
}
IntegerSlider *ExportVideoTab::width_slider() const
{
return width_slider_;
}
IntegerSlider *ExportVideoTab::height_slider() const
{
return height_slider_;
}
QCheckBox *ExportVideoTab::maintain_aspect_checkbox() const
{
return maintain_aspect_checkbox_;
}
QComboBox *ExportVideoTab::scaling_method_combobox() const
{
return scaling_method_combobox_;
}
const rational &ExportVideoTab::frame_rate() const
{
return frame_rates_.at(frame_rate_combobox_->currentIndex());
}
void ExportVideoTab::set_frame_rate(const rational &frame_rate)
{
frame_rate_combobox_->setCurrentIndex(frame_rates_.indexOf(frame_rate));
}
QString ExportVideoTab::CurrentOCIOColorSpace()
{
return color_space_chooser_->input();
}
CodecSection *ExportVideoTab::GetCodecSection() const
{
return static_cast<CodecSection*>(codec_stack_->currentWidget());
}
void ExportVideoTab::SetCodecSection(CodecSection *section)
{
codec_stack_->setCurrentWidget(section);
}
ImageSection *ExportVideoTab::image_section() const
{
return image_section_;
}
H264Section *ExportVideoTab::h264_section() const
{
return h264_section_;
}
QWidget* ExportVideoTab::SetupResolutionSection()
{
int row = 0;
@@ -163,14 +98,23 @@ QWidget* ExportVideoTab::SetupResolutionSection()
layout->addWidget(new QLabel(tr("Frame Rate:")), row, 0);
frame_rate_combobox_ = new QComboBox();
frame_rates_ = Core::SupportedFrameRates();
foreach (const rational& fr, frame_rates_) {
frame_rate_combobox_->addItem(Core::FrameRateToString(fr));
}
frame_rate_combobox_ = new FrameRateComboBox();
layout->addWidget(frame_rate_combobox_, row, 1);
row++;
layout->addWidget(new QLabel(tr("Pixel Aspect Ratio:")), row, 0);
pixel_aspect_combobox_ = new PixelAspectRatioComboBox();
layout->addWidget(pixel_aspect_combobox_, row, 1);
row++;
layout->addWidget(new QLabel(tr("Interlacing:")), row, 0);
interlaced_combobox_ = new InterlacedComboBox();
layout->addWidget(interlaced_combobox_, row, 1);
return resolution_group;
}