~ubuntu-branches/ubuntu/feisty/avidemux/feisty

« back to all changes in this revision

Viewing changes to adm_lavcodec/indeo3.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2005-05-25 13:02:29 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050525130229-jw94cav0yhmg7vjw
Tags: 1:2.0.40-0.0
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
static void iv_alloc_frames(Indeo3DecodeContext *s) 
102
102
{
103
103
  int luma_width, luma_height, luma_pixels, chroma_width, chroma_height,
104
 
    chroma_pixels, bufsize, i;
 
104
      chroma_pixels, i;
 
105
  unsigned int bufsize;
105
106
 
106
107
  luma_width   = (s->width  + 3) & (~3);
107
108
  luma_height  = (s->height + 3) & (~3);
195
196
  hdr_height = le2me_16(*(uint16_t *)buf_pos);
196
197
  buf_pos += 2;
197
198
  hdr_width = le2me_16(*(uint16_t *)buf_pos);
 
199
  
 
200
  if(avcodec_check_dimensions(NULL, hdr_width, hdr_height))
 
201
      return -1;
 
202
  
198
203
  buf_pos += 2;
199
204
  chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc;
200
205
  chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc;
223
228
    hdr_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos, 
224
229
    min(hdr_width, 160));
225
230
 
 
231
  if (!(s->avctx->flags & CODEC_FLAG_GRAY))
 
232
  {
 
233
 
226
234
  buf_pos = buf + 16 + offs2;
227
235
  offs = le2me_32(*(uint32_t *)buf_pos);
228
236
  buf_pos += 4;
239
247
    chroma_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos, 
240
248
    min(chroma_width, 40));
241
249
 
 
250
  }
 
251
 
242
252
  return 8;
243
253
}
244
254
 
1080
1090
      dest += s->frame.linesize[0];
1081
1091
    }
1082
1092
 
 
1093
    if (!(s->avctx->flags & CODEC_FLAG_GRAY))
 
1094
    {
1083
1095
    src = s->cur_frame->Ubuf;
1084
1096
    dest = s->frame.data[1];
1085
1097
    for (y = 0; y < s->height / 4; y++) {
1095
1107
      src += s->cur_frame->uv_w;
1096
1108
      dest += s->frame.linesize[2];
1097
1109
    }
 
1110
    }
1098
1111
 
1099
1112
    *data_size=sizeof(AVFrame);
1100
1113
    *(AVFrame*)data= s->frame;