comparison vc1.c @ 4414:7c42c51b1130 libavcodec

Set aspect ratio if present (for AP only)
author kostya
date Sat, 27 Jan 2007 06:57:11 +0000
parents 43f4d0d7672c
children 8187c306ffcd
comparison
equal deleted inserted replaced
4413:371bb9f644da 4414:7c42c51b1130
1294 int w, h, ar = 0; 1294 int w, h, ar = 0;
1295 av_log(v->s.avctx, AV_LOG_INFO, "Display extended info:\n"); 1295 av_log(v->s.avctx, AV_LOG_INFO, "Display extended info:\n");
1296 w = get_bits(gb, 14) + 1; 1296 w = get_bits(gb, 14) + 1;
1297 h = get_bits(gb, 14) + 1; 1297 h = get_bits(gb, 14) + 1;
1298 av_log(v->s.avctx, AV_LOG_INFO, "Display dimensions: %ix%i\n", w, h); 1298 av_log(v->s.avctx, AV_LOG_INFO, "Display dimensions: %ix%i\n", w, h);
1299 //TODO: store aspect ratio in AVCodecContext
1300 if(get_bits1(gb)) 1299 if(get_bits1(gb))
1301 ar = get_bits(gb, 4); 1300 ar = get_bits(gb, 4);
1302 if(ar == 15) { 1301 if(ar && ar < 14){
1302 v->s.avctx->sample_aspect_ratio = vc1_pixel_aspect[ar];
1303 }else if(ar == 15){
1303 w = get_bits(gb, 8); 1304 w = get_bits(gb, 8);
1304 h = get_bits(gb, 8); 1305 h = get_bits(gb, 8);
1306 v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
1305 } 1307 }
1306 1308
1307 if(get_bits1(gb)){ //framerate stuff 1309 if(get_bits1(gb)){ //framerate stuff
1308 if(get_bits1(gb)) { 1310 if(get_bits1(gb)) {
1309 get_bits(gb, 16); 1311 get_bits(gb, 16);