Browse code

Merge remote-tracking branch 'qatar/master'

* qatar/master: (29 commits)
cabac: Move code only used within the CABAC test program into the test program.
vp56: Drop unnecessary cabac.h #include.
h264-test: Initialize AVCodecContext.av_class.
build: Skip compiling network.h and rtsp.h if networking is not enabled.
cosmetics: drop some pointless parentheses
Disable annoying warning without changing behavior
faq: Solutions for common problems with sample paths when running FATE.
avcodec: attempt to clarify the CODEC_CAP_DELAY documentation
avcodec: fix avcodec_encode_audio() documentation.
FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside.
vqf: recognize more metadata chunks
FATE test: BMV demuxer and associated video and audio decoders.
FATE: indeo4 video decoder test.
FATE: update xxan-wc4 test to a sample with more code coverage.
Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream.
g722enc: validate AVCodecContext.trellis
g722enc: set frame_size, and also handle an odd number of input samples
g722enc: split encoding into separate functions for trellis vs. no trellis
mpegaudiodec: Use clearer pointer math
tta: Fix returned error code at EOF
...

Conflicts:
libavcodec/h264.c
libavcodec/indeo3.c
libavcodec/interplayvideo.c
libavcodec/ivi_common.c
libavcodec/libxvidff.c
libavcodec/mpegvideo.c
libavcodec/ppc/mpegvideo_altivec.c
libavcodec/tta.c
libavcodec/utils.c
libavfilter/vsrc_buffer.c
libavformat/Makefile
tests/fate/indeo.mak
tests/ref/acodec/g722

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2012/01/08 09:29:15
Showing 48 changed files
... ...
@@ -397,4 +397,16 @@ wrong if it is larger than the average!
397 397
 For example, if you have mixed 25 and 30 fps content, then r_frame_rate
398 398
 will be 150.
399 399
 
400
+@section Why is @code{make fate} not running all tests?
401
+
402
+Make sure you have the fate-suite samples and the @code{SAMPLES} Make variable
403
+or @code{FATE_SAMPLES} environment variable or the @code{--samples}
404
+@command{configure} option is set to the right path.
405
+
406
+@section Why is @code{make fate} not finding the samples?
407
+
408
+Do you happen to have a @code{~} character in the samples path to indicate a
409
+home directory? The value is used in ways where the shell cannot expand it,
410
+causing FATE to not find files. Just replace @code{~} by the full path.
411
+
400 412
 @bye
... ...
@@ -223,7 +223,7 @@ static int ac3_parse_header(AC3DecodeContext *s)
223 223
     int i;
224 224
 
225 225
     /* read the rest of the bsi. read twice for dual mono mode. */
226
-    i = !(s->channel_mode);
226
+    i = !s->channel_mode;
227 227
     do {
228 228
         skip_bits(gbc, 5); // skip dialog normalization
229 229
         if (get_bits1(gbc))
... ...
@@ -792,7 +792,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
792 792
     }
793 793
 
794 794
     /* dynamic range */
795
-    i = !(s->channel_mode);
795
+    i = !s->channel_mode;
796 796
     do {
797 797
         if (get_bits1(gbc)) {
798 798
             s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)] - 1.0) *
... ...
@@ -745,10 +745,22 @@ typedef struct RcOverride{
745 745
 /* Codec can export data for HW decoding (XvMC). */
746 746
 #define CODEC_CAP_HWACCEL         0x0010
747 747
 /**
748
- * Codec has a nonzero delay and needs to be fed with avpkt->data=NULL,
748
+ * Encoder or decoder requires flushing with NULL input at the end in order to
749
+ * give the complete and correct output.
750
+ *
751
+ * NOTE: If this flag is not set, the codec is guaranteed to never be fed with
752
+ *       with NULL data. The user can still send NULL data to the public encode
753
+ *       or decode function, but libavcodec will not pass it along to the codec
754
+ *       unless this flag is set.
755
+ *
756
+ * Decoders:
757
+ * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,
749 758
  * avpkt->size=0 at the end to get the delayed data until the decoder no longer
750
- * returns frames. If this is not set, the codec is guaranteed to never be fed
751
- * with NULL data.
759
+ * returns frames.
760
+ *
761
+ * Encoders:
762
+ * The encoder needs to be fed with NULL data at the end of encoding until the
763
+ * encoder no longer returns data.
752 764
  */
753 765
 #define CODEC_CAP_DELAY           0x0020
754 766
 /**
... ...
@@ -4318,9 +4330,9 @@ void avsubtitle_free(AVSubtitle *sub);
4318 4318
  * Encode an audio frame from samples into buf.
4319 4319
  *
4320 4320
  * @note The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large.
4321
- * However, for PCM audio the user will know how much space is needed
4322
- * because it depends on the value passed in buf_size as described
4323
- * below. In that case a lower value can be used.
4321
+ * However, for codecs with avctx->frame_size equal to 0 (e.g. PCM) the user
4322
+ * will know how much space is needed because it depends on the value passed
4323
+ * in buf_size as described below. In that case a lower value can be used.
4324 4324
  *
4325 4325
  * @param avctx the codec context
4326 4326
  * @param[out] buf the output buffer
... ...
@@ -4328,8 +4340,11 @@ void avsubtitle_free(AVSubtitle *sub);
4328 4328
  * @param[in] samples the input buffer containing the samples
4329 4329
  * The number of samples read from this buffer is frame_size*channels,
4330 4330
  * both of which are defined in avctx.
4331
- * For PCM audio the number of samples read from samples is equal to
4332
- * buf_size * input_sample_size / output_sample_size.
4331
+ * For codecs which have avctx->frame_size equal to 0 (e.g. PCM) the number of
4332
+ * samples read from samples is equal to:
4333
+ * buf_size * 8 / (avctx->channels * av_get_bits_per_sample(avctx->codec_id))
4334
+ * This also implies that av_get_bits_per_sample() must not return 0 for these
4335
+ * codecs.
4333 4336
  * @return On error a negative value is returned, on success zero or the number
4334 4337
  * of bytes used to encode the data read from the input buffer.
4335 4338
  */
... ...
@@ -166,6 +166,31 @@ void ff_init_cabac_states(CABACContext *c){
166 166
 #include "avcodec.h"
167 167
 #include "cabac.h"
168 168
 
169
+static inline void put_cabac_bit(CABACContext *c, int b){
170
+    put_bits(&c->pb, 1, b);
171
+    for(;c->outstanding_count; c->outstanding_count--){
172
+        put_bits(&c->pb, 1, 1-b);
173
+    }
174
+}
175
+
176
+static inline void renorm_cabac_encoder(CABACContext *c){
177
+    while(c->range < 0x100){
178
+        //FIXME optimize
179
+        if(c->low<0x100){
180
+            put_cabac_bit(c, 0);
181
+        }else if(c->low<0x200){
182
+            c->outstanding_count++;
183
+            c->low -= 0x100;
184
+        }else{
185
+            put_cabac_bit(c, 1);
186
+            c->low -= 0x200;
187
+        }
188
+
189
+        c->range+= c->range;
190
+        c->low += c->low;
191
+    }
192
+}
193
+
169 194
 static void put_cabac(CABACContext *c, uint8_t * const state, int bit){
170 195
     int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state];
171 196
 
... ...
@@ -62,31 +62,6 @@ void ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);
62 62
 void ff_init_cabac_states(CABACContext *c);
63 63
 
64 64
 
65
-static inline void put_cabac_bit(CABACContext *c, int b){
66
-    put_bits(&c->pb, 1, b);
67
-    for(;c->outstanding_count; c->outstanding_count--){
68
-        put_bits(&c->pb, 1, 1-b);
69
-    }
70
-}
71
-
72
-static inline void renorm_cabac_encoder(CABACContext *c){
73
-    while(c->range < 0x100){
74
-        //FIXME optimize
75
-        if(c->low<0x100){
76
-            put_cabac_bit(c, 0);
77
-        }else if(c->low<0x200){
78
-            c->outstanding_count++;
79
-            c->low -= 0x100;
80
-        }else{
81
-            put_cabac_bit(c, 1);
82
-            c->low -= 0x200;
83
-        }
84
-
85
-        c->range+= c->range;
86
-        c->low += c->low;
87
-    }
88
-}
89
-
90 65
 static void refill(CABACContext *c){
91 66
 #if CABAC_BITS == 16
92 67
         c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1);
... ...
@@ -658,8 +658,8 @@ void ff_cavs_init_top_lines(AVSContext *h) {
658 658
     h->top_mv[1]    = av_malloc((h->mb_width*2+1)*sizeof(cavs_vector));
659 659
     h->top_pred_Y   = av_malloc( h->mb_width*2*sizeof(*h->top_pred_Y));
660 660
     h->top_border_y = av_malloc((h->mb_width+1)*16);
661
-    h->top_border_u = av_malloc((h->mb_width)*10);
662
-    h->top_border_v = av_malloc((h->mb_width)*10);
661
+    h->top_border_u = av_malloc( h->mb_width * 10);
662
+    h->top_border_v = av_malloc( h->mb_width * 10);
663 663
 
664 664
     /* alloc space for co-located MVs and types */
665 665
     h->col_mv       = av_malloc( h->mb_width*h->mb_height*4*sizeof(cavs_vector));
... ...
@@ -491,7 +491,7 @@ static int decode_pic(AVSContext *h) {
491 491
             skip_bits(&s->gb,24);//time_code
492 492
         /* old sample clips were all progressive and no low_delay,
493 493
            bump stream revision if detected otherwise */
494
-        if((s->low_delay) || !(show_bits(&s->gb,9) & 1))
494
+        if (s->low_delay || !(show_bits(&s->gb,9) & 1))
495 495
             h->stream_revision = 1;
496 496
         /* similarly test top_field_first and repeat_first_field */
497 497
         else if(show_bits(&s->gb,11) & 3)
... ...
@@ -109,8 +109,8 @@ static void put_dc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t
109 109
     for(y=0; y<8; y++){
110 110
         int x;
111 111
         for(x=0; x<8; x++){
112
-            dest_cb[x + y*(s->uvlinesize)]= dcu/8;
113
-            dest_cr[x + y*(s->uvlinesize)]= dcv/8;
112
+            dest_cb[x + y * s->uvlinesize] = dcu / 8;
113
+            dest_cr[x + y * s->uvlinesize] = dcv / 8;
114 114
         }
115 115
     }
116 116
 }
... ...
@@ -1120,8 +1120,8 @@ void ff_er_frame_end(MpegEncContext *s){
1120 1120
             for(y=0; y<8; y++){
1121 1121
                 int x;
1122 1122
                 for(x=0; x<8; x++){
1123
-                    dcu+=dest_cb[x + y*(s->uvlinesize)];
1124
-                    dcv+=dest_cr[x + y*(s->uvlinesize)];
1123
+                    dcu += dest_cb[x + y * s->uvlinesize];
1124
+                    dcv += dest_cr[x + y * s->uvlinesize];
1125 1125
                 }
1126 1126
             }
1127 1127
             s->dc_val[1][mb_x + mb_y*s->mb_stride]= (dcu+4)>>3;
... ...
@@ -32,6 +32,15 @@
32 32
 
33 33
 #define FREEZE_INTERVAL 128
34 34
 
35
+/* This is an arbitrary value. Allowing insanely large values leads to strange
36
+   problems, so we limit it to a reasonable value */
37
+#define MAX_FRAME_SIZE 32768
38
+
39
+/* We clip the value of avctx->trellis to prevent data type overflows and
40
+   undefined behavior. Using larger values is insanely slow anyway. */
41
+#define MIN_TRELLIS 0
42
+#define MAX_TRELLIS 16
43
+
35 44
 static av_cold int g722_encode_init(AVCodecContext * avctx)
36 45
 {
37 46
     G722Context *c = avctx->priv_data;
... ...
@@ -56,6 +65,40 @@ static av_cold int g722_encode_init(AVCodecContext * avctx)
56 56
         }
57 57
     }
58 58
 
59
+    if (avctx->frame_size) {
60
+        /* validate frame size */
61
+        if (avctx->frame_size & 1 || avctx->frame_size > MAX_FRAME_SIZE) {
62
+            int new_frame_size;
63
+
64
+            if (avctx->frame_size == 1)
65
+                new_frame_size = 2;
66
+            else if (avctx->frame_size > MAX_FRAME_SIZE)
67
+                new_frame_size = MAX_FRAME_SIZE;
68
+            else
69
+                new_frame_size = avctx->frame_size - 1;
70
+
71
+            av_log(avctx, AV_LOG_WARNING, "Requested frame size is not "
72
+                   "allowed. Using %d instead of %d\n", new_frame_size,
73
+                   avctx->frame_size);
74
+            avctx->frame_size = new_frame_size;
75
+        }
76
+    } else {
77
+        /* This is arbitrary. We use 320 because it's 20ms @ 16kHz, which is
78
+           a common packet size for VoIP applications */
79
+        avctx->frame_size = 320;
80
+    }
81
+
82
+    if (avctx->trellis) {
83
+        /* validate trellis */
84
+        if (avctx->trellis < MIN_TRELLIS || avctx->trellis > MAX_TRELLIS) {
85
+            int new_trellis = av_clip(avctx->trellis, MIN_TRELLIS, MAX_TRELLIS);
86
+            av_log(avctx, AV_LOG_WARNING, "Requested trellis value is not "
87
+                   "allowed. Using %d instead of %d\n", new_trellis,
88
+                   avctx->trellis);
89
+            avctx->trellis = new_trellis;
90
+        }
91
+    }
92
+
59 93
     return 0;
60 94
 }
61 95
 
... ...
@@ -117,13 +160,12 @@ static inline int encode_low(const struct G722Band* state, int xlow)
117 117
     return (diff < 0 ? (i < 2 ? 63 : 33) : 61) - i;
118 118
 }
