diff mbox series

[FFmpeg-devel,v6,24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding

Message ID 1e2fc0d09f8d195c87e6c0f075c12ee0d49c78ab.1656261322.git.ffmpegagent@gmail.com
State New
Headers show
Series Subtitle Filtering 2022 | expand

Commit Message

Aman Karmani June 26, 2022, 4:35 p.m. UTC
From: softworkz <softworkz@hotmail.com>

This commit actually enables subtitle filtering in ffmpeg by
sending and receiving subtitle frames to and from a filtergraph.

The heartbeat functionality from the previous sub2video implementation
is removed and now provided by the 'subfeed' filter.
The other part of sub2video functionality is retained by
auto-insertion of the new graphicsub2video filter.

Justification for changed test refs:

- sub2video
  The previous results were incorrect. The command line for this test
  specifies -r 5 (5 frames per second), which is now fulfilled by the
  additional frames in the reference output.
  Example: The first subtitle time is 499000, the second is 15355000,
  which means 0.5s and 15.35s with a difference of 14.85s.
  15s * 5fps = 75 frames and that's now the exact number of video
  frames between these two subtitle events.

- sub2video_basic
  The previous results had some incorrect output because multiple
  frames had the same dts
  The non-empty content frames are visually identical, the different
  CRC is due to the different blending algorithm that is being used.

- sub2video_time_limited
  Subtitle frames are emitted to the filter graphs at a 5 fps rate
  by default. The time limit for this test is 15s * 5fps = 75 frames
  which matches the count in the new ref.

- sub-dvb
  Running ffprobe -show_frames on the source file shows that there
  are 7 subtitle frames with 0 rects in the source at the start
  and 2 at the end. This translates to the 14 and 4 additional
  entries in the new test results.

- filter-overlay-dvdsub-2397
  Overlay results have slightly different CRCs due to different
  blending implementation

- sub-scc
  The first entry is no longer in the output because it is before
  the actual start time and the strim filter removes such entries
  now (like for video and audio)

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 fftools/ffmpeg.c                          |  613 +++++-----
 fftools/ffmpeg.h                          |   17 +-
 fftools/ffmpeg_filter.c                   |  270 +++--
 fftools/ffmpeg_hw.c                       |    2 +-
 fftools/ffmpeg_opt.c                      |   28 +-
 tests/ref/fate/filter-overlay-dvdsub-2397 |  182 +--
 tests/ref/fate/sub-dvb                    |  162 +--
 tests/ref/fate/sub-scc                    |    1 -
 tests/ref/fate/sub2video                  | 1091 +++++++++++++++++-
 tests/ref/fate/sub2video_basic            | 1238 +++++++++++++++++++--
 tests/ref/fate/sub2video_time_limited     |   78 +-
 11 files changed, 3010 insertions(+), 672 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 09caa3e3c4..40d7868368 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -142,8 +142,6 @@  int want_sdp = 1;
 static BenchmarkTimeStamps current_time;
 AVIOContext *progress_avio = NULL;
 
-static uint8_t *subtitle_out;
-
 InputStream **input_streams = NULL;
 int        nb_input_streams = 0;
 InputFile   **input_files   = NULL;
@@ -168,163 +166,6 @@  static int restore_tty;
 static void free_input_threads(void);
 #endif
 
-/* sub2video hack:
-   Convert subtitles to video with alpha to insert them in filter graphs.
-   This is a temporary solution until libavfilter gets real subtitles support.
- */
-
-static int sub2video_get_blank_frame(InputStream *ist)
-{
-    int ret;
-    AVFrame *frame = ist->sub2video.frame;
-
-    av_frame_unref(frame);
-    ist->sub2video.frame->width  = ist->dec_ctx->width  ? ist->dec_ctx->width  : ist->sub2video.w;
-    ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h;
-    ist->sub2video.frame->format = AV_PIX_FMT_RGB32;
-    if ((ret = av_frame_get_buffer(frame, 0)) < 0)
-        return ret;
-    memset(frame->data[0], 0, frame->height * frame->linesize[0]);
-    return 0;
-}
-
-static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h,
-                                AVSubtitleRect *r)
-{
-    uint32_t *pal, *dst2;
-    uint8_t *src, *src2;
-    int x, y;
-
-    if (r->type != SUBTITLE_BITMAP) {
-        av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n");
-        return;
-    }
-    if (r->x < 0 || r->x + r->w > w || r->y < 0 || r->y + r->h > h) {
-        av_log(NULL, AV_LOG_WARNING, "sub2video: rectangle (%d %d %d %d) overflowing %d %d\n",
-            r->x, r->y, r->w, r->h, w, h
-        );
-        return;
-    }
-
-    dst += r->y * dst_linesize + r->x * 4;
-    src = r->data[0];
-    pal = (uint32_t *)r->data[1];
-    for (y = 0; y < r->h; y++) {
-        dst2 = (uint32_t *)dst;
-        src2 = src;
-        for (x = 0; x < r->w; x++)
-            *(dst2++) = pal[*(src2++)];
-        dst += dst_linesize;
-        src += r->linesize[0];
-    }
-}
-
-static void sub2video_push_ref(InputStream *ist, int64_t pts)
-{
-    AVFrame *frame = ist->sub2video.frame;
-    int i;
-    int ret;
-
-    av_assert1(frame->data[0]);
-    ist->sub2video.last_pts = frame->pts = pts;
-    for (i = 0; i < ist->nb_filters; i++) {
-        ret = av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame,
-                                           AV_BUFFERSRC_FLAG_KEEP_REF |
-                                           AV_BUFFERSRC_FLAG_PUSH);
-        if (ret != AVERROR_EOF && ret < 0)
-            av_log(NULL, AV_LOG_WARNING, "Error while add the frame to buffer source(%s).\n",
-                   av_err2str(ret));
-    }
-}
-
-void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
-{
-    AVFrame *frame = ist->sub2video.frame;
-    int8_t *dst;
-    int     dst_linesize;
-    int num_rects, i;
-    int64_t pts, end_pts;
-
-    if (!frame)
-        return;
-    if (sub) {
-        pts       = av_rescale_q(sub->pts + sub->start_display_time * 1000LL,
-                                 AV_TIME_BASE_Q, ist->st->time_base);
-        end_pts   = av_rescale_q(sub->pts + sub->end_display_time   * 1000LL,
-                                 AV_TIME_BASE_Q, ist->st->time_base);
-        num_rects = sub->num_rects;
-    } else {
-        /* If we are initializing the system, utilize current heartbeat
-           PTS as the start time, and show until the following subpicture
-           is received. Otherwise, utilize the previous subpicture's end time
-           as the fall-back value. */
-        pts       = ist->sub2video.initialize ?
-                    heartbeat_pts : ist->sub2video.end_pts;
-        end_pts   = INT64_MAX;
-        num_rects = 0;
-    }
-    if (sub2video_get_blank_frame(ist) < 0) {
-        av_log(ist->dec_ctx, AV_LOG_ERROR,
-               "Impossible to get a blank canvas.\n");
-        return;
-    }
-    dst          = frame->data    [0];
-    dst_linesize = frame->linesize[0];
-    for (i = 0; i < num_rects; i++)
-        sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]);
-    sub2video_push_ref(ist, pts);
-    ist->sub2video.end_pts = end_pts;
-    ist->sub2video.initialize = 0;
-}
-
-static void sub2video_heartbeat(InputStream *ist, int64_t pts)
-{
-    InputFile *infile = input_files[ist->file_index];
-    int i, j, nb_reqs;
-    int64_t pts2;
-
-    /* When a frame is read from a file, examine all sub2video streams in
-       the same file and send the sub2video frame again. Otherwise, decoded
-       video frames could be accumulating in the filter graph while a filter
-       (possibly overlay) is desperately waiting for a subtitle frame. */
-    for (i = 0; i < infile->nb_streams; i++) {
-        InputStream *ist2 = input_streams[infile->ist_index + i];
-        if (!ist2->sub2video.frame)
-            continue;
-        /* subtitles seem to be usually muxed ahead of other streams;
-           if not, subtracting a larger time here is necessary */
-        pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1;
-        /* do not send the heartbeat frame if the subtitle is already ahead */
-        if (pts2 <= ist2->sub2video.last_pts)
-            continue;
-        if (pts2 >= ist2->sub2video.end_pts || ist2->sub2video.initialize)
-            /* if we have hit the end of the current displayed subpicture,
-               or if we need to initialize the system, update the
-               overlayed subpicture and its start/end times */
-            sub2video_update(ist2, pts2 + 1, NULL);
-        for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++)
-            nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter);
-        if (nb_reqs)
-            sub2video_push_ref(ist2, pts2);
-    }
-}
-
-static void sub2video_flush(InputStream *ist)
-{
-    int i;
-    int ret;
-
-    if (ist->sub2video.end_pts < INT64_MAX)
-        sub2video_update(ist, INT64_MAX, NULL);
-    for (i = 0; i < ist->nb_filters; i++) {
-        ret = av_buffersrc_add_frame(ist->filters[i]->filter, NULL);
-        if (ret != AVERROR_EOF && ret < 0)
-            av_log(NULL, AV_LOG_WARNING, "Flush the frame error.\n");
-    }
-}
-
-/* end of sub2video hack */
-
 static void term_exit_sigsafe(void)
 {
 #if HAVE_TERMIOS_H
@@ -525,7 +366,6 @@  static void ffmpeg_cleanup(int ret)
         avfilter_graph_free(&fg->graph);
         for (j = 0; j < fg->nb_inputs; j++) {
             InputFilter *ifilter = fg->inputs[j];
-            struct InputStream *ist = ifilter->ist;
 
             if (ifilter->frame_queue) {
                 AVFrame *frame;
@@ -534,12 +374,6 @@  static void ffmpeg_cleanup(int ret)
                 av_fifo_freep2(&ifilter->frame_queue);
             }
             av_freep(&ifilter->displaymatrix);
-            if (ist->sub2video.sub_queue) {
-                AVSubtitle sub;
-                while (av_fifo_read(ist->sub2video.sub_queue, &sub, 1) >= 0)
-                    avsubtitle_free(&sub);
-                av_fifo_freep2(&ist->sub2video.sub_queue);
-            }
             av_buffer_unref(&ifilter->hw_frames_ctx);
             av_freep(&ifilter->name);
             av_freep(&fg->inputs[j]);
@@ -560,7 +394,7 @@  static void ffmpeg_cleanup(int ret)
     }
     av_freep(&filtergraphs);
 
-    av_freep(&subtitle_out);
+    ////av_freep(&subtitle_out);
 
     /* close files */
     for (i = 0; i < nb_output_files; i++)
@@ -613,15 +447,19 @@  static void ffmpeg_cleanup(int ret)
     for (i = 0; i < nb_input_streams; i++) {
         InputStream *ist = input_streams[i];
 
+        if (ist->prev_sub.subtitle == ist->decoded_frame)
+            // Prevent double-free
+            ist->prev_sub.subtitle = NULL;
+
         av_frame_free(&ist->decoded_frame);
         av_packet_free(&ist->pkt);
         av_dict_free(&ist->decoder_opts);
-        avsubtitle_free(&ist->prev_sub.subtitle);
-        av_frame_free(&ist->sub2video.frame);
+        av_frame_free(&ist->prev_sub.subtitle);
         av_freep(&ist->filters);
         av_freep(&ist->hwaccel_device);
         av_freep(&ist->dts_buffer);
 
+        av_buffer_unref(&ist->subtitle_header);
         avcodec_free_context(&ist->dec_ctx);
 
         av_freep(&input_streams[i]);
@@ -991,33 +829,83 @@  static void do_audio_out(OutputFile *of, OutputStream *ost,
         exit_program(1);
 }
 
-static void do_subtitle_out(OutputFile *of,
-                            OutputStream *ost,
-                            AVSubtitle *sub)
+static void encode_subtitle_frame(OutputFile *of, OutputStream *ost, AVFrame *frame, AVPacket *pkt, int64_t pts_offset)
+{
+    AVCodecContext *enc = ost->enc_ctx;
+    int ret;
+
+        ost->frames_encoded++;
+
+        ret = avcodec_send_frame(enc, frame);
+        if (ret < 0)
+            goto error;
+
+        while (1) {
+            ret = avcodec_receive_packet(enc, pkt);
+            update_benchmark("encode_subtitles %d.%d", ost->file_index, ost->index);
+            if (ret == AVERROR(EAGAIN))
+                break;
+            if (ret < 0)
+                goto error;
+
+            if (debug_ts) {
+                av_log(NULL, AV_LOG_INFO, "encoder -> type:subtitles "
+                       "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
+                       av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &enc->time_base),
+                       av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &enc->time_base));
+            }
+
+            pkt->pts  = av_rescale_q(frame->subtitle_timing.start_pts, AV_TIME_BASE_Q, ost->mux_timebase);
+            pkt->duration = av_rescale_q(frame->subtitle_timing.duration, AV_TIME_BASE_Q, ost->mux_timebase);
+            pkt->pts += pts_offset;
+
+            pkt->dts = pkt->pts;
+            output_packet(of, pkt, ost, 0);
+        }
+        ost->sync_opts++;
+        ost->frame_number++;
+
+    return;
+error:
+    av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed - Error code: %d\n", ret);
+    exit_program(1);
+}
+
+static void do_subtitle_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
 {
-    int subtitle_out_max_size = 1024 * 1024;
-    int subtitle_out_size, nb, i;
+    int nb, i;
     AVCodecContext *enc;
     AVPacket *pkt = ost->pkt;
     int64_t pts;
 
-    if (sub->pts == AV_NOPTS_VALUE) {
+    if (!frame)
+        return;
+
+    av_log(NULL, AV_LOG_DEBUG, "do_subtitle_out: sub->pts: %"PRId64"  frame->pts: %"PRId64"\n", frame->subtitle_timing.start_pts, frame->pts);
+
+    if (frame->subtitle_timing.start_pts == AV_NOPTS_VALUE) {
         av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n");
         if (exit_on_error)
             exit_program(1);
         return;
     }
 
-    enc = ost->enc_ctx;
-
-    if (!subtitle_out) {
-        subtitle_out = av_malloc(subtitle_out_max_size);
-        if (!subtitle_out) {
-            av_log(NULL, AV_LOG_FATAL, "Failed to allocate subtitle_out\n");
-            exit_program(1);
-        }
+    if (frame->repeat_sub) {
+        av_log(NULL, AV_LOG_WARNING, "Ignoring repeated subtitle frame\n");
+        return;
     }
 
+    ////if (ost->last_subtitle_pts && ost->last_subtitle_pts == frame->subtitle_timing.start_pts) {
+    ////    av_log(NULL, AV_LOG_DEBUG, "Ignoring subtitle frame with duplicate subtitle_pts\n");
+    ////    return;
+    ////}
+
+    ost->last_subtitle_pts = frame->subtitle_timing.start_pts;
+
+    init_output_stream_wrapper(ost, frame, 1);
+
+    enc = ost->enc_ctx;
+
     /* Note: DVB subtitle need one packet to draw them and one other
        packet to clear them */
     /* XXX: signal it in the codec context ? */
@@ -1027,50 +915,38 @@  static void do_subtitle_out(OutputFile *of,
         nb = 1;
 
     /* shift timestamp to honor -ss and make check_recording_time() work with -t */
-    pts = sub->pts;
+    pts = frame->subtitle_timing.start_pts;
     if (output_files[ost->file_index]->start_time != AV_NOPTS_VALUE)
         pts -= output_files[ost->file_index]->start_time;
-    for (i = 0; i < nb; i++) {
-        unsigned save_num_rects = sub->num_rects;
 
-        ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base);
-        if (!check_recording_time(ost))
-            return;
+    ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base);
+    if (!check_recording_time(ost))
+        return;
 
-        sub->pts = pts;
-        // start_display_time is required to be 0
-        sub->pts               += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q);
-        sub->end_display_time  -= sub->start_display_time;
-        sub->start_display_time = 0;
-        if (i == 1)
-            sub->num_rects = 0;
+    frame->subtitle_timing.start_pts = pts;
+
+    for (i = 0; i < nb; i++) {
+        const unsigned save_num_rects = frame->num_subtitle_areas;
+        int64_t pts_offset = 0;
 
         ost->frames_encoded++;
 
-        subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out,
-                                                    subtitle_out_max_size, sub);
         if (i == 1)
-            sub->num_rects = save_num_rects;
-        if (subtitle_out_size < 0) {
-            av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n");
-            exit_program(1);
-        }
+            frame->num_subtitle_areas = 0;
 
-        av_packet_unref(pkt);
-        pkt->data = subtitle_out;
-        pkt->size = subtitle_out_size;
-        pkt->pts  = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->mux_timebase);
-        pkt->duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase);
         if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) {
             /* XXX: the pts correction is handled here. Maybe handling
                it in the codec would be better */
             if (i == 0)
-                pkt->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase);
+                pts_offset = 0;
             else
-                pkt->pts += av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase);
+                pts_offset = av_rescale_q(frame->subtitle_timing.duration, AV_TIME_BASE_Q, ost->mux_timebase);
         }
-        pkt->dts = pkt->pts;
-        output_packet(of, pkt, ost, 0);
+
+        encode_subtitle_frame(of, ost, frame, pkt, pts_offset);
+
+        if (i == 1)
+            frame->num_subtitle_areas = save_num_rects;
     }
 }
 
@@ -1375,8 +1251,26 @@  static int reap_filters(int flush)
                 }
                 do_audio_out(of, ost, filtered_frame);
                 break;
+            case AVMEDIA_TYPE_SUBTITLE:
+
+                if (filtered_frame->format == AV_SUBTITLE_FMT_ASS && !enc->subtitle_header
+                    && filtered_frame->subtitle_header) {
+                    const char *subtitle_header = (char *)filtered_frame->subtitle_header->data;
+                    enc->subtitle_header = (uint8_t *)av_strdup(subtitle_header);
+                    if (!enc->subtitle_header)
+                        return AVERROR(ENOMEM);
+                    enc->subtitle_header_size = strlen(subtitle_header);
+                }
+
+                if ((ost->enc_ctx->width == 0 || ost->enc_ctx->height == 0)
+                    && filter->inputs[0]->w > 0 && filter->inputs[0]->h > 0 ) {
+                    ost->enc_ctx->width = filter->inputs[0]->w;
+                    ost->enc_ctx->height = filter->inputs[0]->h;
+                }
+
+                do_subtitle_out(of, ost, filtered_frame);
+                break;
             default:
-                // TODO support subtitle filters
                 av_assert0(0);
             }
 
@@ -1928,7 +1822,8 @@  static int ifilter_has_all_input_formats(FilterGraph *fg)
     int i;
     for (i = 0; i < fg->nb_inputs; i++) {
         if (fg->inputs[i]->format < 0 && (fg->inputs[i]->type == AVMEDIA_TYPE_AUDIO ||
-                                          fg->inputs[i]->type == AVMEDIA_TYPE_VIDEO))
+                                          fg->inputs[i]->type == AVMEDIA_TYPE_VIDEO ||
+                                          fg->inputs[i]->type == AVMEDIA_TYPE_SUBTITLE))
             return 0;
     }
     return 1;
@@ -1955,6 +1850,18 @@  static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_ref
     case AVMEDIA_TYPE_VIDEO:
         need_reinit |= ifilter->width  != frame->width ||
                        ifilter->height != frame->height;
+
+        if (need_reinit)
+            need_reinit = 1;
+        break;
+    case AVMEDIA_TYPE_SUBTITLE:
+        need_reinit |= ifilter->width  != frame->width ||
+                       ifilter->height != frame->height;
+
+        need_reinit &= (ifilter->width == 0 || ifilter->height == 0);
+
+        if (need_reinit)
+            need_reinit = 1;
         break;
     }
 
@@ -2026,12 +1933,9 @@  static int ifilter_send_eof(InputFilter *ifilter, int64_t pts)
             return ret;
     } else {
         // the filtergraph was never configured
-        if (ifilter->format < 0) {
-            ret = ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar);
-            if (ret < 0)
-                return ret;
-        }
-        if (ifilter->format < 0 && (ifilter->type == AVMEDIA_TYPE_AUDIO || ifilter->type == AVMEDIA_TYPE_VIDEO)) {
+        if (ifilter->format < 0)
+            ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar);
+        if (ifilter->format < 0 && (ifilter->type == AVMEDIA_TYPE_AUDIO || ifilter->type == AVMEDIA_TYPE_VIDEO || ifilter->type == AVMEDIA_TYPE_SUBTITLE)) {
             av_log(NULL, AV_LOG_ERROR, "Cannot determine format of input stream %d:%d after EOF\n", ifilter->ist->file_index, ifilter->ist->st->index);
             return AVERROR_INVALIDDATA;
         }
@@ -2069,7 +1973,7 @@  static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacke
 
 static int send_frame_to_filters(InputStream *ist, AVFrame *decoded_frame)
 {
-    int i, ret;
+    int i, ret = 0;
 
     av_assert1(ist->nb_filters > 0); /* ensure ret is initialized */
     for (i = 0; i < ist->nb_filters; i++) {
@@ -2270,79 +2174,200 @@  fail:
     return err < 0 ? err : ret;
 }
 
-static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output,
+static void subtitle_send_kickoff(InputStream *ist, int64_t heartbeat_pts)
+{
+    AVFrame *frame;
+    int64_t pts;
+
+    frame = av_frame_alloc();
+    if (!frame) {
+        av_log(ist->dec_ctx, AV_LOG_ERROR, "Unable to alloc frame (out of memory).\n");
+        return;
+    }
+
+    frame->type = AVMEDIA_TYPE_SUBTITLE;
+    av_frame_get_buffer2(frame, 0);
+
+    frame->format = (uint16_t)ist->dec_ctx->subtitle_type;
+
+    pts = FFMAX(heartbeat_pts, ist->subtitle_kickoff.last_pts) + av_rescale_q(10, (AVRational){ 1, 1000 }, ist->st->time_base);
+
+    frame->width = ist->subtitle_kickoff.w;
+    frame->height = ist->subtitle_kickoff.h;
+    frame->subtitle_timing.start_pts = av_rescale_q(pts, ist->st->time_base, AV_TIME_BASE_Q);
+    frame->subtitle_timing.duration =  av_rescale_q(10, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q);
+    frame->pts = pts;
+
+    av_log(NULL, AV_LOG_WARNING, "subtitle_kickoff: call subtitle_resend_current %"PRId64" frame->format: %d\n", pts, frame->format);
+
+    ist->subtitle_kickoff.last_pts = pts;
+
+    send_frame_to_filters(ist, frame);
+
+    av_frame_free(&frame);
+}
+
+// Opposed to the earlier "subtitle hearbeat", this is primarily aimed at
+// sending an initial subtitle frame to the filters for propagating the initial
+// timing values and to avoid that too much time is spent on a single "HW" decoder
+// which could overflow its buffer pool otherwise
+static void subtitle_kickoff(InputStream *ist, int64_t pts)
+{
+    int i;
+    int64_t pts2;
+    int64_t diff;
+
+    if (ist->st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
+        return;
+
+    for (i = 0; i < nb_input_streams; i++) {
+        InputStream *ist2 = input_streams[i];
+        unsigned j, nb_reqs;
+
+        if (!ist2->subtitle_kickoff.is_active)
+            continue;
+        /* It's primarily the initial send that matters and which propagates
+         * the right start times to subtitle filters depending on input from decoding */
+        diff = av_rescale_q(5000, (AVRational){ 1, 1000 }, ist2->st->time_base);
+        pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base);
+
+        /* do not send a kickoff frame if the subtitle is already ahead */
+        if (pts2 - diff <= ist2->subtitle_kickoff.last_pts)
+            continue;
+
+        for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++) {
+            if (ist2->filters[j]->filter == NULL) {
+                subtitle_send_kickoff(ist2, pts2);
+                return;
+            }
+            nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter);
+        }
+        if (nb_reqs) {
+            av_log(NULL, AV_LOG_WARNING, "subtitle_kickoff: resend - pts: %"PRIi64"\n", pts2);
+            subtitle_send_kickoff(ist2, pts2);
+        }
+    }
+}
+
+static InputStream *get_input_stream(OutputStream *ost)
+{
+    if (ost->source_index >= 0)
+        return input_streams[ost->source_index];
+    return NULL;
+}
+
+static int decode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output,
                                int *decode_failed)
 {
-    AVSubtitle subtitle;
-    int free_sub = 1;
-    int i, ret = avcodec_decode_subtitle2(ist->dec_ctx,
-                                          &subtitle, got_output, pkt);
+    AVFrame *decoded_frame;
+    AVCodecContext *avctx = ist->dec_ctx;
+    int i = 0, ret = 0, err = 0;
+    int64_t pts;
+
+    if (!ist->decoded_frame && !((ist->decoded_frame = av_frame_alloc())))
+        return AVERROR(ENOMEM);
+    decoded_frame = ist->decoded_frame;
+    decoded_frame->type = AVMEDIA_TYPE_SUBTITLE;
+    decoded_frame->format = (uint16_t)avctx->subtitle_type;
+
+    if (!ist->subtitle_header && avctx->subtitle_header && avctx->subtitle_header_size > 0) {
+        ist->subtitle_header = av_buffer_allocz(avctx->subtitle_header_size + 1);
+        if (!ist->subtitle_header)
+            return AVERROR(ENOMEM);
+        memcpy(ist->subtitle_header->data, avctx->subtitle_header, avctx->subtitle_header_size);
+    }
+
+    ret = decode(avctx, decoded_frame, got_output, pkt);
 
-    check_decode_result(NULL, got_output, ret);
+    if (ret != AVERROR_EOF)
+        check_decode_result(NULL, got_output, ret);
 
     if (ret < 0 || !*got_output) {
         *decode_failed = 1;
-        if (!pkt->size)
-            sub2video_flush(ist);
+        if (!pkt->size) {
+            // Flush
+            for (i = 0; i < ist->nb_filters; i++) {
+                if (ist->filters[i]->filter != NULL) {
+                    ret = av_buffersrc_add_frame(ist->filters[i]->filter, NULL);
+                    if (ret != AVERROR_EOF && ret < 0)
+                        av_log(NULL, AV_LOG_WARNING, "Flush the frame error.\n");
+                }
+            }
+        }
         return ret;
     }
 
     if (ist->fix_sub_duration) {
-        int end = 1;
-        if (ist->prev_sub.got_output) {
-            end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts,
-                             1000, AV_TIME_BASE);
-            if (end < ist->prev_sub.subtitle.end_display_time) {
-                av_log(ist->dec_ctx, AV_LOG_DEBUG,
-                       "Subtitle duration reduced from %"PRId32" to %d%s\n",
-                       ist->prev_sub.subtitle.end_display_time, end,
-                       end <= 0 ? ", dropping it" : "");
-                ist->prev_sub.subtitle.end_display_time = end;
+        int64_t end = 1;
+        if (ist->prev_sub.got_output && ist->prev_sub.subtitle) {
+
+            const int64_t duration = ist->prev_sub.subtitle->subtitle_timing.duration;
+            end = decoded_frame->subtitle_timing.start_pts - ist->prev_sub.subtitle->subtitle_timing.start_pts;
+
+            if (end < duration) {
+                av_log(avctx, AV_LOG_DEBUG, "Subtitle duration reduced from %"PRId64" to %"PRId64"%s\n",
+                    duration, end, end <= 0 ? ", dropping it" : "");
+                ist->prev_sub.subtitle->subtitle_timing.duration = end;
             }
         }
-        FFSWAP(int,        *got_output, ist->prev_sub.got_output);
-        FFSWAP(int,        ret,         ist->prev_sub.ret);
-        FFSWAP(AVSubtitle, subtitle,    ist->prev_sub.subtitle);
+        FFSWAP(int,        *got_output,        ist->prev_sub.got_output);
+        FFSWAP(int,        ret,                ist->prev_sub.ret);
+        FFSWAP(AVFrame*,   ist->decoded_frame, ist->prev_sub.subtitle);
+        decoded_frame = ist->decoded_frame;
         if (end <= 0)
-            goto out;
+            return (int)end;
     }
 
-    if (!*got_output)
+    if (!*got_output || !decoded_frame)
         return ret;
 
-    if (ist->sub2video.frame) {
-        sub2video_update(ist, INT64_MIN, &subtitle);
-    } else if (ist->nb_filters) {
-        if (!ist->sub2video.sub_queue)
-            ist->sub2video.sub_queue = av_fifo_alloc2(8, sizeof(AVSubtitle), AV_FIFO_FLAG_AUTO_GROW);
-        if (!ist->sub2video.sub_queue)
-            exit_program(1);
+    decoded_frame->type = AVMEDIA_TYPE_SUBTITLE;
 
-        ret = av_fifo_write(ist->sub2video.sub_queue, &subtitle, 1);
-        if (ret < 0)
-            exit_program(1);
-        free_sub = 0;
-    }
+    if (decoded_frame->format == AV_SUBTITLE_FMT_UNKNOWN)
+        decoded_frame->format = (uint16_t)avctx->subtitle_type;
+
+    if ((ret = av_buffer_replace(&decoded_frame->subtitle_header, ist->subtitle_header)) < 0)
+        return ret;
 
-    if (!subtitle.num_rects)
-        goto out;
+    decoded_frame->pts = av_rescale_q(decoded_frame->subtitle_timing.start_pts, AV_TIME_BASE_Q, ist->st->time_base);
 
-    ist->frames_decoded++;
+    pts     = av_rescale_q(decoded_frame->subtitle_timing.start_pts,
+                           AV_TIME_BASE_Q, ist->st->time_base);
 
-    for (i = 0; i < nb_output_streams; i++) {
-        OutputStream *ost = output_streams[i];
+    ist->subtitle_kickoff.last_pts = decoded_frame->pts = pts;
 
-        if (!check_output_constraints(ist, ost) || !ost->encoding_needed
-            || ost->enc->type != AVMEDIA_TYPE_SUBTITLE)
-            continue;
+    if (ist->nb_filters > 0) {
+        AVFrame *filter_frame = av_frame_clone(decoded_frame);
+        if (!filter_frame) {
+            err = AVERROR(ENOMEM);
+            goto end;
+        }
 
-        do_subtitle_out(output_files[ost->file_index], ost, &subtitle);
+        err = send_frame_to_filters(ist, filter_frame);
+        av_frame_free(&filter_frame);
     }
 
-out:
-    if (free_sub)
-        avsubtitle_free(&subtitle);
-    return ret;
+    if (err >= 0) {
+        for (i = 0; i < nb_output_streams; i++) {
+            OutputStream *ost = output_streams[i];
+            InputStream *ist_src = get_input_stream(ost);
+
+            if (!ist_src || !check_output_constraints(ist, ost)
+                || ist_src != ist
+                || !ost->encoding_needed
+                || ost->enc->type != AVMEDIA_TYPE_SUBTITLE)
+                continue;
+
+            if (ost->filter && ost->filter->filter->nb_inputs > 0)
+                continue;
+
+            do_subtitle_out(output_files[ost->file_index], ost, decoded_frame);
+        }
+    }
+
+end:
+    av_frame_unref(decoded_frame);
+    return err < 0 ? err : ret;
 }
 
 static int send_filter_eof(InputStream *ist)
@@ -2446,7 +2471,7 @@  static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
         case AVMEDIA_TYPE_SUBTITLE:
             if (repeating)
                 break;
-            ret = transcode_subtitles(ist, avpkt, &got_output, &decode_failed);
+            ret = decode_subtitles(ist, avpkt, &got_output, &decode_failed);
             if (!pkt && ret >= 0)
                 ret = AVERROR_EOF;
             av_packet_unref(avpkt);
@@ -2663,13 +2688,6 @@  static int init_input_stream(int ist_index, char *error, int error_len)
     return 0;
 }
 
-static InputStream *get_input_stream(OutputStream *ost)
-{
-    if (ost->source_index >= 0)
-        return input_streams[ost->source_index];
-    return NULL;
-}
-
 static int compare_int64(const void *a, const void *b)
 {
     return FFDIFFSIGN(*(const int64_t *)a, *(const int64_t *)b);
@@ -3097,7 +3115,7 @@  static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
         break;
     case AVMEDIA_TYPE_SUBTITLE:
         enc_ctx->time_base = AV_TIME_BASE_Q;
-        if (!enc_ctx->width) {
+        if (!enc_ctx->width && ost->source_index >= 0) {
             enc_ctx->width     = input_streams[ost->source_index]->st->codecpar->width;
             enc_ctx->height    = input_streams[ost->source_index]->st->codecpar->height;
         }
@@ -3114,6 +3132,17 @@  static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
     return 0;
 }
 
+static enum AVSubtitleType get_subtitle_format(const AVCodecDescriptor *codec_descriptor)
+{
+    if(codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB)
+        return AV_SUBTITLE_FMT_BITMAP;
+
+    if(codec_descriptor->props & AV_CODEC_PROP_TEXT_SUB)
+        return AV_SUBTITLE_FMT_ASS;
+
+    return AV_SUBTITLE_FMT_UNKNOWN;
+}
+
 static int init_output_stream(OutputStream *ost, AVFrame *frame,
                               char *error, int error_len)
 {
@@ -3150,19 +3179,13 @@  static int init_output_stream(OutputStream *ost, AVFrame *frame,
         }
 
         if (ist && ist->dec->type == AVMEDIA_TYPE_SUBTITLE && ost->enc->type == AVMEDIA_TYPE_SUBTITLE) {
-            int input_props = 0, output_props = 0;
-            AVCodecDescriptor const *input_descriptor =
-                avcodec_descriptor_get(dec->codec_id);
-            AVCodecDescriptor const *output_descriptor =
-                avcodec_descriptor_get(ost->enc_ctx->codec_id);
-            if (input_descriptor)
-                input_props = input_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB);
-            if (output_descriptor)
-                output_props = output_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB);
-            if (input_props && output_props && input_props != output_props) {
-                snprintf(error, error_len,
-                         "Subtitle encoding currently only possible from text to text "
-                         "or bitmap to bitmap");
+            AVCodecDescriptor const *output_descriptor    = avcodec_descriptor_get(ost->enc_ctx->codec_id);
+            const enum AVSubtitleType in_subtitle_format  = (uint16_t)dec->subtitle_type;
+            const enum AVSubtitleType out_subtitle_format = output_descriptor ? get_subtitle_format(output_descriptor) : AV_SUBTITLE_FMT_UNKNOWN;
+
+            if (ist->nb_filters == 0 && in_subtitle_format != AV_SUBTITLE_FMT_UNKNOWN && out_subtitle_format != AV_SUBTITLE_FMT_UNKNOWN
+                && in_subtitle_format != out_subtitle_format) {
+                snprintf(error, error_len, "Subtitle encoding is only possible from text to text or bitmap to bitmap");
                 return AVERROR_INVALIDDATA;
             }
         }
@@ -3326,7 +3349,8 @@  static int transcode_init(void)
     for (i = 0; i < nb_output_streams; i++) {
         if (!output_streams[i]->stream_copy &&
             (output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
-             output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO))
+             output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO ||
+             output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE))
             continue;
 
         ret = init_output_stream_wrapper(output_streams[i], NULL, 0);
@@ -3497,7 +3521,7 @@  static OutputStream *choose_output(void)
                        av_rescale_q(ost->last_mux_dts, ost->st->time_base,
                                     AV_TIME_BASE_Q);
         if (ost->last_mux_dts == AV_NOPTS_VALUE)
-            av_log(NULL, AV_LOG_DEBUG,
+            av_log(NULL, AV_LOG_INFO,
                 "cur_dts is invalid st:%d (%d) [init:%d i_done:%d finish:%d] (this is harmless if it occurs once at the start per stream)\n",
                 ost->st->index, ost->st->id, ost->initialized, ost->inputs_done, ost->finished);
 
@@ -4166,7 +4190,7 @@  static int process_input(int file_index)
                av_ts2timestr(input_files[ist->file_index]->ts_offset, &AV_TIME_BASE_Q));
     }
 
