Revision c46eeae2 libavcodec/svq1enc.c

View differences:

libavcodec/svq1enc.c
94 94
        /* output 5 unknown bits (2 + 2 + 1) */
95 95
        put_bits(&s->pb, 5, 2); /* 2 needed by quicktime decoder */
96 96

  
97
        for (i = 0; i < 7; i++)
98
        {
99
            if ((ff_svq1_frame_size_table[i].width == s->frame_width) &&
100
                (ff_svq1_frame_size_table[i].height == s->frame_height))
101
            {
102
                put_bits(&s->pb, 3, i);
103
                break;
104
            }
105
        }
97
        i= ff_match_2uint16(ff_svq1_frame_size_table, FF_ARRAY_ELEMS(ff_svq1_frame_size_table), s->frame_width, s->frame_height);
98
        put_bits(&s->pb, 3, i);
106 99

  
107 100
        if (i == 7)
108 101
        {
109
            put_bits(&s->pb, 3, 7);
110 102
                put_bits(&s->pb, 12, s->frame_width);
111 103
                put_bits(&s->pb, 12, s->frame_height);
112 104
        }

Also available in: Unified diff