119 119
 
120
-static int g722_encode_trellis(AVCodecContext *avctx,
121
-                               uint8_t *dst, int buf_size, void *data)
120
+static void g722_encode_trellis(G722Context *c, int trellis,
121
+                                uint8_t *dst, int nb_samples,
122
+                                const int16_t *samples)
122 123
 {
123
-    G722Context *c = avctx->priv_data;
124
-    const int16_t *samples = data;
125 124
     int i, j, k;
126
-    int frontier = 1 << avctx->trellis;
125
+    int frontier = 1 << trellis;
127 126
     struct TrellisNode **nodes[2];
128 127
     struct TrellisNode **nodes_next[2];
129 128
     int pathn[2] = {0, 0}, froze = -1;
... ...
@@ -139,7 +181,7 @@ static int g722_encode_trellis(AVCodecContext *avctx,
139 139
         nodes[i][0]->state = c->band[i];
140 140
     }
141 141
 
142
-    for (i = 0; i < buf_size; i++) {
142
+    for (i = 0; i < nb_samples >> 1; i++) {
143 143
         int xlow, xhigh;
144 144
         struct TrellisNode *next[2];
145 145
         int heap_pos[2] = {0, 0};
... ...
@@ -271,8 +313,28 @@ static int g722_encode_trellis(AVCodecContext *avctx,
271 271
     }
272 272
     c->band[0] = nodes[0][0]->state;
273 273
     c->band[1] = nodes[1][0]->state;
274
+}
275
+
276
+static av_always_inline void encode_byte(G722Context *c, uint8_t *dst,
277
+                                         const int16_t *samples)
278
+{
279
+    int xlow, xhigh, ilow, ihigh;
280
+    filter_samples(c, samples, &xlow, &xhigh);
281
+    ihigh = encode_high(&c->band[1], xhigh);
282
+    ilow  = encode_low (&c->band[0], xlow);
283
+    ff_g722_update_high_predictor(&c->band[1], c->band[1].scale_factor *
284
+                                ff_g722_high_inv_quant[ihigh] >> 10, ihigh);
285
+    ff_g722_update_low_predictor(&c->band[0], ilow >> 2);
286
+    *dst = ihigh << 6 | ilow;
287
+}
274 288
 
275
-    return i;
289
+static void g722_encode_no_trellis(G722Context *c,
290
+                                   uint8_t *dst, int nb_samples,
291
+                                   const int16_t *samples)
292
+{
293
+    int i;
294
+    for (i = 0; i < nb_samples; i += 2)
295
+        encode_byte(c, dst++, &samples[i]);
276 296
 }
277 297
 
278 298
 static int g722_encode_frame(AVCodecContext *avctx,
... ...
@@ -280,22 +342,22 @@ static int g722_encode_frame(AVCodecContext *avctx,
280 280
 {
281 281
     G722Context *c = avctx->priv_data;
282 282
     const int16_t *samples = data;
283
-    int i;
283
+    int nb_samples;
284 284
 
285
-    if (avctx->trellis)
286
-        return g722_encode_trellis(avctx, dst, buf_size, data);
285
+    nb_samples = avctx->frame_size - (avctx->frame_size & 1);
287 286
 
288
-    for (i = 0; i < buf_size; i++) {
289
-        int xlow, xhigh, ihigh, ilow;
290
-        filter_samples(c, &samples[2*i], &xlow, &xhigh);
291
-        ihigh = encode_high(&c->band[1], xhigh);
292
-        ilow  = encode_low(&c->band[0], xlow);
293
-        ff_g722_update_high_predictor(&c->band[1], c->band[1].scale_factor *
294
-                                      ff_g722_high_inv_quant[ihigh] >> 10, ihigh);
295
-        ff_g722_update_low_predictor(&c->band[0], ilow >> 2);
296
-        *dst++ = ihigh << 6 | ilow;
287
+    if (avctx->trellis)
288
+        g722_encode_trellis(c, avctx->trellis, dst, nb_samples, samples);
289
+    else
290
+        g722_encode_no_trellis(c, dst, nb_samples, samples);
291
+
292
+    /* handle last frame with odd frame_size */
293
+    if (nb_samples < avctx->frame_size) {
294
+        int16_t last_samples[2] = { samples[nb_samples], samples[nb_samples] };
295
+        encode_byte(c, &dst[nb_samples >> 1], last_samples);
297 296
     }
298
-    return i;
297
+
298
+    return (avctx->frame_size + 1) >> 1;
299 299
 }
300 300
 
301 301
 AVCodec ff_adpcm_g722_encoder = {
... ...
@@ -306,6 +368,7 @@ AVCodec ff_adpcm_g722_encoder = {
306 306
     .init           = g722_encode_init,
307 307
     .close          = g722_encode_close,
308 308
     .encode         = g722_encode_frame,
309
+    .capabilities   = CODEC_CAP_SMALL_LAST_FRAME,
309 310
     .long_name      = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
310 311
     .sample_fmts    = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
311 312
 };
... ...
@@ -4170,7 +4170,6 @@ int main(void){
4170 4170
     uint8_t temp[SIZE];
4171 4171
     PutBitContext pb;
4172 4172
     GetBitContext gb;
4173
-//    int int_temp[10000];
4174 4173
     DSPContext dsp;
4175 4174
     AVCodecContext avctx;
4176 4175
 
... ...
@@ -89,6 +89,7 @@ typedef struct Indeo3DecodeContext {
89 89
     const uint8_t   *next_cell_data;
90 90
     const uint8_t   *last_byte;
91 91
     const int8_t    *mc_vectors;
92
+    unsigned        num_vectors;    ///< number of motion vectors in mc_vectors
92 93
 
93 94
     int16_t         width, height;
94 95
     uint32_t        frame_num;      ///< current frame number (zero-based)
... ...
@@ -767,11 +768,17 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
767 767
             break;
768 768
         case INTER_DATA:
769 769
             if (!curr_cell.tree) { /* MC tree INTER code */
770
+                unsigned mv_idx;
770 771
                 /* get motion vector index and setup the pointer to the mv set */
771 772
                 if (!ctx->need_resync)
772 773
                     ctx->next_cell_data = &ctx->gb.buffer[(get_bits_count(&ctx->gb) + 7) >> 3];
773 774
                 if(ctx->mc_vectors)
774
-                    curr_cell.mv_ptr = &ctx->mc_vectors[*(ctx->next_cell_data++) << 1];
775
+                    mv_idx = *(ctx->next_cell_data++) << 1;
776
+                if (mv_idx >= ctx->num_vectors) {
777
+                    av_log(avctx, AV_LOG_ERROR, "motion vector index out of range\n");
778
+                    return AVERROR_INVALIDDATA;
779
+                }
780
+                curr_cell.mv_ptr = &ctx->mc_vectors[mv_idx];
775 781
                 curr_cell.tree   = 1; /* enter the VQ tree */
776 782
                 UPDATE_BITPOS(8);
777 783
             } else { /* VQ tree DATA code */
... ...
@@ -801,19 +808,24 @@ static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
801 801
                         int32_t strip_width)
802 802
 {
803 803
     Cell            curr_cell;
804
-    uint32_t        num_vectors;
804
+    unsigned        num_vectors;
805 805
 
806 806
     /* each plane data starts with mc_vector_count field, */
807 807
     /* an optional array of motion vectors followed by the vq data */
808 808
     num_vectors = bytestream_get_le32(&data);
809
-    if(num_vectors >= data_size/2)
809
+    if (num_vectors > 256) {
810
+        av_log(ctx->avctx, AV_LOG_ERROR,
811
+               "Read invalid number of motion vectors %d\n", num_vectors);
810 812
         return AVERROR_INVALIDDATA;
813
+    }
814
+    if (num_vectors * 2 >= data_size)
815
+        return AVERROR_INVALIDDATA;
816
+
817
+    ctx->num_vectors = num_vectors;
811 818
     ctx->mc_vectors  = num_vectors ? data : 0;
812
-    data     += num_vectors * 2;
813
-    data_size-= num_vectors * 2;
814 819
 
815 820
     /* init the bitreader */
816
-    init_get_bits(&ctx->gb, data, data_size << 3);
821
+    init_get_bits(&ctx->gb, &data[num_vectors * 2], (data_size - num_vectors * 2) << 3);
817 822
     ctx->skip_bits   = 0;
818 823
     ctx->need_resync = 0;
819 824
 
... ...
@@ -1019,12 +1019,10 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
1019 1019
 
1020 1020
     dsputil_init(&s->dsp, avctx);
1021 1021
 
1022
-    /* decoding map contains 4 bits of information per 8x8 block */
1023
-    s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
1024
-
1025 1022
     avcodec_get_frame_defaults(&s->second_last_frame);
1026 1023
     avcodec_get_frame_defaults(&s->last_frame);
1027 1024
     avcodec_get_frame_defaults(&s->current_frame);
1025
+
1028 1026
     s->current_frame.data[0] = s->last_frame.data[0] =
1029 1027
     s->second_last_frame.data[0] = NULL;
1030 1028
 
... ...
@@ -1039,6 +1037,9 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
1039 1039
     int buf_size = avpkt->size;
1040 1040
     IpvideoContext *s = avctx->priv_data;
1041 1041
 
1042
+    /* decoding map contains 4 bits of information per 8x8 block */
1043
+    s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
1044
+
1042 1045
     /* compressed buffer needs to be large enough to at least hold an entire
1043 1046
      * decoding map */
1044 1047
     if (buf_size < s->decoding_map_size)
... ...
@@ -1099,6 +1100,6 @@ AVCodec ff_interplay_video_decoder = {
1099 1099
     .init           = ipvideo_decode_init,
1100 1100
     .close          = ipvideo_decode_end,
1101 1101
     .decode         = ipvideo_decode_frame,
1102
-    .capabilities   = CODEC_CAP_DR1,
1102
+    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_PARAM_CHANGE,
1103 1103
     .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"),
1104 1104
 };
... ...
@@ -613,7 +613,7 @@ void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch)
613 613
     const int16_t   *src  = plane->bands[0].buf;
614 614
     uint32_t        pitch = plane->bands[0].pitch;
615 615
 
616
-    if(!src)
616
+    if (!src)
617 617
         return;
618 618
 
619 619
     for (y = 0; y < plane->height; y++) {
... ...
@@ -136,7 +136,7 @@ static av_cold int libdirac_encode_init(AVCodecContext *avccontext)
136 136
     preset = GetDiracVideoFormatPreset(avccontext);
137 137
 
138 138
     /* initialize the encoder context */
139
-    dirac_encoder_context_init(&(p_dirac_params->enc_ctx), preset);
139
+    dirac_encoder_context_init(&p_dirac_params->enc_ctx, preset);
140 140
 
141 141
     p_dirac_params->enc_ctx.src_params.chroma = GetDiracChromaFormat(avccontext->pix_fmt);
142 142
 
... ...
@@ -199,7 +199,7 @@ static av_cold int libdirac_encode_init(AVCodecContext *avccontext)
199 199
          * irrespective of the type of source material */
200 200
         p_dirac_params->enc_ctx.enc_params.picture_coding_mode = 1;
201 201
 
202
-    p_dirac_params->p_encoder = dirac_encoder_init(&(p_dirac_params->enc_ctx),
202
+    p_dirac_params->p_encoder = dirac_encoder_init(&p_dirac_params->enc_ctx,
203 203
                                                    verbose);
204 204
 
205 205
     if (!p_dirac_params->p_encoder) {
... ...
@@ -221,7 +221,7 @@ static void DiracFreeFrame(void *data)
221 221
 {
222 222
     DiracSchroEncodedFrame *enc_frame = data;
223 223
 
224
-    av_freep(&(enc_frame->p_encbuf));
224
+    av_freep(&enc_frame->p_encbuf);
225 225
     av_free(enc_frame);
226 226
 }
227 227
 
... ...
@@ -258,7 +258,7 @@ static void SchroedingerFreeFrame(void *data)
258 258
 {
259 259
     DiracSchroEncodedFrame *enc_frame = data;
260 260
 
261
-    av_freep(&(enc_frame->p_encbuf));
261
+    av_freep(&enc_frame->p_encbuf);
262 262
     av_free(enc_frame);
263 263
 }
264 264
 
... ...
@@ -232,7 +232,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)  {
232 232
         rc2pass2.version = XVID_VERSION;
233 233
         rc2pass2.bitrate = avctx->bit_rate;
234 234
 
235
-        fd = av_tempfile("xvidff.", &(x->twopassfile), 0, avctx);
235
+        fd = av_tempfile("xvidff.", &x->twopassfile, 0, avctx);
236 236
         if( fd == -1 ) {
237 237
             av_log(avctx, AV_LOG_ERROR,
238 238
                 "Xvid: Cannot write 2-pass pipe\n");
... ...
@@ -376,7 +376,7 @@ static int xvid_encode_frame(AVCodecContext *avctx,
376 376
     char *tmp;
377 377
     struct xvid_context *x = avctx->priv_data;
378 378
     AVFrame *picture = data;
379
-    AVFrame *p = &(x->encoded_picture);
379
+    AVFrame *p = &x->encoded_picture;
380 380
 
381 381
     xvid_enc_frame_t xvid_enc_frame;
382 382
     xvid_enc_stats_t xvid_enc_stats;
... ...
@@ -538,7 +538,7 @@ int xvid_strip_vol_header(AVCodecContext *avctx,
538 538
         }
539 539
         /* Less dangerous now, memmove properly copies the two
540 540
            chunks of overlapping data */
541
-        memmove(frame, &(frame[vo_len]), frame_len - vo_len);
541
+        memmove(frame, &frame[vo_len], frame_len - vo_len);
542 542
         return frame_len - vo_len;
543 543
     } else
544 544
         return frame_len;
... ...
@@ -1273,7 +1273,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
1273 1273
 
1274 1274
         /* low_delay may be forced, in this case we will have B-frames
1275 1275
          * that behave like P-frames. */
1276
-        avctx->has_b_frames = !(s->low_delay);
1276
+        avctx->has_b_frames = !s->low_delay;
1277 1277
 
1278 1278
         assert((avctx->sub_id == 1) == (avctx->codec_id == CODEC_ID_MPEG1VIDEO));
1279 1279
         if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) {
... ...
@@ -704,9 +704,9 @@ av_cold int MPV_common_init(MpegEncContext *s)
704 704
     mb_array_size = s->mb_height * s->mb_stride;
705 705
     mv_table_size = (s->mb_height + 2) * s->mb_stride + 1;
706 706
 
707
-    /* set chroma shifts */
708
-    avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,&(s->chroma_x_shift),
709
-                                                    &(s->chroma_y_shift) );
707
+        /* set chroma shifts */
708
+        avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &s->chroma_x_shift,
709
+                                      &s->chroma_y_shift);
710 710
 
711 711
     /* set default edge pos, will be overriden in decode_header if needed */
712 712
     s->h_edge_pos = s->mb_width * 16;
... ...
@@ -2318,7 +2318,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
2318 2318
         }
2319 2319
 
2320 2320
         dct_linesize = linesize << s->interlaced_dct;
2321
-        dct_offset =(s->interlaced_dct)? linesize : linesize*block_size;
2321
+        dct_offset   = s->interlaced_dct ? linesize : linesize * block_size;
2322 2322
 
2323 2323
         if(readable){
2324 2324
             dest_y=  s->dest[0];
... ...
@@ -2414,7 +2414,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
2414 2414
                     }else{
2415 2415
                         //chroma422
2416 2416
                         dct_linesize = uvlinesize << s->interlaced_dct;
2417
-                        dct_offset =(s->interlaced_dct)? uvlinesize : uvlinesize*block_size;
2417
+                        dct_offset   = s->interlaced_dct ? uvlinesize : uvlinesize*block_size;
2418 2418
 
2419 2419
                         add_dct(s, block[4], 4, dest_cb, dct_linesize);
2420 2420
                         add_dct(s, block[5], 5, dest_cr, dct_linesize);
... ...
@@ -2466,7 +2466,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
2466 2466
                     }else{
2467 2467
 
2468 2468
                         dct_linesize = uvlinesize << s->interlaced_dct;
2469
-                        dct_offset =(s->interlaced_dct)? uvlinesize : uvlinesize*block_size;
2469
+                        dct_offset   = s->interlaced_dct? uvlinesize : uvlinesize*block_size;
2470 2470
 
2471 2471
                         s->dsp.idct_put(dest_cb,              dct_linesize, block[4]);
2472 2472
                         s->dsp.idct_put(dest_cr,              dct_linesize, block[5]);
... ...
@@ -269,14 +269,14 @@ static int dct_quantize_altivec(MpegEncContext* s,
269 269
 
270 270
             if(n<4){
271 271
                 qmat = (vector signed int*)s->q_intra_matrix[qscale];
272
-                biasAddr = &(s->intra_quant_bias);
272
+                biasAddr = &s->intra_quant_bias;
273 273
             }else{
274 274
                 qmat = (vector signed int*)s->q_chroma_intra_matrix[qscale];
275
-                biasAddr = &(s->intra_quant_bias);
275
+                biasAddr = &s->intra_quant_bias;
276 276
             }
277 277
         } else {
278 278
             qmat = (vector signed int*)s->q_inter_matrix[qscale];
279
-            biasAddr = &(s->inter_quant_bias);
279
+            biasAddr = &s->inter_quant_bias;
280 280
         }
281 281
 
282 282
         // Load the bias vector (We add 0.5 to the bias so that we're
... ...
@@ -366,8 +366,8 @@ static int dct_quantize_altivec(MpegEncContext* s,
366 366
             vector signed int max_q_int, min_q_int;
367 367
             vector signed short max_q, min_q;
368 368
 
369
-            LOAD4(max_q_int, &(s->max_qcoeff));
370
-            LOAD4(min_q_int, &(s->min_qcoeff));
369
+            LOAD4(max_q_int, &s->max_qcoeff);
370
+            LOAD4(min_q_int, &s->min_qcoeff);
371 371
 
372 372
             max_q = vec_pack(max_q_int, max_q_int);
373 373
             min_q = vec_pack(min_q_int, min_q_int);
... ...
@@ -845,7 +845,7 @@ static int frame_thread_init(AVCodecContext *avctx)
845 845
                 err = AVERROR(ENOMEM);
846 846
                 goto error;
847 847
             }
848
-            *(copy->internal) = *(src->internal);
848
+            *copy->internal = *src->internal;
849 849
             copy->internal->is_copy = 1;
850 850
 
851 851
             if (codec->init_thread_copy)
... ...
@@ -88,7 +88,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
88 88
         return -1;
89 89
     }
90 90
 
91
-    zret = inflateReset(&(c->zstream));
91
+    zret = inflateReset(&c->zstream);
92 92
     if (zret != Z_OK) {
93 93
         av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
94 94
         return -1;
... ...
@@ -97,7 +97,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
97 97
     c->zstream.avail_in = len;
98 98
     c->zstream.next_out = c->decomp_buf;
99 99
     c->zstream.avail_out = c->decomp_size;
100
-    zret = inflate(&(c->zstream), Z_FINISH);
100
+    zret = inflate(&c->zstream, Z_FINISH);
101 101
     // Z_DATA_ERROR means empty picture
102 102
     if ((zret != Z_OK) && (zret != Z_STREAM_END) && (zret != Z_DATA_ERROR)) {
103 103
         av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", zret);
... ...
@@ -144,7 +144,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
144 144
 
145 145
     avcodec_get_frame_defaults(&c->pic);
146 146
     // Needed if zlib unused or init aborted before inflateInit
147
-    memset(&(c->zstream), 0, sizeof(z_stream));
147
+    memset(&c->zstream, 0, sizeof(z_stream));
148 148
     switch(avctx->bits_per_coded_sample){
149 149
     case  8: avctx->pix_fmt = PIX_FMT_PAL8; break;
150 150
     case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
... ...
@@ -170,7 +170,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
170 170
     c->zstream.zalloc = Z_NULL;
171 171
     c->zstream.zfree = Z_NULL;
172 172
     c->zstream.opaque = Z_NULL;
173
-    zret = inflateInit(&(c->zstream));
173
+    zret = inflateInit(&c->zstream);
174 174
     if (zret != Z_OK) {
175 175
         av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
176 176
         return 1;
... ...
@@ -194,7 +194,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
194 194
 
195 195
     if (c->pic.data[0])
196 196
         avctx->release_buffer(avctx, &c->pic);
197
-    inflateEnd(&(c->zstream));
197
+    inflateEnd(&c->zstream);
198 198
 
199 199
     return 0;
200 200
 }
... ...
@@ -324,6 +324,10 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
324 324
         return ret;
325 325
     }
326 326
 
327
+    // decode directly to output buffer for 24-bit sample format
328
+    if (s->bps == 3)
329
+        s->decode_buffer = s->frame.data[0];
330
+
327 331
     // init per channel states
328 332
     for (i = 0; i < s->channels; i++) {
329 333
         s->ch_ctx[i].predictor = 0;
... ...
@@ -429,7 +433,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
429 429
                 // shift samples for 24-bit sample format
430 430
                 int32_t *samples = (int32_t *)s->frame.data[0];
431 431
                 for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++)
432
-                    *samples++ = *p<<8;
432
+                    *samples++ <<= 8;
433 433
                 // reset decode buffer
434 434
                 s->decode_buffer = NULL;
435 435
                 break;
... ...
@@ -935,6 +935,48 @@ static int64_t guess_correct_pts(AVCodecContext *ctx,
935 935
     return pts;
936 936
 }
937 937
 
938
+static void apply_param_change(AVCodecContext *avctx, AVPacket *avpkt)
939
+{
940
+    int size = 0;
941
+    const uint8_t *data;
942
+    uint32_t flags;
943
+
944
+    if (!(avctx->codec->capabilities & CODEC_CAP_PARAM_CHANGE))
945
+        return;
946
+
947
+    data = av_packet_get_side_data(avpkt, AV_PKT_DATA_PARAM_CHANGE, &size);
948
+    if (!data || size < 4)
949
+        return;
950
+    flags = bytestream_get_le32(&data);
951
+    size -= 4;
952
+    if (size < 4) /* Required for any of the changes */
953
+        return;
954
+    if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) {
955
+        avctx->channels = bytestream_get_le32(&data);
956
+        size -= 4;
957
+    }
958
+    if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) {
959
+        if (size < 8)
960
+            return;
961
+        avctx->channel_layout = bytestream_get_le64(&data);
962
+        size -= 8;
963
+    }
964
+    if (size < 4)
965
+        return;
966
+    if (flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) {
967
+        avctx->sample_rate = bytestream_get_le32(&data);
968
+        size -= 4;
969
+    }
970
+    if (flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) {
971
+        if (size < 8)
972
+            return;
973
+        avctx->width  = bytestream_get_le32(&data);
974
+        avctx->height = bytestream_get_le32(&data);
975
+        avcodec_set_dimensions(avctx, avctx->width, avctx->height);
976
+        size -= 8;
977
+    }
978
+}
979
+
938 980
 int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
939 981
                          int *got_picture_ptr,
940 982
                          AVPacket *avpkt)
... ...
@@ -947,6 +989,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
947 947
 
948 948
     if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
949 949
         av_packet_split_side_data(avpkt);
950
+        apply_param_change(avctx, avpkt);
950 951
         avctx->pkt = avpkt;
951 952
         if (HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME)
952 953
              ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr,
... ...
@@ -1031,47 +1074,6 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
1031 1031
 }
1032 1032
 #endif
1033 1033
 
1034
-static void apply_param_change(AVCodecContext *avctx, AVPacket *avpkt)
1035
-{
1036
-    int size = 0;
1037
-    const uint8_t *data;
1038
-    uint32_t flags;
1039
-
1040
-    if (!(avctx->codec->capabilities & CODEC_CAP_PARAM_CHANGE))
1041
-        return;
1042
-
1043
-    data = av_packet_get_side_data(avpkt, AV_PKT_DATA_PARAM_CHANGE, &size);
1044
-    if (!data || size < 4)
1045
-        return;
1046
-    flags = bytestream_get_le32(&data);
1047
-    size -= 4;
1048
-    if (size < 4) /* Required for any of the changes */
1049
-        return;
1050
-    if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) {
1051
-        avctx->channels = bytestream_get_le32(&data);
1052
-        size -= 4;
1053
-    }
1054
-    if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) {
1055
-        if (size < 8)
1056
-            return;
1057
-        avctx->channel_layout = bytestream_get_le64(&data);
1058
-        size -= 8;
1059
-    }
1060
-    if (size < 4)
1061
-        return;
1062
-    if (flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) {
1063
-        avctx->sample_rate = bytestream_get_le32(&data);
1064
-        size -= 4;
1065
-    }
1066
-    if (flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) {
1067
-        if (size < 8)
1068
-            return;
1069
-        avctx->width  = bytestream_get_le32(&data);
1070
-        avctx->height = bytestream_get_le32(&data);
1071
-        size -= 8;
1072
-    }
1073
-}
1074
-
1075 1034
 int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
1076 1035
                                               AVFrame *frame,
1077 1036
                                               int *got_frame_ptr,
... ...
@@ -5342,7 +5342,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
5342 5342
     if (v->profile == PROFILE_ADVANCED)
5343 5343
         avctx->level = v->level;
5344 5344
 
5345
-    avctx->has_b_frames = !!(avctx->max_b_frames);
5345
+    avctx->has_b_frames = !!avctx->max_b_frames;
5346 5346
 
5347 5347
     s->mb_width  = (avctx->coded_width  + 15) >> 4;
5348 5348
     s->mb_height = (avctx->coded_height + 15) >> 4;
... ...
@@ -820,8 +820,7 @@ static void create_map(vorbis_context *vc, unsigned floor_number)
820 820
 
821 821
         for (idx = 0; idx < n; ++idx) {
822 822
             map[idx] = floor(BARK((vf->rate * idx) / (2.0f * n)) *
823
-                             ((vf->bark_map_size) /
824
-                              BARK(vf->rate / 2.0f)));
823
+                             (vf->bark_map_size / BARK(vf->rate / 2.0f)));
825 824
             if (vf->bark_map_size-1 < map[idx])
826 825
                 map[idx] = vf->bark_map_size - 1;
827 826
         }
... ...
@@ -979,7 +978,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext)
979 979
     int headers_len    = avccontext->extradata_size;
980 980
     uint8_t *header_start[3];
981 981
     int header_len[3];
982
-    GetBitContext *gb = &(vc->gb);
982
+    GetBitContext *gb = &vc->gb;
983 983
     int hdr_type, ret;
984 984
 
985 985
     vc->avccontext = avccontext;
... ...
@@ -1642,7 +1641,7 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, void *data,
1642 1642
     const uint8_t *buf = avpkt->data;
1643 1643
     int buf_size       = avpkt->size;
1644 1644
     vorbis_context *vc = avccontext->priv_data;
1645
-    GetBitContext *gb = &(vc->gb);
1645
+    GetBitContext *gb = &vc->gb;
1646 1646
     const float *channel_ptrs[255];
1647 1647
     int i, len, ret;
1648 1648
 
... ...
@@ -30,7 +30,6 @@
30 30
 #include "dsputil.h"
31 31
 #include "get_bits.h"
32 32
 #include "bytestream.h"
33
-#include "cabac.h"
34 33
 #include "vp56dsp.h"
35 34
 
36 35
 typedef struct vp56_context VP56Context;
... ...
@@ -618,7 +618,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
618 618
     c->bpp = avctx->bits_per_coded_sample;
619 619
 
620 620
     // Needed if zlib unused or init aborted before inflateInit
621
-    memset(&(c->zstream), 0, sizeof(z_stream));
621
+    memset(&c->zstream, 0, sizeof(z_stream));
622 622
 
623 623
     avctx->pix_fmt = PIX_FMT_RGB24;
624 624
     c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64);
... ...
@@ -635,7 +635,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
635 635
     c->zstream.zalloc = Z_NULL;
636 636
     c->zstream.zfree = Z_NULL;
637 637
     c->zstream.opaque = Z_NULL;
638
-    zret = inflateInit(&(c->zstream));
638
+    zret = inflateInit(&c->zstream);
639 639
     if (zret != Z_OK) {
640 640
         av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
641 641
         return 1;
... ...
@@ -659,7 +659,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
659 659
 
660 660
     if (c->pic.data[0])
661 661
         avctx->release_buffer(avctx, &c->pic);
662
-    inflateEnd(&(c->zstream));
662
+    inflateEnd(&c->zstream);
663 663
     av_freep(&c->cur);
664 664
     av_freep(&c->prev);
665 665
 
... ...
@@ -269,7 +269,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
269 269
     }
270 270
 
271 271
     // Needed if zlib unused or init aborted before deflateInit
272
-    memset(&(c->zstream), 0, sizeof(z_stream));
272
+    memset(&c->zstream, 0, sizeof(z_stream));
273 273
     c->comp_size = avctx->width * avctx->height + 1024 +
274 274
         ((avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * ((avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * 2 + 4;
275 275
     if ((c->work_buf = av_malloc(c->comp_size)) == NULL) {
... ...
@@ -294,7 +294,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
294 294
     c->zstream.zalloc = Z_NULL;
295 295
     c->zstream.zfree = Z_NULL;
296 296
     c->zstream.opaque = Z_NULL;
297
-    zret = deflateInit(&(c->zstream), lvl);
297
+    zret = deflateInit(&c->zstream, lvl);
298 298
     if (zret != Z_OK) {
299 299
         av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
300 300
         return -1;
... ...
@@ -317,7 +317,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
317 317
     av_freep(&c->comp_buf);
318 318
     av_freep(&c->work_buf);
319 319
 
320
-    deflateEnd(&(c->zstream));
320
+    deflateEnd(&c->zstream);
321 321
     av_freep(&c->prev);
322 322
 
323 323
     return 0;
... ...
@@ -292,7 +292,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
292 292
 
293 293
 
294 294
     if (bktr_init(s1->filename, width, height, s->standard,
295
-            &(s->video_fd), &(s->tuner_fd), -1, 0.0) < 0) {
295
+                  &s->video_fd, &s->tuner_fd, -1, 0.0) < 0) {
296 296
         ret = AVERROR(EIO);
297 297
         goto out;
298 298
     }
... ...
@@ -69,7 +69,7 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
69 69
         loop_error          = system_time - self->cycle_time;
70 70
 
71 71
         /// update loop
72
-        self->cycle_time   += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error;
72
+        self->cycle_time   += FFMAX(self->feedback2_factor, 1.0 / self->count) * loop_error;
73 73
         self->clock_period += self->feedback3_factor * loop_error / period;
74 74
     }
75 75
     return self->cycle_time;
... ...
@@ -217,7 +217,7 @@ static int request_frame(AVFilterLink *link)
217 217
 static int poll_frame(AVFilterLink *link)
218 218
 {
219 219
     BufferSourceContext *c = link->src->priv;
220
-    return !!(c->picref);
220
+    return !!c->picref;
221 221
 }
222 222
 
223 223
 AVFilter avfilter_vsrc_buffer = {
... ...
@@ -371,6 +371,6 @@ OBJS-$(CONFIG_TCP_PROTOCOL)              += tcp.o
371 371
 OBJS-$(CONFIG_TLS_PROTOCOL)              += tls.o
372 372
 OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
373 373
 
374
-
374
+SKIPHEADERS-$(CONFIG_NETWORK)            += network.h rtsp.h
375 375
 TESTPROGS = seek
376 376
 TOOLS     = pktdumper probetest
... ...
@@ -168,7 +168,7 @@ static void flush_buffer(AVIOContext *s)
168 168
 
169 169
 void avio_w8(AVIOContext *s, int b)
170 170
 {
171
-    *(s->buf_ptr)++ = b;
171
+    *s->buf_ptr++ = b;
172 172
     if (s->buf_ptr >= s->buf_end)
173 173
         flush_buffer(s);
174 174
 }
... ...
@@ -221,10 +221,6 @@ static int process_audio_header_eacs(AVFormatContext *s)
221 221
 
222 222
     ea->sample_rate  = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
223 223
     ea->bytes        = avio_r8(pb);   /* 1=8-bit, 2=16-bit */
224
-    if(ea->bytes == 0){
225
-        av_log(s,AV_LOG_ERROR,"the file is corrupted, ea->bytes = 0\n");
226
-        return AVERROR_INVALIDDATA;
227
-    }
228 224
     ea->num_channels = avio_r8(pb);
229 225
     compression_type = avio_r8(pb);
230 226
     avio_skip(pb, 13);
... ...
@@ -440,6 +436,11 @@ static int ea_read_header(AVFormatContext *s,
440 440
             ea->audio_codec = 0;
441 441
             return 1;
442 442
         }
443
+        if (ea->bytes <= 0) {
444
+            av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);
445
+            ea->audio_codec = CODEC_ID_NONE;
446
+            return 1;
447
+        }
443 448
 
444 449
         /* initialize the audio decoder stream */
445 450
         st = avformat_new_stream(s, NULL);
... ...
@@ -89,6 +89,7 @@ typedef struct IPMVEContext {
89 89
     int64_t video_pts;
90 90
     uint32_t     palette[256];
91 91
     int          has_palette;
92
+    int          changed;
92 93
 
93 94
     unsigned int audio_bits;
94 95
     unsigned int audio_channels;
... ...
@@ -168,6 +169,10 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
168 168
             }
169 169
         }
170 170
 
171
+        if (s->changed) {
172
+            ff_add_param_change(pkt, 0, 0, 0, s->video_width, s->video_height);
173
+            s->changed = 0;
174
+        }
171 175
         pkt->pos= s->decode_map_chunk_offset;
172 176
         avio_seek(pb, s->decode_map_chunk_offset, SEEK_SET);
173 177
         s->decode_map_chunk_offset = 0;
... ...
@@ -223,6 +228,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
223 223
     int first_color, last_color;
224 224
     int audio_flags;
225 225
     unsigned char r, g, b;
226
+    unsigned int width, height;
226 227
 
227 228
     /* see if there are any pending packets */
228 229
     chunk_type = load_ipmovie_packet(s, pb, pkt);
... ...
@@ -379,8 +385,16 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
379 379
                 chunk_type = CHUNK_BAD;
380 380
                 break;
381 381
             }
382
-            s->video_width = AV_RL16(&scratch[0]) * 8;
383
-            s->video_height = AV_RL16(&scratch[2]) * 8;
382
+            width  = AV_RL16(&scratch[0]) * 8;
383
+            height = AV_RL16(&scratch[2]) * 8;
384
+            if (width != s->video_width) {
385
+                s->video_width = width;
386
+                s->changed++;
387
+            }
388
+            if (height != s->video_height) {
389
+                s->video_height = height;
390
+                s->changed++;
391
+            }
384 392
             if (opcode_version < 2 || !AV_RL16(&scratch[6])) {
385 393
                 s->video_bpp = 8;
386 394
             } else {
... ...
@@ -53,7 +53,7 @@ typedef struct MTVDemuxContext {
53 53
 static int mtv_probe(AVProbeData *p)
54 54
 {
55 55
     /* Magic is 'AMV' */
56
-    if(*(p->buf) != 'A' || *(p->buf+1) != 'M' || *(p->buf+2) != 'V')
56
+    if (*p->buf != 'A' || *(p->buf + 1) != 'M' || *(p->buf + 2) != 'V')
57 57
         return 0;
58 58
 
59 59
     /* Check for nonzero in bpp and (width|height) header fields */
... ...
@@ -662,7 +662,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
662 662
     vst->videobufpos += len;
663 663
     rm->remaining_len-= len;
664 664
 
665
-    if(type == 2 || (vst->videobufpos) == vst->videobufsize){
665
+    if (type == 2 || vst->videobufpos == vst->videobufsize) {
666 666
         vst->pkt.data[0] = vst->cur_slice-1;
667 667
         *pkt= vst->pkt;
668 668
         vst->pkt.data= NULL;
... ...
@@ -24,6 +24,7 @@
24 24
 #include "libavutil/intreadwrite.h"
25 25
 #include "libavutil/dict.h"
26 26
 #include "libavutil/mathematics.h"
27
+#include "riff.h"
27 28
 
28 29
 typedef struct VqfContext {
29 30
     int frame_bit_len;
... ...
@@ -45,11 +46,11 @@ static int vqf_probe(AVProbeData *probe_packet)
45 45
     return AVPROBE_SCORE_MAX/2;
46 46
 }
47 47
 
48
-static void add_metadata(AVFormatContext *s, const char *tag,
48
+static void add_metadata(AVFormatContext *s, uint32_t tag,
49 49
                          unsigned int tag_len, unsigned int remaining)
50 50
 {
51 51
     int len = FFMIN(tag_len, remaining);
52
-    char *buf;
52
+    char *buf, key[5] = {0};
53 53
 
54 54
     if (len == UINT_MAX)
55 55
         return;
... ...
@@ -59,9 +60,32 @@ static void add_metadata(AVFormatContext *s, const char *tag,
59 59
         return;
60 60
     avio_read(s->pb, buf, len);
61 61
     buf[len] = 0;
62
-    av_dict_set(&s->metadata, tag, buf, AV_DICT_DONT_STRDUP_VAL);
62
+    AV_WL32(key, tag);
63
+    av_dict_set(&s->metadata, key, buf, AV_DICT_DONT_STRDUP_VAL);
63 64
 }
64 65
 
66
+static const AVMetadataConv vqf_metadata_conv[] = {
67
+    { "(c) ", "copyright" },
68
+    { "ARNG", "arranger"  },
69
+    { "AUTH", "author"    },
70
+    { "BAND", "band"      },
71
+    { "CDCT", "conductor" },
72
+    { "COMT", "comment"   },
73
+    { "FILE", "filename"  },
74
+    { "GENR", "genre"     },
75
+    { "LABL", "publisher" },
76
+    { "MUSC", "composer"  },
77
+    { "NAME", "title"     },
78
+    { "NOTE", "note"      },
79
+    { "PROD", "producer"  },
80
+    { "PRSN", "personnel" },
81
+    { "REMX", "remixer"   },
82
+    { "SING", "singer"    },
83
+    { "TRCK", "track"     },
84
+    { "WORD", "words"     },
85
+    { 0 },
86
+};
87
+
65 88
 static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
66 89
 {
67 90
     VqfContext *c = s->priv_data;
... ...
@@ -110,41 +134,25 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
110 110
 
111 111
             st->codec->bit_rate              = read_bitrate*1000;
112 112
             break;
113
-        case MKTAG('N','A','M','E'):
114
-            add_metadata(s, "title"    , len, header_size);
115
-            break;
116
-        case MKTAG('(','c',')',' '):
117
-            add_metadata(s, "copyright", len, header_size);
118
-            break;
119
-        case MKTAG('A','U','T','H'):
120
-            add_metadata(s, "author"   , len, header_size);
121
-            break;
122
-        case MKTAG('A','L','B','M'):
123
-            add_metadata(s, "album"    , len, header_size);
124
-            break;
125
-        case MKTAG('T','R','C','K'):
126
-            add_metadata(s, "track"    , len, header_size);
127
-            break;
128
-        case MKTAG('C','O','M','T'):
129
-            add_metadata(s, "comment"  , len, header_size);
130
-            break;
131
-        case MKTAG('F','I','L','E'):
132
-            add_metadata(s, "filename" , len, header_size);
133
-            break;
134
-        case MKTAG('D','S','I','Z'):
135
-            add_metadata(s, "size"     , len, header_size);
136
-            break;
137
-        case MKTAG('D','A','T','E'):
138
-            add_metadata(s, "date"     , len, header_size);
113
+        case MKTAG('D','S','I','Z'): // size of compressed data
114
+        {
115
+            char buf[8] = {0};
116
+            int size = avio_rb32(s->pb);
117
+
118
+            snprintf(buf, sizeof(buf), "%d", size);
119
+            av_dict_set(&s->metadata, "size", buf, 0);
120
+        }
139 121
             break;
140
-        case MKTAG('G','E','N','R'):
141
-            add_metadata(s, "genre"    , len, header_size);
122
+        case MKTAG('Y','E','A','R'): // recording date
123
+        case MKTAG('E','N','C','D'): // compression date
124
+        case MKTAG('E','X','T','R'): // reserved
125
+        case MKTAG('_','Y','M','H'): // reserved
126
+        case MKTAG('_','N','T','T'): // reserved
127
+        case MKTAG('_','I','D','3'): // reserved for ID3 tags
128
+            avio_skip(s->pb, FFMIN(len, header_size));
142 129
             break;
143 130
         default:
144
-            av_log(s, AV_LOG_ERROR, "Unknown chunk: %c%c%c%c\n",
145
-                   ((char*)&chunk_tag)[0], ((char*)&chunk_tag)[1],
146
-                   ((char*)&chunk_tag)[2], ((char*)&chunk_tag)[3]);
147
-            avio_skip(s->pb, FFMIN(len, header_size));
131
+            add_metadata(s, chunk_tag, len, header_size);
148 132
             break;
149 133
         }
150 134
 
... ...
@@ -201,6 +209,8 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
201 201
     st->codec->extradata_size = 12;
202 202
     memcpy(st->codec->extradata, comm_chunk, 12);
203 203
 
204
+    ff_metadata_conv_ctx(s, NULL, vqf_metadata_conv);
205
+
204 206
     return 0;
205 207
 }
206 208
 
... ...
@@ -10,6 +10,9 @@ fate-bink-demux: CMD = crc -i $(SAMPLES)/bink/Snd0a7d9b58.dee -vn -acodec copy
10 10
 FATE_TESTS += fate-bink-demux-video
11 11
 fate-bink-demux-video: CMD = framecrc -i $(SAMPLES)/bink/hol2br.bik
12 12
 
13
+FATE_TESTS += fate-bmv
14
+fate-bmv: CMD = framecrc -i $(SAMPLES)/bmv/SURFING-partial.BMV -pix_fmt rgb24
15
+
13 16
 FATE_TESTS += fate-caf
14 17
 fate-caf: CMD = crc -i $(SAMPLES)/caf/caf-pcm16.caf
15 18
 
... ...
@@ -78,3 +81,6 @@ fate-siff: CMD = framecrc -i $(SAMPLES)/SIFF/INTRO_B.VB -t 3 -pix_fmt rgb24
78 78
 
79 79
 FATE_TESTS += fate-westwood-aud
80 80
 fate-westwood-aud: CMD = md5 -i $(SAMPLES)/westwood-aud/excellent.aud -f s16le
81
+
82
+FATE_TESTS += fate-xmv-demux
83
+fate-xmv-demux: CMD = framecrc -i $(SAMPLES)/xmv/logos1p.fmv -vcodec copy -acodec copy
... ...
@@ -378,4 +378,4 @@ fate-h264-conformance-sva_nl2_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conf
378 378
 fate-h264-interlace-crop: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vframes 3
379 379
 fate-h264-lossless: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/lossless.h264
380 380
 fate-h264-extreme-plane-pred: CMD = framemd5 -vsync 0 -i $(SAMPLES)/h264/extreme-plane-pred.h264
381
-fate-h264-bsf-mp4toannexb: CMD = md5 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vcodec copy -bsf h264_mp4toannexb -f mpeg
381
+fate-h264-bsf-mp4toannexb: CMD = md5 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vcodec copy -bsf h264_mp4toannexb -f h264
... ...
@@ -4,6 +4,9 @@ fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI
4 4
 FATE_INDEO += fate-indeo3
5 5
 fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov
6 6
 
7
+FATE_INDEO += fate-indeo4
8
+fate-indeo4: CMD = framecrc -i $(SAMPLES)/iv41/indeo41-partial.avi -an
9
+
7 10
 FATE_INDEO += fate-indeo5
8 11
 fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
9 12
 
... ...
@@ -185,5 +185,5 @@ fate-wnv1: CMD = framecrc -i $(SAMPLES)/wnv1/wnv1-codec.avi -an
185 185
 FATE_TESTS += fate-yop
186 186
 fate-yop: CMD = framecrc -i $(SAMPLES)/yop/test1.yop -pix_fmt rgb24 -an
187 187
 
188
-FATE_TESTS += fate-xxan-wc4
189
-fate-xxan-wc4: CMD = framecrc -i $(SAMPLES)/wc4-xan/wc4_2.avi -an -vframes 10
188
+#FATE_TESTS += fate-xxan-wc4
189
+#fate-xxan-wc4: CMD = framecrc -i $(SAMPLES)/wc4-xan/wc4trailer-partial.avi -an
... ...
@@ -1,4 +1,4 @@
1
-156f63e3391b95020ae882dbae6eccf3 *./tests/data/acodec/g722.wav
2
-47991 ./tests/data/acodec/g722.wav
3
-8f65de513acc08b37a488d6a802b4f00 *./tests/data/g722.acodec.out.wav
4
-stddev: 8860.50 PSNR: 17.38 MAXDIFF:33814 bytes:   191732/  1058400
1
+b813a52d4efe6cf7974190ea9c4c7e8c *./tests/data/acodec/g722.wav
2
+48053 ./tests/data/acodec/g722.wav
3
+d8344d14a11eef0418b856af70694cbe *./tests/data/g722.acodec.out.wav
4
+stddev: 8841.18 PSNR: 17.40 MAXDIFF:36225 bytes:   191980/  1058400
5 5
new file mode 100644
... ...
@@ -0,0 +1,42 @@
0
+0, 0, 823680, 0xddb8a306
1
+1, 0, 7424, 0x18540b36
2
+0, 7500, 823680, 0xa95375c8
3
+1, 7576, 7296, 0x5acd2484
4
+0, 15000, 823680, 0xa95375c8
5
+1, 15020, 7424, 0xa1bc5c5a
6
+0, 22500, 823680, 0xb6f78afe
7
+1, 22596, 7296, 0x71a02ad1
8
+0, 30000, 823680, 0xb6f78afe
9
+1, 30041, 7424, 0x09cc32f2
10
+0, 37500, 823680, 0x45b9c8f0
11
+1, 37616, 7296, 0xa3451726
12
+0, 45000, 823680, 0x45b9c8f0
13
+1, 45061, 7296, 0x1eb40a18
14
+0, 52500, 823680, 0x7653d8e9
15
+1, 52506, 7424, 0xc55a2acf
16
+0, 60000, 823680, 0x7653d8e9
17
+1, 60082, 7296, 0x5b9fad3f
18
+0, 67500, 823680, 0xf1e2fd73
19
+1, 67527, 7424, 0xea651ae7
20
+0, 75000, 823680, 0xf1e2fd73
21
+1, 75102, 7296, 0x2bd5ddb6
22
+0, 82500, 823680, 0x6d2deab3
23
+1, 82547, 7424, 0xde4243b4
24
+0, 90000, 823680, 0x6d2deab3
25
+1, 90122, 7296, 0x358806d3
26
+0, 97500, 823680, 0x37fd33ce
27
+1, 97567, 7296, 0x511a144e
28
+0, 105000, 823680, 0x37fd33ce
29
+1, 105012, 7424, 0x887a3e84
30
+0, 112500, 823680, 0x0a8e0ab9
31
+1, 112588, 7296, 0xfeae2a0c
32
+0, 120000, 823680, 0x0a8e0ab9
33
+1, 120033, 7424, 0xa4ea5d22
34
+0, 127500, 823680, 0x991bb2b0
35
+1, 127608, 7296, 0xb3adf7fa
36
+0, 135000, 823680, 0x991bb2b0
37
+1, 135053, 7424, 0xce995dcc
38
+0, 142500, 823680, 0xb8397c8c
39
+1, 142629, 7296, 0x5b4cf574
40
+0, 150000, 823680, 0xb8397c8c
41
+1, 150073, 7296, 0x8a70eaf0
... ...
@@ -1 +1 @@
1
-503d34ff458a86387ab349c31726f19a
1
+5f04c27cc6ee8625fe2405fb0f7da9a3
2 2
new file mode 100644
... ...
@@ -0,0 +1,100 @@
0
+0, 0, 86400, 0x98f5e422
1
+0, 6000, 86400, 0x1864cb06
2
+0, 12000, 86400, 0xb09532ef
3
+0, 18000, 86400, 0x3cd3dcdc
4
+0, 24000, 86400, 0xe738847f
5
+0, 30000, 86400, 0xc9b13afb
6
+0, 36000, 86400, 0x5005d035
7
+0, 42000, 86400, 0x22f63e17
8
+0, 48000, 86400, 0x93391f02
9
+0, 54000, 86400, 0x264830fd
10
+0, 60000, 86400, 0x8fff9f5f
11
+0, 66000, 86400, 0x524997fe
12
+0, 72000, 86400, 0x54e330f9
13
+0, 78000, 86400, 0x1d766a22
14
+0, 84000, 86400, 0x683a70ac
15
+0, 90000, 86400, 0x553b7b3d
16
+0, 96000, 86400, 0x822c79bc
17
+0, 102000, 86400, 0xe1087a1c
18
+0, 108000, 86400, 0xff397595
19
+0, 114000, 86400, 0x1b6b7717
20
+0, 120000, 86400, 0x6c5275c1
21
+0, 126000, 86400, 0x4e6a7189
22
+0, 132000, 86400, 0x285c6eba
23
+0, 138000, 86400, 0xce647227
24
+0, 144000, 86400, 0xa0d07b1c
25
+0, 150000, 86400, 0x5b567861
26
+0, 156000, 86400, 0x105873ec
27
+0, 162000, 86400, 0x59267fa0
28
+0, 168000, 86400, 0xaeac839f
29
+0, 174000, 86400, 0x2faf7402
30
+0, 180000, 86400, 0xc8547a30
31
+0, 186000, 86400, 0x3d357d49
32
+0, 192000, 86400, 0x75db6d6c
33
+0, 198000, 86400, 0x9fbf68e9
34
+0, 204000, 86400, 0x56a64d26
35
+0, 210000, 86400, 0xce9e1f43
36
+0, 216000, 86400, 0xa4d7fddc
37
+0, 222000, 86400, 0x3e20d77c
38
+0, 228000, 86400, 0x4680661d
39
+0, 234000, 86400, 0xf1b20af3
40
+0, 240000, 86400, 0xb79d8045
41
+0, 246000, 86400, 0x9479fc8a
42
+0, 252000, 86400, 0x232965c3
43
+0, 258000, 86400, 0xd18bca17
44
+0, 264000, 86400, 0xb9064249
45
+0, 270000, 86400, 0xcc48ab34
46
+0, 276000, 86400, 0xe25018cd
47
+0, 282000, 86400, 0x8da489ee
48
+0, 288000, 86400, 0x90de0fc1
49
+0, 294000, 86400, 0x2428dcee
50
+0, 300000, 86400, 0x4316e1ae
51
+0, 306000, 86400, 0x2b25e54c
52
+0, 312000, 86400, 0x736ce020
53
+0, 318000, 86400, 0x9a6be09a
54
+0, 324000, 86400, 0x23bddbcd
55
+0, 330000, 86400, 0x9368e465
56
+0, 336000, 86400, 0x1ae9bb87
57
+0, 342000, 86400, 0x4e591f32
58
+0, 348000, 86400, 0xba1bf9dc
59
+0, 354000, 86400, 0x07f0aa60
60
+0, 360000, 86400, 0xf5a2cfa2
61
+0, 366000, 86400, 0xcba5fc18
62
+0, 372000, 86400, 0x858c0cfe
63
+0, 378000, 86400, 0xac73ecd4
64
+0, 384000, 86400, 0xf41bf03c
65
+0, 390000, 86400, 0x928ed146
66
+0, 396000, 86400, 0x9ff5990a
67
+0, 402000, 86400, 0xc2fabc3d
68
+0, 408000, 86400, 0x94af87a3
69
+0, 414000, 86400, 0x9bae514c
70
+0, 420000, 86400, 0xe0da267a
71
+0, 426000, 86400, 0x1d40f55c
72
+0, 432000, 86400, 0xe6173b68
73
+0, 438000, 86400, 0x1445490d
74
+0, 444000, 86400, 0x8d8753c1
75
+0, 450000, 86400, 0xe5a7779d
76
+0, 456000, 86400, 0x3cfc66ef
77
+0, 462000, 86400, 0xa5d45608
78
+0, 468000, 86400, 0x62f17be1
79
+0, 474000, 86400, 0xa64c84d3
80
+0, 480000, 86400, 0xf98162f0
81
+0, 486000, 86400, 0x0db77d9f
82
+0, 492000, 86400, 0x0f0cbac9
83
+0, 498000, 86400, 0xb9934e97
84
+0, 504000, 86400, 0x7f8fa248
85
+0, 510000, 86400, 0xdfd96768
86
+0, 516000, 86400, 0x81b07919
87
+0, 522000, 86400, 0x66c11e9f
88
+0, 528000, 86400, 0xd86eb114
89
+0, 534000, 86400, 0x67f20c1f
90
+0, 540000, 86400, 0x66915de5
91
+0, 546000, 86400, 0x2b8aa76f
92
+0, 552000, 86400, 0x85b5a3d2
93
+0, 558000, 86400, 0x80d29ed6
94
+0, 564000, 86400, 0x4d508e2c
95
+0, 570000, 86400, 0x0d407374
96
+0, 576000, 86400, 0xd4068016
97
+0, 582000, 86400, 0x6ffab98f
98
+0, 588000, 86400, 0x2360903d
99
+0, 594000, 86400, 0x470e04a0
0 100
new file mode 100644
... ...
@@ -0,0 +1,181 @@
0
+0, 0, 1508, 0xefceba48
1
+1, 0, 5976, 0xfa2c2db9
2
+1, 10841, 5976, 0x256b935c
3
+1, 21682, 5976, 0xa78a9563
4
+1, 32522, 5976, 0x4ea056f4
5
+1, 43363, 5976, 0xda772d8d
6
+1, 54204, 5976, 0xafacf7c9
7
+0, 57600, 108, 0x06713c96
8
+0, 61200, 952, 0xd306df7e
9
+0, 64800, 2312, 0xaf316585
10
+1, 65045, 5976, 0xdeb003f4
11
+0, 68400, 3872, 0xfc1c527c
12
+0, 72000, 20, 0xaffc0edd
13
+0, 75600, 6600, 0xe1b66c7f
14
+1, 75886, 2016, 0xa7380d36
15
+0, 79200, 6868, 0xd5b3f631
16
+1, 79543, 2016, 0xbc090bac
17
+0, 82800, 8420, 0xf70ee33b
18
+1, 83200, 2016, 0x6f8c164c
19
+0, 86400, 13144, 0x9a54ef39
20
+1, 86857, 2016, 0x13b80e28
21
+0, 90000, 6340, 0xe55bf555
22
+1, 90514, 2016, 0xd40ff863
23
+0, 93600, 3736, 0x0b23f89f
24
+1, 94171, 2016, 0x4d530ed7
25
+0, 97200, 2624, 0x79e2e451
26
+1, 97829, 2160, 0x0fbc37eb
27
+0, 100800, 1860, 0x63886f11
28
+1, 101747, 13824, 0x82fb2602
29
+0, 104400, 1244, 0x74594601
30
+0, 108000, 564, 0xf4561dfb
31
+0, 111600, 80, 0xbf8e2e30
32
+0, 115200, 20, 0xa0990c29
33
+1, 126824, 13824, 0x08771caf
34
+1, 151902, 13824, 0xdf7d4a65
35
+1, 176980, 13896, 0x24bf3f47
36
+1, 202188, 3600, 0x9ad26b9f
37
+1, 208718, 3600, 0x8c666fd6
38
+1, 215249, 3600, 0x305c6ca1
39
+1, 221780, 3600, 0x48b04e1e
40
+0, 223200, 104, 0x12413980
41
+0, 226800, 796, 0x2e698ed3
42
+1, 228310, 3600, 0x8c915935
43
+0, 230400, 1808, 0x8b3e6e5e
44
+0, 234000, 4712, 0xdbd51737
45
+1, 234841, 3600, 0xa8f45e01
46
+0, 237600, 5548, 0xee9c831c
47
+0, 241200, 6152, 0x9c18ccc1
48
+1, 241371, 3816, 0xc64cc5ed
49
+0, 244800, 6452, 0x7860462a
50
+1, 248294, 1944, 0x0ac2e3f1
51
+0, 248400, 6676, 0xe1b1c9e4
52
+1, 251820, 1944, 0x2197dccd
53
+0, 252000, 10904, 0x0bded7b7
54
+1, 255347, 1944, 0x0c02e77f
55
+0, 255600, 12844, 0xe6d16cff
56
+1, 258873, 1944, 0x675ee06a
57
+0, 259200, 10920, 0xe114c46b
58
+1, 262400, 2160, 0x0d803a8b
59
+0, 262800, 5952, 0xb7464634
60
+1, 266318, 6696, 0xa7a0dfea
61
+0, 266400, 4732, 0x2fa2e36d
62
+0, 270000, 2592, 0xf54ddd57
63
+0, 273600, 1516, 0x4a1cd4d5
64
+0, 277200, 864, 0x49889afc
65
+1, 278465, 6696, 0x59aa3145
66
+0, 280800, 468, 0x3932e6a4
67
+0, 284400, 116, 0x2b8341e6
68
+0, 288000, 16, 0x6a3109cf
69
+1, 290612, 6696, 0x69be4d78
70
+1, 302759, 6696, 0x64064c67
71
+1, 314906, 6696, 0xc8536f98
72
+1, 327053, 6696, 0xc0ce5199
73
+1, 339200, 6768, 0x3b275c58
74
+1, 351478, 8856, 0x90e5b37c
75
+0, 360000, 1508, 0xefceba48
76
+1, 367543, 8856, 0x86b33366
77
+1, 383608, 8856, 0x19e18797
78
+1, 399673, 8856, 0x0a0c7fbd
79
+1, 415739, 8928, 0x4a9b2d42
80
+0, 417600, 100, 0x45023894
81
+0, 421200, 948, 0xa65ed345
82
+0, 424800, 2808, 0xd7285746
83
+0, 428400, 5372, 0x05794175
84
+1, 431935, 1512, 0xed8b3f4b
85
+0, 432000, 11596, 0x8636eca7
86
+1, 434678, 1512, 0xa27d3891
87
+0, 435600, 11524, 0xe1f39be3
88
+1, 437420, 1512, 0xb0f13eb6
89
+0, 439200, 23392, 0xab053f05
90
+1, 440163, 1656, 0xe5a98324
91
+0, 442800, 4560, 0x03197d07
92
+1, 443167, 2232, 0x15445433
93
+0, 446400, 4440, 0x1cc361a2
94
+1, 447216, 2232, 0x5cb348a9
95
+0, 450000, 23688, 0x16030634
96
+1, 451265, 2232, 0xf10347da
97
+0, 453600, 16132, 0xf0eca799
98
+1, 455314, 2448, 0x3e16a175
99
+0, 457200, 29896, 0x0c0988ea
100
+1, 459755, 2520, 0x17e3ca2b
101
+0, 460800, 19956, 0x0093aa0b
102
+1, 464327, 1944, 0x35c2de84
103
+0, 464400, 16392, 0x8829a9ca
104
+1, 467853, 1944, 0x55b4db40
105
+0, 468000, 16772, 0x9a4a546d
106
+1, 471380, 2088, 0xdaae14b2
107
+0, 471600, 8920, 0xcd8ca203
108
+1, 475167, 1944, 0x92ccd37f
109
+0, 475200, 9632, 0x53c1d37b
110
+1, 478694, 1944, 0x70efede1
111
+0, 478800, 8976, 0xfe4da2cc
112
+1, 482220, 1944, 0x7601d304
113
+0, 482400, 6680, 0x35348fe0
114
+1, 485747, 1944, 0x3922ebc2
115
+0, 486000, 9228, 0xcbf62b0c
116
+1, 489273, 2160, 0xde462f2e
117
+0, 489600, 5108, 0xd1d88511
118
+1, 493192, 1872, 0x467ac1d2
119
+0, 493200, 10016, 0xaff4b2b2
120
+1, 496588, 1872, 0xa1e4cd43
121
+0, 496800, 7468, 0x23e81ab8
122
+1, 499984, 1872, 0x1dceccc6
123
+0, 500400, 4172, 0x253cd05b
124
+1, 503380, 1872, 0x2bbad2a5
125
+0, 504000, 8188, 0x7ede743f
126
+1, 506776, 1872, 0xc603d44d
127
+0, 507600, 2884, 0x2dec55a3
128
+1, 510171, 1872, 0x1b4cc261
129
+0, 511200, 3900, 0xd0666a18
130
+1, 513567, 1872, 0x10edd6cf
131
+0, 514800, 2996, 0x9cc99b8c
132
+1, 516963, 2376, 0xecdb9d61
133
+0, 518400, 2156, 0xae612776
134
+1, 521273, 2592, 0x5559eced
135
+0, 522000, 3988, 0x0d2c9992
136
+0, 525600, 1512, 0x6281fc00
137
+1, 525976, 2592, 0x8848dfc7
138
+0, 529200, 6544, 0xb75c2562
139
+1, 530678, 2592, 0x4ca2d7da
140
+0, 532800, 4108, 0xfb21efc9
141
+1, 535380, 2592, 0x285fd7e6
142
+0, 536400, 1096, 0x85922a37
143
+0, 540000, 9740, 0xe57d7647
144
+1, 540082, 2592, 0x2717e404
145
+0, 543600, 416, 0x61c2ea02
146
+1, 544784, 2592, 0xf106111a
147
+0, 547200, 336, 0x1dc5ac1c
148
+1, 549486, 2592, 0xd7d01119
149
+0, 550800, 204, 0x16f57017
150
+1, 554188, 2592, 0x550cfeda
151
+0, 554400, 112, 0x78374234
152
+0, 558000, 40, 0x6cb21985
153
+1, 558890, 2592, 0x47ad00c4
154
+1, 563592, 2592, 0x39bbf306
155
+1, 568294, 3240, 0x69addfce
156
+1, 574171, 21384, 0x254f63e0
157
+1, 612963, 21456, 0x2f7a9859
158
+0, 615600, 14420, 0x53324ca4
159
+0, 619200, 40, 0x10971420
160
+1, 651886, 37512, 0x6e962928
161
+1, 719935, 2736, 0x1dc91c69
162
+0, 720000, 24904, 0x15574f7e
163
+1, 724898, 2736, 0x023434fd
164
+1, 729861, 2736, 0x906f1541
165
+0, 734400, 1908, 0xccb2dd3c
166
+1, 734824, 2736, 0x85a31102
167
+0, 738000, 4676, 0xbfa42b7e
168
+1, 739788, 3024, 0x9296a5f3
169
+0, 741600, 3600, 0x87c9dc58
170
+0, 745200, 8184, 0x504a8e65
171
+1, 745273, 1944, 0x7bf4dedc
172
+0, 748800, 9636, 0x2efb3006
173
+1, 748800, 1944, 0x4196c404
174
+1, 752327, 1944, 0xcda97c7a
175
+0, 752400, 9580, 0x0fb6f4e8
176
+1, 755853, 1944, 0x5f4922b2
177
+0, 756000, 7840, 0xe996f564
178
+1, 759380, 2088, 0x37dfc157
179
+0, 759600, 4208, 0xe9c2fba2
180
+0, 763200, 556, 0x3f1e077c
... ...
@@ -1,10 +1,21 @@
1
-0, 0, 79360, 0x877eb3ed
2
-0, 6000, 79360, 0x9ff8707c
3
-0, 12000, 79360, 0x144dec86
4
-0, 18000, 79360, 0x56d59588
5
-0, 24000, 79360, 0x2d20f8ce
6
-0, 30000, 79360, 0x1a752c42
7
-0, 36000, 79360, 0x85705730
8
-0, 42000, 79360, 0xddea3741
9
-0, 48000, 79360, 0x46448efd
10
-0, 54000, 79360, 0x27186e2b
1
+0, 0, 79360, 0x3b0a7d1b
2
+0, 6000, 79360, 0x740842c3
3
+0, 12000, 79360, 0x85160167
4
+0, 18000, 79360, 0xaf510e92
5
+0, 24000, 79360, 0x8e290bec
6
+0, 30000, 79360, 0x51e981b0
7
+0, 36000, 79360, 0x16e52c60
8
+0, 42000, 79360, 0x66e1e60a
9
+0, 48000, 79360, 0x40fa58f6
10
+0, 54000, 79360, 0x00388edd
11
+0, 60000, 79360, 0xc74f95bf
12
+0, 66000, 79360, 0xf446a3fd
13
+0, 72000, 79360, 0x27b5eb60
14
+0, 78000, 79360, 0xea9266a2
15
+0, 84000, 79360, 0x7b6a7907
16
+0, 90000, 79360, 0x2be7d946
17
+0, 96000, 79360, 0x61881ee4
18
+0, 102000, 79360, 0x9214bd4f
19
+0, 108000, 79360, 0xeb294afe
20
+0, 114000, 79360, 0xc861ad55
21
+0, 120000, 79360, 0x3d3b6220