-    sub2video_heartbeat(ist, pkt->pts);
+    subtitle_kickoff(ist, pkt->pts);
 
     process_input_packet(ist, pkt, 0);
 
@@ -4378,6 +4402,7 @@  static int transcode(void)
     /* at the end of stream, we must flush the decoder buffers */
     for (i = 0; i < nb_input_streams; i++) {
         ist = input_streams[i];
+        ist->subtitle_kickoff.is_active = 0;
         if (!input_files[ist->file_index]->eof_reached) {
             process_input_packet(ist, NULL, 0);
         }
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 69a368b8d1..74feff734f 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -353,17 +353,16 @@  typedef struct InputStream {
     struct { /* previous decoded subtitle and related variables */
         int got_output;
         int ret;
-        AVSubtitle subtitle;
+        AVFrame *subtitle;
     } prev_sub;
 
-    struct sub2video {
+    struct subtitle_kickoff {
+        int is_active;
         int64_t last_pts;
-        int64_t end_pts;
-        AVFifo *sub_queue;    ///< queue of AVSubtitle* before filter init
-        AVFrame *frame;
         int w, h;
-        unsigned int initialize; ///< marks if sub2video_update should force an initialization
-    } sub2video;
+    } subtitle_kickoff;
+
+    AVBufferRef *subtitle_header;
 
     /* decoded data from this stream goes into all those filters
      * currently video and audio only */
@@ -468,6 +467,8 @@  typedef struct OutputStream {
     int64_t first_pts;
     /* dts of the last packet sent to the muxer */
     int64_t last_mux_dts;
+    /* subtitle_pts values of the last subtitle frame having arrived for encoding */
+    int64_t last_subtitle_pts;
     // the timebase of the packets sent to the muxer
     AVRational mux_timebase;
     AVRational enc_timebase;
@@ -675,8 +676,6 @@  int filtergraph_is_simple(FilterGraph *fg);
 int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
 int init_complex_filtergraph(FilterGraph *fg);
 
-void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub);
-
 int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);
 
 int ffmpeg_parse_options(int argc, char **argv);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 0845c631a5..fe03d06373 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -22,6 +22,8 @@ 
 
 #include "ffmpeg.h"
 
+#include "libavutil/ass_split_internal.h"
+
 #include "libavfilter/avfilter.h"
 #include "libavfilter/buffersink.h"
 #include "libavfilter/buffersrc.h"
@@ -30,11 +32,9 @@ 
 #include "libavutil/avstring.h"
 #include "libavutil/bprint.h"
 #include "libavutil/channel_layout.h"
-#include "libavutil/display.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "libavutil/pixfmt.h"
-#include "libavutil/imgutils.h"
 #include "libavutil/samplefmt.h"
 
 // FIXME: YUV420P etc. are actually supported with full color range,
@@ -232,9 +232,8 @@  static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
     InputFilter *ifilter;
     int i;
 
-    // TODO: support other filter types
-    if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
-        av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
+    if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO && type != AVMEDIA_TYPE_SUBTITLE) {
+        av_log(NULL, AV_LOG_FATAL, "Only video, audio and subtitle filters supported "
                "currently.\n");
         exit_program(1);
     }
@@ -255,8 +254,9 @@  static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
         for (i = 0; i < s->nb_streams; i++) {
             enum AVMediaType stream_type = s->streams[i]->codecpar->codec_type;
             if (stream_type != type &&
-                !(stream_type == AVMEDIA_TYPE_SUBTITLE &&
-                  type == AVMEDIA_TYPE_VIDEO /* sub2video hack */))
+                // in the followng case we auto-insert the graphicsub2video conversion filter
+                // for retaining compatibility with the previous sub2video hack
+                !(stream_type == AVMEDIA_TYPE_SUBTITLE && type == AVMEDIA_TYPE_VIDEO))
                 continue;
             if (check_stream_specifier(s, s->streams[i], *p == ':' ? p + 1 : p) == 1) {
                 st = s->streams[i];
@@ -361,6 +361,21 @@  static int insert_trim(int64_t start_time, int64_t duration,
     const char *name = (type == AVMEDIA_TYPE_VIDEO) ? "trim" : "atrim";
     int ret = 0;
 
+    switch (type) {
+    case AVMEDIA_TYPE_VIDEO:
+        name = "trim";
+        break;
+    case AVMEDIA_TYPE_AUDIO:
+        name = "atrim";
+        break;
+    case AVMEDIA_TYPE_SUBTITLE:
+        name = "strim";
+        break;
+    default:
+        av_log(NULL, AV_LOG_ERROR, "insert_trim: Invalid media type: %d\n", type);
+        return AVERROR_INVALIDDATA;
+    }
+
     if (duration == INT64_MAX && start_time == AV_NOPTS_VALUE)
         return 0;
 
@@ -423,6 +438,40 @@  static int insert_filter(AVFilterContext **last_filter, int *pad_idx,
     return 0;
 }
 
+static int configure_output_subtitle_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
+{
+    OutputStream *ost = ofilter->ost;
+    OutputFile    *of = output_files[ost->file_index];
+    AVFilterContext *last_filter = out->filter_ctx;
+    int pad_idx = out->pad_idx;
+    int ret;
+    char name[255];
+
+    snprintf(name, sizeof(name), "out_%d_%d", ost->file_index, ost->index);
+    ret = avfilter_graph_create_filter(&ofilter->filter,
+                                       avfilter_get_by_name("sbuffersink"),
+                                       name, NULL, NULL, fg->graph);
+
+    if (ret < 0) {
+        av_log(NULL, AV_LOG_ERROR, "Unable to create filter sbuffersink\n");
+        return ret;
+    }
+
+    snprintf(name, sizeof(name), "trim_out_%d_%d",
+             ost->file_index, ost->index);
+    ret = insert_trim(of->start_time, of->recording_time,
+                      &last_filter, &pad_idx, name);
+    if (ret < 0)
+        return ret;
+
+    ////ost->st->codecpar->codec_tag = MKTAG('a', 's', 's', 's');
+
+    if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
+        return ret;
+
+    return 0;
+}
+
 static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
 {
     OutputStream *ost = ofilter->ost;
@@ -604,7 +653,8 @@  static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
         int i;
 
         for (i=0; i<of->ctx->nb_streams; i++)
-            if (of->ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
+            if (of->ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
+                of->ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)
                 break;
 
         if (i<of->ctx->nb_streams) {
@@ -638,6 +688,7 @@  static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter,
     switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out);
     case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out);
+    case AVMEDIA_TYPE_SUBTITLE: return configure_output_subtitle_filter(fg, ofilter, out);
     default: av_assert0(0); return 0;
     }
 }
@@ -657,51 +708,154 @@  void check_filter_outputs(void)
     }
 }
 
-static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)
+static int configure_input_subtitle_filter(FilterGraph *fg, InputFilter *ifilter,
+                                        AVFilterInOut *in)
 {
-    AVFormatContext *avf = input_files[ist->file_index]->ctx;
-    int i, w, h;
+    AVFilterContext *last_filter;
+    const AVFilter *buffer_filt = avfilter_get_by_name("sbuffer");
+    InputStream *ist = ifilter->ist;
+    InputFile     *f = input_files[ist->file_index];
+    AVBPrint args;
+    char name[255];
+    int ret, pad_idx = 0;
+    int w, h;
+    int64_t tsoffset = 0;
+    AVBufferSrcParameters *par = av_buffersrc_parameters_alloc();
+    enum AVMediaType media_type;
+
+    if (!par)
+        return AVERROR(ENOMEM);
+
+    par->format = AV_PIX_FMT_NONE;
+
+    if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
+        av_log(NULL, AV_LOG_ERROR, "Cannot connect subtitle filter to audio input\n");
+        ret = AVERROR(EINVAL);
+        goto fail;
+    }
+
+    if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
+        av_log(NULL, AV_LOG_ERROR, "Cannot connect subtitle filter to video input\n");
+        ret = AVERROR(EINVAL);
+        goto fail;
+    }
+
+    if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE && ist->dec_ctx) {
+        // For subtitles, we need to set the format here. Would we leave the format
+        // at -1, it would delay processing (ifilter_has_all_input_formats()) until
+        // the first subtile frame arrives, which could never happen in the worst case
+        ifilter->format = (uint16_t)ist->dec_ctx->subtitle_type;
+    }
+
+    ist->subtitle_kickoff.is_active = 1;
 
-    /* Compute the size of the canvas for the subtitles stream.
-       If the subtitles codecpar has set a size, use it. Otherwise use the
-       maximum dimensions of the video streams in the same file. */
     w = ifilter->width;
     h = ifilter->height;
+
     if (!(w && h)) {
-        for (i = 0; i < avf->nb_streams; i++) {
-            if (avf->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
-                w = FFMAX(w, avf->streams[i]->codecpar->width);
-                h = FFMAX(h, avf->streams[i]->codecpar->height);
+        w = ist->dec_ctx->width;
+        h = ist->dec_ctx->height;
+    }
+
+    if (!(w && h) && ist->dec_ctx->subtitle_header) {
+        ASSSplitContext *ass_ctx = avpriv_ass_split((char *)ist->dec_ctx->subtitle_header);
+        ASS *ass = (ASS *)ass_ctx;
+        w = ass->script_info.play_res_x;
+        h = ass->script_info.play_res_y;
+        avpriv_ass_split_free(ass_ctx);
+    }
+
+    ist->subtitle_kickoff.w = w;
+    ist->subtitle_kickoff.h = h;
+    av_log(ifilter, AV_LOG_INFO, "subtitle input filter: decoding size %dx%d\n", ist->subtitle_kickoff.w, ist->subtitle_kickoff.h);
+
+    ifilter->width = w;
+    ifilter->height = h;
+    ist->dec_ctx->width = w;
+    ist->dec_ctx->height = h;
+
+    ist->subtitle_kickoff.last_pts = INT64_MIN;
+
+    snprintf(name, sizeof(name), "graph %d subtitle input from stream %d:%d", fg->index,
+             ist->file_index, ist->st->index);
+
+
+    av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
+    av_bprintf(&args,
+             "subtitle_type=%d:width=%d:height=%d:time_base=%d/%d:",
+             ifilter->format, ifilter->width, ifilter->height,
+             ist->st->time_base.num, ist->st->time_base.den);
+    if ((ret = avfilter_graph_create_filter(&ifilter->filter, buffer_filt, name,
+                                            args.str, NULL, fg->graph)) < 0)
+        goto fail;
+
+    par->hw_frames_ctx = ifilter->hw_frames_ctx;
+    par->format = ifilter->format;
+    par->width = ifilter->width;
+    par->height = ifilter->height;
+
+    ret = av_buffersrc_parameters_set(ifilter->filter, par);
+    if (ret < 0)
+        goto fail;
+    av_freep(&par);
+    last_filter = ifilter->filter;
+
+    // This is for sub2video compatibility
+    media_type = avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx);
+    if (media_type == AVMEDIA_TYPE_VIDEO) {
+        int subscale_w = w, subscale_h = h;
+
+        av_log(NULL, AV_LOG_INFO, "Auto-inserting subfeed filter\n");
+        ret = insert_filter(&last_filter, &pad_idx, "subfeed", NULL);
+        if (ret < 0)
+            return ret;
+
+        if (!(subscale_w && subscale_h)) {
+            // If the subtitle frame size is unknown, try to find a video input
+            // and use its size for adding a subscale filter
+            for (int i = 0; i < fg->nb_inputs; i++) {
+                InputFilter *input = fg->inputs[i];
+                if (input->type == AVMEDIA_TYPE_VIDEO && input->width && input->height) {
+                    subscale_w = input->width;
+                    subscale_h = input->height;
+                    break;
+                }
             }
         }
-        if (!(w && h)) {
-            w = FFMAX(w, 720);
-            h = FFMAX(h, 576);
-        }
-        av_log(avf, AV_LOG_INFO, "sub2video: using %dx%d canvas\n", w, h);
-    }
-    ist->sub2video.w = ifilter->width  = w;
-    ist->sub2video.h = ifilter->height = h;
 
-    ifilter->width  = ist->dec_ctx->width  ? ist->dec_ctx->width  : ist->sub2video.w;
-    ifilter->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h;
+        if (subscale_w && subscale_h) {
+            char subscale_params[64];
+            snprintf(subscale_params, sizeof(subscale_params), "w=%d:h=%d", subscale_w, subscale_h);
+            ret = insert_filter(&last_filter, &pad_idx, "subscale", subscale_params);
+            if (ret < 0)
+                return ret;
+        }
 
-    /* rectangles are AV_PIX_FMT_PAL8, but we have no guarantee that the
-       palettes for all rectangles are identical or compatible */
-    ifilter->format = AV_PIX_FMT_RGB32;
+        av_log(NULL, AV_LOG_INFO, "Auto-inserting graphicsub2video filter\n");
+        ret = insert_filter(&last_filter, &pad_idx, "graphicsub2video", NULL);
+        if (ret < 0)
+            return ret;
+    }
 
-    ist->sub2video.frame = av_frame_alloc();
-    if (!ist->sub2video.frame)
-        return AVERROR(ENOMEM);
-    ist->sub2video.last_pts = INT64_MIN;
-    ist->sub2video.end_pts  = INT64_MIN;
+    if (copy_ts) {
+        tsoffset = f->start_time == AV_NOPTS_VALUE ? 0 : f->start_time;
+        if (!start_at_zero && f->ctx->start_time != AV_NOPTS_VALUE)
+            tsoffset += f->ctx->start_time;
+    }
+    ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?
+                      AV_NOPTS_VALUE : tsoffset, f->recording_time,
+                      &last_filter, &pad_idx, name);
+    if (ret < 0)
+        return ret;
 
-    /* sub2video structure has been (re-)initialized.
-       Mark it as such so that the system will be
-       initialized with the first received heartbeat. */
-    ist->sub2video.initialize = 1;
+    if ((ret = avfilter_link(last_filter, 0, in->filter_ctx, in->pad_idx)) < 0)
+        return ret;
 
     return 0;
+fail:
+    av_freep(&par);
+
+    return ret;
 }
 
 static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
@@ -720,8 +874,15 @@  static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
     char name[255];
     int ret, pad_idx = 0;
     int64_t tsoffset = 0;
-    AVBufferSrcParameters *par = av_buffersrc_parameters_alloc();
+    AVBufferSrcParameters *par;
+
+    if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
+        // Automatically insert conversion filter to retain compatibility
+        // with sub2video command lines
+        return configure_input_subtitle_filter(fg, ifilter, in);
+    }
 
+    par = av_buffersrc_parameters_alloc();
     if (!par)
         return AVERROR(ENOMEM);
     memset(par, 0, sizeof(*par));
@@ -736,12 +897,6 @@  static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
     if (!fr.num)
         fr = av_guess_frame_rate(input_files[ist->file_index]->ctx, ist->st, NULL);
 
-    if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
-        ret = sub2video_prepare(ist, ifilter);
-        if (ret < 0)
-            goto fail;
-    }
-
     sar = ifilter->sample_aspect_ratio;
     if(!sar.den)
         sar = (AVRational){0,1};
@@ -753,7 +908,7 @@  static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
              tb.num, tb.den, sar.num, sar.den);
     if (fr.num && fr.den)
         av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den);
-    snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
+    snprintf(name, sizeof(name), "graph %d video input from stream %d:%d", fg->index,
              ist->file_index, ist->st->index);
 
 
@@ -952,6 +1107,7 @@  static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter,
     switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in);
     case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in);
+    case AVMEDIA_TYPE_SUBTITLE: return configure_input_subtitle_filter(fg, ifilter, in);
     default: av_assert0(0); return 0;
     }
 }
@@ -969,8 +1125,9 @@  static void cleanup_filtergraph(FilterGraph *fg)
 static int filter_is_buffersrc(const AVFilterContext *f)
 {
     return f->nb_inputs == 0 &&
-           (!strcmp(f->filter->name, "buffer") ||
-            !strcmp(f->filter->name, "abuffer"));
+           (!strcmp(f->filter->name, "buffersrc") ||
+            !strcmp(f->filter->name, "abuffersrc") ||
+            !strcmp(f->filter->name, "sbuffersrc"));
 }
 
 static int graph_is_meta(AVFilterGraph *graph)
@@ -1147,18 +1304,6 @@  int configure_filtergraph(FilterGraph *fg)
         }
     }
 
-    /* process queued up subtitle packets */
-    for (i = 0; i < fg->nb_inputs; i++) {
-        InputStream *ist = fg->inputs[i]->ist;
-        if (ist->sub2video.sub_queue && ist->sub2video.frame) {
-            AVSubtitle tmp;
-            while (av_fifo_read(ist->sub2video.sub_queue, &tmp, 1) >= 0) {
-                sub2video_update(ist, INT64_MIN, &tmp);
-                avsubtitle_free(&tmp);
-            }
-        }
-    }
-
     return 0;
 
 fail:
@@ -1178,6 +1323,7 @@  int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
     ifilter->width               = frame->width;
     ifilter->height              = frame->height;
     ifilter->sample_aspect_ratio = frame->sample_aspect_ratio;
+    ifilter->type                = frame->type;
 
     ifilter->sample_rate         = frame->sample_rate;
     ret = av_channel_layout_copy(&ifilter->ch_layout, &frame->ch_layout);
diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c
index 14e702bd92..be69d54aaf 100644
--- a/fftools/ffmpeg_hw.c
+++ b/fftools/ffmpeg_hw.c
@@ -449,7 +449,7 @@  int hw_device_setup_for_encode(OutputStream *ost)
     AVBufferRef *frames_ref = NULL;
     int i;
 
