Mercurial > libavcodec.hg
diff mpegvideo.c @ 8522:f8c091bb5779 libavcodec
Add VDPAU hardware accelerated decoding for H264 which can be used by
video players.
Original patch by NVIDIA corporation.
author | cehoyos |
---|---|
date | Sun, 04 Jan 2009 23:55:27 +0000 |
parents | 9281a8a9387a |
children | 7a463923ecd1 |
line wrap: on
line diff
--- a/mpegvideo.c Sun Jan 04 18:58:49 2009 +0000 +++ b/mpegvideo.c Sun Jan 04 23:55:27 2009 +0000 @@ -957,7 +957,11 @@ XVMC_field_end(s); }else #endif - if(s->unrestricted_mv && s->current_picture.reference && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) { + if(!(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) + && s->unrestricted_mv + && s->current_picture.reference + && !s->intra_only + && !(s->flags&CODEC_FLAG_EMU_EDGE)) { s->dsp.draw_edges(s->current_picture.data[0], s->linesize , s->h_edge_pos , s->v_edge_pos , EDGE_WIDTH ); s->dsp.draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); s->dsp.draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2);