comparison mpeg12.c @ 8855:6ce8ebfc9d86 libavcodec

use ff_xvmc for function names instead of XVMC_
author iive
date Sat, 14 Feb 2009 18:25:41 +0000
parents 3eaabd9c4371
children f8042554d4c8
comparison
equal deleted inserted replaced
8854:897a2b1f883e 8855:6ce8ebfc9d86
59 static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, DCTELEM *block, int n); 59 static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, DCTELEM *block, int n);
60 static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n); 60 static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n);
61 static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); 61 static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred);
62 static void exchange_uv(MpegEncContext *s); 62 static void exchange_uv(MpegEncContext *s);
63 63
64 int XVMC_field_start(MpegEncContext *s, AVCodecContext *avctx); 64 int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx);
65 int XVMC_field_end(MpegEncContext *s); 65 int ff_xvmc_field_end(MpegEncContext *s);
66 void XVMC_pack_pblocks(MpegEncContext *s,int cbp); 66 void ff_xvmc_pack_pblocks(MpegEncContext *s,int cbp);
67 void XVMC_init_block(MpegEncContext *s);//set s->block 67 void ff_xvmc_init_block(MpegEncContext *s);//set s->block
68 68
69 static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = { 69 static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = {
70 PIX_FMT_XVMC_MPEG2_IDCT, 70 PIX_FMT_XVMC_MPEG2_IDCT,
71 PIX_FMT_XVMC_MPEG2_MC, 71 PIX_FMT_XVMC_MPEG2_MC,
72 PIX_FMT_NONE}; 72 PIX_FMT_NONE};
302 memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ 302 memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
303 s->mb_intra = 1; 303 s->mb_intra = 1;
304 #if CONFIG_MPEG_XVMC_DECODER 304 #if CONFIG_MPEG_XVMC_DECODER
305 //if 1, we memcpy blocks in xvmcvideo 305 //if 1, we memcpy blocks in xvmcvideo
306 if(s->avctx->xvmc_acceleration > 1){ 306 if(s->avctx->xvmc_acceleration > 1){
307 XVMC_pack_pblocks(s,-1);//inter are always full blocks 307 ff_xvmc_pack_pblocks(s,-1);//inter are always full blocks
308 if(s->swap_uv){ 308 if(s->swap_uv){
309 exchange_uv(s); 309 exchange_uv(s);
310 } 310 }
311 } 311 }
312 #endif 312 #endif
515 } 515 }
516 516
517 #if CONFIG_MPEG_XVMC_DECODER 517 #if CONFIG_MPEG_XVMC_DECODER
518 //if 1, we memcpy blocks in xvmcvideo 518 //if 1, we memcpy blocks in xvmcvideo
519 if(s->avctx->xvmc_acceleration > 1){ 519 if(s->avctx->xvmc_acceleration > 1){
520 XVMC_pack_pblocks(s,cbp); 520 ff_xvmc_pack_pblocks(s,cbp);
521 if(s->swap_uv){ 521 if(s->swap_uv){
522 exchange_uv(s); 522 exchange_uv(s);
523 } 523 }
524 } 524 }
525 #endif 525 #endif
1650 } 1650 }
1651 #if CONFIG_MPEG_XVMC_DECODER 1651 #if CONFIG_MPEG_XVMC_DECODER
1652 // MPV_frame_start will call this function too, 1652 // MPV_frame_start will call this function too,
1653 // but we need to call it on every field 1653 // but we need to call it on every field
1654 if(s->avctx->xvmc_acceleration) 1654 if(s->avctx->xvmc_acceleration)
1655 XVMC_field_start(s,avctx); 1655 ff_xvmc_field_start(s,avctx);
1656 #endif 1656 #endif
1657 1657
1658 return 0; 1658 return 0;
1659 } 1659 }
1660 1660
1740 1740
1741 for(;;) { 1741 for(;;) {
1742 #if CONFIG_MPEG_XVMC_DECODER 1742 #if CONFIG_MPEG_XVMC_DECODER
1743 //If 1, we memcpy blocks in xvmcvideo. 1743 //If 1, we memcpy blocks in xvmcvideo.
1744 if(s->avctx->xvmc_acceleration > 1) 1744 if(s->avctx->xvmc_acceleration > 1)
1745 XVMC_init_block(s);//set s->block 1745 ff_xvmc_init_block(s);//set s->block
1746 #endif 1746 #endif
1747 1747
1748 if(mpeg_decode_mb(s, s->block) < 0) 1748 if(mpeg_decode_mb(s, s->block) < 0)
1749 return -1; 1749 return -1;
1750 1750
1921 if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) 1921 if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
1922 return 0; 1922 return 0;
1923 1923
1924 #if CONFIG_MPEG_XVMC_DECODER 1924 #if CONFIG_MPEG_XVMC_DECODER
1925 if(s->avctx->xvmc_acceleration) 1925 if(s->avctx->xvmc_acceleration)
1926 XVMC_field_end(s); 1926 ff_xvmc_field_end(s);
1927 #endif 1927 #endif
1928 /* end of slice reached */ 1928 /* end of slice reached */
1929 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) { 1929 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) {
1930 /* end of image */ 1930 /* end of image */
1931 1931