#include <libavutil/display.h>
}
DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
#include <iostream>
#include "i18n.h"
using std::cout;
using std::max;
using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcpomatic;
av_packet_unref (&_packet);
- if (_first_video && got_all_audio && temporal_reference.size() >= PULLDOWN_CHECK_FRAMES) {
+ if (_first_video && got_all_audio && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)) {
/* All done */
break;
}
}
_rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
-
- DCPOMATIC_ASSERT (fabs (*_rotation - 90 * round (*_rotation / 90)) < 2);
}
LOG_GENERAL("Temporal reference was %1", temporal_reference);
- if (temporal_reference.find("T2T3B2B3T2T3B2B3") || temporal_reference.find("B2B3T2T3B2B3T2T3")) {
+ if (temporal_reference.find("T2T3B2B3T2T3B2B3") != string::npos || temporal_reference.find("B2B3T2T3B2B3T2T3") != string::npos) {
/* The magical sequence (taken from mediainfo) suggests that 2:3 pull-down is in use */
_pulldown = true;
LOG_GENERAL_NC("Suggest that this may be 2:3 pull-down (soft telecine)");
}
-
-#ifdef DCPOMATIC_VARIANT_SWAROOP
- AVDictionaryEntry* e = av_dict_get (_format_context->metadata, SWAROOP_ID_TAG, 0, 0);
- if (e) {
- _id = e->value;
- }
-#endif
}
{
DCPOMATIC_ASSERT (_video_stream);
- if (_first_video && !_need_video_length && temporal_reference.size() >= PULLDOWN_CHECK_FRAMES) {
+ if (_first_video && !_need_video_length && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)) {
return;
}
_format_context->streams[_video_stream.get()]
).get_value_or (ContentTime ()).frames_round (video_frame_rate().get ());
}
- if (temporal_reference.size() < PULLDOWN_CHECK_FRAMES) {
+ if (temporal_reference.size() < (PULLDOWN_CHECK_FRAMES * 2)) {
temporal_reference += (_frame->top_field_first ? "T" : "B");
temporal_reference += (_frame->repeat_pict ? "3" : "2");
}