Mercurial > libavcodec.hg
comparison mpeg12.c @ 8590:7a463923ecd1 libavcodec
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.
author | aurel |
---|---|
date | Tue, 13 Jan 2009 23:44:16 +0000 |
parents | a29b5b5c3c9d |
children | 8b80f8285b1b |
comparison
equal
deleted
inserted
replaced
8589:a29b5b5c3c9d | 8590:7a463923ecd1 |
---|---|
301 | 301 |
302 skip_bits1(&s->gb); /* marker */ | 302 skip_bits1(&s->gb); /* marker */ |
303 }else | 303 }else |
304 memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ | 304 memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ |
305 s->mb_intra = 1; | 305 s->mb_intra = 1; |
306 #ifdef CONFIG_XVMC | 306 #if CONFIG_XVMC |
307 //if 1, we memcpy blocks in xvmcvideo | 307 //if 1, we memcpy blocks in xvmcvideo |
308 if(s->avctx->xvmc_acceleration > 1){ | 308 if(s->avctx->xvmc_acceleration > 1){ |
309 XVMC_pack_pblocks(s,-1);//inter are always full blocks | 309 XVMC_pack_pblocks(s,-1);//inter are always full blocks |
310 if(s->swap_uv){ | 310 if(s->swap_uv){ |
311 exchange_uv(s); | 311 exchange_uv(s); |
514 if (cbp <= 0){ | 514 if (cbp <= 0){ |
515 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); | 515 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); |
516 return -1; | 516 return -1; |
517 } | 517 } |
518 | 518 |
519 #ifdef CONFIG_XVMC | 519 #if CONFIG_XVMC |
520 //if 1, we memcpy blocks in xvmcvideo | 520 //if 1, we memcpy blocks in xvmcvideo |
521 if(s->avctx->xvmc_acceleration > 1){ | 521 if(s->avctx->xvmc_acceleration > 1){ |
522 XVMC_pack_pblocks(s,cbp); | 522 XVMC_pack_pblocks(s,cbp); |
523 if(s->swap_uv){ | 523 if(s->swap_uv){ |
524 exchange_uv(s); | 524 exchange_uv(s); |
1642 if(s->picture_structure == PICT_BOTTOM_FIELD){ | 1642 if(s->picture_structure == PICT_BOTTOM_FIELD){ |
1643 s->current_picture.data[i] += s->current_picture_ptr->linesize[i]; | 1643 s->current_picture.data[i] += s->current_picture_ptr->linesize[i]; |
1644 } | 1644 } |
1645 } | 1645 } |
1646 } | 1646 } |
1647 #ifdef CONFIG_XVMC | 1647 #if CONFIG_XVMC |
1648 // MPV_frame_start will call this function too, | 1648 // MPV_frame_start will call this function too, |
1649 // but we need to call it on every field | 1649 // but we need to call it on every field |
1650 if(s->avctx->xvmc_acceleration) | 1650 if(s->avctx->xvmc_acceleration) |
1651 XVMC_field_start(s,avctx); | 1651 XVMC_field_start(s,avctx); |
1652 #endif | 1652 #endif |
1733 s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); | 1733 s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); |
1734 } | 1734 } |
1735 } | 1735 } |
1736 | 1736 |
1737 for(;;) { | 1737 for(;;) { |
1738 #ifdef CONFIG_XVMC | 1738 #if CONFIG_XVMC |
1739 //If 1, we memcpy blocks in xvmcvideo. | 1739 //If 1, we memcpy blocks in xvmcvideo. |
1740 if(s->avctx->xvmc_acceleration > 1) | 1740 if(s->avctx->xvmc_acceleration > 1) |
1741 XVMC_init_block(s);//set s->block | 1741 XVMC_init_block(s);//set s->block |
1742 #endif | 1742 #endif |
1743 | 1743 |
1915 MpegEncContext *s = &s1->mpeg_enc_ctx; | 1915 MpegEncContext *s = &s1->mpeg_enc_ctx; |
1916 | 1916 |
1917 if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) | 1917 if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) |
1918 return 0; | 1918 return 0; |
1919 | 1919 |
1920 #ifdef CONFIG_XVMC | 1920 #if CONFIG_XVMC |
1921 if(s->avctx->xvmc_acceleration) | 1921 if(s->avctx->xvmc_acceleration) |
1922 XVMC_field_end(s); | 1922 XVMC_field_end(s); |
1923 #endif | 1923 #endif |
1924 /* end of slice reached */ | 1924 /* end of slice reached */ |
1925 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) { | 1925 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) { |
2471 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, | 2471 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, |
2472 .flush= ff_mpeg_flush, | 2472 .flush= ff_mpeg_flush, |
2473 .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | 2473 .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), |
2474 }; | 2474 }; |
2475 | 2475 |
2476 #ifdef CONFIG_XVMC | 2476 #if CONFIG_XVMC |
2477 static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ | 2477 static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ |
2478 Mpeg1Context *s; | 2478 Mpeg1Context *s; |
2479 | 2479 |
2480 if( avctx->thread_count > 1) | 2480 if( avctx->thread_count > 1) |
2481 return -1; | 2481 return -1; |