comparison dv.c @ 1543:7542cb99b950 libavcodec

* providing MPEG codecs with a generic fields in AVFrame to use. * fixing YUV4MPEG format. * fixing a bug in DV codec where coded_frame was not set.
author romansh
date Sat, 18 Oct 2003 03:19:44 +0000
parents a0086452b9d8
children 0183874861fd
comparison
equal deleted inserted replaced
1542:576861d6343a 1543:7542cb99b950
147 dv_build_unquantize_tables(s); 147 dv_build_unquantize_tables(s);
148 148
149 /* FIXME: I really don't think this should be here */ 149 /* FIXME: I really don't think this should be here */
150 if (dv_codec_profile(avctx)) 150 if (dv_codec_profile(avctx))
151 avctx->pix_fmt = dv_codec_profile(avctx)->pix_fmt; 151 avctx->pix_fmt = dv_codec_profile(avctx)->pix_fmt;
152 avctx->coded_frame = &s->picture;
152 153
153 return 0; 154 return 0;
154 } 155 }
155 156
156 // #define VLC_DEBUG 157 // #define VLC_DEBUG
851 avctx->height = s->sys->height; 852 avctx->height = s->sys->height;
852 if(avctx->get_buffer(avctx, &s->picture) < 0) { 853 if(avctx->get_buffer(avctx, &s->picture) < 0) {
853 fprintf(stderr, "get_buffer() failed\n"); 854 fprintf(stderr, "get_buffer() failed\n");
854 return -1; 855 return -1;
855 } 856 }
857 s->picture.interlaced_frame = 1;
858 s->picture.bottom_field_first = 1;
856 859
857 /* for each DIF segment */ 860 /* for each DIF segment */
858 mb_pos_ptr = s->sys->video_place; 861 mb_pos_ptr = s->sys->video_place;
859 for (ds = 0; ds < s->sys->difseg_size; ds++) { 862 for (ds = 0; ds < s->sys->difseg_size; ds++) {
860 buf += 6 * 80; /* skip DIF segment header */ 863 buf += 6 * 80; /* skip DIF segment header */