]> git.sesse.net Git - ffmpeg/blob - libavformat/movenc-test.c
Merge commit '1077d8c8455b27688de37cd04f8cc253fb37944d'
[ffmpeg] / libavformat / movenc-test.c
1 /*
2  * Copyright (c) 2015 Martin Storsjo
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 #include "config.h"
22
23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/mathematics.h"
25 #include "libavutil/md5.h"
26
27 #include "avformat.h"
28
29 #if HAVE_UNISTD_H
30 #include <unistd.h>
31 #endif
32
33 #if !HAVE_GETOPT
34 #include "compat/getopt.c"
35 #endif
36
37 #define HASH_SIZE 16
38
39 static const uint8_t h264_extradata[] = {
40     0x01, 0x4d, 0x40, 0x1e, 0xff, 0xe1, 0x00, 0x02, 0x67, 0x4d, 0x01, 0x00, 0x02, 0x68, 0xef
41 };
42 static const uint8_t aac_extradata[] = {
43     0x12, 0x10
44 };
45
46
47 const char *format = "mp4";
48 AVFormatContext *ctx;
49 uint8_t iobuf[32768];
50 AVDictionary *opts;
51
52 int write_file;
53 const char *cur_name;
54 FILE* out;
55 int out_size;
56 struct AVMD5* md5;
57 uint8_t hash[HASH_SIZE];
58
59 AVStream *video_st, *audio_st;
60 int64_t audio_dts, video_dts;
61
62 int bframes;
63 int64_t duration;
64 int64_t audio_duration;
65 int frames;
66 int gop_size;
67 int64_t next_p_pts;
68 enum AVPictureType last_picture;
69 int skip_write;
70 int skip_write_audio;
71 int clear_duration;
72
73 int num_warnings;
74
75 int check_faults;
76
77
78 static void count_warnings(void *avcl, int level, const char *fmt, va_list vl)
79 {
80     if (level == AV_LOG_WARNING)
81         num_warnings++;
82 }
83
84 static void init_count_warnings(void)
85 {
86     av_log_set_callback(count_warnings);
87     num_warnings = 0;
88 }
89
90 static void reset_count_warnings(void)
91 {
92     av_log_set_callback(av_log_default_callback);
93 }
94
95 static int io_write(void *opaque, uint8_t *buf, int size)
96 {
97     out_size += size;
98     av_md5_update(md5, buf, size);
99     if (out)
100         fwrite(buf, 1, size, out);
101     return size;
102 }
103
104 static void init_out(const char *name)
105 {
106     char buf[100];
107     cur_name = name;
108     snprintf(buf, sizeof(buf), "%s.%s", cur_name, format);
109
110     av_md5_init(md5);
111     if (write_file) {
112         out = fopen(buf, "wb");
113         if (!out)
114             perror(buf);
115     }
116     out_size = 0;
117 }
118
119 static void close_out(void)
120 {
121     int i;
122     av_md5_final(md5, hash);
123     for (i = 0; i < HASH_SIZE; i++)
124         printf("%02x", hash[i]);
125     printf(" %d %s\n", out_size, cur_name);
126     if (out)
127         fclose(out);
128     out = NULL;
129 }
130
131 static void check_func(int value, int line, const char *msg, ...)
132 {
133     if (!value) {
134         va_list ap;
135         va_start(ap, msg);
136         printf("%d: ", line);
137         vprintf(msg, ap);
138         printf("\n");
139         check_faults++;
140         va_end(ap);
141     }
142 }
143 #define check(value, ...) check_func(value, __LINE__, __VA_ARGS__)
144
145 static void init_fps(int bf, int audio_preroll, int fps)
146 {
147     AVStream *st;
148     ctx = avformat_alloc_context();
149     if (!ctx)
150         exit(1);
151     ctx->oformat = av_guess_format(format, NULL, NULL);
152     if (!ctx->oformat)
153         exit(1);
154     ctx->pb = avio_alloc_context(iobuf, sizeof(iobuf), AVIO_FLAG_WRITE, NULL, NULL, io_write, NULL);
155     if (!ctx->pb)
156         exit(1);
157     ctx->flags |= AVFMT_FLAG_BITEXACT;
158
159     st = avformat_new_stream(ctx, NULL);
160     if (!st)
161         exit(1);
162     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
163     st->codec->codec_id = AV_CODEC_ID_H264;
164     st->codec->width = 640;
165     st->codec->height = 480;
166     st->time_base.num = 1;
167     st->time_base.den = 30;
168     st->codec->extradata_size = sizeof(h264_extradata);
169     st->codec->extradata = av_mallocz(st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
170     if (!st->codec->extradata)
171         exit(1);
172     memcpy(st->codec->extradata, h264_extradata, sizeof(h264_extradata));
173     st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
174     video_st = st;
175
176     st = avformat_new_stream(ctx, NULL);
177     if (!st)
178         exit(1);
179     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
180     st->codec->codec_id = AV_CODEC_ID_AAC;
181     st->codec->sample_rate = 44100;
182     st->codec->channels = 2;
183     st->time_base.num = 1;
184     st->time_base.den = 44100;
185     st->codec->extradata_size = sizeof(aac_extradata);
186     st->codec->extradata = av_mallocz(st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
187     if (!st->codec->extradata)
188         exit(1);
189     memcpy(st->codec->extradata, aac_extradata, sizeof(aac_extradata));
190     st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
191     audio_st = st;
192
193     if (avformat_write_header(ctx, &opts) < 0)
194         exit(1);
195     av_dict_free(&opts);
196
197     frames = 0;
198     gop_size = 30;
199     duration = video_st->time_base.den / fps;
200     audio_duration = 1024LL * audio_st->time_base.den / audio_st->codec->sample_rate;
201     if (audio_preroll)
202         audio_preroll = 2048LL * audio_st->time_base.den / audio_st->codec->sample_rate;
203
204     bframes = bf;
205     video_dts = bframes ? -duration : 0;
206     audio_dts = -audio_preroll;
207 }
208
209 static void init(int bf, int audio_preroll)
210 {
211     init_fps(bf, audio_preroll, 30);
212 }
213
214 static void mux_frames(int n)
215 {
216     int end_frames = frames + n;
217     while (1) {
218         AVPacket pkt;
219         uint8_t pktdata[8] = { 0 };
220         av_init_packet(&pkt);
221
222         if (av_compare_ts(audio_dts, audio_st->time_base, video_dts, video_st->time_base) < 0) {
223             pkt.dts = pkt.pts = audio_dts;
224             pkt.stream_index = 1;
225             pkt.duration = audio_duration;
226             audio_dts += audio_duration;
227         } else {
228             if (frames == end_frames)
229                 break;
230             pkt.dts = video_dts;
231             pkt.stream_index = 0;
232             pkt.duration = duration;
233             if ((frames % gop_size) == 0) {
234                 pkt.flags |= AV_PKT_FLAG_KEY;
235                 last_picture = AV_PICTURE_TYPE_I;
236                 pkt.pts = pkt.dts + duration;
237                 video_dts = pkt.pts;
238             } else {
239                 if (last_picture == AV_PICTURE_TYPE_P) {
240                     last_picture = AV_PICTURE_TYPE_B;
241                     pkt.pts = pkt.dts;
242                     video_dts = next_p_pts;
243                 } else {
244                     last_picture = AV_PICTURE_TYPE_P;
245                     if (((frames + 1) % gop_size) == 0) {
246                         pkt.pts = pkt.dts + duration;
247                         video_dts = pkt.pts;
248                     } else {
249                         next_p_pts = pkt.pts = pkt.dts + 2 * duration;
250                         video_dts += duration;
251                     }
252                 }
253             }
254             if (!bframes)
255                 pkt.pts = pkt.dts;
256             frames++;
257         }
258
259         if (clear_duration)
260             pkt.duration = 0;
261         AV_WB32(pktdata + 4, pkt.pts);
262         pkt.data = pktdata;
263         pkt.size = 8;
264         if (skip_write)
265             continue;
266         if (skip_write_audio && pkt.stream_index == 1)
267             continue;
268         av_write_frame(ctx, &pkt);
269     }
270 }
271
272 static void mux_gops(int n)
273 {
274     mux_frames(gop_size * n);
275 }
276
277 static void skip_gops(int n)
278 {
279     skip_write = 1;
280     mux_gops(n);
281     skip_write = 0;
282 }
283
284 static void signal_init_ts(void)
285 {
286     AVPacket pkt;
287     av_init_packet(&pkt);
288     pkt.size = 0;
289     pkt.data = NULL;
290
291     pkt.stream_index = 0;
292     pkt.dts = video_dts;
293     pkt.pts = 0;
294     av_write_frame(ctx, &pkt);
295
296     pkt.stream_index = 1;
297     pkt.dts = pkt.pts = audio_dts;
298     av_write_frame(ctx, &pkt);
299 }
300
301 static void finish(void)
302 {
303     av_write_trailer(ctx);
304     av_free(ctx->pb);
305     avformat_free_context(ctx);
306     ctx = NULL;
307 }
308
309 static void help(void)
310 {
311     printf("movenc-test [-w]\n"
312            "-w          write output into files\n");
313 }
314
315 int main(int argc, char **argv)
316 {
317     int c;
318     uint8_t header[HASH_SIZE];
319     uint8_t content[HASH_SIZE];
320     int empty_moov_pos;
321     int prev_pos;
322
323     for (;;) {
324         c = getopt(argc, argv, "wh");
325         if (c == -1)
326             break;
327         switch (c) {
328         case 'w':
329             write_file = 1;
330             break;
331         default:
332         case 'h':
333             help();
334             return 0;
335         }
336     }
337
338     av_register_all();
339
340     md5 = av_md5_alloc();
341     if (!md5)
342         return 1;
343
344     // Write a fragmented file with an initial moov that actually contains some
345     // samples. One moov+mdat with 1 second of data and one moof+mdat with 1
346     // second of data.
347     init_out("non-empty-moov");
348     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
349     init(0, 0);
350     mux_gops(2);
351     finish();
352     close_out();
353
354     // Write a similar file, but with b-frames and audio preroll, handled
355     // via an edit list.
356     init_out("non-empty-moov-elst");
357     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
358     av_dict_set(&opts, "use_editlist", "1", 0);
359     init(1, 1);
360     mux_gops(2);
361     finish();
362     close_out();
363
364     // Use b-frames but no audio-preroll, but without an edit list.
365     // Due to avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO, the dts
366     // of the first audio packet is > 0, but it is set to zero since edit
367     // lists aren't used, increasing the duration of the first packet instead.
368     init_out("non-empty-moov-no-elst");
369     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
370     av_dict_set(&opts, "use_editlist", "0", 0);
371     init(1, 0);
372     mux_gops(2);
373     finish();
374     close_out();
375
376     format = "ismv";
377     // Write an ISMV, with b-frames and audio preroll.
378     init_out("ismv");
379     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
380     init(1, 1);
381     mux_gops(2);
382     finish();
383     close_out();
384     format = "mp4";
385
386     // An initial moov that doesn't contain any samples, followed by two
387     // moof+mdat pairs.
388     init_out("empty-moov");
389     av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
390     av_dict_set(&opts, "use_editlist", "0", 0);
391     init(0, 0);
392     mux_gops(2);
393     finish();
394     close_out();
395     memcpy(content, hash, HASH_SIZE);
396
397     // Similar to the previous one, but with input that doesn't start at
398     // pts/dts 0. avoid_negative_ts behaves in the same way as
399     // in non-empty-moov-no-elst above.
400     init_out("empty-moov-no-elst");
401     av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
402     init(1, 0);
403     mux_gops(2);
404     finish();
405     close_out();
406
407     // Same as the previous one, but disable avoid_negative_ts (which
408     // would require using an edit list, but with empty_moov, one can't
409     // write a sensible edit list, when the start timestamps aren't known).
410     // This should trigger a warning - we check that the warning is produced.
411     init_count_warnings();
412     init_out("empty-moov-no-elst-no-adjust");
413     av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
414     av_dict_set(&opts, "avoid_negative_ts", "0", 0);
415     init(1, 0);
416     mux_gops(2);
417     finish();
418     close_out();
419
420     reset_count_warnings();
421     check(num_warnings > 0, "No warnings printed for unhandled start offset");
422
423     // Verify that delay_moov produces the same as empty_moov for
424     // simple input
425     init_out("delay-moov");
426     av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
427     av_dict_set(&opts, "use_editlist", "0", 0);
428     init(0, 0);
429     mux_gops(2);
430     finish();
431     close_out();
432     check(!memcmp(hash, content, HASH_SIZE), "delay_moov differs from empty_moov");
433
434     // Test writing content that requires an edit list using delay_moov
435     init_out("delay-moov-elst");
436     av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
437     init(1, 1);
438     mux_gops(2);
439     finish();
440     close_out();
441
442     // Test writing a file with one track lacking packets, with delay_moov.
443     skip_write_audio = 1;
444     init_out("delay-moov-empty-track");
445     av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
446     init(0, 0);
447     mux_gops(2);
448     // The automatic flushing shouldn't output anything, since we're still
449     // waiting for data for some tracks
450     check(out_size == 0, "delay_moov flushed prematurely");
451     // When closed (or manually flushed), all the written data should still
452     // be output.
453     finish();
454     close_out();
455     check(out_size > 0, "delay_moov didn't output anything");
456
457     // Check that manually flushing still outputs things as expected. This
458     // produces two fragments, while the one above produces only one.
459     init_out("delay-moov-empty-track-flush");
460     av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0);
461     init(0, 0);
462     mux_gops(1);
463     av_write_frame(ctx, NULL); // Force writing the moov
464     check(out_size > 0, "No moov written");
465     av_write_frame(ctx, NULL);
466     mux_gops(1);
467     av_write_frame(ctx, NULL);
468     finish();
469     close_out();
470
471     skip_write_audio = 0;
472
473
474
475     // Verify that the header written by delay_moov when manually flushed
476     // is identical to the one by empty_moov.
477     init_out("empty-moov-header");
478     av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
479     av_dict_set(&opts, "use_editlist", "0", 0);
480     init(0, 0);
481     close_out();
482     memcpy(header, hash, HASH_SIZE);
483     init_out("empty-moov-content");
484     mux_gops(2);
485     // Written 2 seconds of content, with an automatic flush after 1 second.
486     check(out_size > 0, "No automatic flush?");
487     empty_moov_pos = prev_pos = out_size;
488     // Manually flush the second fragment
489     av_write_frame(ctx, NULL);
490     check(out_size > prev_pos, "No second fragment flushed?");
491     prev_pos = out_size;
492     // Check that an extra flush doesn't output any more data
493     av_write_frame(ctx, NULL);
494     check(out_size == prev_pos, "More data written?");
495     close_out();
496     memcpy(content, hash, HASH_SIZE);
497     // Ignore the trailer written here
498     finish();
499
500     init_out("delay-moov-header");
501     av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0);
502     av_dict_set(&opts, "use_editlist", "0", 0);
503     init(0, 0);
504     check(out_size == 0, "Output written during init with delay_moov");
505     mux_gops(1); // Write 1 second of content
506     av_write_frame(ctx, NULL); // Force writing the moov
507     close_out();
508     check(!memcmp(hash, header, HASH_SIZE), "delay_moov header differs from empty_moov");
509     init_out("delay-moov-content");
510     av_write_frame(ctx, NULL); // Flush the first fragment
511     check(out_size == empty_moov_pos, "Manually flushed content differs from automatically flushed, %d vs %d", out_size, empty_moov_pos);
512     mux_gops(1); // Write the rest of the content
513     av_write_frame(ctx, NULL); // Flush the second fragment
514     close_out();
515     check(!memcmp(hash, content, HASH_SIZE), "delay_moov content differs from empty_moov");
516     finish();
517
518
519     // Verify that we can produce an identical second fragment without
520     // writing the first one. First write the reference fragments that
521     // we want to reproduce.
522     av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash", 0);
523     init(0, 0);
524     mux_gops(1);
525     av_write_frame(ctx, NULL); // Output the first fragment
526     init_out("empty-moov-second-frag");
527     mux_gops(1);
528     av_write_frame(ctx, NULL); // Output the second fragment
529     close_out();
530     memcpy(content, hash, HASH_SIZE);
531     finish();
532
533     // Produce the same second fragment without actually writing the first
534     // one before.
535     av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash+frag_discont", 0);
536     av_dict_set(&opts, "fragment_index", "2", 0);
537     av_dict_set(&opts, "avoid_negative_ts", "0", 0);
538     av_dict_set(&opts, "use_editlist", "0", 0);
539     init(0, 0);
540     skip_gops(1);
541     init_out("empty-moov-second-frag-discont");
542     mux_gops(1);
543     av_write_frame(ctx, NULL); // Output the second fragment
544     close_out();
545     check(!memcmp(hash, content, HASH_SIZE), "discontinuously written fragment differs");
546     finish();
547
548     // Produce the same thing by using delay_moov, which requires a slightly
549     // different call sequence.
550     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
551     av_dict_set(&opts, "fragment_index", "2", 0);
552     init(0, 0);
553     skip_gops(1);
554     mux_gops(1);
555     av_write_frame(ctx, NULL); // Output the moov
556     init_out("delay-moov-second-frag-discont");
557     av_write_frame(ctx, NULL); // Output the second fragment
558     close_out();
559     check(!memcmp(hash, content, HASH_SIZE), "discontinuously written fragment differs");
560     finish();
561
562
563     // Test discontinously written fragments with b-frames (where the
564     // assumption of starting at pts=0 works) but not with audio preroll
565     // (which can't be guessed).
566     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
567     init(1, 0);
568     mux_gops(1);
569     init_out("delay-moov-elst-init");
570     av_write_frame(ctx, NULL); // Output the moov
571     close_out();
572     memcpy(header, hash, HASH_SIZE);
573     av_write_frame(ctx, NULL); // Output the first fragment
574     init_out("delay-moov-elst-second-frag");
575     mux_gops(1);
576     av_write_frame(ctx, NULL); // Output the second fragment
577     close_out();
578     memcpy(content, hash, HASH_SIZE);
579     finish();
580
581     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
582     av_dict_set(&opts, "fragment_index", "2", 0);
583     init(1, 0);
584     skip_gops(1);
585     mux_gops(1); // Write the second fragment
586     init_out("delay-moov-elst-init-discont");
587     av_write_frame(ctx, NULL); // Output the moov
588     close_out();
589     check(!memcmp(hash, header, HASH_SIZE), "discontinuously written header differs");
590     init_out("delay-moov-elst-second-frag-discont");
591     av_write_frame(ctx, NULL); // Output the second fragment
592     close_out();
593     check(!memcmp(hash, content, HASH_SIZE), "discontinuously written fragment differs");
594     finish();
595
596
597     // Test discontinously written fragments with b-frames and audio preroll,
598     // properly signaled.
599     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
600     init(1, 1);
601     mux_gops(1);
602     init_out("delay-moov-elst-signal-init");
603     av_write_frame(ctx, NULL); // Output the moov
604     close_out();
605     memcpy(header, hash, HASH_SIZE);
606     av_write_frame(ctx, NULL); // Output the first fragment
607     init_out("delay-moov-elst-signal-second-frag");
608     mux_gops(1);
609     av_write_frame(ctx, NULL); // Output the second fragment
610     close_out();
611     memcpy(content, hash, HASH_SIZE);
612     finish();
613
614     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
615     av_dict_set(&opts, "fragment_index", "2", 0);
616     init(1, 1);
617     signal_init_ts();
618     skip_gops(1);
619     mux_gops(1); // Write the second fragment
620     init_out("delay-moov-elst-signal-init-discont");
621     av_write_frame(ctx, NULL); // Output the moov
622     close_out();
623     check(!memcmp(hash, header, HASH_SIZE), "discontinuously written header differs");
624     init_out("delay-moov-elst-signal-second-frag-discont");
625     av_write_frame(ctx, NULL); // Output the second fragment
626     close_out();
627     check(!memcmp(hash, content, HASH_SIZE), "discontinuously written fragment differs");
628     finish();
629
630
631     // Test VFR content, with sidx atoms (which declare the pts duration
632     // of a fragment, forcing overriding the start pts of the next one).
633     // Here, the fragment duration in pts is significantly different from
634     // the duration in dts. The video stream starts at dts=-10,pts=0, and
635     // the second fragment starts at dts=155,pts=156. The trun duration sum
636     // of the first fragment is 165, which also is written as
637     // baseMediaDecodeTime in the tfdt in the second fragment. The sidx for
638     // the first fragment says earliest_presentation_time = 0 and
639     // subsegment_duration = 156, which also matches the sidx in the second
640     // fragment. For the audio stream, the pts and dts durations also don't
641     // match - the input stream starts at pts=-2048, but that part is excluded
642     // by the edit list.
643     init_out("vfr");
644     av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0);
645     init_fps(1, 1, 3);
646     mux_frames(gop_size/2);
647     duration /= 10;
648     mux_frames(gop_size/2);
649     mux_gops(1);
650     finish();
651     close_out();
652
653     // Test VFR content, with cleared duration fields. In these cases,
654     // the muxer must guess the duration of the last packet of each
655     // fragment. As long as the framerate doesn't vary (too much) at the
656     // fragment edge, it works just fine. Additionally, when automatically
657     // cutting fragments, the muxer already know the timestamps of the next
658     // packet for one stream (in most cases the video stream), avoiding
659     // having to use guesses for that one.
660     init_count_warnings();
661     clear_duration = 1;
662     init_out("vfr-noduration");
663     av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0);
664     init_fps(1, 1, 3);
665     mux_frames(gop_size/2);
666     duration /= 10;
667     mux_frames(gop_size/2);
668     mux_gops(1);
669     finish();
670     close_out();
671     clear_duration = 0;
672     reset_count_warnings();
673     check(num_warnings > 0, "No warnings printed for filled in durations");
674
675     av_free(md5);
676
677     return check_faults > 0 ? 1 : 0;
678 }