comparison dv.c @ 3168:1deaaa111fbc libavcodec

I still don't think this should be here. Note: without this code DV encoder will accept incorrect pix_fmt's and such, but decoder will work much better with containers not setting the same attributes. It seems like there will be a generic mechanism for checking such constraints, but if not I can always resurrect this check for *encoder* only.
author romansh
date Mon, 06 Mar 2006 09:54:09 +0000
parents 312b86bc4202
children 3335f51b6cd3
comparison
equal deleted inserted replaced
3167:312b86bc4202 3168:1deaaa111fbc
239 memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64); 239 memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
240 240
241 /* XXX: do it only for constant case */ 241 /* XXX: do it only for constant case */
242 dv_build_unquantize_tables(s, dsp.idct_permutation); 242 dv_build_unquantize_tables(s, dsp.idct_permutation);
243 243
244 /* FIXME: I really don't think this should be here */
245 s->sys = dv_codec_profile(avctx);
246 if(!s->sys) {
247 av_log(avctx, AV_LOG_ERROR, "Cannot determine type of DV output stream\n");
248 return -EINVAL;
249 }
250 avctx->pix_fmt = s->sys->pix_fmt;
251 avctx->bit_rate = av_rescale(s->sys->frame_size * 8,
252 s->sys->frame_rate,
253 s->sys->frame_rate_base);
254 avctx->coded_frame = &s->picture; 244 avctx->coded_frame = &s->picture;
255 s->avctx= avctx; 245 s->avctx= avctx;
256 246
257 return 0; 247 return 0;
258 } 248 }