Remove swaroop variant.
[dcpomatic.git] / src / lib / ffmpeg_examiner.cc
index 87bb8ce95687f5bc331cc1b5057014202be4f4a5..bfd7e77227bbad5d73d93e523fbcb02c558a279d 100644 (file)
@@ -158,7 +158,7 @@ DCPOMATIC_ENABLE_WARNINGS
 
                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;
                }
@@ -184,23 +184,14 @@ DCPOMATIC_ENABLE_WARNINGS
                }
 
                _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
 }
 
 
@@ -213,7 +204,7 @@ FFmpegExaminer::video_packet (AVCodecContext* context, string& temporal_referenc
 {
        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;
        }
 
@@ -229,7 +220,7 @@ DCPOMATIC_ENABLE_WARNINGS
                                _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");
                }