-    if (ost->filter) {
+    if (ost->filter && ost->filter->filter) {
         frames_ref = av_buffersink_get_hw_frames_ctx(ost->filter->filter);
         if (frames_ref &&
             ((AVHWFramesContext*)frames_ref->data)->format ==
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index e08455478f..5a52f355a0 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1000,6 +1000,7 @@  static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
                 av_log(NULL, AV_LOG_FATAL, "Invalid canvas size: %s.\n", canvas_size);
                 exit_program(1);
             }
+            ist->subtitle_kickoff.is_active = 1;
             break;
         }
         case AVMEDIA_TYPE_ATTACHMENT:
@@ -1715,11 +1716,15 @@  static char *get_ost_filters(OptionsContext *o, AVFormatContext *oc,
 
     if (ost->filters_script)
         return read_file(ost->filters_script);
-    else if (ost->filters)
+    if (ost->filters)
         return av_strdup(ost->filters);
 
-    return av_strdup(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ?
-                     "null" : "anull");
+    switch (st->codecpar->codec_type) {
+    case AVMEDIA_TYPE_VIDEO: return av_strdup("null");
+    case AVMEDIA_TYPE_AUDIO: return av_strdup("anull");
+    case AVMEDIA_TYPE_SUBTITLE: return av_strdup("snull");
+    default: av_assert0(0); return NULL;
+    }
 }
 
 static void check_streamcopy_filters(OptionsContext *o, AVFormatContext *oc,
@@ -2120,6 +2125,9 @@  static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc,
 
     subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
 
+    MATCH_PER_STREAM_OPT(filter_scripts, str, ost->filters_script, oc, st);
+    MATCH_PER_STREAM_OPT(filters,        str, ost->filters,        oc, st);
+
     if (!ost->stream_copy) {
         char *frame_size = NULL;
 
@@ -2128,6 +2136,10 @@  static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc,
             av_log(NULL, AV_LOG_FATAL, "Invalid frame size: %s.\n", frame_size);
             exit_program(1);
         }
+
+        ost->avfilter = get_ost_filters(o, oc, ost);
+        if (!ost->avfilter)
+            exit_program(1);
     }
 
     return ost;
@@ -2273,8 +2285,9 @@  static void init_output_filter(OutputFilter *ofilter, OptionsContext *o,
     switch (ofilter->type) {
     case AVMEDIA_TYPE_VIDEO: ost = new_video_stream(o, oc, -1); break;
     case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream(o, oc, -1); break;
+    case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream(o, oc, -1); break;
     default:
-        av_log(NULL, AV_LOG_FATAL, "Only video and audio filters are supported "
+        av_log(NULL, AV_LOG_FATAL, "Only video, audio and subtitle filters are supported "
                "currently.\n");
         exit_program(1);
     }
@@ -2679,7 +2692,8 @@  loop_end:
             ist->processing_needed = 1;
 
             if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
-                ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
+                ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ||
+                ost->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) {
                 err = init_simple_filtergraph(ist, ost);
                 if (err < 0) {
                     av_log(NULL, AV_LOG_ERROR,
@@ -2724,6 +2738,10 @@  loop_end:
                 } else if (ost->enc->ch_layouts) {
                     f->ch_layouts = ost->enc->ch_layouts;
                 }
+                break;
+            case AVMEDIA_TYPE_SUBTITLE:
+                f->format     = ost->enc_ctx->subtitle_type;
+
                 break;
             }
         }
diff --git a/tests/ref/fate/filter-overlay-dvdsub-2397 b/tests/ref/fate/filter-overlay-dvdsub-2397
index 7df4f50776..7b827956f1 100644
--- a/tests/ref/fate/filter-overlay-dvdsub-2397
+++ b/tests/ref/fate/filter-overlay-dvdsub-2397
@@ -489,368 +489,368 @@ 
 1,       3877,       3877,       10,     2013, 0x95a39f9c
 1,       3887,       3887,       10,     2013, 0x4f7ea123
 1,       3897,       3897,       10,     2013, 0x9efb9ba1
-0,        117,        117,        1,   518400, 0xbf8523da
+0,        117,        117,        1,   518400, 0xc44e1d4c
 1,       3907,       3907,       10,     2013, 0xf395b2cd
 1,       3917,       3917,       10,     2013, 0x261a881e
 1,       3927,       3927,       10,     2013, 0x7f2d9f72
 1,       3937,       3937,       10,     2013, 0x0105b38d
-0,        118,        118,        1,   518400, 0x41890ed6
+0,        118,        118,        1,   518400, 0xad1a084c
 1,       3952,       3952,       10,     2013, 0x0e5db67e
 1,       3962,       3962,       10,     2013, 0xfc9baf97
-0,        119,        119,        1,   518400, 0x588534fc
+0,        119,        119,        1,   518400, 0x52d52e73
 1,       3972,       3972,       10,     2013, 0x8e02a1b1
 1,       3982,       3982,       10,     2013, 0x6eecaac8
 1,       3992,       3992,       10,     2013, 0xf5558f0c
 1,       4002,       4002,       10,     2013, 0x512ba99b
-0,        120,        120,        1,   518400, 0x2145ebc1
+0,        120,        120,        1,   518400, 0xc732e546
 1,       4012,       4012,       10,     2013, 0x932b9932
 1,       4022,       4022,       10,     2013, 0xc01ea987
-0,        121,        121,        1,   518400, 0x28bca595
+0,        121,        121,        1,   518400, 0xc36f9f14
 1,       4038,       4038,       10,     2013, 0x10879cf7
 1,       4048,       4048,       10,     2013, 0x90679338
 1,       4058,       4058,       10,     2013, 0x077d8a9e
 1,       4068,       4068,       10,     2013, 0x969fa57c
-0,        122,        122,        1,   518400, 0x77dc951e
+0,        122,        122,        1,   518400, 0x78428e8b
 1,       4078,       4078,       10,     2013, 0xe049ab07
 1,       4088,       4088,       10,     2013, 0xf535b3b3
 1,       4098,       4098,       10,     2013, 0xfe76bd37
-0,        123,        123,        1,   518400, 0xe8924c17
+0,        123,        123,        1,   518400, 0xf0f8458d
 1,       4108,       4108,       10,     2013, 0xde79ad8c
 1,       4123,       4123,       10,     2013, 0xe89b9c47
 1,       4133,       4133,       10,     2013, 0xc570b0f0
-0,        124,        124,        1,   518400, 0xadb4cccc
+0,        124,        124,        1,   518400, 0x7083c653
 1,       4143,       4143,       10,     2013, 0xee709cd9
 1,       4153,       4153,       10,     2013, 0xcfe5afab
 1,       4163,       4163,       10,     2013, 0x98ff8ce4
-0,        125,        125,        1,   518400, 0x1d7b56ac
+0,        125,        125,        1,   518400, 0xa105502c
 1,       4173,       4173,       10,     2013, 0x9d19b44c
 1,       4183,       4183,       10,     2013, 0x4349917a
 1,       4193,       4193,       10,     2013, 0xbf54a59a
-0,        126,        126,        1,   518400, 0xad5739a4
+0,        126,        126,        1,   518400, 0xd411331a
 1,       4208,       4208,       10,     2013, 0xc4a399e0
 1,       4218,       4218,       10,     2013, 0x1bf58ff0
 1,       4228,       4228,       10,     2013, 0x3518ac56
-0,        127,        127,        1,   518400, 0x2733d35a
+0,        127,        127,        1,   518400, 0x83b0ccdb
 1,       4238,       4238,       10,     2013, 0xcd38c1de
 1,       4248,       4248,       10,     2013, 0xbe7d9c4d
 1,       4258,       4258,       10,     2013, 0xe113a306
 1,       4268,       4268,       10,     2013, 0x083197ea
-0,        128,        128,        1,   518400, 0x78e76da2
+0,        128,        128,        1,   518400, 0xa9be671a
 1,       4278,       4278,       10,     2013, 0x1929b1eb
 1,       4294,       4294,       10,     2013, 0x5d6ea5af
 1,       4304,       4304,       10,     2013, 0x05519d53
-0,        129,        129,        1,   518400, 0x6c076013
+0,        129,        129,        1,   518400, 0xaeb75983
 1,       4314,       4314,       10,     2013, 0x5773b380
 1,       4324,       4324,       10,     2013, 0xaa70a8f5
 1,       4334,       4334,       10,     2013, 0x990db0ec
-0,        130,        130,        1,   518400, 0x7854f2b1
+0,        130,        130,        1,   518400, 0x81f8ec13
 1,       4344,       4344,       10,     2013, 0x91d3a623
 1,       4354,       4354,       10,     2013, 0xc91f9824
 1,       4364,       4364,       10,     2013, 0x1d058abf
-0,        131,        131,        1,   518400, 0xd2ae1ecd
+0,        131,        131,        1,   518400, 0x8aaa1839
 1,       4379,       4379,       10,     2013, 0x8de1b8d5
 1,       4389,       4389,       10,     2013, 0x7872b06b
 1,       4399,       4399,       10,     2013, 0xa084c203
-0,        132,        132,        1,   518400, 0xf5eab38d
+0,        132,        132,        1,   518400, 0xc98bacf5
 1,       4409,       4409,       10,     2013, 0xff90ae8d
 1,       4419,       4419,       10,     2013, 0x61dead8e
 1,       4429,       4429,       10,     2013, 0xee76b284
-0,        133,        133,        1,   518400, 0x994d3e9c
+0,        133,        133,        1,   518400, 0x31083804
 1,       4439,       4439,       10,     2013, 0xe888af7f
 1,       4449,       4449,       10,     2013, 0x5d57b115
 1,       4464,       4464,       10,     2013, 0xcdbfb1d0
-0,        134,        134,        1,   518400, 0x95ab705a
+0,        134,        134,        1,   518400, 0x540a69dc
 1,       4474,       4474,       10,     2013, 0x2e28a952
 1,       4484,       4484,       10,     2013, 0x4795a994
 1,       4494,       4494,       10,     2013, 0x7e7ea304
 1,       4504,       4504,       10,     2013, 0x9502c1e1
-0,        135,        135,        1,   518400, 0x3c83c5ce
+0,        135,        135,        1,   518400, 0x80d3bf46
 1,       4514,       4514,       10,     2013, 0xf7c78ab2
 1,       4524,       4524,       10,     2013, 0x24049816
 1,       4534,       4534,       10,     2013, 0x52089dcf
-0,        136,        136,        1,   518400, 0xfa22c508
+0,        136,        136,        1,   518400, 0x2967be7f
 1,       4550,       4550,       10,     2013, 0x2150a0b1
 1,       4560,       4560,       10,     2013, 0x3c2e9b93
 1,       4570,       4570,       10,     2013, 0x491f932b
-0,        137,        137,        1,   518400, 0xddda1712
+0,        137,        137,        1,   518400, 0x5a3b1092
 1,       4580,       4580,       10,     2013, 0x31359cf8
 1,       4590,       4590,       10,     2013, 0x1b00ac3f
 1,       4600,       4600,       10,     2013, 0x8d7ab3cb
-0,        138,        138,        1,   518400, 0x985a3b93
+0,        138,        138,        1,   518400, 0x8741350b
 1,       4610,       4610,       10,     2013, 0xb2c2a4de
 1,       4620,       4620,       10,     2013, 0x80a4abf2
 1,       4635,       4635,       10,     2013, 0x0701a4ee
-0,        139,        139,        1,   518400, 0xea63c5e7
+0,        139,        139,        1,   518400, 0xd5a9bf60
 1,       4645,       4645,       10,     2013, 0xdc1ba5bc
 1,       4655,       4655,       10,     2013, 0x6083a8a4
 1,       4665,       4665,       10,     2013, 0x6226ad45
-0,        140,        140,        1,   518400, 0xef64983d
+0,        140,        140,        1,   518400, 0xc05f91ba
 1,       4675,       4675,       10,     2013, 0x2732a205
 1,       4685,       4685,       10,     2013, 0x0f62a0d3
 1,       4695,       4695,       10,     2013, 0xc1799249
-0,        141,        141,        1,   518400, 0x747bb193
+0,        141,        141,        1,   518400, 0x3fdaab0b
 1,       4705,       4705,       10,     2013, 0xbccfa9c8
 1,       4720,       4720,       10,     2013, 0xded096e7
 1,       4730,       4730,       10,     2013, 0x7f0daf43
-0,        142,        142,        1,   518400, 0xb8748862
+0,        142,        142,        1,   518400, 0xab7281d9
 1,       4740,       4740,       10,     2013, 0xc47ea682
 1,       4750,       4750,       10,     2013, 0x5a72b07a
 1,       4760,       4760,       10,     2013, 0x386faa8c
 1,       4770,       4770,       10,     2013, 0xf9919a91
-0,        143,        143,        1,   518400, 0xaab55a5f
+0,        143,        143,        1,   518400, 0xc80053d6
 1,       4780,       4780,       10,     2013, 0x4908897e
 1,       4790,       4790,       10,     2013, 0x4882b594
-0,        144,        144,        1,   518400, 0x7b468add
+0,        144,        144,        1,   518400, 0x6526845c
 1,       4806,       4806,       10,     2013, 0x113e98d1
 1,       4816,       4816,       10,     2013, 0x5098b30d
 1,       4826,       4826,       10,     2013, 0x0ef7b857
 1,       4836,       4836,       10,     2013, 0x216ea176
-0,        145,        145,        1,   518400, 0xf2078707
+0,        145,        145,        1,   518400, 0x1b788089
 1,       4846,       4846,       10,     2013, 0xf906944a
 1,       4856,       4856,       10,     2013, 0xee9b92fb
 1,       4866,       4866,       10,     2013, 0xd6029209
-0,        146,        146,        1,   518400, 0x6a2d931e
+0,        146,        146,        1,   518400, 0xfa8e8ca9
 1,       4876,       4876,       10,     2013, 0x2256a12e
 1,       4891,       4891,       10,     2013, 0x89de8e4a
 1,       4901,       4901,       10,     2013, 0x0bf0a584
-0,        147,        147,        1,   518400, 0xbbe3c417
+0,        147,        147,        1,   518400, 0xb278bda1
 1,       4911,       4911,       10,     2013, 0x6a5ebd58
 1,       4921,       4921,       10,     2013, 0x3edd9aa4
 1,       4931,       4931,       10,     2013, 0xbd66ac26
-0,        148,        148,        1,   518400, 0x6294e449
+0,        148,        148,        1,   518400, 0xb0c3ddca
 1,       4941,       4941,       10,     2013, 0x313896ea
 1,       4951,       4951,       10,     2013, 0x6b83a6a0
 1,       4961,       4961,       10,     2013, 0x9aafb109
-0,        149,        149,        1,   518400, 0xa05721e7
+0,        149,        149,        1,   518400, 0x10351b53
 1,       4976,       4976,       10,     2013, 0x5192a85a
 1,       4986,       4986,       10,     2013, 0x1f919f79
 1,       4996,       4996,       10,     2013, 0xc0799c40
-0,        150,        150,        1,   518400, 0x37749183
+0,        150,        150,        1,   518400, 0xc1408aee
 1,       5006,       5006,       10,     2013, 0x2988bcd8
 1,       5016,       5016,       10,     2013, 0x1482913a
 1,       5026,       5026,       10,     2013, 0x74da9a94
 1,       5036,       5036,       10,     2013, 0x763eb709
-0,        151,        151,        1,   518400, 0xf9d9dca0
+0,        151,        151,        1,   518400, 0xf016d615
 1,       5046,       5046,       10,     2013, 0x1285b405
 1,       5062,       5062,       10,     2013, 0xb6ab9dfc
-0,        152,        152,        1,   518400, 0x5f8ccf08
+0,        152,        152,        1,   518400, 0xa768c892
 1,       5072,       5072,       10,     2013, 0xe4c8bf19
 1,       5082,       5082,       10,     2013, 0xabbbade8
 1,       5092,       5092,       10,     2013, 0xf8b69d89
 1,       5102,       5102,       10,     2013, 0xce04a866
-0,        153,        153,        1,   518400, 0x7303f77b
+0,        153,        153,        1,   518400, 0x11c3f11e
 1,       5112,       5112,       10,     2013, 0x07528abf
 1,       5122,       5122,       10,     2013, 0x74fb98bf
 1,       5132,       5132,       10,     2013, 0x579fb1c9
-0,        154,        154,        1,   518400, 0x22b0513f
+0,        154,        154,        1,   518400, 0xcd9a4ac4
 1,       5147,       5147,       10,     2013, 0x7ddea2ed
 1,       5157,       5157,       10,     2013, 0x296caa2c
 1,       5167,       5167,       10,     2013, 0x346d9c4f
-0,        155,        155,        1,   518400, 0x330485d2
+0,        155,        155,        1,   518400, 0x4ade7f5e
 1,       5177,       5177,       10,     2013, 0x3e1fba15
 1,       5187,       5187,       10,     2013, 0x48a2908f
 1,       5197,       5197,       10,     2013, 0xc1938d09
-0,        156,        156,        1,   518400, 0x7f83daea
+0,        156,        156,        1,   518400, 0x655dd46b
 1,       5207,       5207,       10,     2013, 0x0e96a060
 1,       5217,       5217,       10,     2013, 0x7b6a9e06
 1,       5232,       5232,       10,     2013, 0x5b779d28
-0,        157,        157,        1,   518400, 0xee19f2df
+0,        157,        157,        1,   518400, 0x5ab5ec61
 1,       5242,       5242,       10,     2013, 0xf600aca1
 1,       5252,       5252,       10,     2013, 0x3a6c9e68
 1,       5262,       5262,       10,     2013, 0x0c8dc1b0
-0,        158,        158,        1,   518400, 0xb71b1c77
+0,        158,        158,        1,   518400, 0x45dc15e6
 1,       5272,       5272,       10,     2013, 0x26beb245
 1,       5282,       5282,       10,     2013, 0x2bc09557
 1,       5292,       5292,       10,     2013, 0x27fc8845
 1,       5302,       5302,       10,     2013, 0x1025aa47
-0,        159,        159,        1,   518400, 0xbffc1856
+0,        159,        159,        1,   518400, 0x201911d3
 1,       5318,       5318,       10,     2013, 0xc2e69baa
 1,       5328,       5328,       10,     2013, 0xdb249b92
 1,       5338,       5338,       10,     2013, 0x6ccda29e
-0,        160,        160,        1,   518400, 0xabc125aa
+0,        160,        160,        1,   518400, 0x0fbc1f46
 1,       5348,       5348,       10,     2013, 0xeaf6a1cf
 1,       5358,       5358,       10,     2013, 0x509ba397
 1,       5368,       5368,       10,     2013, 0xfaf8a2df
-0,        161,        161,        1,   518400, 0x5ee467f8
+0,        161,        161,        1,   518400, 0x7e316179
 1,       5378,       5378,       10,     2013, 0x41388f28
 1,       5388,       5388,       10,     2013, 0xfe5eab39
 1,       5403,       5403,       10,     2013, 0xd5ffa066
-0,        162,        162,        1,   518400, 0x6c2cf168
+0,        162,        162,        1,   518400, 0x73bbeaed
 1,       5413,       5413,       10,     2013, 0x6813a30a
 1,       5423,       5423,       10,     2013, 0x9be89718
 1,       5433,       5433,       10,     2013, 0xaec3a27b
-0,        163,        163,        1,   518400, 0x63996b26
+0,        163,        163,        1,   518400, 0x3a7c648a
 1,       5446,       5446,       10,     2013, 0x579a983e
 1,       5456,       5456,       10,     2013, 0x98cea21f
 1,       5466,       5466,       10,     2013, 0xca77a58a
-0,        164,        164,        1,   518400, 0xb34d789a
+0,        164,        164,        1,   518400, 0x9f707209
 1,       5476,       5476,       10,     2013, 0xcbc3b1ee
 1,       5486,       5486,       10,     2013, 0xf3bb8f07
 1,       5496,       5496,       10,     2013, 0x6aeebd92
-0,        165,        165,        1,   518400, 0xf49c030f
+0,        165,        165,        1,   518400, 0x9f25fc5c
 1,       5506,       5506,       10,     2013, 0xe955a449
 1,       5516,       5516,       10,     2013, 0x9436aa5b
 1,       5531,       5531,       10,     2013, 0x4f0a8f9f
-0,        166,        166,        1,   518400, 0x092dc41a
+0,        166,        166,        1,   518400, 0x2ed8bd75
 1,       5541,       5541,       10,     2013, 0x3551b22d
 1,       5551,       5551,       10,     2013, 0x0959a3d4
 1,       5561,       5561,       10,     2013, 0x2ed5a11b
 1,       5571,       5571,       10,     2013, 0x8f52a5c3
-0,        167,        167,        1,   518400, 0x4134c577
+0,        167,        167,        1,   518400, 0xb493becb
 1,       5581,       5581,       10,     2013, 0x6552978d
 1,       5591,       5591,       10,     2013, 0x7dcca0c1
 1,       5601,       5601,       10,     2013, 0xbcd4a3c9
-0,        168,        168,        1,   518400, 0x261de1ed
+0,        168,        168,        1,   518400, 0x7df6db57
 1,       5616,       5616,       10,     2013, 0xfe41a8d8
 1,       5626,       5626,       10,     2013, 0xc85aae14
 1,       5636,       5636,       10,     2013, 0x1185b346
-0,        169,        169,        1,   518400, 0xcbc8566a
+0,        169,        169,        1,   518400, 0x1cb94fca
 1,       5646,       5646,       10,     2013, 0xf7429a0d
 1,       5656,       5656,       10,     2013, 0x48c2a160
 1,       5666,       5666,       10,     2013, 0x9d85a85d
-0,        170,        170,        1,   518400, 0x407a5c76
+0,        170,        170,        1,   518400, 0x70db55d8
 1,       5676,       5676,       10,     2013, 0xbbe89fe9
 1,       5686,       5686,       10,     2013, 0xea429fe2
 1,       5702,       5702,       10,     2013, 0x221ca1d4
-0,        171,        171,        1,   518400, 0x1ed73bb2
+0,        171,        171,        1,   518400, 0xc1d9351b
 1,       5712,       5712,       10,     2013, 0x394b925b
 1,       5722,       5722,       10,     2013, 0x556dc26f
 1,       5732,       5732,       10,     2013, 0xce21a5e1
-0,        172,        172,        1,   518400, 0x8467ddb5
+0,        172,        172,        1,   518400, 0xa4b0d717
 1,       5742,       5742,       10,     2013, 0xbc87c0a8
 1,       5752,       5752,       10,     2013, 0xbac4ac07
 1,       5762,       5762,       10,     2013, 0xdeefa4aa
 1,       5772,       5772,       10,     2013, 0x1f15b362
-0,        173,        173,        1,   518400, 0x0523dc73
+0,        173,        173,        1,   518400, 0x3730d5e9
 1,       5787,       5787,       10,     2013, 0x6406b7b2
 1,       5797,       5797,       10,     2013, 0x8030a03d
-0,        174,        174,        1,   518400, 0x81f5e895
+0,        174,        174,        1,   518400, 0x9673e1ec
 1,       5807,       5807,       10,     2013, 0x0373a5b1
 1,       5817,       5817,       10,     2013, 0x34ef93da
 1,       5827,       5827,       10,     2013, 0x94c198fe
 1,       5837,       5837,       10,     2013, 0xfefcabad
-0,        175,        175,        1,   518400, 0xfc74608d
+0,        175,        175,        1,   518400, 0x877959d5
 1,       5847,       5847,       10,     2013, 0x8755b3ec
 1,       5857,       5857,       10,     2013, 0xe436a6fd
 1,       5872,       5872,       10,     2013, 0x9cf5a11e
-0,        176,        176,        1,   518400, 0xc4e0dae0
+0,        176,        176,        1,   518400, 0x04f3d421
 1,       5882,       5882,       10,     2013, 0x03b8a98c
 1,       5892,       5892,       10,     2013, 0x6216a138
 1,       5902,       5902,       10,     2013, 0xd87b9f12
-0,        177,        177,        1,   518400, 0x98367f5b
+0,        177,        177,        1,   518400, 0x4f3078bc
 1,       5912,       5912,       10,     2013, 0x4ce99653
 1,       5922,       5922,       10,     2013, 0x6c2ea9e2
 1,       5932,       5932,       10,     2013, 0x918cae4c
-0,        178,        178,        1,   518400, 0x0f1a869d
+0,        178,        178,        1,   518400, 0x8a127ff8
 1,       5942,       5942,       10,     2013, 0xd19fa5f2
 1,       5958,       5958,       10,     2013, 0x0bdda7c6
 1,       5968,       5968,       10,     2013, 0x0f9ab0ca
-0,        179,        179,        1,   518400, 0x45b6ccf2
+0,        179,        179,        1,   518400, 0x5864c64f
 1,       5978,       5978,       10,     2013, 0x410a92b1
 1,       5988,       5988,       10,     2013, 0xcfbe9d1c
 1,       5998,       5998,       10,     2013, 0x59ed9d15
-0,        180,        180,        1,   518400, 0x5f9ccb77
+0,        180,        180,        1,   518400, 0xdaccc4c0
 1,       6008,       6008,       10,     2013, 0x4e129e27
 1,       6018,       6018,       10,     2013, 0x7bb9ac0a
 1,       6028,       6028,       10,     2013, 0x826ca82b
-0,        181,        181,        1,   518400, 0x5f15ea31
+0,        181,        181,        1,   518400, 0xd999e376
 1,       6043,       6043,       10,     2013, 0x9ad5a74b
 1,       6053,       6053,       10,     2013, 0x6c5f969a
 1,       6063,       6063,       10,     2013, 0x8479a0e5
-0,        182,        182,        1,   518400, 0x86369f27
+0,        182,        182,        1,   518400, 0x8af39876
 1,       6073,       6073,       10,     2013, 0x165298ef
 1,       6083,       6083,       10,     2013, 0xdcadb4a1
 1,       6093,       6093,       10,     2013, 0xa90e987c
 1,       6103,       6103,       10,     2013, 0x1ac5b510
-0,        183,        183,        1,   518400, 0x2e27f9fa
+0,        183,        183,        1,   518400, 0x5e72f33d
 1,       6113,       6113,       10,     2013, 0x66728d85
 1,       6128,       6128,       10,     2013, 0xe4859fc5
 1,       6138,       6138,       10,     2013, 0x9901786e
-0,        184,        184,        1,   518400, 0xc029a44d
+0,        184,        184,        1,   518400, 0x14af9d92
 1,       6148,       6148,       10,     2013, 0x6aebb406
 1,       6158,       6158,       10,     2013, 0x7d13a2cc
 1,       6168,       6168,       10,     2013, 0x99b7a8cc
-0,        185,        185,        1,   518400, 0xebee33b0
+0,        185,        185,        1,   518400, 0x50b82d10
 1,       6178,       6178,       10,     2013, 0x80b8a624
 1,       6188,       6188,       10,     2013, 0xbb6aa271
 1,       6198,       6198,       10,     2013, 0x17af9e4a
-0,        186,        186,        1,   518400, 0x19e5494f
+0,        186,        186,        1,   518400, 0xc068429c
 1,       6214,       6214,       10,     2013, 0xfaf0a8f1
 1,       6224,       6224,       10,     2013, 0xd6849b93
 1,       6234,       6234,       10,     2013, 0xe9829669
-0,        187,        187,        1,   518400, 0xf697bd7c
+0,        187,        187,        1,   518400, 0x8934b6d1
 1,       6244,       6244,       10,     2013, 0x7ec98944
 1,       6254,       6254,       10,     2013, 0x2b2099a4
 1,       6264,       6264,       10,     2013, 0x1033a82f
-0,        188,        188,        1,   518400, 0x82569002
+0,        188,        188,        1,   518400, 0x11d08947
 1,       6274,       6274,       10,     2013, 0x5ec88990
 1,       6284,       6284,       10,     2013, 0xd2a19b3d
 1,       6299,       6299,       10,     2013, 0xa377b268
-0,        189,        189,        1,   518400, 0xfcb6d707
+0,        189,        189,        1,   518400, 0x8a27d041
 1,       6309,       6309,       10,     2013, 0xfa859901
 1,       6319,       6319,       10,     2013, 0x1713955a
 1,       6329,       6329,       10,     2013, 0x70aab0da
 1,       6339,       6339,       10,     2013, 0xcdaea422
-0,        190,        190,        1,   518400, 0x82a9662b
+0,        190,        190,        1,   518400, 0xab265f7d
 1,       6349,       6349,       10,     2013, 0x65c3bf80
 1,       6359,       6359,       10,     2013, 0x1d75a55f
 1,       6369,       6369,       10,     2013, 0xa5bea4de
-0,        191,        191,        1,   518400, 0x212e16ee
+0,        191,        191,        1,   518400, 0xff491040
 1,       6384,       6384,       10,     2013, 0x184db71c
 1,       6394,       6394,       10,     2013, 0x99858ec8
 1,       6404,       6404,       10,     2013, 0xb8f2aee5
-0,        192,        192,        1,   518400, 0x2ca34dca
+0,        192,        192,        1,   518400, 0x822b4704
 1,       6414,       6414,       10,     2013, 0x4435b2ef
 1,       6424,       6424,       10,     2013, 0x8acfa6c7
 1,       6434,       6434,       10,     2013, 0x42b4c01f
-0,        193,        193,        1,   518400, 0xe9ebe0a5
+0,        193,        193,        1,   518400, 0x4523d9f4
 1,       6444,       6444,       10,     2013, 0x6e308c13
 1,       6454,       6454,       10,     2013, 0x8227a0f6
 1,       6470,       6470,       10,     2013, 0x6f12a7a2
-0,        194,        194,        1,   518400, 0x4e6b6917
+0,        194,        194,        1,   518400, 0xfc3c626e
 1,       6480,       6480,       10,     2013, 0x785392be
 1,       6490,       6490,       10,     2013, 0x81849c2b
 1,       6500,       6500,       10,     2013, 0x5cf2af65
-0,        195,        195,        1,   518400, 0x7dcf20ab
+0,        195,        195,        1,   518400, 0x237319e5
 1,       6510,       6510,       10,     2013, 0x0c6ca6b4
 1,       6520,       6520,       10,     2013, 0x412fab9f
 1,       6530,       6530,       10,     2013, 0x08e792b4
-0,        196,        196,        1,   518400, 0xf30fac97
+0,        196,        196,        1,   518400, 0x892ca5d8
 1,       6540,       6540,       10,     2013, 0x407aace3
 1,       6555,       6555,       10,     2013, 0xd26bac16
 1,       6565,       6565,       10,     2013, 0xac8bb295
-0,        197,        197,        1,   518400, 0xcb9fc692
+0,        197,        197,        1,   518400, 0xc4c0bfc7
 1,       6575,       6575,       10,     2013, 0xddd1949c
 1,       6585,       6585,       10,     2013, 0x6b26b868
 1,       6595,       6595,       10,     2013, 0x5eaba587
 1,       6605,       6605,       10,     2013, 0xef0793b9
-0,        198,        198,        1,   518400, 0x5d05601e
+0,        198,        198,        1,   518400, 0x57c85956
 1,       6615,       6615,       10,     2013, 0xdef19bd6
 1,       6625,       6625,       10,     2013, 0xca98a635
-0,        199,        199,        1,   518400, 0x456c1417
+0,        199,        199,        1,   518400, 0xd6300d46
 1,       6640,       6640,       10,     2013, 0x06269a5a
 1,       6650,       6650,       10,     2013, 0x32cb9952
 1,       6660,       6660,       10,     2013, 0xf01fa95a
 1,       6670,       6670,       10,     2013, 0xefab9e55
-0,        200,        200,        1,   518400, 0x9a0fd1ad
+0,        200,        200,        1,   518400, 0xd3dacaec
 1,       6680,       6680,       10,     2013, 0x55a3b63a
 1,       6690,       6690,       10,     2013, 0xcd36a553
 1,       6700,       6700,       10,     2013, 0x2ec19877
-0,        201,        201,        1,   518400, 0x55db9716
+0,        201,        201,        1,   518400, 0x65429052
 1,       6710,       6710,       10,     2013, 0xc18b924c
 1,       6726,       6726,       10,     2013, 0xf132b04c
 1,       6736,       6736,       10,     2013, 0x7975a44d
-0,        202,        202,        1,   518400, 0x1f0d40d6
+0,        202,        202,        1,   518400, 0xec803a15
 1,       6746,       6746,       10,     2013, 0x2aaf94cb
 1,       6756,       6756,       10,     2013, 0x58cfa60f
 1,       6766,       6766,       10,     2013, 0x9757a658
-0,        203,        203,        1,   518400, 0x73695c82
+0,        203,        203,        1,   518400, 0x7a9a55c9
 1,       6776,       6776,       10,     2013, 0x67ebc0d5
 1,       6786,       6786,       10,     2013, 0x3c50a70e
 1,       6796,       6796,       10,     2013, 0x9c5799c6
-0,        204,        204,        1,   518400, 0xb0f10812
+0,        204,        204,        1,   518400, 0xcac30160
 1,       6811,       6811,       10,     2013, 0x018d85b2
 1,       6821,       6821,       10,     2013, 0x5367a956
-0,        205,        205,        1,   518400, 0xdec18505
-0,        208,        208,        1,   518400, 0xb147b947
-0,        240,        240,        1,   518400, 0x9d2e3977
+0,        205,        205,        1,   518400, 0x7e187e4f
+0,        208,        208,        1,   518400, 0x0be0b2a2
+0,        213,        213,        1,   518400, 0x0be0b2a2
diff --git a/tests/ref/fate/sub-dvb b/tests/ref/fate/sub-dvb
index cbd1801d64..8f33c75d70 100644
--- a/tests/ref/fate/sub-dvb
+++ b/tests/ref/fate/sub-dvb
@@ -1,75 +1,93 @@ 
 #tb 0: 1/1000000
 #media_type 0: subtitle
 #codec_id 0: dvb_subtitle
-0,   15600000,   15600000,   159000,     1168, 0xd0f89d82
-0,   15759000,   15759000,   159000,       14, 0x064900eb
-0,   15760000,   15760000,   239000,     1544, 0xe60f1751
-0,   15999000,   15999000,   239000,       14, 0x0729010b
-0,   16000000,   16000000,   339000,     1658, 0xbe343093
-0,   16339000,   16339000,   339000,       14, 0x0809012b
-0,   16340000,   16340000,   599000,     2343, 0xc68f07ef
-0,   16939000,   16939000,   599000,       14, 0x08e9014b
-0,   16940000,   16940000,   459000,     2568, 0x0ee657b1
-0,   17399000,   17399000,   459000,       14, 0x09c9016b
-0,   17400000,   17400000,   359000,     3422, 0xba5b63ce
-0,   17759000,   17759000,   359000,       14, 0x0aa9018b
-0,   17760000,   17760000,   219000,     5078, 0x95b19902
-0,   17979000,   17979000,   219000,       14, 0x0b8901ab
-0,   17980000,   17980000,   959000,     5808, 0xc9717b89
-0,   18939000,   18939000,   959000,       14, 0x0c6901cb
-0,   18940000,   18940000,   219000,     6015, 0x0becbfac
-0,   19159000,   19159000,   219000,       14, 0x064900eb
-0,   19160000,   19160000,   259000,     6519, 0xfcd24d26
-0,   19419000,   19419000,   259000,       14, 0x0729010b
-0,   19420000,   19420000,    99000,     7061, 0xf0320408
-0,   19519000,   19519000,    99000,       14, 0x0809012b
-0,   19520000,   19520000,   219000,     4773, 0x66c93074
-0,   19739000,   19739000,   219000,       14, 0x08e9014b
-0,   19740000,   19740000,   219000,     5546, 0x06052c81
-0,   19959000,   19959000,   219000,       14, 0x09c9016b
-0,   19960000,   19960000,   239000,     5754, 0x904f7325
-0,   20199000,   20199000,   239000,       14, 0x0aa9018b
-0,   20200000,   20200000,   139000,     6099, 0xe30cde07
-0,   20339000,   20339000,   139000,       14, 0x0b8901ab
-0,   20340000,   20340000,   799000,     6839, 0x770fcb6c
-0,   21139000,   21139000,   799000,       14, 0x0c6901cb
-0,   21140000,   21140000,   239000,     4744, 0xa91e1b41
-0,   21379000,   21379000,   239000,       14, 0x064900eb
-0,   21380000,   21380000,   339000,     5824, 0xcf6d782b
-0,   21719000,   21719000,   339000,       14, 0x0729010b
-0,   21720000,   21720000,  1439000,     6212, 0xabf8f7cf
-0,   23159000,   23159000,  1439000,       14, 0x0809012b
-0,   23160000,   23160000,  1319000,     7082, 0xd7ca10f2
-0,   24479000,   24479000,  1319000,       14, 0x08e9014b
-0,   24480000,   24480000,   219000,     5345, 0x12b2cae0
-0,   24699000,   24699000,   219000,       14, 0x09c9016b
-0,   24700000,   24700000,   219000,     5765, 0xc7d46192
-0,   24919000,   24919000,   219000,       14, 0x0aa9018b
-0,   24920000,   24920000,   599000,     6557, 0xcb995d30
-0,   25519000,   25519000,   599000,       14, 0x0b8901ab
-0,   25520000,   25520000,   219000,     7091, 0xe6ea0559
-0,   25739000,   25739000,   219000,       14, 0x0c6901cb
-0,   25740000,   25740000,   239000,     7305, 0xb66c404e
-0,   25979000,   25979000,   239000,       14, 0x064900eb
-0,   25980000,   25980000,   359000,     7590, 0x0cc2a481
-0,   26339000,   26339000,   359000,       14, 0x0729010b
-0,   26340000,   26340000,   219000,     4629, 0xe18cfea8
-0,   26559000,   26559000,   219000,       14, 0x0809012b
-0,   26560000,   26560000,   719000,     4785, 0x82043fc0
-0,   27279000,   27279000,   719000,       14, 0x08e9014b
-0,   27280000,   27280000,   459000,     6061, 0xbde7d245
-0,   27739000,   27739000,   459000,       14, 0x09c9016b
-0,   27740000,   27740000,   239000,     6301, 0x92d01a51
-0,   27979000,   27979000,   239000,       14, 0x0aa9018b
-0,   27980000,   27980000,    99000,     6736, 0xbd25a134
-0,   28079000,   28079000,    99000,       14, 0x0b8901ab
-0,   28080000,   28080000,   219000,     7214, 0x7ef93c13
-0,   28299000,   28299000,   219000,       14, 0x0c6901cb
-0,   28300000,   28300000,   239000,     7366, 0x5bed7fcd
-0,   28539000,   28539000,   239000,       14, 0x064900eb
-0,   28540000,   28540000,   599000,     4564, 0x7f4c014b
-0,   29139000,   29139000,   599000,       14, 0x0729010b
-0,   29140000,   29140000,   219000,     4637, 0x682626b7
-0,   29359000,   29359000,   219000,       14, 0x0809012b
-0,   29360000,   29360000,  1679000,     5358, 0x29e30c48
-0,   31039000,   31039000,  1679000,       14, 0x08e9014b
+0,          0,          0,   279000,       14, 0x05d900db
+0,     279000,     279000,   279000,       14, 0x064900eb
+0,     280000,     280000,  4999000,       14, 0x06b900fb
+0,    5279000,    5279000,  4999000,       14, 0x0729010b
+0,    5280000,    5280000,  5019000,       14, 0x0799011b
+0,   10299000,   10299000,  5019000,       14, 0x0809012b
+0,   10300000,   10300000,  3599000,       14, 0x0879013b
+0,   13899000,   13899000,  3599000,       14, 0x08e9014b
+0,   13900000,   13900000,   219000,       14, 0x0959015b
+0,   14119000,   14119000,   219000,       14, 0x09c9016b
+0,   14120000,   14120000,  1439000,       14, 0x0a39017b
+0,   15559000,   15559000,  1439000,       14, 0x0aa9018b
+0,   15560000,   15560000,    39000,       14, 0x0b19019b
+0,   15599000,   15599000,    39000,       14, 0x0b8901ab
+0,   15600000,   15600000,   159000,     1168, 0xd69da022
+0,   15759000,   15759000,   159000,       14, 0x0c6901cb
+0,   15760000,   15760000,   239000,     1544, 0xc5f116f1
+0,   15999000,   15999000,   239000,       14, 0x064900eb
+0,   16000000,   16000000,   339000,     1658, 0x73563033
+0,   16339000,   16339000,   339000,       14, 0x0729010b
+0,   16340000,   16340000,   599000,     2343, 0x7ac2078f
+0,   16939000,   16939000,   599000,       14, 0x0809012b
+0,   16940000,   16940000,   459000,     2568, 0x6eaa5751
+0,   17399000,   17399000,   459000,       14, 0x08e9014b
+0,   17400000,   17400000,   359000,     3422, 0xd9d0636e
+0,   17759000,   17759000,   359000,       14, 0x09c9016b
+0,   17760000,   17760000,   219000,     5078, 0x722c9862
+0,   17979000,   17979000,   219000,       14, 0x0aa9018b
+0,   17980000,   17980000,   959000,     5808, 0x38dd7ae9
+0,   18939000,   18939000,   959000,       14, 0x0b8901ab
+0,   18940000,   18940000,   219000,     6015, 0xd4d2c40c
+0,   19159000,   19159000,   219000,       14, 0x0c6901cb
+0,   19160000,   19160000,   259000,     6519, 0x08af4c86
+0,   19419000,   19419000,   259000,       14, 0x064900eb
+0,   19420000,   19420000,    99000,     7061, 0xecf10368
+0,   19519000,   19519000,    99000,       14, 0x0729010b
+0,   19520000,   19520000,   219000,     4773, 0xbee42fd4
+0,   19739000,   19739000,   219000,       14, 0x0809012b
+0,   19740000,   19740000,   219000,     5546, 0xdb822be1
+0,   19959000,   19959000,   219000,       14, 0x08e9014b
+0,   19960000,   19960000,   239000,     5754, 0xfdcc7285
+0,   20199000,   20199000,   239000,       14, 0x09c9016b
+0,   20200000,   20200000,   139000,     6099, 0xa409dd67
+0,   20339000,   20339000,   139000,       14, 0x0aa9018b
+0,   20340000,   20340000,   799000,     6839, 0xc5eecacc
+0,   21139000,   21139000,   799000,       14, 0x0b8901ab
+0,   21140000,   21140000,   239000,     4744, 0x4e451fa1
+0,   21379000,   21379000,   239000,       14, 0x0c6901cb
+0,   21380000,   21380000,   339000,     5824, 0x5299778b
+0,   21719000,   21719000,   339000,       14, 0x064900eb
+0,   21720000,   21720000,  1439000,     6212, 0x6d15f72f
+0,   23159000,   23159000,  1439000,       14, 0x0729010b
+0,   23160000,   23160000,  1319000,     7082, 0xe5c91052
+0,   24479000,   24479000,  1319000,       14, 0x0809012b
+0,   24480000,   24480000,   219000,     5345, 0x2e5eca40
+0,   24699000,   24699000,   219000,       14, 0x08e9014b
+0,   24700000,   24700000,   219000,     5765, 0x118060f2
+0,   24919000,   24919000,   219000,       14, 0x09c9016b
+0,   24920000,   24920000,   599000,     6557, 0x89275c90
+0,   25519000,   25519000,   599000,       14, 0x0aa9018b
+0,   25520000,   25520000,   219000,     7091, 0x996904b9
+0,   25739000,   25739000,   219000,       14, 0x0b8901ab
+0,   25740000,   25740000,   239000,     7305, 0xc23e44ae
+0,   25979000,   25979000,   239000,       14, 0x0c6901cb
+0,   25980000,   25980000,   359000,     7590, 0xc5a3a3e1
+0,   26339000,   26339000,   359000,       14, 0x064900eb
+0,   26340000,   26340000,   219000,     4629, 0x7ad6fe08
+0,   26559000,   26559000,   219000,       14, 0x0729010b
+0,   26560000,   26560000,   719000,     4785, 0xcd3f3f20
+0,   27279000,   27279000,   719000,       14, 0x0809012b
+0,   27280000,   27280000,   459000,     6061, 0x8b04d1a5
+0,   27739000,   27739000,   459000,       14, 0x08e9014b
+0,   27740000,   27740000,   239000,     6301, 0xe7de19b1
+0,   27979000,   27979000,   239000,       14, 0x09c9016b
+0,   27980000,   27980000,    99000,     6736, 0x38b3a094
+0,   28079000,   28079000,    99000,       14, 0x0aa9018b
+0,   28080000,   28080000,   219000,     7214, 0x0b783b73
+0,   28299000,   28299000,   219000,       14, 0x0b8901ab
+0,   28300000,   28300000,   239000,     7366, 0x98bf842d
+0,   28539000,   28539000,   239000,       14, 0x0c6901cb
+0,   28540000,   28540000,   599000,     4564, 0x3d9600ab
+0,   29139000,   29139000,   599000,       14, 0x064900eb
+0,   29140000,   29140000,   219000,     4637, 0x01f02617
+0,   29359000,   29359000,   219000,       14, 0x0729010b
+0,   29360000,   29360000,  1679000,     5358, 0x5b0f0ba8
+0,   31039000,   31039000,  1679000,       14, 0x0809012b
+0,   31040000,   31040000,   359000,       14, 0x0879013b
+0,   31399000,   31399000,   359000,       14, 0x08e9014b
+0,   31400000,   31400000,   479000,       14, 0x0959015b
+0,   31879000,   31879000,   479000,       14, 0x09c9016b
diff --git a/tests/ref/fate/sub-scc b/tests/ref/fate/sub-scc
index 62cbf6fa4a..b02e6e95b5 100644
--- a/tests/ref/fate/sub-scc
+++ b/tests/ref/fate/sub-scc
@@ -11,7 +11,6 @@  Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0,
 
 [Events]
 Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
-Dialogue: 0,0:00:-2.-47,0:00:00.70,Default,,0,0,0,,{\an7}{\pos(76,228)}WE HAVE FOUND A WITCH !\N{\an7}{\pos(76,243)}MAY WE BURN HER ?
 Dialogue: 0,0:00:00.69,0:00:03.29,Default,,0,0,0,,{\an7}{\pos(115,228)}[ Crowd ]\N{\an7}{\pos(115,243)}BURN HER !  BURN HER !
 Dialogue: 0,0:00:03.30,0:00:07.07,Default,,0,0,0,,{\an7}{\pos(38,197)}HOW DO YOU KNOW\N{\an7}{\pos(38,213)}SHE IS A WITCH ?\N{\an7}{\pos(153,243)}SHE LOOKS LIKE ONE !
 Dialogue: 0,0:00:07.07,0:00:09.27,Default,,0,0,0,,{\an7}{\pos(192,228)}[ Shouting\N{\an7}{\pos(192,243)}\h\hAffirmations ]
diff --git a/tests/ref/fate/sub2video b/tests/ref/fate/sub2video
index 80abe9c905..7cc6549966 100644
--- a/tests/ref/fate/sub2video
+++ b/tests/ref/fate/sub2video
@@ -58,129 +58,1136 @@ 
 0,         47,         47,        1,   518400, 0xde69683f
 0,         48,         48,        1,   518400, 0x7df08fba
 0,         49,         49,        1,   518400, 0xbab197ea
+0,         50,         50,        1,   518400, 0xbab197ea
+0,         51,         51,        1,   518400, 0xbab197ea
+0,         52,         52,        1,   518400, 0xbab197ea
+0,         53,         53,        1,   518400, 0xbab197ea
+0,         54,         54,        1,   518400, 0xbab197ea
+0,         55,         55,        1,   518400, 0xbab197ea
+0,         56,         56,        1,   518400, 0xbab197ea
+0,         57,         57,        1,   518400, 0xbab197ea
+0,         58,         58,        1,   518400, 0xbab197ea
+0,         59,         59,        1,   518400, 0xbab197ea
+0,         60,         60,        1,   518400, 0xbab197ea
+0,         61,         61,        1,   518400, 0xbab197ea
+0,         62,         62,        1,   518400, 0xbab197ea
+0,         63,         63,        1,   518400, 0xbab197ea
+0,         64,         64,        1,   518400, 0xbab197ea
+0,         65,         65,        1,   518400, 0xbab197ea
+0,         66,         66,        1,   518400, 0xbab197ea
+0,         67,         67,        1,   518400, 0xbab197ea
+0,         68,         68,        1,   518400, 0xbab197ea
+0,         69,         69,        1,   518400, 0xbab197ea
+0,         70,         70,        1,   518400, 0xbab197ea
+0,         71,         71,        1,   518400, 0xbab197ea
+0,         72,         72,        1,   518400, 0xbab197ea
+0,         73,         73,        1,   518400, 0xbab197ea
+0,         74,         74,        1,   518400, 0xbab197ea
+0,         75,         75,        1,   518400, 0xbab197ea
+0,         76,         76,        1,   518400, 0xbab197ea
 1,   15355000,   15355000,  4733000,     2094, 0x3c171425
 0,         77,         77,        1,   518400, 0x902285d9
-0,        100,        100,        1,   518400, 0xbab197ea
+0,         78,         78,        1,   518400, 0x902285d9
+0,         79,         79,        1,   518400, 0x902285d9
+0,         80,         80,        1,   518400, 0x902285d9
+0,         81,         81,        1,   518400, 0x902285d9
+0,         82,         82,        1,   518400, 0x902285d9
+0,         83,         83,        1,   518400, 0x902285d9
+0,         84,         84,        1,   518400, 0x902285d9
+0,         85,         85,        1,   518400, 0x902285d9
+0,         86,         86,        1,   518400, 0x902285d9
+0,         87,         87,        1,   518400, 0x902285d9
+0,         88,         88,        1,   518400, 0x902285d9
+0,         89,         89,        1,   518400, 0x902285d9
+0,         90,         90,        1,   518400, 0x902285d9
+0,         91,         91,        1,   518400, 0x902285d9
+0,         92,         92,        1,   518400, 0x902285d9
+0,         93,         93,        1,   518400, 0x902285d9
+0,         94,         94,        1,   518400, 0x902285d9
+0,         95,         95,        1,   518400, 0x902285d9
+0,         96,         96,        1,   518400, 0x902285d9
+0,         97,         97,        1,   518400, 0x902285d9
+0,         98,         98,        1,   518400, 0x902285d9
+0,         99,         99,        1,   518400, 0x902285d9
+0,        100,        100,        1,   518400, 0x902285d9
+0,        101,        101,        1,   518400, 0xbab197ea
+0,        102,        102,        1,   518400, 0xbab197ea
+0,        103,        103,        1,   518400, 0xbab197ea
+0,        104,        104,        1,   518400, 0xbab197ea
+0,        105,        105,        1,   518400, 0xbab197ea
+0,        106,        106,        1,   518400, 0xbab197ea
+0,        107,        107,        1,   518400, 0xbab197ea
+0,        108,        108,        1,   518400, 0xbab197ea
+0,        109,        109,        1,   518400, 0xbab197ea
+0,        110,        110,        1,   518400, 0xbab197ea
+0,        111,        111,        1,   518400, 0xbab197ea
+0,        112,        112,        1,   518400, 0xbab197ea
+0,        113,        113,        1,   518400, 0xbab197ea
+0,        114,        114,        1,   518400, 0xbab197ea
+0,        115,        115,        1,   518400, 0xbab197ea
+0,        116,        116,        1,   518400, 0xbab197ea
+0,        117,        117,        1,   518400, 0xbab197ea
+0,        118,        118,        1,   518400, 0xbab197ea
+0,        119,        119,        1,   518400, 0xbab197ea
+0,        120,        120,        1,   518400, 0xbab197ea
+0,        121,        121,        1,   518400, 0xbab197ea
+0,        122,        122,        1,   518400, 0xbab197ea
+0,        123,        123,        1,   518400, 0xbab197ea
+0,        124,        124,        1,   518400, 0xbab197ea
+0,        125,        125,        1,   518400, 0xbab197ea
+0,        126,        126,        1,   518400, 0xbab197ea
+0,        127,        127,        1,   518400, 0xbab197ea
+0,        128,        128,        1,   518400, 0xbab197ea
+0,        129,        129,        1,   518400, 0xbab197ea
+0,        130,        130,        1,   518400, 0xbab197ea
+0,        131,        131,        1,   518400, 0xbab197ea
+0,        132,        132,        1,   518400, 0xbab197ea
+0,        133,        133,        1,   518400, 0xbab197ea
+0,        134,        134,        1,   518400, 0xbab197ea
+0,        135,        135,        1,   518400, 0xbab197ea
+0,        136,        136,        1,   518400, 0xbab197ea
+0,        137,        137,        1,   518400, 0xbab197ea
+0,        138,        138,        1,   518400, 0xbab197ea
+0,        139,        139,        1,   518400, 0xbab197ea
+0,        140,        140,        1,   518400, 0xbab197ea
+0,        141,        141,        1,   518400, 0xbab197ea
+0,        142,        142,        1,   518400, 0xbab197ea
+0,        143,        143,        1,   518400, 0xbab197ea
+0,        144,        144,        1,   518400, 0xbab197ea
+0,        145,        145,        1,   518400, 0xbab197ea
+0,        146,        146,        1,   518400, 0xbab197ea
+0,        147,        147,        1,   518400, 0xbab197ea
+0,        148,        148,        1,   518400, 0xbab197ea
+0,        149,        149,        1,   518400, 0xbab197ea
+0,        150,        150,        1,   518400, 0xbab197ea
+0,        151,        151,        1,   518400, 0xbab197ea
+0,        152,        152,        1,   518400, 0xbab197ea
+0,        153,        153,        1,   518400, 0xbab197ea
+0,        154,        154,        1,   518400, 0xbab197ea
+0,        155,        155,        1,   518400, 0xbab197ea
+0,        156,        156,        1,   518400, 0xbab197ea
+0,        157,        157,        1,   518400, 0xbab197ea
+0,        158,        158,        1,   518400, 0xbab197ea
+0,        159,        159,        1,   518400, 0xbab197ea
+0,        160,        160,        1,   518400, 0xbab197ea
+0,        161,        161,        1,   518400, 0xbab197ea
+0,        162,        162,        1,   518400, 0xbab197ea
+0,        163,        163,        1,   518400, 0xbab197ea
+0,        164,        164,        1,   518400, 0xbab197ea
+0,        165,        165,        1,   518400, 0xbab197ea
+0,        166,        166,        1,   518400, 0xbab197ea
+0,        167,        167,        1,   518400, 0xbab197ea
+0,        168,        168,        1,   518400, 0xbab197ea
+0,        169,        169,        1,   518400, 0xbab197ea
+0,        170,        170,        1,   518400, 0xbab197ea
+0,        171,        171,        1,   518400, 0xbab197ea
+0,        172,        172,        1,   518400, 0xbab197ea
+0,        173,        173,        1,   518400, 0xbab197ea
+0,        174,        174,        1,   518400, 0xbab197ea
+0,        175,        175,        1,   518400, 0xbab197ea
+0,        176,        176,        1,   518400, 0xbab197ea
+0,        177,        177,        1,   518400, 0xbab197ea
+0,        178,        178,        1,   518400, 0xbab197ea
+0,        179,        179,        1,   518400, 0xbab197ea
+0,        180,        180,        1,   518400, 0xbab197ea
+0,        181,        181,        1,   518400, 0xbab197ea
+0,        182,        182,        1,   518400, 0xbab197ea
+0,        183,        183,        1,   518400, 0xbab197ea
+0,        184,        184,        1,   518400, 0xbab197ea
+0,        185,        185,        1,   518400, 0xbab197ea
+0,        186,        186,        1,   518400, 0xbab197ea
+0,        187,        187,        1,   518400, 0xbab197ea
+0,        188,        188,        1,   518400, 0xbab197ea
+0,        189,        189,        1,   518400, 0xbab197ea
+0,        190,        190,        1,   518400, 0xbab197ea
+0,        191,        191,        1,   518400, 0xbab197ea
+0,        192,        192,        1,   518400, 0xbab197ea
+0,        193,        193,        1,   518400, 0xbab197ea
+0,        194,        194,        1,   518400, 0xbab197ea
+0,        195,        195,        1,   518400, 0xbab197ea
+0,        196,        196,        1,   518400, 0xbab197ea
+0,        197,        197,        1,   518400, 0xbab197ea
+0,        198,        198,        1,   518400, 0xbab197ea
+0,        199,        199,        1,   518400, 0xbab197ea
+0,        200,        200,        1,   518400, 0xbab197ea
+0,        201,        201,        1,   518400, 0xbab197ea
+0,        202,        202,        1,   518400, 0xbab197ea
+0,        203,        203,        1,   518400, 0xbab197ea
+0,        204,        204,        1,   518400, 0xbab197ea
+0,        205,        205,        1,   518400, 0xbab197ea
+0,        206,        206,        1,   518400, 0xbab197ea
+0,        207,        207,        1,   518400, 0xbab197ea
+0,        208,        208,        1,   518400, 0xbab197ea
+0,        209,        209,        1,   518400, 0xbab197ea
+0,        210,        210,        1,   518400, 0xbab197ea
+0,        211,        211,        1,   518400, 0xbab197ea
+0,        212,        212,        1,   518400, 0xbab197ea
+0,        213,        213,        1,   518400, 0xbab197ea
+0,        214,        214,        1,   518400, 0xbab197ea
+0,        215,        215,        1,   518400, 0xbab197ea
+0,        216,        216,        1,   518400, 0xbab197ea
+0,        217,        217,        1,   518400, 0xbab197ea
+0,        218,        218,        1,   518400, 0xbab197ea
+0,        219,        219,        1,   518400, 0xbab197ea
+0,        220,        220,        1,   518400, 0xbab197ea
+0,        221,        221,        1,   518400, 0xbab197ea
+0,        222,        222,        1,   518400, 0xbab197ea
+0,        223,        223,        1,   518400, 0xbab197ea
+0,        224,        224,        1,   518400, 0xbab197ea
+0,        225,        225,        1,   518400, 0xbab197ea
+0,        226,        226,        1,   518400, 0xbab197ea
+0,        227,        227,        1,   518400, 0xbab197ea
+0,        228,        228,        1,   518400, 0xbab197ea
+0,        229,        229,        1,   518400, 0xbab197ea
+0,        230,        230,        1,   518400, 0xbab197ea
+0,        231,        231,        1,   518400, 0xbab197ea
+0,        232,        232,        1,   518400, 0xbab197ea
+0,        233,        233,        1,   518400, 0xbab197ea
+0,        234,        234,        1,   518400, 0xbab197ea
+0,        235,        235,        1,   518400, 0xbab197ea
+0,        236,        236,        1,   518400, 0xbab197ea
+0,        237,        237,        1,   518400, 0xbab197ea
+0,        238,        238,        1,   518400, 0xbab197ea
+0,        239,        239,        1,   518400, 0xbab197ea
+0,        240,        240,        1,   518400, 0xbab197ea
+0,        241,        241,        1,   518400, 0xbab197ea
+0,        242,        242,        1,   518400, 0xbab197ea
+0,        243,        243,        1,   518400, 0xbab197ea
 1,   48797000,   48797000,  2560000,     2480, 0x7c0edf21
 0,        244,        244,        1,   518400, 0x7a11c812
-0,        257,        257,        1,   518400, 0xbab197ea
+0,        245,        245,        1,   518400, 0x7a11c812
+0,        246,        246,        1,   518400, 0x7a11c812
+0,        247,        247,        1,   518400, 0x7a11c812
+0,        248,        248,        1,   518400, 0x7a11c812
+0,        249,        249,        1,   518400, 0x7a11c812
+0,        250,        250,        1,   518400, 0x7a11c812
+0,        251,        251,        1,   518400, 0x7a11c812
+0,        252,        252,        1,   518400, 0x7a11c812
+0,        253,        253,        1,   518400, 0x7a11c812
+0,        254,        254,        1,   518400, 0x7a11c812
+0,        255,        255,        1,   518400, 0x7a11c812
+0,        256,        256,        1,   518400, 0x7a11c812
+0,        257,        257,        1,   518400, 0x34cdddee
 1,   51433000,   51433000,  2366000,     3059, 0xc95b8a05
 0,        258,        258,        1,   518400, 0x34cdddee
-0,        269,        269,        1,   518400, 0xbab197ea
+0,        259,        259,        1,   518400, 0x34cdddee
+0,        260,        260,        1,   518400, 0x34cdddee
+0,        261,        261,        1,   518400, 0x34cdddee
+0,        262,        262,        1,   518400, 0x34cdddee
+0,        263,        263,        1,   518400, 0x34cdddee
+0,        264,        264,        1,   518400, 0x34cdddee
+0,        265,        265,        1,   518400, 0x34cdddee
+0,        266,        266,        1,   518400, 0x34cdddee
+0,        267,        267,        1,   518400, 0x34cdddee
+0,        268,        268,        1,   518400, 0x34cdddee
+0,        269,        269,        1,   518400, 0x34cdddee
 1,   53910000,   53910000,  2696000,     2095, 0x61bb15ed
 0,        270,        270,        1,   518400, 0x4db4ce51
-0,        283,        283,        1,   518400, 0xbab197ea
+0,        271,        271,        1,   518400, 0x4db4ce51
+0,        272,        272,        1,   518400, 0x4db4ce51
+0,        273,        273,        1,   518400, 0x4db4ce51
+0,        274,        274,        1,   518400, 0x4db4ce51
+0,        275,        275,        1,   518400, 0x4db4ce51
+0,        276,        276,        1,   518400, 0x4db4ce51
+0,        277,        277,        1,   518400, 0x4db4ce51
+0,        278,        278,        1,   518400, 0x4db4ce51
+0,        279,        279,        1,   518400, 0x4db4ce51
+0,        280,        280,        1,   518400, 0x4db4ce51
+0,        281,        281,        1,   518400, 0x4db4ce51
+0,        282,        282,        1,   518400, 0x4db4ce51
+0,        283,        283,        1,   518400, 0xe6bc0ea9
 1,   56663000,   56663000,  1262000,     1013, 0xc9ae89b7
 0,        284,        284,        1,   518400, 0xe6bc0ea9
-0,        290,        290,        1,   518400, 0xbab197ea
+0,        285,        285,        1,   518400, 0xe6bc0ea9
+0,        286,        286,        1,   518400, 0xe6bc0ea9
+0,        287,        287,        1,   518400, 0xe6bc0ea9
+0,        288,        288,        1,   518400, 0xe6bc0ea9
+0,        289,        289,        1,   518400, 0xe6bc0ea9
+0,        290,        290,        1,   518400, 0xa8643af7
 1,   58014000,   58014000,  1661000,      969, 0xe01878f0
 0,        291,        291,        1,   518400, 0xa8643af7
-0,        298,        298,        1,   518400, 0xbab197ea
+0,        292,        292,        1,   518400, 0xa8643af7
+0,        293,        293,        1,   518400, 0xa8643af7
+0,        294,        294,        1,   518400, 0xa8643af7
+0,        295,        295,        1,   518400, 0xa8643af7
+0,        296,        296,        1,   518400, 0xa8643af7
+0,        297,        297,        1,   518400, 0xa8643af7
+0,        298,        298,        1,   518400, 0xa8643af7
+0,        299,        299,        1,   518400, 0xbab197ea
+0,        300,        300,        1,   518400, 0xbab197ea
+0,        301,        301,        1,   518400, 0xbab197ea
+0,        302,        302,        1,   518400, 0xbab197ea
+0,        303,        303,        1,   518400, 0xbab197ea
+0,        304,        304,        1,   518400, 0xbab197ea
+0,        305,        305,        1,   518400, 0xbab197ea
+0,        306,        306,        1,   518400, 0xbab197ea
+0,        307,        307,        1,   518400, 0xbab197ea
+0,        308,        308,        1,   518400, 0xbab197ea
+0,        309,        309,        1,   518400, 0xbab197ea
+0,        310,        310,        1,   518400, 0xbab197ea
+0,        311,        311,        1,   518400, 0xbab197ea
+0,        312,        312,        1,   518400, 0xbab197ea
+0,        313,        313,        1,   518400, 0xbab197ea
+0,        314,        314,        1,   518400, 0xbab197ea
+0,        315,        315,        1,   518400, 0xbab197ea
+0,        316,        316,        1,   518400, 0xbab197ea
+0,        317,        317,        1,   518400, 0xbab197ea
+0,        318,        318,        1,   518400, 0xbab197ea
+0,        319,        319,        1,   518400, 0xbab197ea
+0,        320,        320,        1,   518400, 0xbab197ea
+0,        321,        321,        1,   518400, 0xbab197ea
+0,        322,        322,        1,   518400, 0xbab197ea
+0,        323,        323,        1,   518400, 0xbab197ea
+0,        324,        324,        1,   518400, 0xbab197ea
+0,        325,        325,        1,   518400, 0xbab197ea
+0,        326,        326,        1,   518400, 0xbab197ea
+0,        327,        327,        1,   518400, 0xbab197ea
+0,        328,        328,        1,   518400, 0xbab197ea
+0,        329,        329,        1,   518400, 0xbab197ea
+0,        330,        330,        1,   518400, 0xbab197ea
+0,        331,        331,        1,   518400, 0xbab197ea
+0,        332,        332,        1,   518400, 0xbab197ea
+0,        333,        333,        1,   518400, 0xbab197ea
+0,        334,        334,        1,   518400, 0xbab197ea
+0,        335,        335,        1,   518400, 0xbab197ea
+0,        336,        336,        1,   518400, 0xbab197ea
+0,        337,        337,        1,   518400, 0xbab197ea
+0,        338,        338,        1,   518400, 0xbab197ea
 1,   67724000,   67724000,  1365000,      844, 0xe7db4fc1
 0,        339,        339,        1,   518400, 0xb1885c67
-0,        345,        345,        1,   518400, 0xbab197ea
+0,        340,        340,        1,   518400, 0xb1885c67
+0,        341,        341,        1,   518400, 0xb1885c67
+0,        342,        342,        1,   518400, 0xb1885c67
+0,        343,        343,        1,   518400, 0xb1885c67
+0,        344,        344,        1,   518400, 0xb1885c67
+0,        345,        345,        1,   518400, 0xb1885c67
 1,   69175000,   69175000,  1558000,      802, 0xf48531ba
 0,        346,        346,        1,   518400, 0x378e3fd0
-0,        354,        354,        1,   518400, 0xbab197ea
+0,        347,        347,        1,   518400, 0x378e3fd0
+0,        348,        348,        1,   518400, 0x378e3fd0
+0,        349,        349,        1,   518400, 0x378e3fd0
+0,        350,        350,        1,   518400, 0x378e3fd0
+0,        351,        351,        1,   518400, 0x378e3fd0
+0,        352,        352,        1,   518400, 0x378e3fd0
+0,        353,        353,        1,   518400, 0x378e3fd0
+0,        354,        354,        1,   518400, 0xa3782469
 1,   70819000,   70819000,  1865000,     1709, 0xb4d5a1bd
 0,        355,        355,        1,   518400, 0xa3782469
-0,        363,        363,        1,   518400, 0xbab197ea
+0,        356,        356,        1,   518400, 0xa3782469
+0,        357,        357,        1,   518400, 0xa3782469
+0,        358,        358,        1,   518400, 0xa3782469
+0,        359,        359,        1,   518400, 0xa3782469
+0,        360,        360,        1,   518400, 0xa3782469
+0,        361,        361,        1,   518400, 0xa3782469
+0,        362,        362,        1,   518400, 0xa3782469
+0,        363,        363,        1,   518400, 0xa3782469
 1,   72762000,   72762000,  1968000,     2438, 0x99d7bc82
 0,        364,        364,        1,   518400, 0xba23a0d5
-0,        374,        374,        1,   518400, 0xbab197ea
+0,        365,        365,        1,   518400, 0xba23a0d5
+0,        366,        366,        1,   518400, 0xba23a0d5
+0,        367,        367,        1,   518400, 0xba23a0d5
+0,        368,        368,        1,   518400, 0xba23a0d5
+0,        369,        369,        1,   518400, 0xba23a0d5
+0,        370,        370,        1,   518400, 0xba23a0d5
+0,        371,        371,        1,   518400, 0xba23a0d5
+0,        372,        372,        1,   518400, 0xba23a0d5
+0,        373,        373,        1,   518400, 0xba23a0d5
+0,        374,        374,        1,   518400, 0x129de2f8
 1,   74806000,   74806000,  1831000,     2116, 0x96514097
 0,        375,        375,        1,   518400, 0x129de2f8
-0,        383,        383,        1,   518400, 0xbab197ea
+0,        376,        376,        1,   518400, 0x129de2f8
+0,        377,        377,        1,   518400, 0x129de2f8
+0,        378,        378,        1,   518400, 0x129de2f8
+0,        379,        379,        1,   518400, 0x129de2f8
+0,        380,        380,        1,   518400, 0x129de2f8
+0,        381,        381,        1,   518400, 0x129de2f8
+0,        382,        382,        1,   518400, 0x129de2f8
+0,        383,        383,        1,   518400, 0x129de2f8
 1,   76716000,   76716000,  1262000,     1822, 0xefccc72e
 0,        384,        384,        1,   518400, 0x19772f0f
-0,        390,        390,        1,   518400, 0xbab197ea
+0,        385,        385,        1,   518400, 0x19772f0f
+0,        386,        386,        1,   518400, 0x19772f0f
+0,        387,        387,        1,   518400, 0x19772f0f
+0,        388,        388,        1,   518400, 0x19772f0f
+0,        389,        389,        1,   518400, 0x19772f0f
+0,        390,        390,        1,   518400, 0x56f54e73
 1,   78051000,   78051000,  1524000,      987, 0x7b927a27
 0,        391,        391,        1,   518400, 0x56f54e73
-0,        398,        398,        1,   518400, 0xbab197ea
+0,        392,        392,        1,   518400, 0x56f54e73
+0,        393,        393,        1,   518400, 0x56f54e73
+0,        394,        394,        1,   518400, 0x56f54e73
+0,        395,        395,        1,   518400, 0x56f54e73
+0,        396,        396,        1,   518400, 0x56f54e73
+0,        397,        397,        1,   518400, 0x56f54e73
+0,        398,        398,        1,   518400, 0x300b5247
 1,   79644000,   79644000,  2662000,     2956, 0x190778f7
 0,        399,        399,        1,   518400, 0x300b5247
+0,        400,        400,        1,   518400, 0x300b5247
+0,        401,        401,        1,   518400, 0x300b5247
+0,        402,        402,        1,   518400, 0x300b5247
+0,        403,        403,        1,   518400, 0x300b5247
+0,        404,        404,        1,   518400, 0x300b5247
+0,        405,        405,        1,   518400, 0x300b5247
+0,        406,        406,        1,   518400, 0x300b5247
+0,        407,        407,        1,   518400, 0x300b5247
+0,        408,        408,        1,   518400, 0x300b5247
+0,        409,        409,        1,   518400, 0x300b5247
+0,        410,        410,        1,   518400, 0x300b5247
+0,        411,        411,        1,   518400, 0x300b5247
 1,   82380000,   82380000,  2764000,     3094, 0xc021b7d3
-0,        412,        412,        1,   518400, 0xbab197ea
+0,        412,        412,        1,   518400, 0x6fd028fa
 0,        413,        413,        1,   518400, 0x6fd028fa
-0,        426,        426,        1,   518400, 0xbab197ea
+0,        414,        414,        1,   518400, 0x6fd028fa
+0,        415,        415,        1,   518400, 0x6fd028fa
+0,        416,        416,        1,   518400, 0x6fd028fa
+0,        417,        417,        1,   518400, 0x6fd028fa
+0,        418,        418,        1,   518400, 0x6fd028fa
+0,        419,        419,        1,   518400, 0x6fd028fa
+0,        420,        420,        1,   518400, 0x6fd028fa
+0,        421,        421,        1,   518400, 0x6fd028fa
+0,        422,        422,        1,   518400, 0x6fd028fa
+0,        423,        423,        1,   518400, 0x6fd028fa
+0,        424,        424,        1,   518400, 0x6fd028fa
+0,        425,        425,        1,   518400, 0x6fd028fa
+0,        426,        426,        1,   518400, 0x01f80e9d
 1,   85225000,   85225000,  2366000,     2585, 0x74d0048f
 0,        427,        427,        1,   518400, 0x01f80e9d
-0,        438,        438,        1,   518400, 0xbab197ea
+0,        428,        428,        1,   518400, 0x01f80e9d
+0,        429,        429,        1,   518400, 0x01f80e9d
+0,        430,        430,        1,   518400, 0x01f80e9d
+0,        431,        431,        1,   518400, 0x01f80e9d
+0,        432,        432,        1,   518400, 0x01f80e9d
+0,        433,        433,        1,   518400, 0x01f80e9d
+0,        434,        434,        1,   518400, 0x01f80e9d
+0,        435,        435,        1,   518400, 0x01f80e9d
+0,        436,        436,        1,   518400, 0x01f80e9d
+0,        437,        437,        1,   518400, 0x01f80e9d
+0,        438,        438,        1,   518400, 0xb48d90c0
 1,   87652000,   87652000,  1831000,      634, 0x8832fda1
 0,        439,        439,        1,   518400, 0xb48d90c0
-0,        447,        447,        1,   518400, 0xbab197ea
+0,        440,        440,        1,   518400, 0xb48d90c0
+0,        441,        441,        1,   518400, 0xb48d90c0
+0,        442,        442,        1,   518400, 0xb48d90c0
+0,        443,        443,        1,   518400, 0xb48d90c0
+0,        444,        444,        1,   518400, 0xb48d90c0
+0,        445,        445,        1,   518400, 0xb48d90c0
+0,        446,        446,        1,   518400, 0xb48d90c0
+0,        447,        447,        1,   518400, 0xb48d90c0
+0,        448,        448,        1,   518400, 0xbab197ea
+0,        449,        449,        1,   518400, 0xbab197ea
+0,        450,        450,        1,   518400, 0xbab197ea
+0,        451,        451,        1,   518400, 0xbab197ea
+0,        452,        452,        1,   518400, 0xbab197ea
+0,        453,        453,        1,   518400, 0xbab197ea
+0,        454,        454,        1,   518400, 0xbab197ea
+0,        455,        455,        1,   518400, 0xbab197ea
+0,        456,        456,        1,   518400, 0xbab197ea
+0,        457,        457,        1,   518400, 0xbab197ea
 1,   91531000,   91531000,  2332000,     2080, 0x97a1146f
 0,        458,        458,        1,   518400, 0xcb5a0173
-0,        469,        469,        1,   518400, 0xbab197ea
+0,        459,        459,        1,   518400, 0xcb5a0173
+0,        460,        460,        1,   518400, 0xcb5a0173
+0,        461,        461,        1,   518400, 0xcb5a0173
+0,        462,        462,        1,   518400, 0xcb5a0173
+0,        463,        463,        1,   518400, 0xcb5a0173
+0,        464,        464,        1,   518400, 0xcb5a0173
+0,        465,        465,        1,   518400, 0xcb5a0173
+0,        466,        466,        1,   518400, 0xcb5a0173
+0,        467,        467,        1,   518400, 0xcb5a0173
+0,        468,        468,        1,   518400, 0xcb5a0173
+0,        469,        469,        1,   518400, 0xcb5a0173
+0,        470,        470,        1,   518400, 0xbab197ea
+0,        471,        471,        1,   518400, 0xbab197ea
+0,        472,        472,        1,   518400, 0xbab197ea
+0,        473,        473,        1,   518400, 0xbab197ea
+0,        474,        474,        1,   518400, 0xbab197ea
+0,        475,        475,        1,   518400, 0xbab197ea
+0,        476,        476,        1,   518400, 0xbab197ea
+0,        477,        477,        1,   518400, 0xbab197ea
 1,   95510000,   95510000,  3299000,     2964, 0x8b8f6684
 0,        478,        478,        1,   518400, 0xb8a323e4
-0,        494,        494,        1,   518400, 0xbab197ea
+0,        479,        479,        1,   518400, 0xb8a323e4
+0,        480,        480,        1,   518400, 0xb8a323e4
+0,        481,        481,        1,   518400, 0xb8a323e4
+0,        482,        482,        1,   518400, 0xb8a323e4
+0,        483,        483,        1,   518400, 0xb8a323e4
+0,        484,        484,        1,   518400, 0xb8a323e4
+0,        485,        485,        1,   518400, 0xb8a323e4
+0,        486,        486,        1,   518400, 0xb8a323e4
+0,        487,        487,        1,   518400, 0xb8a323e4
+0,        488,        488,        1,   518400, 0xb8a323e4
+0,        489,        489,        1,   518400, 0xb8a323e4
+0,        490,        490,        1,   518400, 0xb8a323e4
+0,        491,        491,        1,   518400, 0xb8a323e4
+0,        492,        492,        1,   518400, 0xb8a323e4
+0,        493,        493,        1,   518400, 0xb8a323e4
+0,        494,        494,        1,   518400, 0xc43518ba
 1,   98872000,   98872000,  2161000,     1875, 0x9002ef71
 0,        495,        495,        1,   518400, 0xc43518ba
-0,        505,        505,        1,   518400, 0xbab197ea
+0,        496,        496,        1,   518400, 0xc43518ba
+0,        497,        497,        1,   518400, 0xc43518ba
+0,        498,        498,        1,   518400, 0xc43518ba
+0,        499,        499,        1,   518400, 0xc43518ba
+0,        500,        500,        1,   518400, 0xc43518ba
+0,        501,        501,        1,   518400, 0xc43518ba
+0,        502,        502,        1,   518400, 0xc43518ba
+0,        503,        503,        1,   518400, 0xc43518ba
+0,        504,        504,        1,   518400, 0xc43518ba
+0,        505,        505,        1,   518400, 0xc43518ba
 1,  101124000,  101124000,  4096000,     3872, 0x20c6ed9c
 0,        506,        506,        1,   518400, 0x04e38692
-0,        526,        526,        1,   518400, 0xbab197ea
+0,        507,        507,        1,   518400, 0x04e38692
+0,        508,        508,        1,   518400, 0x04e38692
+0,        509,        509,        1,   518400, 0x04e38692
+0,        510,        510,        1,   518400, 0x04e38692
+0,        511,        511,        1,   518400, 0x04e38692
+0,        512,        512,        1,   518400, 0x04e38692
+0,        513,        513,        1,   518400, 0x04e38692
+0,        514,        514,        1,   518400, 0x04e38692
+0,        515,        515,        1,   518400, 0x04e38692
+0,        516,        516,        1,   518400, 0x04e38692
+0,        517,        517,        1,   518400, 0x04e38692
+0,        518,        518,        1,   518400, 0x04e38692
+0,        519,        519,        1,   518400, 0x04e38692
+0,        520,        520,        1,   518400, 0x04e38692
+0,        521,        521,        1,   518400, 0x04e38692
+0,        522,        522,        1,   518400, 0x04e38692
+0,        523,        523,        1,   518400, 0x04e38692
+0,        524,        524,        1,   518400, 0x04e38692
+0,        525,        525,        1,   518400, 0x04e38692
+0,        526,        526,        1,   518400, 0x04e38692
 1,  105303000,  105303000,  2730000,     3094, 0xf203a663
 0,        527,        527,        1,   518400, 0x856b0ee5
-0,        540,        540,        1,   518400, 0xbab197ea
+0,        528,        528,        1,   518400, 0x856b0ee5
+0,        529,        529,        1,   518400, 0x856b0ee5
+0,        530,        530,        1,   518400, 0x856b0ee5
+0,        531,        531,        1,   518400, 0x856b0ee5
+0,        532,        532,        1,   518400, 0x856b0ee5
+0,        533,        533,        1,   518400, 0x856b0ee5
+0,        534,        534,        1,   518400, 0x856b0ee5
+0,        535,        535,        1,   518400, 0x856b0ee5
+0,        536,        536,        1,   518400, 0x856b0ee5
+0,        537,        537,        1,   518400, 0x856b0ee5
+0,        538,        538,        1,   518400, 0x856b0ee5
+0,        539,        539,        1,   518400, 0x856b0ee5
+0,        540,        540,        1,   518400, 0x856b0ee5
 1,  108106000,  108106000,  2059000,     2404, 0x41a7b429
 0,        541,        541,        1,   518400, 0x3e5beee2
-0,        551,        551,        1,   518400, 0xbab197ea
+0,        542,        542,        1,   518400, 0x3e5beee2
+0,        543,        543,        1,   518400, 0x3e5beee2
+0,        544,        544,        1,   518400, 0x3e5beee2
+0,        545,        545,        1,   518400, 0x3e5beee2
+0,        546,        546,        1,   518400, 0x3e5beee2
+0,        547,        547,        1,   518400, 0x3e5beee2
+0,        548,        548,        1,   518400, 0x3e5beee2
+0,        549,        549,        1,   518400, 0x3e5beee2
+0,        550,        550,        1,   518400, 0x3e5beee2
+0,        551,        551,        1,   518400, 0x3e5beee2
+0,        552,        552,        1,   518400, 0xbab197ea
+0,        553,        553,        1,   518400, 0xbab197ea
+0,        554,        554,        1,   518400, 0xbab197ea
+0,        555,        555,        1,   518400, 0xbab197ea
+0,        556,        556,        1,   518400, 0xbab197ea
+0,        557,        557,        1,   518400, 0xbab197ea
+0,        558,        558,        1,   518400, 0xbab197ea
+0,        559,        559,        1,   518400, 0xbab197ea
+0,        560,        560,        1,   518400, 0xbab197ea
+0,        561,        561,        1,   518400, 0xbab197ea
+0,        562,        562,        1,   518400, 0xbab197ea
+0,        563,        563,        1,   518400, 0xbab197ea
+0,        564,        564,        1,   518400, 0xbab197ea
+0,        565,        565,        1,   518400, 0xbab197ea
+0,        566,        566,        1,   518400, 0xbab197ea
+0,        567,        567,        1,   518400, 0xbab197ea
+0,        568,        568,        1,   518400, 0xbab197ea
+0,        569,        569,        1,   518400, 0xbab197ea
+0,        570,        570,        1,   518400, 0xbab197ea
+0,        571,        571,        1,   518400, 0xbab197ea
+0,        572,        572,        1,   518400, 0xbab197ea
+0,        573,        573,        1,   518400, 0xbab197ea
+0,        574,        574,        1,   518400, 0xbab197ea
+0,        575,        575,        1,   518400, 0xbab197ea
+0,        576,        576,        1,   518400, 0xbab197ea
+0,        577,        577,        1,   518400, 0xbab197ea
+0,        578,        578,        1,   518400, 0xbab197ea
+0,        579,        579,        1,   518400, 0xbab197ea
+0,        580,        580,        1,   518400, 0xbab197ea
+0,        581,        581,        1,   518400, 0xbab197ea
+0,        582,        582,        1,   518400, 0xbab197ea
+0,        583,        583,        1,   518400, 0xbab197ea
+0,        584,        584,        1,   518400, 0xbab197ea
+0,        585,        585,        1,   518400, 0xbab197ea
+0,        586,        586,        1,   518400, 0xbab197ea
+0,        587,        587,        1,   518400, 0xbab197ea
+0,        588,        588,        1,   518400, 0xbab197ea
+0,        589,        589,        1,   518400, 0xbab197ea
+0,        590,        590,        1,   518400, 0xbab197ea
+0,        591,        591,        1,   518400, 0xbab197ea
+0,        592,        592,        1,   518400, 0xbab197ea
+0,        593,        593,        1,   518400, 0xbab197ea
+0,        594,        594,        1,   518400, 0xbab197ea
+0,        595,        595,        1,   518400, 0xbab197ea
+0,        596,        596,        1,   518400, 0xbab197ea
+0,        597,        597,        1,   518400, 0xbab197ea
+0,        598,        598,        1,   518400, 0xbab197ea
+0,        599,        599,        1,   518400, 0xbab197ea
+0,        600,        600,        1,   518400, 0xbab197ea
+0,        601,        601,        1,   518400, 0xbab197ea
+0,        602,        602,        1,   518400, 0xbab197ea
+0,        603,        603,        1,   518400, 0xbab197ea
+0,        604,        604,        1,   518400, 0xbab197ea
+0,        605,        605,        1,   518400, 0xbab197ea
+0,        606,        606,        1,   518400, 0xbab197ea
+0,        607,        607,        1,   518400, 0xbab197ea
+0,        608,        608,        1,   518400, 0xbab197ea
+0,        609,        609,        1,   518400, 0xbab197ea
+0,        610,        610,        1,   518400, 0xbab197ea
+0,        611,        611,        1,   518400, 0xbab197ea
+0,        612,        612,        1,   518400, 0xbab197ea
+0,        613,        613,        1,   518400, 0xbab197ea
+0,        614,        614,        1,   518400, 0xbab197ea
+0,        615,        615,        1,   518400, 0xbab197ea
+0,        616,        616,        1,   518400, 0xbab197ea
+0,        617,        617,        1,   518400, 0xbab197ea
+0,        618,        618,        1,   518400, 0xbab197ea
+0,        619,        619,        1,   518400, 0xbab197ea
+0,        620,        620,        1,   518400, 0xbab197ea
+0,        621,        621,        1,   518400, 0xbab197ea
+0,        622,        622,        1,   518400, 0xbab197ea
+0,        623,        623,        1,   518400, 0xbab197ea
+0,        624,        624,        1,   518400, 0xbab197ea
+0,        625,        625,        1,   518400, 0xbab197ea
+0,        626,        626,        1,   518400, 0xbab197ea
+0,        627,        627,        1,   518400, 0xbab197ea
+0,        628,        628,        1,   518400, 0xbab197ea
+0,        629,        629,        1,   518400, 0xbab197ea
+0,        630,        630,        1,   518400, 0xbab197ea
+0,        631,        631,        1,   518400, 0xbab197ea
+0,        632,        632,        1,   518400, 0xbab197ea
+0,        633,        633,        1,   518400, 0xbab197ea
+0,        634,        634,        1,   518400, 0xbab197ea
+0,        635,        635,        1,   518400, 0xbab197ea
+0,        636,        636,        1,   518400, 0xbab197ea
+0,        637,        637,        1,   518400, 0xbab197ea
+0,        638,        638,        1,   518400, 0xbab197ea
+0,        639,        639,        1,   518400, 0xbab197ea
+0,        640,        640,        1,   518400, 0xbab197ea
+0,        641,        641,        1,   518400, 0xbab197ea
+0,        642,        642,        1,   518400, 0xbab197ea
+0,        643,        643,        1,   518400, 0xbab197ea
+0,        644,        644,        1,   518400, 0xbab197ea
+0,        645,        645,        1,   518400, 0xbab197ea
+0,        646,        646,        1,   518400, 0xbab197ea
+0,        647,        647,        1,   518400, 0xbab197ea
+0,        648,        648,        1,   518400, 0xbab197ea
+0,        649,        649,        1,   518400, 0xbab197ea
+0,        650,        650,        1,   518400, 0xbab197ea
+0,        651,        651,        1,   518400, 0xbab197ea
+0,        652,        652,        1,   518400, 0xbab197ea
+0,        653,        653,        1,   518400, 0xbab197ea
+0,        654,        654,        1,   518400, 0xbab197ea
+0,        655,        655,        1,   518400, 0xbab197ea
+0,        656,        656,        1,   518400, 0xbab197ea
+0,        657,        657,        1,   518400, 0xbab197ea
+0,        658,        658,        1,   518400, 0xbab197ea
+0,        659,        659,        1,   518400, 0xbab197ea
+0,        660,        660,        1,   518400, 0xbab197ea
+0,        661,        661,        1,   518400, 0xbab197ea
+0,        662,        662,        1,   518400, 0xbab197ea
+0,        663,        663,        1,   518400, 0xbab197ea
+0,        664,        664,        1,   518400, 0xbab197ea
+0,        665,        665,        1,   518400, 0xbab197ea
+0,        666,        666,        1,   518400, 0xbab197ea
+0,        667,        667,        1,   518400, 0xbab197ea
+0,        668,        668,        1,   518400, 0xbab197ea
+0,        669,        669,        1,   518400, 0xbab197ea
+0,        670,        670,        1,   518400, 0xbab197ea
+0,        671,        671,        1,   518400, 0xbab197ea
+0,        672,        672,        1,   518400, 0xbab197ea
+0,        673,        673,        1,   518400, 0xbab197ea
+0,        674,        674,        1,   518400, 0xbab197ea
+0,        675,        675,        1,   518400, 0xbab197ea
+0,        676,        676,        1,   518400, 0xbab197ea
+0,        677,        677,        1,   518400, 0xbab197ea
+0,        678,        678,        1,   518400, 0xbab197ea
+0,        679,        679,        1,   518400, 0xbab197ea
+0,        680,        680,        1,   518400, 0xbab197ea
+0,        681,        681,        1,   518400, 0xbab197ea
+0,        682,        682,        1,   518400, 0xbab197ea
+0,        683,        683,        1,   518400, 0xbab197ea
+0,        684,        684,        1,   518400, 0xbab197ea
+0,        685,        685,        1,   518400, 0xbab197ea
+0,        686,        686,        1,   518400, 0xbab197ea
+0,        687,        687,        1,   518400, 0xbab197ea
+0,        688,        688,        1,   518400, 0xbab197ea
+0,        689,        689,        1,   518400, 0xbab197ea
+0,        690,        690,        1,   518400, 0xbab197ea
+0,        691,        691,        1,   518400, 0xbab197ea
+0,        692,        692,        1,   518400, 0xbab197ea
+0,        693,        693,        1,   518400, 0xbab197ea
+0,        694,        694,        1,   518400, 0xbab197ea
+0,        695,        695,        1,   518400, 0xbab197ea
+0,        696,        696,        1,   518400, 0xbab197ea
+0,        697,        697,        1,   518400, 0xbab197ea
+0,        698,        698,        1,   518400, 0xbab197ea
+0,        699,        699,        1,   518400, 0xbab197ea
+0,        700,        700,        1,   518400, 0xbab197ea
+0,        701,        701,        1,   518400, 0xbab197ea
+0,        702,        702,        1,   518400, 0xbab197ea
+0,        703,        703,        1,   518400, 0xbab197ea
+0,        704,        704,        1,   518400, 0xbab197ea
+0,        705,        705,        1,   518400, 0xbab197ea
+0,        706,        706,        1,   518400, 0xbab197ea
+0,        707,        707,        1,   518400, 0xbab197ea
 1,  141556000,  141556000,  1661000,     1088, 0xde20aa20
 0,        708,        708,        1,   518400, 0xb8bc1365
-0,        716,        716,        1,   518400, 0xbab197ea
+0,        709,        709,        1,   518400, 0xb8bc1365
+0,        710,        710,        1,   518400, 0xb8bc1365
+0,        711,        711,        1,   518400, 0xb8bc1365
+0,        712,        712,        1,   518400, 0xb8bc1365
+0,        713,        713,        1,   518400, 0xb8bc1365
+0,        714,        714,        1,   518400, 0xb8bc1365
+0,        715,        715,        1,   518400, 0xb8bc1365
+0,        716,        716,        1,   518400, 0xb8bc1365
+0,        717,        717,        1,   518400, 0xbab197ea
+0,        718,        718,        1,   518400, 0xbab197ea
+0,        719,        719,        1,   518400, 0xbab197ea
+0,        720,        720,        1,   518400, 0xbab197ea
+0,        721,        721,        1,   518400, 0xbab197ea
+0,        722,        722,        1,   518400, 0xbab197ea
+0,        723,        723,        1,   518400, 0xbab197ea
+0,        724,        724,        1,   518400, 0xbab197ea
+0,        725,        725,        1,   518400, 0xbab197ea
+0,        726,        726,        1,   518400, 0xbab197ea
+0,        727,        727,        1,   518400, 0xbab197ea
+0,        728,        728,        1,   518400, 0xbab197ea
+0,        729,        729,        1,   518400, 0xbab197ea
+0,        730,        730,        1,   518400, 0xbab197ea
+0,        731,        731,        1,   518400, 0xbab197ea
+0,        732,        732,        1,   518400, 0xbab197ea
+0,        733,        733,        1,   518400, 0xbab197ea
+0,        734,        734,        1,   518400, 0xbab197ea
+0,        735,        735,        1,   518400, 0xbab197ea
+0,        736,        736,        1,   518400, 0xbab197ea
+0,        737,        737,        1,   518400, 0xbab197ea
+0,        738,        738,        1,   518400, 0xbab197ea
+0,        739,        739,        1,   518400, 0xbab197ea
+0,        740,        740,        1,   518400, 0xbab197ea
+0,        741,        741,        1,   518400, 0xbab197ea
+0,        742,        742,        1,   518400, 0xbab197ea
+0,        743,        743,        1,   518400, 0xbab197ea
+0,        744,        744,        1,   518400, 0xbab197ea
+0,        745,        745,        1,   518400, 0xbab197ea
+0,        746,        746,        1,   518400, 0xbab197ea
+0,        747,        747,        1,   518400, 0xbab197ea
+0,        748,        748,        1,   518400, 0xbab197ea
+0,        749,        749,        1,   518400, 0xbab197ea
+0,        750,        750,        1,   518400, 0xbab197ea
+0,        751,        751,        1,   518400, 0xbab197ea
+0,        752,        752,        1,   518400, 0xbab197ea
+0,        753,        753,        1,   518400, 0xbab197ea
+0,        754,        754,        1,   518400, 0xbab197ea
+0,        755,        755,        1,   518400, 0xbab197ea
+0,        756,        756,        1,   518400, 0xbab197ea
+0,        757,        757,        1,   518400, 0xbab197ea
+0,        758,        758,        1,   518400, 0xbab197ea
+0,        759,        759,        1,   518400, 0xbab197ea
+0,        760,        760,        1,   518400, 0xbab197ea
+0,        761,        761,        1,   518400, 0xbab197ea
+0,        762,        762,        1,   518400, 0xbab197ea
+0,        763,        763,        1,   518400, 0xbab197ea
+0,        764,        764,        1,   518400, 0xbab197ea
+0,        765,        765,        1,   518400, 0xbab197ea
+0,        766,        766,        1,   518400, 0xbab197ea
+0,        767,        767,        1,   518400, 0xbab197ea
+0,        768,        768,        1,   518400, 0xbab197ea
+0,        769,        769,        1,   518400, 0xbab197ea
+0,        770,        770,        1,   518400, 0xbab197ea
+0,        771,        771,        1,   518400, 0xbab197ea
+0,        772,        772,        1,   518400, 0xbab197ea
+0,        773,        773,        1,   518400, 0xbab197ea
+0,        774,        774,        1,   518400, 0xbab197ea
+0,        775,        775,        1,   518400, 0xbab197ea
+0,        776,        776,        1,   518400, 0xbab197ea
+0,        777,        777,        1,   518400, 0xbab197ea
+0,        778,        778,        1,   518400, 0xbab197ea
+0,        779,        779,        1,   518400, 0xbab197ea
+0,        780,        780,        1,   518400, 0xbab197ea
+0,        781,        781,        1,   518400, 0xbab197ea
+0,        782,        782,        1,   518400, 0xbab197ea
+0,        783,        783,        1,   518400, 0xbab197ea
+0,        784,        784,        1,   518400, 0xbab197ea
+0,        785,        785,        1,   518400, 0xbab197ea
+0,        786,        786,        1,   518400, 0xbab197ea
+0,        787,        787,        1,   518400, 0xbab197ea
+0,        788,        788,        1,   518400, 0xbab197ea
+0,        789,        789,        1,   518400, 0xbab197ea
+0,        790,        790,        1,   518400, 0xbab197ea
+0,        791,        791,        1,   518400, 0xbab197ea
+0,        792,        792,        1,   518400, 0xbab197ea
+0,        793,        793,        1,   518400, 0xbab197ea
+0,        794,        794,        1,   518400, 0xbab197ea
+0,        795,        795,        1,   518400, 0xbab197ea
+0,        796,        796,        1,   518400, 0xbab197ea
+0,        797,        797,        1,   518400, 0xbab197ea
+0,        798,        798,        1,   518400, 0xbab197ea
+0,        799,        799,        1,   518400, 0xbab197ea
+0,        800,        800,        1,   518400, 0xbab197ea
+0,        801,        801,        1,   518400, 0xbab197ea
+0,        802,        802,        1,   518400, 0xbab197ea
+0,        803,        803,        1,   518400, 0xbab197ea
+0,        804,        804,        1,   518400, 0xbab197ea
+0,        805,        805,        1,   518400, 0xbab197ea
+0,        806,        806,        1,   518400, 0xbab197ea
+0,        807,        807,        1,   518400, 0xbab197ea
+0,        808,        808,        1,   518400, 0xbab197ea
+0,        809,        809,        1,   518400, 0xbab197ea
+0,        810,        810,        1,   518400, 0xbab197ea
+0,        811,        811,        1,   518400, 0xbab197ea
+0,        812,        812,        1,   518400, 0xbab197ea
+0,        813,        813,        1,   518400, 0xbab197ea
+0,        814,        814,        1,   518400, 0xbab197ea
+0,        815,        815,        1,   518400, 0xbab197ea
+0,        816,        816,        1,   518400, 0xbab197ea
 0,        817,        817,        1,   518400, 0x83efa32d
 1,  163445000,  163445000,  1331000,      339, 0x8bd186ef
-0,        824,        824,        1,   518400, 0xbab197ea
+0,        818,        818,        1,   518400, 0x83efa32d
+0,        819,        819,        1,   518400, 0x83efa32d
+0,        820,        820,        1,   518400, 0x83efa32d
+0,        821,        821,        1,   518400, 0x83efa32d
+0,        822,        822,        1,   518400, 0x83efa32d
+0,        823,        823,        1,   518400, 0x83efa32d
+0,        824,        824,        1,   518400, 0x83efa32d
+0,        825,        825,        1,   518400, 0xbab197ea
+0,        826,        826,        1,   518400, 0xbab197ea
+0,        827,        827,        1,   518400, 0xbab197ea
+0,        828,        828,        1,   518400, 0xbab197ea
+0,        829,        829,        1,   518400, 0xbab197ea
+0,        830,        830,        1,   518400, 0xbab197ea
+0,        831,        831,        1,   518400, 0xbab197ea
+0,        832,        832,        1,   518400, 0xbab197ea
+0,        833,        833,        1,   518400, 0xbab197ea
+0,        834,        834,        1,   518400, 0xbab197ea
+0,        835,        835,        1,   518400, 0xbab197ea
+0,        836,        836,        1,   518400, 0xbab197ea
+0,        837,        837,        1,   518400, 0xbab197ea
+0,        838,        838,        1,   518400, 0xbab197ea
+0,        839,        839,        1,   518400, 0xbab197ea
 0,        840,        840,        1,   518400, 0x03ea0e90
 1,  168049000,  168049000,  1900000,     1312, 0x0bf20e8d
-0,        850,        850,        1,   518400, 0xbab197ea
+0,        841,        841,        1,   518400, 0x03ea0e90
+0,        842,        842,        1,   518400, 0x03ea0e90
+0,        843,        843,        1,   518400, 0x03ea0e90
+0,        844,        844,        1,   518400, 0x03ea0e90
+0,        845,        845,        1,   518400, 0x03ea0e90
+0,        846,        846,        1,   518400, 0x03ea0e90
+0,        847,        847,        1,   518400, 0x03ea0e90
+0,        848,        848,        1,   518400, 0x03ea0e90
+0,        849,        849,        1,   518400, 0x03ea0e90
+0,        850,        850,        1,   518400, 0x8780239e
 1,  170035000,  170035000,  1524000,     1279, 0xb6c2dafe
 0,        851,        851,        1,   518400, 0x8780239e
-0,        858,        858,        1,   518400, 0xbab197ea
+0,        852,        852,        1,   518400, 0x8780239e
+0,        853,        853,        1,   518400, 0x8780239e
+0,        854,        854,        1,   518400, 0x8780239e
+0,        855,        855,        1,   518400, 0x8780239e
+0,        856,        856,        1,   518400, 0x8780239e
+0,        857,        857,        1,   518400, 0x8780239e
+0,        858,        858,        1,   518400, 0x8780239e
+0,        859,        859,        1,   518400, 0xbab197ea
+0,        860,        860,        1,   518400, 0xbab197ea
 0,        861,        861,        1,   518400, 0x6eb72347
 1,  172203000,  172203000,  1695000,     1826, 0x9a1ac769
-0,        869,        869,        1,   518400, 0xbab197ea
+0,        862,        862,        1,   518400, 0x6eb72347
+0,        863,        863,        1,   518400, 0x6eb72347
+0,        864,        864,        1,   518400, 0x6eb72347
+0,        865,        865,        1,   518400, 0x6eb72347
+0,        866,        866,        1,   518400, 0x6eb72347
+0,        867,        867,        1,   518400, 0x6eb72347
+0,        868,        868,        1,   518400, 0x6eb72347
+0,        869,        869,        1,   518400, 0x6eb72347
 1,  173947000,  173947000,  1934000,     1474, 0xa9b03cdc
 0,        870,        870,        1,   518400, 0x9c4a3a3d
-0,        879,        879,        1,   518400, 0xbab197ea
+0,        871,        871,        1,   518400, 0x9c4a3a3d
+0,        872,        872,        1,   518400, 0x9c4a3a3d
+0,        873,        873,        1,   518400, 0x9c4a3a3d
+0,        874,        874,        1,   518400, 0x9c4a3a3d
+0,        875,        875,        1,   518400, 0x9c4a3a3d
+0,        876,        876,        1,   518400, 0x9c4a3a3d
+0,        877,        877,        1,   518400, 0x9c4a3a3d
+0,        878,        878,        1,   518400, 0x9c4a3a3d
+0,        879,        879,        1,   518400, 0x9c4a3a3d
 1,  175957000,  175957000,  1763000,     1019, 0x20409355
 0,        880,        880,        1,   518400, 0xc9ebfa89
-0,        889,        889,        1,   518400, 0xbab197ea
+0,        881,        881,        1,   518400, 0xc9ebfa89
+0,        882,        882,        1,   518400, 0xc9ebfa89
+0,        883,        883,        1,   518400, 0xc9ebfa89
+0,        884,        884,        1,   518400, 0xc9ebfa89
+0,        885,        885,        1,   518400, 0xc9ebfa89
+0,        886,        886,        1,   518400, 0xc9ebfa89
+0,        887,        887,        1,   518400, 0xc9ebfa89
+0,        888,        888,        1,   518400, 0xc9ebfa89
+0,        889,        889,        1,   518400, 0xc9ebfa89
+0,        890,        890,        1,   518400, 0xbab197ea
+0,        891,        891,        1,   518400, 0xbab197ea
+0,        892,        892,        1,   518400, 0xbab197ea
+0,        893,        893,        1,   518400, 0xbab197ea
+0,        894,        894,        1,   518400, 0xbab197ea
+0,        895,        895,        1,   518400, 0xbab197ea
+0,        896,        896,        1,   518400, 0xbab197ea
+0,        897,        897,        1,   518400, 0xbab197ea
+0,        898,        898,        1,   518400, 0xbab197ea
+0,        899,        899,        1,   518400, 0xbab197ea
+0,        900,        900,        1,   518400, 0xbab197ea
+0,        901,        901,        1,   518400, 0xbab197ea
+0,        902,        902,        1,   518400, 0xbab197ea
+0,        903,        903,        1,   518400, 0xbab197ea
+0,        904,        904,        1,   518400, 0xbab197ea
+0,        905,        905,        1,   518400, 0xbab197ea
+0,        906,        906,        1,   518400, 0xbab197ea
+0,        907,        907,        1,   518400, 0xbab197ea
+0,        908,        908,        1,   518400, 0xbab197ea
+0,        909,        909,        1,   518400, 0xbab197ea
+0,        910,        910,        1,   518400, 0xbab197ea
+0,        911,        911,        1,   518400, 0xbab197ea
+0,        912,        912,        1,   518400, 0xbab197ea
+0,        913,        913,        1,   518400, 0xbab197ea
+0,        914,        914,        1,   518400, 0xbab197ea
+0,        915,        915,        1,   518400, 0xbab197ea
+0,        916,        916,        1,   518400, 0xbab197ea
+0,        917,        917,        1,   518400, 0xbab197ea
+0,        918,        918,        1,   518400, 0xbab197ea
+0,        919,        919,        1,   518400, 0xbab197ea
+0,        920,        920,        1,   518400, 0xbab197ea
+0,        921,        921,        1,   518400, 0xbab197ea
+0,        922,        922,        1,   518400, 0xbab197ea
+0,        923,        923,        1,   518400, 0xbab197ea
+0,        924,        924,        1,   518400, 0xbab197ea
+0,        925,        925,        1,   518400, 0xbab197ea
+0,        926,        926,        1,   518400, 0xbab197ea
+0,        927,        927,        1,   518400, 0xbab197ea
+0,        928,        928,        1,   518400, 0xbab197ea
+0,        929,        929,        1,   518400, 0xbab197ea
+0,        930,        930,        1,   518400, 0xbab197ea
+0,        931,        931,        1,   518400, 0xbab197ea
+0,        932,        932,        1,   518400, 0xbab197ea
+0,        933,        933,        1,   518400, 0xbab197ea
+0,        934,        934,        1,   518400, 0xbab197ea
+0,        935,        935,        1,   518400, 0xbab197ea
+0,        936,        936,        1,   518400, 0xbab197ea
+0,        937,        937,        1,   518400, 0xbab197ea
+0,        938,        938,        1,   518400, 0xbab197ea
+0,        939,        939,        1,   518400, 0xbab197ea
+0,        940,        940,        1,   518400, 0xbab197ea
+0,        941,        941,        1,   518400, 0xbab197ea
+0,        942,        942,        1,   518400, 0xbab197ea
+0,        943,        943,        1,   518400, 0xbab197ea
+0,        944,        944,        1,   518400, 0xbab197ea
+0,        945,        945,        1,   518400, 0xbab197ea
 0,        946,        946,        1,   518400, 0xbaf801ef
 1,  189295000,  189295000,  1968000,     1596, 0x408c726e
-0,        956,        956,        1,   518400, 0xbab197ea
+0,        947,        947,        1,   518400, 0xbaf801ef
+0,        948,        948,        1,   518400, 0xbaf801ef
+0,        949,        949,        1,   518400, 0xbaf801ef
+0,        950,        950,        1,   518400, 0xbaf801ef
+0,        951,        951,        1,   518400, 0xbaf801ef
+0,        952,        952,        1,   518400, 0xbaf801ef
+0,        953,        953,        1,   518400, 0xbaf801ef
+0,        954,        954,        1,   518400, 0xbaf801ef
+0,        955,        955,        1,   518400, 0xbaf801ef
+0,        956,        956,        1,   518400, 0xbaf801ef
 1,  191356000,  191356000,  1228000,     1517, 0xae8c5c2b
 0,        957,        957,        1,   518400, 0x59f4e72f
-0,        963,        963,        1,   518400, 0xbab197ea
+0,        958,        958,        1,   518400, 0x59f4e72f
+0,        959,        959,        1,   518400, 0x59f4e72f
+0,        960,        960,        1,   518400, 0x59f4e72f
+0,        961,        961,        1,   518400, 0x59f4e72f
+0,        962,        962,        1,   518400, 0x59f4e72f
+0,        963,        963,        1,   518400, 0x9d5b9d69
 1,  192640000,  192640000,  1763000,     2506, 0xa458d6d4
 0,        964,        964,        1,   518400, 0x9d5b9d69
-0,        972,        972,        1,   518400, 0xbab197ea
+0,        965,        965,        1,   518400, 0x9d5b9d69
+0,        966,        966,        1,   518400, 0x9d5b9d69
+0,        967,        967,        1,   518400, 0x9d5b9d69
+0,        968,        968,        1,   518400, 0x9d5b9d69
+0,        969,        969,        1,   518400, 0x9d5b9d69
+0,        970,        970,        1,   518400, 0x9d5b9d69
+0,        971,        971,        1,   518400, 0x9d5b9d69
+0,        972,        972,        1,   518400, 0x9d5b9d69
+0,        973,        973,        1,   518400, 0xbab197ea
+0,        974,        974,        1,   518400, 0xbab197ea
+0,        975,        975,        1,   518400, 0xbab197ea
 1,  195193000,  195193000,  1092000,     1074, 0x397ba9a8
 0,        976,        976,        1,   518400, 0x923d1ce7
-0,        981,        981,        1,   518400, 0xbab197ea
+0,        977,        977,        1,   518400, 0x923d1ce7
+0,        978,        978,        1,   518400, 0x923d1ce7
+0,        979,        979,        1,   518400, 0x923d1ce7
+0,        980,        980,        1,   518400, 0x923d1ce7
+0,        981,        981,        1,   518400, 0x923d1ce7
 1,  196361000,  196361000,  1524000,     1715, 0x695ca41e
 0,        982,        982,        1,   518400, 0x6e652cd2
-0,        989,        989,        1,   518400, 0xbab197ea
+0,        983,        983,        1,   518400, 0x6e652cd2
+0,        984,        984,        1,   518400, 0x6e652cd2
+0,        985,        985,        1,   518400, 0x6e652cd2
+0,        986,        986,        1,   518400, 0x6e652cd2
+0,        987,        987,        1,   518400, 0x6e652cd2
+0,        988,        988,        1,   518400, 0x6e652cd2
+0,        989,        989,        1,   518400, 0x6e652cd2
 1,  197946000,  197946000,  1160000,      789, 0xc63a189e
 0,        990,        990,        1,   518400, 0x25113966
-0,        996,        996,        1,   518400, 0xbab197ea
+0,        991,        991,        1,   518400, 0x25113966
+0,        992,        992,        1,   518400, 0x25113966
+0,        993,        993,        1,   518400, 0x25113966
+0,        994,        994,        1,   518400, 0x25113966
+0,        995,        995,        1,   518400, 0x25113966
+0,        996,        996,        1,   518400, 0x2dc83609
 1,  199230000,  199230000,  1627000,     1846, 0xeea8c599
 0,        997,        997,        1,   518400, 0x2dc83609
-0,       1004,       1004,        1,   518400, 0xbab197ea
+0,        998,        998,        1,   518400, 0x2dc83609
+0,        999,        999,        1,   518400, 0x2dc83609
+0,       1000,       1000,        1,   518400, 0x2dc83609
+0,       1001,       1001,        1,   518400, 0x2dc83609
+0,       1002,       1002,        1,   518400, 0x2dc83609
+0,       1003,       1003,        1,   518400, 0x2dc83609
+0,       1004,       1004,        1,   518400, 0x2dc83609
 1,  200924000,  200924000,  1763000,      922, 0xd4a87222
 0,       1005,       1005,        1,   518400, 0x90483bc6
-0,       1013,       1013,        1,   518400, 0xbab197ea
+0,       1006,       1006,        1,   518400, 0x90483bc6
+0,       1007,       1007,        1,   518400, 0x90483bc6
+0,       1008,       1008,        1,   518400, 0x90483bc6
+0,       1009,       1009,        1,   518400, 0x90483bc6
+0,       1010,       1010,        1,   518400, 0x90483bc6
+0,       1011,       1011,        1,   518400, 0x90483bc6
+0,       1012,       1012,        1,   518400, 0x90483bc6
+0,       1013,       1013,        1,   518400, 0x90483bc6
+0,       1014,       1014,        1,   518400, 0xbab197ea
+0,       1015,       1015,        1,   518400, 0xbab197ea
+0,       1016,       1016,        1,   518400, 0xbab197ea
+0,       1017,       1017,        1,   518400, 0xbab197ea
+0,       1018,       1018,        1,   518400, 0xbab197ea
+0,       1019,       1019,        1,   518400, 0xbab197ea
+0,       1020,       1020,        1,   518400, 0xbab197ea
+0,       1021,       1021,        1,   518400, 0xbab197ea
+0,       1022,       1022,        1,   518400, 0xbab197ea
+0,       1023,       1023,        1,   518400, 0xbab197ea
+0,       1024,       1024,        1,   518400, 0xbab197ea
+0,       1025,       1025,        1,   518400, 0xbab197ea
+0,       1026,       1026,        1,   518400, 0xbab197ea
+0,       1027,       1027,        1,   518400, 0xbab197ea
+0,       1028,       1028,        1,   518400, 0xbab197ea
+0,       1029,       1029,        1,   518400, 0xbab197ea
+0,       1030,       1030,        1,   518400, 0xbab197ea
+0,       1031,       1031,        1,   518400, 0xbab197ea
+0,       1032,       1032,        1,   518400, 0xbab197ea
+0,       1033,       1033,        1,   518400, 0xbab197ea
+0,       1034,       1034,        1,   518400, 0xbab197ea
+0,       1035,       1035,        1,   518400, 0xbab197ea
+0,       1036,       1036,        1,   518400, 0xbab197ea
+0,       1037,       1037,        1,   518400, 0xbab197ea
+0,       1038,       1038,        1,   518400, 0xbab197ea
+0,       1039,       1039,        1,   518400, 0xbab197ea
+0,       1040,       1040,        1,   518400, 0xbab197ea
+0,       1041,       1041,        1,   518400, 0xbab197ea
+0,       1042,       1042,        1,   518400, 0xbab197ea
+0,       1043,       1043,        1,   518400, 0xbab197ea
+0,       1044,       1044,        1,   518400, 0xbab197ea
+0,       1045,       1045,        1,   518400, 0xbab197ea
+0,       1046,       1046,        1,   518400, 0xbab197ea
+0,       1047,       1047,        1,   518400, 0xbab197ea
+0,       1048,       1048,        1,   518400, 0xbab197ea
+0,       1049,       1049,        1,   518400, 0xbab197ea
+0,       1050,       1050,        1,   518400, 0xbab197ea
+0,       1051,       1051,        1,   518400, 0xbab197ea
+0,       1052,       1052,        1,   518400, 0xbab197ea
 0,       1053,       1053,        1,   518400, 0x3de86ab7
 1,  210600000,  210600000,  1831000,      665, 0x55580135
-0,       1062,       1062,        1,   518400, 0xbab197ea
+0,       1054,       1054,        1,   518400, 0x3de86ab7
+0,       1055,       1055,        1,   518400, 0x3de86ab7
+0,       1056,       1056,        1,   518400, 0x3de86ab7
+0,       1057,       1057,        1,   518400, 0x3de86ab7
+0,       1058,       1058,        1,   518400, 0x3de86ab7
+0,       1059,       1059,        1,   518400, 0x3de86ab7
+0,       1060,       1060,        1,   518400, 0x3de86ab7
+0,       1061,       1061,        1,   518400, 0x3de86ab7
+0,       1062,       1062,        1,   518400, 0x3de86ab7
+0,       1063,       1063,        1,   518400, 0xbab197ea
+0,       1064,       1064,        1,   518400, 0xbab197ea
+0,       1065,       1065,        1,   518400, 0xbab197ea
+0,       1066,       1066,        1,   518400, 0xbab197ea
+0,       1067,       1067,        1,   518400, 0xbab197ea
+0,       1068,       1068,        1,   518400, 0xbab197ea
+0,       1069,       1069,        1,   518400, 0xbab197ea
+0,       1070,       1070,        1,   518400, 0xbab197ea
+0,       1071,       1071,        1,   518400, 0xbab197ea
+0,       1072,       1072,        1,   518400, 0xbab197ea
+0,       1073,       1073,        1,   518400, 0xbab197ea
 1,  214771000,  214771000,  1558000,     1216, 0x50d1f6c5
 0,       1074,       1074,        1,   518400, 0x8c320e68
-0,       1082,       1082,        1,   518400, 0xbab197ea
+0,       1075,       1075,        1,   518400, 0x8c320e68
+0,       1076,       1076,        1,   518400, 0x8c320e68
+0,       1077,       1077,        1,   518400, 0x8c320e68
+0,       1078,       1078,        1,   518400, 0x8c320e68
+0,       1079,       1079,        1,   518400, 0x8c320e68
+0,       1080,       1080,        1,   518400, 0x8c320e68
+0,       1081,       1081,        1,   518400, 0x8c320e68
+0,       1082,       1082,        1,   518400, 0x8c320e68
+0,       1083,       1083,        1,   518400, 0xbab197ea
+0,       1084,       1084,        1,   518400, 0xbab197ea
+0,       1085,       1085,        1,   518400, 0xbab197ea
+0,       1086,       1086,        1,   518400, 0xbab197ea
+0,       1087,       1087,        1,   518400, 0xbab197ea
+0,       1088,       1088,        1,   518400, 0xbab197ea
+0,       1089,       1089,        1,   518400, 0xbab197ea
+0,       1090,       1090,        1,   518400, 0xbab197ea
+0,       1091,       1091,        1,   518400, 0xbab197ea
+0,       1092,       1092,        1,   518400, 0xbab197ea
+0,       1093,       1093,        1,   518400, 0xbab197ea
+0,       1094,       1094,        1,   518400, 0xbab197ea
+0,       1095,       1095,        1,   518400, 0xbab197ea
+0,       1096,       1096,        1,   518400, 0xbab197ea
+0,       1097,       1097,        1,   518400, 0xbab197ea
+0,       1098,       1098,        1,   518400, 0xbab197ea
+0,       1099,       1099,        1,   518400, 0xbab197ea
+0,       1100,       1100,        1,   518400, 0xbab197ea
+0,       1101,       1101,        1,   518400, 0xbab197ea
+0,       1102,       1102,        1,   518400, 0xbab197ea
+0,       1103,       1103,        1,   518400, 0xbab197ea
+0,       1104,       1104,        1,   518400, 0xbab197ea
+0,       1105,       1105,        1,   518400, 0xbab197ea
+0,       1106,       1106,        1,   518400, 0xbab197ea
+0,       1107,       1107,        1,   518400, 0xbab197ea
+0,       1108,       1108,        1,   518400, 0xbab197ea
+0,       1109,       1109,        1,   518400, 0xbab197ea
+0,       1110,       1110,        1,   518400, 0xbab197ea
+0,       1111,       1111,        1,   518400, 0xbab197ea
+0,       1112,       1112,        1,   518400, 0xbab197ea
+0,       1113,       1113,        1,   518400, 0xbab197ea
+0,       1114,       1114,        1,   518400, 0xbab197ea
+0,       1115,       1115,        1,   518400, 0xbab197ea
+0,       1116,       1116,        1,   518400, 0xbab197ea
+0,       1117,       1117,        1,   518400, 0xbab197ea
+0,       1118,       1118,        1,   518400, 0xbab197ea
+0,       1119,       1119,        1,   518400, 0xbab197ea
+0,       1120,       1120,        1,   518400, 0xbab197ea
+0,       1121,       1121,        1,   518400, 0xbab197ea
+0,       1122,       1122,        1,   518400, 0xbab197ea
+0,       1123,       1123,        1,   518400, 0xbab197ea
+0,       1124,       1124,        1,   518400, 0xbab197ea
+0,       1125,       1125,        1,   518400, 0xbab197ea
+0,       1126,       1126,        1,   518400, 0xbab197ea
+0,       1127,       1127,        1,   518400, 0xbab197ea
 0,       1128,       1128,        1,   518400, 0x81e977b2
 1,  225640000,  225640000,  2127000,     2133, 0x670c11a5
-0,       1139,       1139,        1,   518400, 0xbab197ea
+0,       1129,       1129,        1,   518400, 0x81e977b2
+0,       1130,       1130,        1,   518400, 0x81e977b2
+0,       1131,       1131,        1,   518400, 0x81e977b2
+0,       1132,       1132,        1,   518400, 0x81e977b2
+0,       1133,       1133,        1,   518400, 0x81e977b2
+0,       1134,       1134,        1,   518400, 0x81e977b2
+0,       1135,       1135,        1,   518400, 0x81e977b2
+0,       1136,       1136,        1,   518400, 0x81e977b2
+0,       1137,       1137,        1,   518400, 0x81e977b2
+0,       1138,       1138,        1,   518400, 0x81e977b2
+0,       1139,       1139,        1,   518400, 0xb046dd30
 1,  227834000,  227834000,  1262000,     1264, 0xc1d9fc57
 0,       1140,       1140,        1,   518400, 0xb046dd30
-0,       1145,       1145,        1,   518400, 0xbab197ea
diff --git a/tests/ref/fate/sub2video_basic b/tests/ref/fate/sub2video_basic
index 5f72e292c9..9bd4e8b114 100644
--- a/tests/ref/fate/sub2video_basic
+++ b/tests/ref/fate/sub2video_basic
@@ -1,95 +1,1149 @@ 
-#tb 0: 1/25
+#tb 0: 1/5
 #media_type 0: video
 #codec_id 0: rawvideo
 #dimensions 0: 720x480
-#sar 0: 0/1
-0,       3312,       3312,        1,  1382400, 0x00000000
-0,       3312,       3312,        1,  1382400, 0x8c93c2ba
-0,       3436,       3436,        1,  1382400, 0x00000000
-0,       3684,       3684,        1,  1382400, 0xb02e32ca
-0,       3802,       3802,        1,  1382400, 0x00000000
-0,       4520,       4520,        1,  1382400, 0x83b71116
-0,       4584,       4584,        1,  1382400, 0x00000000
-0,       4586,       4586,        1,  1382400, 0x85547fd1
-0,       4645,       4645,        1,  1382400, 0x00000000
-0,       4648,       4648,        1,  1382400, 0x00000000
-0,       4648,       4648,        1,  1382400, 0xb6a8f181
-0,       4715,       4715,        1,  1382400, 0x00000000
-0,       4717,       4717,        1,  1382400, 0xb64d1a2c
-0,       4748,       4748,        1,  1382400, 0x00000000
-0,       4750,       4750,        1,  1382400, 0x7b37ecf3
-0,       4792,       4792,        1,  1382400, 0x00000000
-0,       4993,       4993,        1,  1382400, 0xdc025bd1
-0,       5027,       5027,        1,  1382400, 0x00000000
-0,       5029,       5029,        1,  1382400, 0x688b294d
-0,       5068,       5068,        1,  1382400, 0x00000000
-0,       5070,       5070,        1,  1382400, 0xa2b33d1b
-0,       5117,       5117,        1,  1382400, 0x00000000
-0,       5119,       5119,        1,  1382400, 0xb3e525e3
-0,       5168,       5168,        1,  1382400, 0x00000000
-0,       5170,       5170,        1,  1382400, 0xaa8fbdd7
-0,       5216,       5216,        1,  1382400, 0x00000000
-0,       5218,       5218,        1,  1382400, 0x7b7f26dd
-0,       5249,       5249,        1,  1382400, 0x00000000
-0,       5251,       5251,        1,  1382400, 0x15e2f836
-0,       5289,       5289,        1,  1382400, 0x00000000
-0,       5291,       5291,        1,  1382400, 0x0fee9b0c
-0,       5358,       5358,        1,  1382400, 0x00000000
-0,       5360,       5360,        1,  1382400, 0x89d62791
-0,       5429,       5429,        1,  1382400, 0x00000000
-0,       5431,       5431,        1,  1382400, 0xa6a9fd74
-0,       5490,       5490,        1,  1382400, 0x00000000
-0,       5491,       5491,        1,  1382400, 0x7896178d
-0,       5537,       5537,        1,  1382400, 0x00000000
-0,       5588,       5588,        1,  1382400, 0x01751a52
-0,       5647,       5647,        1,  1382400, 0x00000000
-0,       5688,       5688,        1,  1382400, 0xa3959c6f
-0,       5770,       5770,        1,  1382400, 0x00000000
-0,       5772,       5772,        1,  1382400, 0x3d3ea47b
-0,       5826,       5826,        1,  1382400, 0x00000000
-0,       5828,       5828,        1,  1382400, 0x593f8b24
-0,       5931,       5931,        1,  1382400, 0x00000000
-0,       5933,       5933,        1,  1382400, 0x171f05ba
-0,       6001,       6001,        1,  1382400, 0x00000000
-0,       6003,       6003,        1,  1382400, 0xb014cdf1
-0,       6054,       6054,        1,  1382400, 0x00000000
-0,       6839,       6839,        1,  1382400, 0xd918e667
-0,       6880,       6880,        1,  1382400, 0x00000000
-0,       7386,       7386,        1,  1382400, 0xc9406331
-0,       7419,       7419,        1,  1382400, 0x00000000
-0,       7501,       7501,        1,  1382400, 0xaf08b10d
-0,       7549,       7549,        1,  1382400, 0x00000000
-0,       7551,       7551,        1,  1382400, 0x00000000
-0,       7551,       7551,        1,  1382400, 0x853a9d93
-0,       7589,       7589,        1,  1382400, 0x00000000
-0,       7605,       7605,        1,  1382400, 0x7491a87d
-0,       7647,       7647,        1,  1382400, 0x00000000
-0,       7649,       7649,        1,  1382400, 0xf7383c58
-0,       7697,       7697,        1,  1382400, 0x00000000
-0,       7699,       7699,        1,  1382400, 0xe66be411
-0,       7743,       7743,        1,  1382400, 0x00000000
-0,       8032,       8032,        1,  1382400, 0xd6850362
-0,       8082,       8082,        1,  1382400, 0x00000000
-0,       8084,       8084,        1,  1382400, 0x3e1ed109
-0,       8115,       8115,        1,  1382400, 0x00000000
-0,       8116,       8116,        1,  1382400, 0x39c1b7bd
-0,       8160,       8160,        1,  1382400, 0x00000000
-0,       8180,       8180,        1,  1382400, 0x35b85f2e
-0,       8207,       8207,        1,  1382400, 0x00000000
-0,       8209,       8209,        1,  1382400, 0x00000000
-0,       8209,       8209,        1,  1382400, 0x83f103e5
-0,       8247,       8247,        1,  1382400, 0x00000000
-0,       8249,       8249,        1,  1382400, 0xbc1ca9b3
-0,       8278,       8278,        1,  1382400, 0x00000000
-0,       8281,       8281,        1,  1382400, 0x94d4a51e
-0,       8321,       8321,        1,  1382400, 0x00000000
-0,       8323,       8323,        1,  1382400, 0xf88cdfde
-0,       8367,       8367,        1,  1382400, 0x00000000
-0,       8565,       8565,        1,  1382400, 0xdd51423b
-0,       8611,       8611,        1,  1382400, 0x00000000
-0,       8669,       8669,        1,  1382400, 0x08259fa4
-0,       8708,       8708,        1,  1382400, 0x00000000
-0,       8941,       8941,        1,  1382400, 0x1663fa34
-0,       8994,       8994,        1,  1382400, 0x00000000
-0,       8996,       8996,        1,  1382400, 0xda2ceb55
-0,       9027,       9027,        1,  1382400, 0x00000000
+#sar 0: 1/1
+0,        662,        662,        1,  1382400, 0xc637b893
+0,        663,        663,        1,  1382400, 0xc637b893
+0,        664,        664,        1,  1382400, 0xc637b893
+0,        665,        665,        1,  1382400, 0xc637b893
+0,        666,        666,        1,  1382400, 0xc637b893
+0,        667,        667,        1,  1382400, 0xc637b893
+0,        668,        668,        1,  1382400, 0xc637b893
+0,        669,        669,        1,  1382400, 0xc637b893
+0,        670,        670,        1,  1382400, 0xc637b893
+0,        671,        671,        1,  1382400, 0xc637b893
+0,        672,        672,        1,  1382400, 0xc637b893
+0,        673,        673,        1,  1382400, 0xc637b893
+0,        674,        674,        1,  1382400, 0xc637b893
+0,        675,        675,        1,  1382400, 0xc637b893
+0,        676,        676,        1,  1382400, 0xc637b893
+0,        677,        677,        1,  1382400, 0xc637b893
+0,        678,        678,        1,  1382400, 0xc637b893
+0,        679,        679,        1,  1382400, 0xc637b893
+0,        680,        680,        1,  1382400, 0xc637b893
+0,        681,        681,        1,  1382400, 0xc637b893
+0,        682,        682,        1,  1382400, 0xc637b893
+0,        683,        683,        1,  1382400, 0xc637b893
+0,        684,        684,        1,  1382400, 0xc637b893
+0,        685,        685,        1,  1382400, 0xc637b893
+0,        686,        686,        1,  1382400, 0xc637b893
+0,        687,        687,        1,  1382400, 0x00000000
+0,        688,        688,        1,  1382400, 0x00000000
+0,        689,        689,        1,  1382400, 0x00000000
+0,        690,        690,        1,  1382400, 0x00000000
+0,        691,        691,        1,  1382400, 0x00000000
+0,        692,        692,        1,  1382400, 0x00000000
+0,        693,        693,        1,  1382400, 0x00000000
+0,        694,        694,        1,  1382400, 0x00000000
+0,        695,        695,        1,  1382400, 0x00000000
+0,        696,        696,        1,  1382400, 0x00000000
+0,        697,        697,        1,  1382400, 0x00000000
+0,        698,        698,        1,  1382400, 0x00000000
+0,        699,        699,        1,  1382400, 0x00000000
+0,        700,        700,        1,  1382400, 0x00000000
+0,        701,        701,        1,  1382400, 0x00000000
+0,        702,        702,        1,  1382400, 0x00000000
+0,        703,        703,        1,  1382400, 0x00000000
+0,        704,        704,        1,  1382400, 0x00000000
+0,        705,        705,        1,  1382400, 0x00000000
+0,        706,        706,        1,  1382400, 0x00000000
+0,        707,        707,        1,  1382400, 0x00000000
+0,        708,        708,        1,  1382400, 0x00000000
+0,        709,        709,        1,  1382400, 0x00000000
+0,        710,        710,        1,  1382400, 0x00000000
+0,        711,        711,        1,  1382400, 0x00000000
+0,        712,        712,        1,  1382400, 0x00000000
+0,        713,        713,        1,  1382400, 0x00000000
+0,        714,        714,        1,  1382400, 0x00000000
+0,        715,        715,        1,  1382400, 0x00000000
+0,        716,        716,        1,  1382400, 0x00000000
+0,        717,        717,        1,  1382400, 0x00000000
+0,        718,        718,        1,  1382400, 0x00000000
+0,        719,        719,        1,  1382400, 0x00000000
+0,        720,        720,        1,  1382400, 0x00000000
+0,        721,        721,        1,  1382400, 0x00000000
+0,        722,        722,        1,  1382400, 0x00000000
+0,        723,        723,        1,  1382400, 0x00000000
+0,        724,        724,        1,  1382400, 0x00000000
+0,        725,        725,        1,  1382400, 0x00000000
+0,        726,        726,        1,  1382400, 0x00000000
+0,        727,        727,        1,  1382400, 0x00000000
+0,        728,        728,        1,  1382400, 0x00000000
+0,        729,        729,        1,  1382400, 0x00000000
+0,        730,        730,        1,  1382400, 0x00000000
+0,        731,        731,        1,  1382400, 0x00000000
+0,        732,        732,        1,  1382400, 0x00000000
+0,        733,        733,        1,  1382400, 0x00000000
+0,        734,        734,        1,  1382400, 0x00000000
+0,        735,        735,        1,  1382400, 0x00000000
+0,        737,        737,        1,  1382400, 0x4c2960ca
+0,        737,        737,        1,  1382400, 0x4c2960ca
+0,        738,        738,        1,  1382400, 0x4c2960ca
+0,        739,        739,        1,  1382400, 0x4c2960ca
+0,        740,        740,        1,  1382400, 0x4c2960ca
+0,        741,        741,        1,  1382400, 0x4c2960ca
+0,        742,        742,        1,  1382400, 0x4c2960ca
+0,        743,        743,        1,  1382400, 0x4c2960ca
+0,        744,        744,        1,  1382400, 0x4c2960ca
+0,        745,        745,        1,  1382400, 0x4c2960ca
+0,        746,        746,        1,  1382400, 0x4c2960ca
+0,        747,        747,        1,  1382400, 0x4c2960ca
+0,        748,        748,        1,  1382400, 0x4c2960ca
+0,        749,        749,        1,  1382400, 0x4c2960ca
+0,        750,        750,        1,  1382400, 0x4c2960ca
+0,        751,        751,        1,  1382400, 0x4c2960ca
+0,        752,        752,        1,  1382400, 0x4c2960ca
+0,        753,        753,        1,  1382400, 0x4c2960ca
+0,        754,        754,        1,  1382400, 0x4c2960ca
+0,        755,        755,        1,  1382400, 0x4c2960ca
+0,        756,        756,        1,  1382400, 0x4c2960ca
+0,        757,        757,        1,  1382400, 0x4c2960ca
+0,        758,        758,        1,  1382400, 0x4c2960ca
+0,        759,        759,        1,  1382400, 0x4c2960ca
+0,        760,        760,        1,  1382400, 0x00000000
+0,        761,        761,        1,  1382400, 0x00000000
+0,        762,        762,        1,  1382400, 0x00000000
+0,        763,        763,        1,  1382400, 0x00000000
+0,        764,        764,        1,  1382400, 0x00000000
+0,        765,        765,        1,  1382400, 0x00000000
+0,        766,        766,        1,  1382400, 0x00000000
+0,        767,        767,        1,  1382400, 0x00000000
+0,        768,        768,        1,  1382400, 0x00000000
+0,        769,        769,        1,  1382400, 0x00000000
+0,        770,        770,        1,  1382400, 0x00000000
+0,        771,        771,        1,  1382400, 0x00000000
+0,        772,        772,        1,  1382400, 0x00000000
+0,        773,        773,        1,  1382400, 0x00000000
+0,        774,        774,        1,  1382400, 0x00000000
+0,        775,        775,        1,  1382400, 0x00000000
+0,        776,        776,        1,  1382400, 0x00000000
+0,        777,        777,        1,  1382400, 0x00000000
+0,        778,        778,        1,  1382400, 0x00000000
+0,        779,        779,        1,  1382400, 0x00000000
+0,        780,        780,        1,  1382400, 0x00000000
+0,        781,        781,        1,  1382400, 0x00000000
+0,        782,        782,        1,  1382400, 0x00000000
+0,        783,        783,        1,  1382400, 0x00000000
+0,        784,        784,        1,  1382400, 0x00000000
+0,        785,        785,        1,  1382400, 0x00000000
+0,        786,        786,        1,  1382400, 0x00000000
+0,        787,        787,        1,  1382400, 0x00000000
+0,        788,        788,        1,  1382400, 0x00000000
+0,        789,        789,        1,  1382400, 0x00000000
+0,        790,        790,        1,  1382400, 0x00000000
+0,        791,        791,        1,  1382400, 0x00000000
+0,        792,        792,        1,  1382400, 0x00000000
+0,        793,        793,        1,  1382400, 0x00000000
+0,        794,        794,        1,  1382400, 0x00000000
+0,        795,        795,        1,  1382400, 0x00000000
+0,        796,        796,        1,  1382400, 0x00000000
+0,        797,        797,        1,  1382400, 0x00000000
+0,        798,        798,        1,  1382400, 0x00000000
+0,        799,        799,        1,  1382400, 0x00000000
+0,        800,        800,        1,  1382400, 0x00000000
+0,        801,        801,        1,  1382400, 0x00000000
+0,        802,        802,        1,  1382400, 0x00000000
+0,        803,        803,        1,  1382400, 0x00000000
+0,        804,        804,        1,  1382400, 0x00000000
+0,        805,        805,        1,  1382400, 0x00000000
+0,        806,        806,        1,  1382400, 0x00000000
+0,        807,        807,        1,  1382400, 0x00000000
+0,        808,        808,        1,  1382400, 0x00000000
+0,        809,        809,        1,  1382400, 0x00000000
+0,        810,        810,        1,  1382400, 0x00000000
+0,        811,        811,        1,  1382400, 0x00000000
+0,        812,        812,        1,  1382400, 0x00000000
+0,        813,        813,        1,  1382400, 0x00000000
+0,        814,        814,        1,  1382400, 0x00000000
+0,        815,        815,        1,  1382400, 0x00000000
+0,        816,        816,        1,  1382400, 0x00000000
+0,        817,        817,        1,  1382400, 0x00000000
+0,        818,        818,        1,  1382400, 0x00000000
+0,        819,        819,        1,  1382400, 0x00000000
+0,        820,        820,        1,  1382400, 0x00000000
+0,        821,        821,        1,  1382400, 0x00000000
+0,        822,        822,        1,  1382400, 0x00000000
+0,        823,        823,        1,  1382400, 0x00000000
+0,        824,        824,        1,  1382400, 0x00000000
+0,        825,        825,        1,  1382400, 0x00000000
+0,        826,        826,        1,  1382400, 0x00000000
+0,        827,        827,        1,  1382400, 0x00000000
+0,        828,        828,        1,  1382400, 0x00000000
+0,        829,        829,        1,  1382400, 0x00000000
+0,        830,        830,        1,  1382400, 0x00000000
+0,        831,        831,        1,  1382400, 0x00000000
+0,        832,        832,        1,  1382400, 0x00000000
+0,        833,        833,        1,  1382400, 0x00000000
+0,        834,        834,        1,  1382400, 0x00000000
+0,        835,        835,        1,  1382400, 0x00000000
+0,        836,        836,        1,  1382400, 0x00000000
+0,        837,        837,        1,  1382400, 0x00000000
+0,        838,        838,        1,  1382400, 0x00000000
+0,        839,        839,        1,  1382400, 0x00000000
+0,        840,        840,        1,  1382400, 0x00000000
+0,        841,        841,        1,  1382400, 0x00000000
+0,        842,        842,        1,  1382400, 0x00000000
+0,        843,        843,        1,  1382400, 0x00000000
+0,        844,        844,        1,  1382400, 0x00000000
+0,        845,        845,        1,  1382400, 0x00000000
+0,        846,        846,        1,  1382400, 0x00000000
+0,        847,        847,        1,  1382400, 0x00000000
+0,        848,        848,        1,  1382400, 0x00000000
+0,        849,        849,        1,  1382400, 0x00000000
+0,        850,        850,        1,  1382400, 0x00000000
+0,        851,        851,        1,  1382400, 0x00000000
+0,        852,        852,        1,  1382400, 0x00000000
+0,        853,        853,        1,  1382400, 0x00000000
+0,        854,        854,        1,  1382400, 0x00000000
+0,        855,        855,        1,  1382400, 0x00000000
+0,        856,        856,        1,  1382400, 0x00000000
+0,        857,        857,        1,  1382400, 0x00000000
+0,        858,        858,        1,  1382400, 0x00000000
+0,        859,        859,        1,  1382400, 0x00000000
+0,        860,        860,        1,  1382400, 0x00000000
+0,        861,        861,        1,  1382400, 0x00000000
+0,        862,        862,        1,  1382400, 0x00000000
+0,        863,        863,        1,  1382400, 0x00000000
+0,        864,        864,        1,  1382400, 0x00000000
+0,        865,        865,        1,  1382400, 0x00000000
+0,        866,        866,        1,  1382400, 0x00000000
+0,        867,        867,        1,  1382400, 0x00000000
+0,        868,        868,        1,  1382400, 0x00000000
+0,        869,        869,        1,  1382400, 0x00000000
+0,        870,        870,        1,  1382400, 0x00000000
+0,        871,        871,        1,  1382400, 0x00000000
+0,        872,        872,        1,  1382400, 0x00000000
+0,        873,        873,        1,  1382400, 0x00000000
+0,        874,        874,        1,  1382400, 0x00000000
+0,        875,        875,        1,  1382400, 0x00000000
+0,        876,        876,        1,  1382400, 0x00000000
+0,        877,        877,        1,  1382400, 0x00000000
+0,        878,        878,        1,  1382400, 0x00000000
+0,        879,        879,        1,  1382400, 0x00000000
+0,        880,        880,        1,  1382400, 0x00000000
+0,        881,        881,        1,  1382400, 0x00000000
+0,        882,        882,        1,  1382400, 0x00000000
+0,        883,        883,        1,  1382400, 0x00000000
+0,        884,        884,        1,  1382400, 0x00000000
+0,        885,        885,        1,  1382400, 0x00000000
+0,        886,        886,        1,  1382400, 0x00000000
+0,        887,        887,        1,  1382400, 0x00000000
+0,        888,        888,        1,  1382400, 0x00000000
+0,        889,        889,        1,  1382400, 0x00000000
+0,        890,        890,        1,  1382400, 0x00000000
+0,        891,        891,        1,  1382400, 0x00000000
+0,        892,        892,        1,  1382400, 0x00000000
+0,        893,        893,        1,  1382400, 0x00000000
+0,        894,        894,        1,  1382400, 0x00000000
+0,        895,        895,        1,  1382400, 0x00000000
+0,        896,        896,        1,  1382400, 0x00000000
+0,        897,        897,        1,  1382400, 0x00000000
+0,        898,        898,        1,  1382400, 0x00000000
+0,        899,        899,        1,  1382400, 0x00000000
+0,        900,        900,        1,  1382400, 0x00000000
+0,        901,        901,        1,  1382400, 0x00000000
+0,        902,        902,        1,  1382400, 0x00000000
+0,        904,        904,        1,  1382400, 0x5fa18966
+0,        904,        904,        1,  1382400, 0x5fa18966
+0,        905,        905,        1,  1382400, 0x5fa18966
+0,        906,        906,        1,  1382400, 0x5fa18966
+0,        907,        907,        1,  1382400, 0x5fa18966
+0,        908,        908,        1,  1382400, 0x5fa18966
+0,        909,        909,        1,  1382400, 0x5fa18966
+0,        910,        910,        1,  1382400, 0x5fa18966
+0,        911,        911,        1,  1382400, 0x5fa18966
+0,        912,        912,        1,  1382400, 0x5fa18966
+0,        913,        913,        1,  1382400, 0x5fa18966
+0,        914,        914,        1,  1382400, 0x5fa18966
+0,        915,        915,        1,  1382400, 0x5fa18966
+0,        916,        916,        1,  1382400, 0x5fa18966
+0,        917,        917,        1,  1382400, 0x55f4b7b1
+0,        918,        918,        1,  1382400, 0x55f4b7b1
+0,        919,        919,        1,  1382400, 0x55f4b7b1
+0,        920,        920,        1,  1382400, 0x55f4b7b1
+0,        921,        921,        1,  1382400, 0x55f4b7b1
+0,        922,        922,        1,  1382400, 0x55f4b7b1
+0,        923,        923,        1,  1382400, 0x55f4b7b1
+0,        924,        924,        1,  1382400, 0x55f4b7b1
+0,        925,        925,        1,  1382400, 0x55f4b7b1
+0,        926,        926,        1,  1382400, 0x55f4b7b1
+0,        927,        927,        1,  1382400, 0x55f4b7b1
+0,        928,        928,        1,  1382400, 0x55f4b7b1
+0,        929,        929,        1,  1382400, 0x00000000
+0,        930,        930,        1,  1382400, 0xdfa4cf32
+0,        931,        931,        1,  1382400, 0xdfa4cf32
+0,        932,        932,        1,  1382400, 0xdfa4cf32
+0,        933,        933,        1,  1382400, 0xdfa4cf32
+0,        934,        934,        1,  1382400, 0xdfa4cf32
+0,        935,        935,        1,  1382400, 0xdfa4cf32
+0,        936,        936,        1,  1382400, 0xdfa4cf32
+0,        937,        937,        1,  1382400, 0xdfa4cf32
+0,        938,        938,        1,  1382400, 0xdfa4cf32
+0,        939,        939,        1,  1382400, 0xdfa4cf32
+0,        940,        940,        1,  1382400, 0xdfa4cf32
+0,        941,        941,        1,  1382400, 0xdfa4cf32
+0,        942,        942,        1,  1382400, 0xdfa4cf32
+0,        943,        943,        1,  1382400, 0x35023df8
+0,        944,        944,        1,  1382400, 0x35023df8
+0,        945,        945,        1,  1382400, 0x35023df8
+0,        946,        946,        1,  1382400, 0x35023df8
+0,        947,        947,        1,  1382400, 0x35023df8
+0,        948,        948,        1,  1382400, 0x35023df8
+0,        949,        949,        1,  1382400, 0x35023df8
+0,        950,        950,        1,  1382400, 0xed933219
+0,        951,        951,        1,  1382400, 0xed933219
+0,        952,        952,        1,  1382400, 0xed933219
+0,        953,        953,        1,  1382400, 0xed933219
+0,        954,        954,        1,  1382400, 0xed933219
+0,        955,        955,        1,  1382400, 0xed933219
+0,        956,        956,        1,  1382400, 0xed933219
+0,        957,        957,        1,  1382400, 0xed933219
+0,        958,        958,        1,  1382400, 0x00000000
+0,        959,        959,        1,  1382400, 0x00000000
+0,        960,        960,        1,  1382400, 0x00000000
+0,        961,        961,        1,  1382400, 0x00000000
+0,        962,        962,        1,  1382400, 0x00000000
+0,        963,        963,        1,  1382400, 0x00000000
+0,        964,        964,        1,  1382400, 0x00000000
+0,        965,        965,        1,  1382400, 0x00000000
+0,        966,        966,        1,  1382400, 0x00000000
+0,        967,        967,        1,  1382400, 0x00000000
+0,        968,        968,        1,  1382400, 0x00000000
+0,        969,        969,        1,  1382400, 0x00000000
+0,        970,        970,        1,  1382400, 0x00000000
+0,        971,        971,        1,  1382400, 0x00000000
+0,        972,        972,        1,  1382400, 0x00000000
+0,        973,        973,        1,  1382400, 0x00000000
+0,        974,        974,        1,  1382400, 0x00000000
+0,        975,        975,        1,  1382400, 0x00000000
+0,        976,        976,        1,  1382400, 0x00000000
+0,        977,        977,        1,  1382400, 0x00000000
+0,        978,        978,        1,  1382400, 0x00000000
+0,        979,        979,        1,  1382400, 0x00000000
+0,        980,        980,        1,  1382400, 0x00000000
+0,        981,        981,        1,  1382400, 0x00000000
+0,        982,        982,        1,  1382400, 0x00000000
+0,        983,        983,        1,  1382400, 0x00000000
+0,        984,        984,        1,  1382400, 0x00000000
+0,        985,        985,        1,  1382400, 0x00000000
+0,        986,        986,        1,  1382400, 0x00000000
+0,        987,        987,        1,  1382400, 0x00000000
+0,        988,        988,        1,  1382400, 0x00000000
+0,        989,        989,        1,  1382400, 0x00000000
+0,        990,        990,        1,  1382400, 0x00000000
+0,        991,        991,        1,  1382400, 0x00000000
+0,        992,        992,        1,  1382400, 0x00000000
+0,        993,        993,        1,  1382400, 0x00000000
+0,        994,        994,        1,  1382400, 0x00000000
+0,        995,        995,        1,  1382400, 0x00000000
+0,        996,        996,        1,  1382400, 0x00000000
+0,        997,        997,        1,  1382400, 0x00000000
+0,        999,        999,        1,  1382400, 0x1b26389a
+0,        999,        999,        1,  1382400, 0x1b26389a
+0,       1000,       1000,        1,  1382400, 0x1b26389a
+0,       1001,       1001,        1,  1382400, 0x1b26389a
+0,       1002,       1002,        1,  1382400, 0x1b26389a
+0,       1003,       1003,        1,  1382400, 0x1b26389a
+0,       1004,       1004,        1,  1382400, 0x1b26389a
+0,       1006,       1006,        1,  1382400, 0xf0c7028b
+0,       1006,       1006,        1,  1382400, 0xf0c7028b
+0,       1007,       1007,        1,  1382400, 0xf0c7028b
+0,       1008,       1008,        1,  1382400, 0xf0c7028b
+0,       1009,       1009,        1,  1382400, 0xf0c7028b
+0,       1010,       1010,        1,  1382400, 0xf0c7028b
+0,       1011,       1011,        1,  1382400, 0xf0c7028b
+0,       1012,       1012,        1,  1382400, 0xf0c7028b
+0,       1013,       1013,        1,  1382400, 0xf0c7028b
+0,       1014,       1014,        1,  1382400, 0x395f521d
+0,       1015,       1015,        1,  1382400, 0x395f521d
+0,       1016,       1016,        1,  1382400, 0x395f521d
+0,       1017,       1017,        1,  1382400, 0x395f521d
+0,       1018,       1018,        1,  1382400, 0x395f521d
+0,       1019,       1019,        1,  1382400, 0x395f521d
+0,       1020,       1020,        1,  1382400, 0x395f521d
+0,       1021,       1021,        1,  1382400, 0x395f521d
+0,       1022,       1022,        1,  1382400, 0x395f521d
+0,       1024,       1024,        1,  1382400, 0x1ea87415
+0,       1024,       1024,        1,  1382400, 0x1ea87415
+0,       1025,       1025,        1,  1382400, 0x1ea87415
+0,       1026,       1026,        1,  1382400, 0x1ea87415
+0,       1027,       1027,        1,  1382400, 0x1ea87415
+0,       1028,       1028,        1,  1382400, 0x1ea87415
+0,       1029,       1029,        1,  1382400, 0x1ea87415
+0,       1030,       1030,        1,  1382400, 0x1ea87415
+0,       1031,       1031,        1,  1382400, 0x1ea87415
+0,       1032,       1032,        1,  1382400, 0x1ea87415
+0,       1033,       1033,        1,  1382400, 0x1ea87415
+0,       1034,       1034,        1,  1382400, 0xc6effdc1
+0,       1035,       1035,        1,  1382400, 0xc6effdc1
+0,       1036,       1036,        1,  1382400, 0xc6effdc1
+0,       1037,       1037,        1,  1382400, 0xc6effdc1
+0,       1038,       1038,        1,  1382400, 0xc6effdc1
+0,       1039,       1039,        1,  1382400, 0xc6effdc1
+0,       1040,       1040,        1,  1382400, 0xc6effdc1
+0,       1041,       1041,        1,  1382400, 0xc6effdc1
+0,       1042,       1042,        1,  1382400, 0xc6effdc1
+0,       1044,       1044,        1,  1382400, 0xba6846f8
+0,       1044,       1044,        1,  1382400, 0xba6846f8
+0,       1045,       1045,        1,  1382400, 0xba6846f8
+0,       1046,       1046,        1,  1382400, 0xba6846f8
+0,       1047,       1047,        1,  1382400, 0xba6846f8
+0,       1048,       1048,        1,  1382400, 0xba6846f8
+0,       1049,       1049,        1,  1382400, 0xba6846f8
+0,       1050,       1050,        1,  1382400, 0x033c5d5b
+0,       1051,       1051,        1,  1382400, 0x033c5d5b
+0,       1052,       1052,        1,  1382400, 0x033c5d5b
+0,       1053,       1053,        1,  1382400, 0x033c5d5b
+0,       1054,       1054,        1,  1382400, 0x033c5d5b
+0,       1055,       1055,        1,  1382400, 0x033c5d5b
+0,       1056,       1056,        1,  1382400, 0x033c5d5b
+0,       1057,       1057,        1,  1382400, 0x033c5d5b
+0,       1058,       1058,        1,  1382400, 0x00000000
+0,       1059,       1059,        1,  1382400, 0xef5abf66
+0,       1060,       1060,        1,  1382400, 0xef5abf66
+0,       1061,       1061,        1,  1382400, 0xef5abf66
+0,       1062,       1062,        1,  1382400, 0xef5abf66
+0,       1063,       1063,        1,  1382400, 0xef5abf66
+0,       1064,       1064,        1,  1382400, 0xef5abf66
+0,       1065,       1065,        1,  1382400, 0xef5abf66
+0,       1066,       1066,        1,  1382400, 0xef5abf66
+0,       1067,       1067,        1,  1382400, 0xef5abf66
+0,       1068,       1068,        1,  1382400, 0xef5abf66
+0,       1069,       1069,        1,  1382400, 0xef5abf66
+0,       1070,       1070,        1,  1382400, 0xef5abf66
+0,       1071,       1071,        1,  1382400, 0xef5abf66
+0,       1072,       1072,        1,  1382400, 0x00000000
+0,       1073,       1073,        1,  1382400, 0xec747954
+0,       1074,       1074,        1,  1382400, 0xec747954
+0,       1075,       1075,        1,  1382400, 0xec747954
+0,       1076,       1076,        1,  1382400, 0xec747954
+0,       1077,       1077,        1,  1382400, 0xec747954
+0,       1078,       1078,        1,  1382400, 0xec747954
+0,       1079,       1079,        1,  1382400, 0xec747954
+0,       1080,       1080,        1,  1382400, 0xec747954
+0,       1081,       1081,        1,  1382400, 0xec747954
+0,       1082,       1082,        1,  1382400, 0xec747954
+0,       1083,       1083,        1,  1382400, 0xec747954
+0,       1084,       1084,        1,  1382400, 0xec747954
+0,       1085,       1085,        1,  1382400, 0xec747954
+0,       1086,       1086,        1,  1382400, 0x00000000
+0,       1087,       1087,        1,  1382400, 0xfa34bcaf
+0,       1088,       1088,        1,  1382400, 0xfa34bcaf
+0,       1089,       1089,        1,  1382400, 0xfa34bcaf
+0,       1090,       1090,        1,  1382400, 0xfa34bcaf
+0,       1091,       1091,        1,  1382400, 0xfa34bcaf
+0,       1092,       1092,        1,  1382400, 0xfa34bcaf
+0,       1093,       1093,        1,  1382400, 0xfa34bcaf
+0,       1094,       1094,        1,  1382400, 0xfa34bcaf
+0,       1095,       1095,        1,  1382400, 0xfa34bcaf
+0,       1096,       1096,        1,  1382400, 0xfa34bcaf
+0,       1097,       1097,        1,  1382400, 0xfa34bcaf
+0,       1098,       1098,        1,  1382400, 0x00000000
+0,       1099,       1099,        1,  1382400, 0x8b7a709b
+0,       1100,       1100,        1,  1382400, 0x8b7a709b
+0,       1101,       1101,        1,  1382400, 0x8b7a709b
+0,       1102,       1102,        1,  1382400, 0x8b7a709b
+0,       1103,       1103,        1,  1382400, 0x8b7a709b
+0,       1104,       1104,        1,  1382400, 0x8b7a709b
+0,       1105,       1105,        1,  1382400, 0x8b7a709b
+0,       1106,       1106,        1,  1382400, 0x8b7a709b
+0,       1107,       1107,        1,  1382400, 0x00000000
+0,       1108,       1108,        1,  1382400, 0x00000000
+0,       1109,       1109,        1,  1382400, 0x00000000
+0,       1110,       1110,        1,  1382400, 0x00000000
+0,       1111,       1111,        1,  1382400, 0x00000000
+0,       1112,       1112,        1,  1382400, 0x00000000
+0,       1113,       1113,        1,  1382400, 0x00000000
+0,       1114,       1114,        1,  1382400, 0x00000000
+0,       1115,       1115,        1,  1382400, 0x00000000
+0,       1116,       1116,        1,  1382400, 0x00000000
+0,       1118,       1118,        1,  1382400, 0xc333382f
+0,       1118,       1118,        1,  1382400, 0xc333382f
+0,       1119,       1119,        1,  1382400, 0xc333382f
+0,       1120,       1120,        1,  1382400, 0xc333382f
+0,       1121,       1121,        1,  1382400, 0xc333382f
+0,       1122,       1122,        1,  1382400, 0xc333382f
+0,       1123,       1123,        1,  1382400, 0xc333382f
+0,       1124,       1124,        1,  1382400, 0xc333382f
+0,       1125,       1125,        1,  1382400, 0xc333382f
+0,       1126,       1126,        1,  1382400, 0xc333382f
+0,       1127,       1127,        1,  1382400, 0xc333382f
+0,       1128,       1128,        1,  1382400, 0xc333382f
+0,       1129,       1129,        1,  1382400, 0x00000000
+0,       1130,       1130,        1,  1382400, 0x00000000
+0,       1131,       1131,        1,  1382400, 0x00000000
+0,       1132,       1132,        1,  1382400, 0x00000000
+0,       1133,       1133,        1,  1382400, 0x00000000
+0,       1134,       1134,        1,  1382400, 0x00000000
+0,       1135,       1135,        1,  1382400, 0x00000000
+0,       1136,       1136,        1,  1382400, 0x00000000
+0,       1138,       1138,        1,  1382400, 0xabe5dfcf
+0,       1138,       1138,        1,  1382400, 0xabe5dfcf
+0,       1139,       1139,        1,  1382400, 0xabe5dfcf
+0,       1140,       1140,        1,  1382400, 0xabe5dfcf
+0,       1141,       1141,        1,  1382400, 0xabe5dfcf
+0,       1142,       1142,        1,  1382400, 0xabe5dfcf
+0,       1143,       1143,        1,  1382400, 0xabe5dfcf
+0,       1144,       1144,        1,  1382400, 0xabe5dfcf
+0,       1145,       1145,        1,  1382400, 0xabe5dfcf
+0,       1146,       1146,        1,  1382400, 0xabe5dfcf
+0,       1147,       1147,        1,  1382400, 0xabe5dfcf
+0,       1148,       1148,        1,  1382400, 0xabe5dfcf
+0,       1149,       1149,        1,  1382400, 0xabe5dfcf
+0,       1150,       1150,        1,  1382400, 0xabe5dfcf
+0,       1151,       1151,        1,  1382400, 0xabe5dfcf
+0,       1152,       1152,        1,  1382400, 0xabe5dfcf
+0,       1153,       1153,        1,  1382400, 0xabe5dfcf
+0,       1154,       1154,        1,  1382400, 0x56948101
+0,       1155,       1155,        1,  1382400, 0x56948101
+0,       1156,       1156,        1,  1382400, 0x56948101
+0,       1157,       1157,        1,  1382400, 0x56948101
+0,       1158,       1158,        1,  1382400, 0x56948101
+0,       1159,       1159,        1,  1382400, 0x56948101
+0,       1160,       1160,        1,  1382400, 0x56948101
+0,       1161,       1161,        1,  1382400, 0x56948101
+0,       1162,       1162,        1,  1382400, 0x56948101
+0,       1163,       1163,        1,  1382400, 0x56948101
+0,       1164,       1164,        1,  1382400, 0x56948101
+0,       1166,       1166,        1,  1382400, 0xb747834a
+0,       1166,       1166,        1,  1382400, 0xb747834a
+0,       1167,       1167,        1,  1382400, 0xb747834a
+0,       1168,       1168,        1,  1382400, 0xb747834a
+0,       1169,       1169,        1,  1382400, 0xb747834a
+0,       1170,       1170,        1,  1382400, 0xb747834a
+0,       1171,       1171,        1,  1382400, 0xb747834a
+0,       1172,       1172,        1,  1382400, 0xb747834a
+0,       1173,       1173,        1,  1382400, 0xb747834a
+0,       1174,       1174,        1,  1382400, 0xb747834a
+0,       1175,       1175,        1,  1382400, 0xb747834a
+0,       1176,       1176,        1,  1382400, 0xb747834a
+0,       1177,       1177,        1,  1382400, 0xb747834a
+0,       1178,       1178,        1,  1382400, 0xb747834a
+0,       1179,       1179,        1,  1382400, 0xb747834a
+0,       1180,       1180,        1,  1382400, 0xb747834a
+0,       1181,       1181,        1,  1382400, 0xb747834a
+0,       1182,       1182,        1,  1382400, 0xb747834a
+0,       1183,       1183,        1,  1382400, 0xb747834a
+0,       1184,       1184,        1,  1382400, 0xb747834a
+0,       1185,       1185,        1,  1382400, 0xb747834a
+0,       1187,       1187,        1,  1382400, 0x3448baad
+0,       1187,       1187,        1,  1382400, 0x3448baad
+0,       1188,       1188,        1,  1382400, 0x3448baad
+0,       1189,       1189,        1,  1382400, 0x3448baad
+0,       1190,       1190,        1,  1382400, 0x3448baad
+0,       1191,       1191,        1,  1382400, 0x3448baad
+0,       1192,       1192,        1,  1382400, 0x3448baad
+0,       1193,       1193,        1,  1382400, 0x3448baad
+0,       1194,       1194,        1,  1382400, 0x3448baad
+0,       1195,       1195,        1,  1382400, 0x3448baad
+0,       1196,       1196,        1,  1382400, 0x3448baad
+0,       1197,       1197,        1,  1382400, 0x3448baad
+0,       1198,       1198,        1,  1382400, 0x3448baad
+0,       1199,       1199,        1,  1382400, 0x3448baad
+0,       1200,       1200,        1,  1382400, 0x00000000
+0,       1201,       1201,        1,  1382400, 0xaabe4f37
+0,       1202,       1202,        1,  1382400, 0xaabe4f37
+0,       1203,       1203,        1,  1382400, 0xaabe4f37
+0,       1204,       1204,        1,  1382400, 0xaabe4f37
+0,       1205,       1205,        1,  1382400, 0xaabe4f37
+0,       1206,       1206,        1,  1382400, 0xaabe4f37
+0,       1207,       1207,        1,  1382400, 0xaabe4f37
+0,       1208,       1208,        1,  1382400, 0xaabe4f37
+0,       1209,       1209,        1,  1382400, 0xaabe4f37
+0,       1210,       1210,        1,  1382400, 0xaabe4f37
+0,       1211,       1211,        1,  1382400, 0x00000000
+0,       1212,       1212,        1,  1382400, 0x00000000
+0,       1213,       1213,        1,  1382400, 0x00000000
+0,       1214,       1214,        1,  1382400, 0x00000000
+0,       1215,       1215,        1,  1382400, 0x00000000
+0,       1216,       1216,        1,  1382400, 0x00000000
+0,       1217,       1217,        1,  1382400, 0x00000000
+0,       1218,       1218,        1,  1382400, 0x00000000
+0,       1219,       1219,        1,  1382400, 0x00000000
+0,       1220,       1220,        1,  1382400, 0x00000000
+0,       1221,       1221,        1,  1382400, 0x00000000
+0,       1222,       1222,        1,  1382400, 0x00000000
+0,       1223,       1223,        1,  1382400, 0x00000000
+0,       1224,       1224,        1,  1382400, 0x00000000
+0,       1225,       1225,        1,  1382400, 0x00000000
+0,       1226,       1226,        1,  1382400, 0x00000000
+0,       1227,       1227,        1,  1382400, 0x00000000
+0,       1228,       1228,        1,  1382400, 0x00000000
+0,       1229,       1229,        1,  1382400, 0x00000000
+0,       1230,       1230,        1,  1382400, 0x00000000
+0,       1231,       1231,        1,  1382400, 0x00000000
+0,       1232,       1232,        1,  1382400, 0x00000000
+0,       1233,       1233,        1,  1382400, 0x00000000
+0,       1234,       1234,        1,  1382400, 0x00000000
+0,       1235,       1235,        1,  1382400, 0x00000000
+0,       1236,       1236,        1,  1382400, 0x00000000
+0,       1237,       1237,        1,  1382400, 0x00000000
+0,       1238,       1238,        1,  1382400, 0x00000000
+0,       1239,       1239,        1,  1382400, 0x00000000
+0,       1240,       1240,        1,  1382400, 0x00000000
+0,       1241,       1241,        1,  1382400, 0x00000000
+0,       1242,       1242,        1,  1382400, 0x00000000
+0,       1243,       1243,        1,  1382400, 0x00000000
+0,       1244,       1244,        1,  1382400, 0x00000000
+0,       1245,       1245,        1,  1382400, 0x00000000
+0,       1246,       1246,        1,  1382400, 0x00000000
+0,       1247,       1247,        1,  1382400, 0x00000000
+0,       1248,       1248,        1,  1382400, 0x00000000
+0,       1249,       1249,        1,  1382400, 0x00000000
+0,       1250,       1250,        1,  1382400, 0x00000000
+0,       1251,       1251,        1,  1382400, 0x00000000
+0,       1252,       1252,        1,  1382400, 0x00000000
+0,       1253,       1253,        1,  1382400, 0x00000000
+0,       1254,       1254,        1,  1382400, 0x00000000
+0,       1255,       1255,        1,  1382400, 0x00000000
+0,       1256,       1256,        1,  1382400, 0x00000000
+0,       1257,       1257,        1,  1382400, 0x00000000
+0,       1258,       1258,        1,  1382400, 0x00000000
+0,       1259,       1259,        1,  1382400, 0x00000000
+0,       1260,       1260,        1,  1382400, 0x00000000
+0,       1261,       1261,        1,  1382400, 0x00000000
+0,       1262,       1262,        1,  1382400, 0x00000000
+0,       1263,       1263,        1,  1382400, 0x00000000
+0,       1264,       1264,        1,  1382400, 0x00000000
+0,       1265,       1265,        1,  1382400, 0x00000000
+0,       1266,       1266,        1,  1382400, 0x00000000
+0,       1267,       1267,        1,  1382400, 0x00000000
+0,       1268,       1268,        1,  1382400, 0x00000000
+0,       1269,       1269,        1,  1382400, 0x00000000
+0,       1270,       1270,        1,  1382400, 0x00000000
+0,       1271,       1271,        1,  1382400, 0x00000000
+0,       1272,       1272,        1,  1382400, 0x00000000
+0,       1273,       1273,        1,  1382400, 0x00000000
+0,       1274,       1274,        1,  1382400, 0x00000000
+0,       1275,       1275,        1,  1382400, 0x00000000
+0,       1276,       1276,        1,  1382400, 0x00000000
+0,       1277,       1277,        1,  1382400, 0x00000000
+0,       1278,       1278,        1,  1382400, 0x00000000
+0,       1279,       1279,        1,  1382400, 0x00000000
+0,       1280,       1280,        1,  1382400, 0x00000000
+0,       1281,       1281,        1,  1382400, 0x00000000
+0,       1282,       1282,        1,  1382400, 0x00000000
+0,       1283,       1283,        1,  1382400, 0x00000000
+0,       1284,       1284,        1,  1382400, 0x00000000
+0,       1285,       1285,        1,  1382400, 0x00000000
+0,       1286,       1286,        1,  1382400, 0x00000000
+0,       1287,       1287,        1,  1382400, 0x00000000
+0,       1288,       1288,        1,  1382400, 0x00000000
+0,       1289,       1289,        1,  1382400, 0x00000000
+0,       1290,       1290,        1,  1382400, 0x00000000
+0,       1291,       1291,        1,  1382400, 0x00000000
+0,       1292,       1292,        1,  1382400, 0x00000000
+0,       1293,       1293,        1,  1382400, 0x00000000
+0,       1294,       1294,        1,  1382400, 0x00000000
+0,       1295,       1295,        1,  1382400, 0x00000000
+0,       1296,       1296,        1,  1382400, 0x00000000
+0,       1297,       1297,        1,  1382400, 0x00000000
+0,       1298,       1298,        1,  1382400, 0x00000000
+0,       1299,       1299,        1,  1382400, 0x00000000
+0,       1300,       1300,        1,  1382400, 0x00000000
+0,       1301,       1301,        1,  1382400, 0x00000000
+0,       1302,       1302,        1,  1382400, 0x00000000
+0,       1303,       1303,        1,  1382400, 0x00000000
+0,       1304,       1304,        1,  1382400, 0x00000000
+0,       1305,       1305,        1,  1382400, 0x00000000
+0,       1306,       1306,        1,  1382400, 0x00000000
+0,       1307,       1307,        1,  1382400, 0x00000000
+0,       1308,       1308,        1,  1382400, 0x00000000
+0,       1309,       1309,        1,  1382400, 0x00000000
+0,       1310,       1310,        1,  1382400, 0x00000000
+0,       1311,       1311,        1,  1382400, 0x00000000
+0,       1312,       1312,        1,  1382400, 0x00000000
+0,       1313,       1313,        1,  1382400, 0x00000000
+0,       1314,       1314,        1,  1382400, 0x00000000
+0,       1315,       1315,        1,  1382400, 0x00000000
+0,       1316,       1316,        1,  1382400, 0x00000000
+0,       1317,       1317,        1,  1382400, 0x00000000
+0,       1318,       1318,        1,  1382400, 0x00000000
+0,       1319,       1319,        1,  1382400, 0x00000000
+0,       1320,       1320,        1,  1382400, 0x00000000
+0,       1321,       1321,        1,  1382400, 0x00000000
+0,       1322,       1322,        1,  1382400, 0x00000000
+0,       1323,       1323,        1,  1382400, 0x00000000
+0,       1324,       1324,        1,  1382400, 0x00000000
+0,       1325,       1325,        1,  1382400, 0x00000000
+0,       1326,       1326,        1,  1382400, 0x00000000
+0,       1327,       1327,        1,  1382400, 0x00000000
+0,       1328,       1328,        1,  1382400, 0x00000000
+0,       1329,       1329,        1,  1382400, 0x00000000
+0,       1330,       1330,        1,  1382400, 0x00000000
+0,       1331,       1331,        1,  1382400, 0x00000000
+0,       1332,       1332,        1,  1382400, 0x00000000
+0,       1333,       1333,        1,  1382400, 0x00000000
+0,       1334,       1334,        1,  1382400, 0x00000000
+0,       1335,       1335,        1,  1382400, 0x00000000
+0,       1336,       1336,        1,  1382400, 0x00000000
+0,       1337,       1337,        1,  1382400, 0x00000000
+0,       1338,       1338,        1,  1382400, 0x00000000
+0,       1339,       1339,        1,  1382400, 0x00000000
+0,       1340,       1340,        1,  1382400, 0x00000000
+0,       1341,       1341,        1,  1382400, 0x00000000
+0,       1342,       1342,        1,  1382400, 0x00000000
+0,       1343,       1343,        1,  1382400, 0x00000000
+0,       1344,       1344,        1,  1382400, 0x00000000
+0,       1345,       1345,        1,  1382400, 0x00000000
+0,       1346,       1346,        1,  1382400, 0x00000000
+0,       1347,       1347,        1,  1382400, 0x00000000
+0,       1348,       1348,        1,  1382400, 0x00000000
+0,       1349,       1349,        1,  1382400, 0x00000000
+0,       1350,       1350,        1,  1382400, 0x00000000
+0,       1351,       1351,        1,  1382400, 0x00000000
+0,       1352,       1352,        1,  1382400, 0x00000000
+0,       1353,       1353,        1,  1382400, 0x00000000
+0,       1354,       1354,        1,  1382400, 0x00000000
+0,       1355,       1355,        1,  1382400, 0x00000000
+0,       1356,       1356,        1,  1382400, 0x00000000
+0,       1357,       1357,        1,  1382400, 0x00000000
+0,       1358,       1358,        1,  1382400, 0x00000000
+0,       1359,       1359,        1,  1382400, 0x00000000
+0,       1360,       1360,        1,  1382400, 0x00000000
+0,       1361,       1361,        1,  1382400, 0x00000000
+0,       1362,       1362,        1,  1382400, 0x00000000
+0,       1363,       1363,        1,  1382400, 0x00000000
+0,       1364,       1364,        1,  1382400, 0x00000000
+0,       1365,       1365,        1,  1382400, 0x00000000
+0,       1366,       1366,        1,  1382400, 0x00000000
+0,       1368,       1368,        1,  1382400, 0x8a48cd6f
+0,       1368,       1368,        1,  1382400, 0x8a48cd6f
+0,       1369,       1369,        1,  1382400, 0x8a48cd6f
+0,       1370,       1370,        1,  1382400, 0x8a48cd6f
+0,       1371,       1371,        1,  1382400, 0x8a48cd6f
+0,       1372,       1372,        1,  1382400, 0x8a48cd6f
+0,       1373,       1373,        1,  1382400, 0x8a48cd6f
+0,       1374,       1374,        1,  1382400, 0x8a48cd6f
+0,       1375,       1375,        1,  1382400, 0x8a48cd6f
+0,       1376,       1376,        1,  1382400, 0x00000000
+0,       1377,       1377,        1,  1382400, 0x00000000
+0,       1378,       1378,        1,  1382400, 0x00000000
+0,       1379,       1379,        1,  1382400, 0x00000000
+0,       1380,       1380,        1,  1382400, 0x00000000
+0,       1381,       1381,        1,  1382400, 0x00000000
+0,       1382,       1382,        1,  1382400, 0x00000000
+0,       1383,       1383,        1,  1382400, 0x00000000
+0,       1384,       1384,        1,  1382400, 0x00000000
+0,       1385,       1385,        1,  1382400, 0x00000000
+0,       1386,       1386,        1,  1382400, 0x00000000
+0,       1387,       1387,        1,  1382400, 0x00000000
+0,       1388,       1388,        1,  1382400, 0x00000000
+0,       1389,       1389,        1,  1382400, 0x00000000
+0,       1390,       1390,        1,  1382400, 0x00000000
+0,       1391,       1391,        1,  1382400, 0x00000000
+0,       1392,       1392,        1,  1382400, 0x00000000
+0,       1393,       1393,        1,  1382400, 0x00000000
+0,       1394,       1394,        1,  1382400, 0x00000000
+0,       1395,       1395,        1,  1382400, 0x00000000
+0,       1396,       1396,        1,  1382400, 0x00000000
+0,       1397,       1397,        1,  1382400, 0x00000000
+0,       1398,       1398,        1,  1382400, 0x00000000
+0,       1399,       1399,        1,  1382400, 0x00000000
+0,       1400,       1400,        1,  1382400, 0x00000000
+0,       1401,       1401,        1,  1382400, 0x00000000
+0,       1402,       1402,        1,  1382400, 0x00000000
+0,       1403,       1403,        1,  1382400, 0x00000000
+0,       1404,       1404,        1,  1382400, 0x00000000
+0,       1405,       1405,        1,  1382400, 0x00000000
+0,       1406,       1406,        1,  1382400, 0x00000000
+0,       1407,       1407,        1,  1382400, 0x00000000
+0,       1408,       1408,        1,  1382400, 0x00000000
+0,       1409,       1409,        1,  1382400, 0x00000000
+0,       1410,       1410,        1,  1382400, 0x00000000
+0,       1411,       1411,        1,  1382400, 0x00000000
+0,       1412,       1412,        1,  1382400, 0x00000000
+0,       1413,       1413,        1,  1382400, 0x00000000
+0,       1414,       1414,        1,  1382400, 0x00000000
+0,       1415,       1415,        1,  1382400, 0x00000000
+0,       1416,       1416,        1,  1382400, 0x00000000
+0,       1417,       1417,        1,  1382400, 0x00000000
+0,       1418,       1418,        1,  1382400, 0x00000000
+0,       1419,       1419,        1,  1382400, 0x00000000
+0,       1420,       1420,        1,  1382400, 0x00000000
+0,       1421,       1421,        1,  1382400, 0x00000000
+0,       1422,       1422,        1,  1382400, 0x00000000
+0,       1423,       1423,        1,  1382400, 0x00000000
+0,       1424,       1424,        1,  1382400, 0x00000000
+0,       1425,       1425,        1,  1382400, 0x00000000
+0,       1426,       1426,        1,  1382400, 0x00000000
+0,       1427,       1427,        1,  1382400, 0x00000000
+0,       1428,       1428,        1,  1382400, 0x00000000
+0,       1429,       1429,        1,  1382400, 0x00000000
+0,       1430,       1430,        1,  1382400, 0x00000000
+0,       1431,       1431,        1,  1382400, 0x00000000
+0,       1432,       1432,        1,  1382400, 0x00000000
+0,       1433,       1433,        1,  1382400, 0x00000000
+0,       1434,       1434,        1,  1382400, 0x00000000
+0,       1435,       1435,        1,  1382400, 0x00000000
+0,       1436,       1436,        1,  1382400, 0x00000000
+0,       1437,       1437,        1,  1382400, 0x00000000
+0,       1438,       1438,        1,  1382400, 0x00000000
+0,       1439,       1439,        1,  1382400, 0x00000000
+0,       1440,       1440,        1,  1382400, 0x00000000
+0,       1441,       1441,        1,  1382400, 0x00000000
+0,       1442,       1442,        1,  1382400, 0x00000000
+0,       1443,       1443,        1,  1382400, 0x00000000
+0,       1444,       1444,        1,  1382400, 0x00000000
+0,       1445,       1445,        1,  1382400, 0x00000000
+0,       1446,       1446,        1,  1382400, 0x00000000
+0,       1447,       1447,        1,  1382400, 0x00000000
+0,       1448,       1448,        1,  1382400, 0x00000000
+0,       1449,       1449,        1,  1382400, 0x00000000
+0,       1450,       1450,        1,  1382400, 0x00000000
+0,       1451,       1451,        1,  1382400, 0x00000000
+0,       1452,       1452,        1,  1382400, 0x00000000
+0,       1453,       1453,        1,  1382400, 0x00000000
+0,       1454,       1454,        1,  1382400, 0x00000000
+0,       1455,       1455,        1,  1382400, 0x00000000
+0,       1456,       1456,        1,  1382400, 0x00000000
+0,       1457,       1457,        1,  1382400, 0x00000000
+0,       1458,       1458,        1,  1382400, 0x00000000
+0,       1459,       1459,        1,  1382400, 0x00000000
+0,       1460,       1460,        1,  1382400, 0x00000000
+0,       1461,       1461,        1,  1382400, 0x00000000
+0,       1462,       1462,        1,  1382400, 0x00000000
+0,       1463,       1463,        1,  1382400, 0x00000000
+0,       1464,       1464,        1,  1382400, 0x00000000
+0,       1465,       1465,        1,  1382400, 0x00000000
+0,       1466,       1466,        1,  1382400, 0x00000000
+0,       1467,       1467,        1,  1382400, 0x00000000
+0,       1468,       1468,        1,  1382400, 0x00000000
+0,       1469,       1469,        1,  1382400, 0x00000000
+0,       1470,       1470,        1,  1382400, 0x00000000
+0,       1471,       1471,        1,  1382400, 0x00000000
+0,       1472,       1472,        1,  1382400, 0x00000000
+0,       1473,       1473,        1,  1382400, 0x00000000
+0,       1474,       1474,        1,  1382400, 0x00000000
+0,       1475,       1475,        1,  1382400, 0x00000000
+0,       1477,       1477,        1,  1382400, 0x49518c43
+0,       1477,       1477,        1,  1382400, 0x49518c43
+0,       1478,       1478,        1,  1382400, 0x49518c43
+0,       1479,       1479,        1,  1382400, 0x49518c43
+0,       1480,       1480,        1,  1382400, 0x49518c43
+0,       1481,       1481,        1,  1382400, 0x49518c43
+0,       1482,       1482,        1,  1382400, 0x49518c43
+0,       1483,       1483,        1,  1382400, 0x49518c43
+0,       1484,       1484,        1,  1382400, 0x00000000
+0,       1485,       1485,        1,  1382400, 0x00000000
+0,       1486,       1486,        1,  1382400, 0x00000000
+0,       1487,       1487,        1,  1382400, 0x00000000
+0,       1488,       1488,        1,  1382400, 0x00000000
+0,       1489,       1489,        1,  1382400, 0x00000000
+0,       1490,       1490,        1,  1382400, 0x00000000
+0,       1491,       1491,        1,  1382400, 0x00000000
+0,       1492,       1492,        1,  1382400, 0x00000000
+0,       1493,       1493,        1,  1382400, 0x00000000
+0,       1494,       1494,        1,  1382400, 0x00000000
+0,       1495,       1495,        1,  1382400, 0x00000000
+0,       1496,       1496,        1,  1382400, 0x00000000
+0,       1497,       1497,        1,  1382400, 0x00000000
+0,       1498,       1498,        1,  1382400, 0x00000000
+0,       1500,       1500,        1,  1382400, 0x4a72fa21
+0,       1500,       1500,        1,  1382400, 0x4a72fa21
+0,       1501,       1501,        1,  1382400, 0x4a72fa21
+0,       1502,       1502,        1,  1382400, 0x4a72fa21
+0,       1503,       1503,        1,  1382400, 0x4a72fa21
+0,       1504,       1504,        1,  1382400, 0x4a72fa21
+0,       1505,       1505,        1,  1382400, 0x4a72fa21
+0,       1506,       1506,        1,  1382400, 0x4a72fa21
+0,       1507,       1507,        1,  1382400, 0x4a72fa21
+0,       1508,       1508,        1,  1382400, 0x4a72fa21
+0,       1509,       1509,        1,  1382400, 0x4a72fa21
+0,       1510,       1510,        1,  1382400, 0x00000000
+0,       1511,       1511,        1,  1382400, 0xa82f7de8
+0,       1512,       1512,        1,  1382400, 0xa82f7de8
+0,       1513,       1513,        1,  1382400, 0xa82f7de8
+0,       1514,       1514,        1,  1382400, 0xa82f7de8
+0,       1515,       1515,        1,  1382400, 0xa82f7de8
+0,       1516,       1516,        1,  1382400, 0xa82f7de8
+0,       1517,       1517,        1,  1382400, 0xa82f7de8
+0,       1518,       1518,        1,  1382400, 0x00000000
+0,       1519,       1519,        1,  1382400, 0x00000000
+0,       1521,       1521,        1,  1382400, 0xeba0b5f3
+0,       1521,       1521,        1,  1382400, 0xeba0b5f3
+0,       1522,       1522,        1,  1382400, 0xeba0b5f3
+0,       1523,       1523,        1,  1382400, 0xeba0b5f3
+0,       1524,       1524,        1,  1382400, 0xeba0b5f3
+0,       1525,       1525,        1,  1382400, 0xeba0b5f3
+0,       1526,       1526,        1,  1382400, 0xeba0b5f3
+0,       1527,       1527,        1,  1382400, 0xeba0b5f3
+0,       1528,       1528,        1,  1382400, 0xeba0b5f3
+0,       1530,       1530,        1,  1382400, 0xd6a91770
+0,       1530,       1530,        1,  1382400, 0xd6a91770
+0,       1531,       1531,        1,  1382400, 0xd6a91770
+0,       1532,       1532,        1,  1382400, 0xd6a91770
+0,       1533,       1533,        1,  1382400, 0xd6a91770
+0,       1534,       1534,        1,  1382400, 0xd6a91770
+0,       1535,       1535,        1,  1382400, 0xd6a91770
+0,       1536,       1536,        1,  1382400, 0xd6a91770
+0,       1537,       1537,        1,  1382400, 0xd6a91770
+0,       1538,       1538,        1,  1382400, 0xd6a91770
+0,       1539,       1539,        1,  1382400, 0x00000000
+0,       1540,       1540,        1,  1382400, 0x222f827c
+0,       1541,       1541,        1,  1382400, 0x222f827c
+0,       1542,       1542,        1,  1382400, 0x222f827c
+0,       1543,       1543,        1,  1382400, 0x222f827c
+0,       1544,       1544,        1,  1382400, 0x222f827c
+0,       1545,       1545,        1,  1382400, 0x222f827c
+0,       1546,       1546,        1,  1382400, 0x222f827c
+0,       1547,       1547,        1,  1382400, 0x222f827c
+0,       1548,       1548,        1,  1382400, 0x222f827c
+0,       1549,       1549,        1,  1382400, 0x00000000
+0,       1550,       1550,        1,  1382400, 0x00000000
+0,       1551,       1551,        1,  1382400, 0x00000000
+0,       1552,       1552,        1,  1382400, 0x00000000
+0,       1553,       1553,        1,  1382400, 0x00000000
+0,       1554,       1554,        1,  1382400, 0x00000000
+0,       1555,       1555,        1,  1382400, 0x00000000
+0,       1556,       1556,        1,  1382400, 0x00000000
+0,       1557,       1557,        1,  1382400, 0x00000000
+0,       1558,       1558,        1,  1382400, 0x00000000
+0,       1559,       1559,        1,  1382400, 0x00000000
+0,       1560,       1560,        1,  1382400, 0x00000000
+0,       1561,       1561,        1,  1382400, 0x00000000
+0,       1562,       1562,        1,  1382400, 0x00000000
+0,       1563,       1563,        1,  1382400, 0x00000000
+0,       1564,       1564,        1,  1382400, 0x00000000
+0,       1565,       1565,        1,  1382400, 0x00000000
+0,       1566,       1566,        1,  1382400, 0x00000000
+0,       1567,       1567,        1,  1382400, 0x00000000
+0,       1568,       1568,        1,  1382400, 0x00000000
+0,       1569,       1569,        1,  1382400, 0x00000000
+0,       1570,       1570,        1,  1382400, 0x00000000
+0,       1571,       1571,        1,  1382400, 0x00000000
+0,       1572,       1572,        1,  1382400, 0x00000000
+0,       1573,       1573,        1,  1382400, 0x00000000
+0,       1574,       1574,        1,  1382400, 0x00000000
+0,       1575,       1575,        1,  1382400, 0x00000000
+0,       1576,       1576,        1,  1382400, 0x00000000
+0,       1577,       1577,        1,  1382400, 0x00000000
+0,       1578,       1578,        1,  1382400, 0x00000000
+0,       1579,       1579,        1,  1382400, 0x00000000
+0,       1580,       1580,        1,  1382400, 0x00000000
+0,       1581,       1581,        1,  1382400, 0x00000000
+0,       1582,       1582,        1,  1382400, 0x00000000
+0,       1583,       1583,        1,  1382400, 0x00000000
+0,       1584,       1584,        1,  1382400, 0x00000000
+0,       1585,       1585,        1,  1382400, 0x00000000
+0,       1586,       1586,        1,  1382400, 0x00000000
+0,       1587,       1587,        1,  1382400, 0x00000000
+0,       1588,       1588,        1,  1382400, 0x00000000
+0,       1589,       1589,        1,  1382400, 0x00000000
+0,       1590,       1590,        1,  1382400, 0x00000000
+0,       1591,       1591,        1,  1382400, 0x00000000
+0,       1592,       1592,        1,  1382400, 0x00000000
+0,       1593,       1593,        1,  1382400, 0x00000000
+0,       1594,       1594,        1,  1382400, 0x00000000
+0,       1595,       1595,        1,  1382400, 0x00000000
+0,       1596,       1596,        1,  1382400, 0x00000000
+0,       1597,       1597,        1,  1382400, 0x00000000
+0,       1598,       1598,        1,  1382400, 0x00000000
+0,       1599,       1599,        1,  1382400, 0x00000000
+0,       1600,       1600,        1,  1382400, 0x00000000
+0,       1601,       1601,        1,  1382400, 0x00000000
+0,       1602,       1602,        1,  1382400, 0x00000000
+0,       1603,       1603,        1,  1382400, 0x00000000
+0,       1604,       1604,        1,  1382400, 0x00000000
+0,       1606,       1606,        1,  1382400, 0x3270f4ff
+0,       1606,       1606,        1,  1382400, 0x3270f4ff
+0,       1607,       1607,        1,  1382400, 0x3270f4ff
+0,       1608,       1608,        1,  1382400, 0x3270f4ff
+0,       1609,       1609,        1,  1382400, 0x3270f4ff
+0,       1610,       1610,        1,  1382400, 0x3270f4ff
+0,       1611,       1611,        1,  1382400, 0x3270f4ff
+0,       1612,       1612,        1,  1382400, 0x3270f4ff
+0,       1613,       1613,        1,  1382400, 0x3270f4ff
+0,       1614,       1614,        1,  1382400, 0x3270f4ff
+0,       1615,       1615,        1,  1382400, 0x3270f4ff
+0,       1617,       1617,        1,  1382400, 0x40813cb3
+0,       1617,       1617,        1,  1382400, 0x40813cb3
+0,       1618,       1618,        1,  1382400, 0x40813cb3
+0,       1619,       1619,        1,  1382400, 0x40813cb3
+0,       1620,       1620,        1,  1382400, 0x40813cb3
+0,       1621,       1621,        1,  1382400, 0x40813cb3
+0,       1622,       1622,        1,  1382400, 0x40813cb3
+0,       1623,       1623,        1,  1382400, 0x9d8fde41
+0,       1624,       1624,        1,  1382400, 0x9d8fde41
+0,       1625,       1625,        1,  1382400, 0x9d8fde41
+0,       1626,       1626,        1,  1382400, 0x9d8fde41
+0,       1627,       1627,        1,  1382400, 0x9d8fde41
+0,       1628,       1628,        1,  1382400, 0x9d8fde41
+0,       1629,       1629,        1,  1382400, 0x9d8fde41
+0,       1630,       1630,        1,  1382400, 0x9d8fde41
+0,       1631,       1631,        1,  1382400, 0x9d8fde41
+0,       1632,       1632,        1,  1382400, 0x00000000
+0,       1633,       1633,        1,  1382400, 0x00000000
+0,       1634,       1634,        1,  1382400, 0x00000000
+0,       1636,       1636,        1,  1382400, 0xc6d7a701
+0,       1636,       1636,        1,  1382400, 0xc6d7a701
+0,       1637,       1637,        1,  1382400, 0xc6d7a701
+0,       1638,       1638,        1,  1382400, 0xc6d7a701
+0,       1639,       1639,        1,  1382400, 0xc6d7a701
+0,       1640,       1640,        1,  1382400, 0xc6d7a701
+0,       1642,       1642,        1,  1382400, 0x9d45f2dc
+0,       1642,       1642,        1,  1382400, 0x9d45f2dc
+0,       1643,       1643,        1,  1382400, 0x9d45f2dc
+0,       1644,       1644,        1,  1382400, 0x9d45f2dc
+0,       1645,       1645,        1,  1382400, 0x9d45f2dc
+0,       1646,       1646,        1,  1382400, 0x9d45f2dc
+0,       1647,       1647,        1,  1382400, 0x9d45f2dc
+0,       1648,       1648,        1,  1382400, 0x9d45f2dc
+0,       1649,       1649,        1,  1382400, 0x00000000
+0,       1650,       1650,        1,  1382400, 0x8525ee40
+0,       1651,       1651,        1,  1382400, 0x8525ee40
+0,       1652,       1652,        1,  1382400, 0x8525ee40
+0,       1653,       1653,        1,  1382400, 0x8525ee40
+0,       1654,       1654,        1,  1382400, 0x8525ee40
+0,       1655,       1655,        1,  1382400, 0x8525ee40
+0,       1656,       1656,        1,  1382400, 0x5b26b98b
+0,       1657,       1657,        1,  1382400, 0x5b26b98b
+0,       1658,       1658,        1,  1382400, 0x5b26b98b
+0,       1659,       1659,        1,  1382400, 0x5b26b98b
+0,       1660,       1660,        1,  1382400, 0x5b26b98b
+0,       1661,       1661,        1,  1382400, 0x5b26b98b
+0,       1662,       1662,        1,  1382400, 0x5b26b98b
+0,       1663,       1663,        1,  1382400, 0x5b26b98b
+0,       1664,       1664,        1,  1382400, 0x00000000
+0,       1665,       1665,        1,  1382400, 0x51be311f
+0,       1666,       1666,        1,  1382400, 0x51be311f
+0,       1667,       1667,        1,  1382400, 0x51be311f
+0,       1668,       1668,        1,  1382400, 0x51be311f
+0,       1669,       1669,        1,  1382400, 0x51be311f
+0,       1670,       1670,        1,  1382400, 0x51be311f
+0,       1671,       1671,        1,  1382400, 0x51be311f
+0,       1672,       1672,        1,  1382400, 0x51be311f
+0,       1673,       1673,        1,  1382400, 0x00000000
+0,       1674,       1674,        1,  1382400, 0x00000000
+0,       1675,       1675,        1,  1382400, 0x00000000
+0,       1676,       1676,        1,  1382400, 0x00000000
+0,       1677,       1677,        1,  1382400, 0x00000000
+0,       1678,       1678,        1,  1382400, 0x00000000
+0,       1679,       1679,        1,  1382400, 0x00000000
+0,       1680,       1680,        1,  1382400, 0x00000000
+0,       1681,       1681,        1,  1382400, 0x00000000
+0,       1682,       1682,        1,  1382400, 0x00000000
+0,       1683,       1683,        1,  1382400, 0x00000000
+0,       1684,       1684,        1,  1382400, 0x00000000
+0,       1685,       1685,        1,  1382400, 0x00000000
+0,       1686,       1686,        1,  1382400, 0x00000000
+0,       1687,       1687,        1,  1382400, 0x00000000
+0,       1688,       1688,        1,  1382400, 0x00000000
+0,       1689,       1689,        1,  1382400, 0x00000000
+0,       1690,       1690,        1,  1382400, 0x00000000
+0,       1691,       1691,        1,  1382400, 0x00000000
+0,       1692,       1692,        1,  1382400, 0x00000000
+0,       1693,       1693,        1,  1382400, 0x00000000
+0,       1694,       1694,        1,  1382400, 0x00000000
+0,       1695,       1695,        1,  1382400, 0x00000000
+0,       1696,       1696,        1,  1382400, 0x00000000
+0,       1697,       1697,        1,  1382400, 0x00000000
+0,       1698,       1698,        1,  1382400, 0x00000000
+0,       1699,       1699,        1,  1382400, 0x00000000
+0,       1700,       1700,        1,  1382400, 0x00000000
+0,       1701,       1701,        1,  1382400, 0x00000000
+0,       1702,       1702,        1,  1382400, 0x00000000
+0,       1703,       1703,        1,  1382400, 0x00000000
+0,       1704,       1704,        1,  1382400, 0x00000000
+0,       1705,       1705,        1,  1382400, 0x00000000
+0,       1706,       1706,        1,  1382400, 0x00000000
+0,       1707,       1707,        1,  1382400, 0x00000000
+0,       1708,       1708,        1,  1382400, 0x00000000
+0,       1709,       1709,        1,  1382400, 0x00000000
+0,       1710,       1710,        1,  1382400, 0x00000000
+0,       1711,       1711,        1,  1382400, 0x00000000
+0,       1713,       1713,        1,  1382400, 0x00a4f2a3
+0,       1713,       1713,        1,  1382400, 0x00a4f2a3
+0,       1714,       1714,        1,  1382400, 0x00a4f2a3
+0,       1715,       1715,        1,  1382400, 0x00a4f2a3
+0,       1716,       1716,        1,  1382400, 0x00a4f2a3
+0,       1717,       1717,        1,  1382400, 0x00a4f2a3
+0,       1718,       1718,        1,  1382400, 0x00a4f2a3
+0,       1719,       1719,        1,  1382400, 0x00a4f2a3
+0,       1720,       1720,        1,  1382400, 0x00a4f2a3
+0,       1721,       1721,        1,  1382400, 0x00a4f2a3
+0,       1722,       1722,        1,  1382400, 0x00000000
+0,       1723,       1723,        1,  1382400, 0x00000000
+0,       1724,       1724,        1,  1382400, 0x00000000
+0,       1725,       1725,        1,  1382400, 0x00000000
+0,       1726,       1726,        1,  1382400, 0x00000000
+0,       1727,       1727,        1,  1382400, 0x00000000
+0,       1728,       1728,        1,  1382400, 0x00000000
+0,       1729,       1729,        1,  1382400, 0x00000000
+0,       1730,       1730,        1,  1382400, 0x00000000
+0,       1731,       1731,        1,  1382400, 0x00000000
+0,       1732,       1732,        1,  1382400, 0x00000000
+0,       1734,       1734,        1,  1382400, 0x40a445e8
+0,       1734,       1734,        1,  1382400, 0x40a445e8
+0,       1735,       1735,        1,  1382400, 0x40a445e8
+0,       1736,       1736,        1,  1382400, 0x40a445e8
+0,       1737,       1737,        1,  1382400, 0x40a445e8
+0,       1738,       1738,        1,  1382400, 0x40a445e8
+0,       1739,       1739,        1,  1382400, 0x40a445e8
+0,       1740,       1740,        1,  1382400, 0x40a445e8
+0,       1741,       1741,        1,  1382400, 0x40a445e8
+0,       1742,       1742,        1,  1382400, 0x00000000
+0,       1743,       1743,        1,  1382400, 0x00000000
+0,       1744,       1744,        1,  1382400, 0x00000000
+0,       1745,       1745,        1,  1382400, 0x00000000
+0,       1746,       1746,        1,  1382400, 0x00000000
+0,       1747,       1747,        1,  1382400, 0x00000000
+0,       1748,       1748,        1,  1382400, 0x00000000
+0,       1749,       1749,        1,  1382400, 0x00000000
+0,       1750,       1750,        1,  1382400, 0x00000000
+0,       1751,       1751,        1,  1382400, 0x00000000
+0,       1752,       1752,        1,  1382400, 0x00000000
+0,       1753,       1753,        1,  1382400, 0x00000000
+0,       1754,       1754,        1,  1382400, 0x00000000
+0,       1755,       1755,        1,  1382400, 0x00000000
+0,       1756,       1756,        1,  1382400, 0x00000000
+0,       1757,       1757,        1,  1382400, 0x00000000
+0,       1758,       1758,        1,  1382400, 0x00000000
+0,       1759,       1759,        1,  1382400, 0x00000000
+0,       1760,       1760,        1,  1382400, 0x00000000
+0,       1761,       1761,        1,  1382400, 0x00000000
+0,       1762,       1762,        1,  1382400, 0x00000000
+0,       1763,       1763,        1,  1382400, 0x00000000
+0,       1764,       1764,        1,  1382400, 0x00000000
+0,       1765,       1765,        1,  1382400, 0x00000000
+0,       1766,       1766,        1,  1382400, 0x00000000
+0,       1767,       1767,        1,  1382400, 0x00000000
+0,       1768,       1768,        1,  1382400, 0x00000000
+0,       1769,       1769,        1,  1382400, 0x00000000
+0,       1770,       1770,        1,  1382400, 0x00000000
+0,       1771,       1771,        1,  1382400, 0x00000000
+0,       1772,       1772,        1,  1382400, 0x00000000
+0,       1773,       1773,        1,  1382400, 0x00000000
+0,       1774,       1774,        1,  1382400, 0x00000000
+0,       1775,       1775,        1,  1382400, 0x00000000
+0,       1776,       1776,        1,  1382400, 0x00000000
+0,       1777,       1777,        1,  1382400, 0x00000000
+0,       1778,       1778,        1,  1382400, 0x00000000
+0,       1779,       1779,        1,  1382400, 0x00000000
+0,       1780,       1780,        1,  1382400, 0x00000000
+0,       1781,       1781,        1,  1382400, 0x00000000
+0,       1782,       1782,        1,  1382400, 0x00000000
+0,       1783,       1783,        1,  1382400, 0x00000000
+0,       1784,       1784,        1,  1382400, 0x00000000
+0,       1785,       1785,        1,  1382400, 0x00000000
+0,       1786,       1786,        1,  1382400, 0x00000000
+0,       1788,       1788,        1,  1382400, 0x43ef5128
+0,       1788,       1788,        1,  1382400, 0x43ef5128
+0,       1789,       1789,        1,  1382400, 0x43ef5128
+0,       1790,       1790,        1,  1382400, 0x43ef5128
+0,       1791,       1791,        1,  1382400, 0x43ef5128
+0,       1792,       1792,        1,  1382400, 0x43ef5128
+0,       1793,       1793,        1,  1382400, 0x43ef5128
+0,       1794,       1794,        1,  1382400, 0x43ef5128
+0,       1795,       1795,        1,  1382400, 0x43ef5128
+0,       1796,       1796,        1,  1382400, 0x43ef5128
+0,       1797,       1797,        1,  1382400, 0x43ef5128
+0,       1798,       1798,        1,  1382400, 0x43ef5128
+0,       1799,       1799,        1,  1382400, 0x3c3e3819
+0,       1800,       1800,        1,  1382400, 0x3c3e3819
+0,       1801,       1801,        1,  1382400, 0x3c3e3819
+0,       1802,       1802,        1,  1382400, 0x3c3e3819
+0,       1803,       1803,        1,  1382400, 0x3c3e3819
+0,       1804,       1804,        1,  1382400, 0x3c3e3819
+0,       1805,       1805,        1,  1382400, 0x00000000
diff --git a/tests/ref/fate/sub2video_time_limited b/tests/ref/fate/sub2video_time_limited
index 9fb6fb06f9..2fbd91a7eb 100644
--- a/tests/ref/fate/sub2video_time_limited
+++ b/tests/ref/fate/sub2video_time_limited
@@ -1,8 +1,80 @@ 
-#tb 0: 1/25
+#tb 0: 1/5
 #media_type 0: video
 #codec_id 0: rawvideo
 #dimensions 0: 1920x1080
-#sar 0: 0/1
-0,          2,          2,        1,  8294400, 0x00000000
+#sar 0: 1/1
+0,          0,          0,        1,  8294400, 0xa87c518f
+0,          1,          1,        1,  8294400, 0xa87c518f
 0,          2,          2,        1,  8294400, 0xa87c518f
+0,          3,          3,        1,  8294400, 0xa87c518f
+0,          4,          4,        1,  8294400, 0xa87c518f
+0,          5,          5,        1,  8294400, 0xa87c518f
+0,          6,          6,        1,  8294400, 0xa87c518f
+0,          7,          7,        1,  8294400, 0xa87c518f
+0,          8,          8,        1,  8294400, 0xa87c518f
+0,          9,          9,        1,  8294400, 0xa87c518f
 0,         10,         10,        1,  8294400, 0xa87c518f
+0,         11,         11,        1,  8294400, 0xa87c518f
+0,         12,         12,        1,  8294400, 0xa87c518f
+0,         13,         13,        1,  8294400, 0xa87c518f
+0,         14,         14,        1,  8294400, 0xa87c518f
+0,         15,         15,        1,  8294400, 0xa87c518f
+0,         16,         16,        1,  8294400, 0xa87c518f
+0,         17,         17,        1,  8294400, 0xa87c518f
+0,         18,         18,        1,  8294400, 0xa87c518f
+0,         19,         19,        1,  8294400, 0xa87c518f
+0,         20,         20,        1,  8294400, 0xa87c518f
+0,         21,         21,        1,  8294400, 0xa87c518f
+0,         22,         22,        1,  8294400, 0xa87c518f
+0,         23,         23,        1,  8294400, 0xa87c518f
+0,         24,         24,        1,  8294400, 0xa87c518f
+0,         25,         25,        1,  8294400, 0xa87c518f
+0,         26,         26,        1,  8294400, 0xa87c518f
+0,         27,         27,        1,  8294400, 0xa87c518f
+0,         28,         28,        1,  8294400, 0xa87c518f
+0,         29,         29,        1,  8294400, 0xa87c518f
+0,         30,         30,        1,  8294400, 0xa87c518f
+0,         31,         31,        1,  8294400, 0xa87c518f
+0,         32,         32,        1,  8294400, 0xa87c518f
+0,         33,         33,        1,  8294400, 0xa87c518f
+0,         34,         34,        1,  8294400, 0xa87c518f
+0,         35,         35,        1,  8294400, 0xa87c518f
+0,         36,         36,        1,  8294400, 0xa87c518f
+0,         37,         37,        1,  8294400, 0xa87c518f
+0,         38,         38,        1,  8294400, 0xa87c518f
+0,         39,         39,        1,  8294400, 0xa87c518f
+0,         40,         40,        1,  8294400, 0xa87c518f
+0,         41,         41,        1,  8294400, 0xa87c518f
+0,         42,         42,        1,  8294400, 0xa87c518f
+0,         43,         43,        1,  8294400, 0xa87c518f
+0,         44,         44,        1,  8294400, 0xa87c518f
+0,         45,         45,        1,  8294400, 0xa87c518f
+0,         46,         46,        1,  8294400, 0xa87c518f
+0,         47,         47,        1,  8294400, 0xa87c518f
+0,         48,         48,        1,  8294400, 0xa87c518f
+0,         49,         49,        1,  8294400, 0xa87c518f
+0,         50,         50,        1,  8294400, 0xa87c518f
+0,         51,         51,        1,  8294400, 0xa87c518f
+0,         52,         52,        1,  8294400, 0xa87c518f
+0,         53,         53,        1,  8294400, 0xa87c518f
+0,         54,         54,        1,  8294400, 0xa87c518f
+0,         55,         55,        1,  8294400, 0xa87c518f
+0,         56,         56,        1,  8294400, 0xa87c518f
+0,         57,         57,        1,  8294400, 0xa87c518f
+0,         58,         58,        1,  8294400, 0xa87c518f
+0,         59,         59,        1,  8294400, 0xa87c518f
+0,         60,         60,        1,  8294400, 0xa87c518f
+0,         61,         61,        1,  8294400, 0xa87c518f
+0,         62,         62,        1,  8294400, 0xa87c518f
+0,         63,         63,        1,  8294400, 0xa87c518f
+0,         64,         64,        1,  8294400, 0xa87c518f
+0,         65,         65,        1,  8294400, 0xa87c518f
+0,         66,         66,        1,  8294400, 0xa87c518f
+0,         67,         67,        1,  8294400, 0xa87c518f
+0,         68,         68,        1,  8294400, 0xa87c518f
+0,         69,         69,        1,  8294400, 0xa87c518f
+0,         70,         70,        1,  8294400, 0xa87c518f
+0,         71,         71,        1,  8294400, 0xa87c518f
+0,         72,         72,        1,  8294400, 0xa87c518f
+0,         73,         73,        1,  8294400, 0xa87c518f
+0,         74,         74,        1,  8294400, 0xa87c518f