~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-updates

« back to all changes in this revision

Viewing changes to libavutil/des.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 17:51:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120175119-gu6kw1arv5tmf1vr
Tags: 3:0.svn20090119-1ubuntu1+unstripped1
* merge with the ubuntu.jaunty branch
* reenable x264 LP: #303537
* build against vdpau
* enable xvmc support

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
};
75
75
#undef T
76
76
 
77
 
#ifdef CONFIG_SMALL
 
77
#if CONFIG_SMALL
78
78
static const uint8_t S_boxes[8][32] = {
79
79
    {
80
80
    0x0e, 0xf4, 0x7d, 0x41, 0xe2, 0x2f, 0xdb, 0x18, 0xa3, 0x6a, 0xc6, 0xbc, 0x95, 0x59, 0x30, 0x87,
218
218
    // apply S-boxes, those compress the data again from 8 * 6 to 8 * 4 bits
219
219
    for (i = 7; i >= 0; i--) {
220
220
        uint8_t tmp = (r ^ k) & 0x3f;
221
 
#ifdef CONFIG_SMALL
 
221
#if CONFIG_SMALL
222
222
        uint8_t v = S_boxes[i][tmp >> 1];
223
223
        if (tmp & 1) v >>= 4;
224
224
        out = (out >> 4) | (v << 28);
229
229
        r = (r >> 4) | (r << 28);
230
230
        k >>= 6;
231
231
    }
232
 
#ifdef CONFIG_SMALL
 
232
#if CONFIG_SMALL
233
233
    out = shuffle(out, P_shuffle, sizeof(P_shuffle));
234
234
#endif
235
235
    return out;