summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-15 13:04:57 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-15 13:04:57 +0000
commitd1e711b21bebcfd0c9289b1d44764f3f2e01648e (patch)
tree981765add42f2be3f3bc9a6cd4fc94d5c74fcceb /libmpcodecs
parenta81bf56e8db0224d6cdc5829ce102b815428ac29 (diff)
downloadmpv-d1e711b21bebcfd0c9289b1d44764f3f2e01648e.tar.bz2
mpv-d1e711b21bebcfd0c9289b1d44764f3f2e01648e.tar.xz
Get rid of mc_render_slice and use the generic draw_slice instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28587 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 6e9499c6c9..291eee3b13 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -55,15 +55,14 @@ typedef struct {
static int get_buffer(AVCodecContext *avctx, AVFrame *pic);
static void release_buffer(AVCodecContext *avctx, AVFrame *pic);
+static void draw_slice(struct AVCodecContext *s, AVFrame *src, int offset[4],
+ int y, int type, int height);
#if CONFIG_XVMC
static enum PixelFormat get_format(struct AVCodecContext *avctx,
const enum PixelFormat *pix_fmt);
static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic);
static void mc_release_buffer(AVCodecContext *avctx, AVFrame *pic);
-static void mc_render_slice(struct AVCodecContext *s,
- AVFrame *src, int offset[4],
- int y, int type, int height);
#endif
static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT;
@@ -254,7 +253,7 @@ static int init(sh_video_t *sh){
avctx->get_format= get_format;//for now only this decoder will use it
avctx->get_buffer= mc_get_buffer;
avctx->release_buffer= mc_release_buffer;
- avctx->draw_horiz_band = mc_render_slice;
+ avctx->draw_horiz_band = draw_slice;
avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD;
}else
#endif /* CONFIG_XVMC */
@@ -857,7 +856,7 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx,
vd_ffmpeg_ctx *ctx = sh->context;
avctx->get_buffer= mc_get_buffer;
avctx->release_buffer= mc_release_buffer;
- avctx->draw_horiz_band = mc_render_slice;
+ avctx->draw_horiz_band = draw_slice;
mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedMPEG2);
assert(ctx->do_dr1);//these are must to!
assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
@@ -887,7 +886,6 @@ static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic){
exit(1);
// return -1;//!!fixme check error conditions
}
- assert(avctx->draw_horiz_band == mc_render_slice);
assert(avctx->release_buffer == mc_release_buffer);
if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_get_buffer\n");
@@ -993,18 +991,4 @@ static void mc_release_buffer(AVCodecContext *avctx, AVFrame *pic){
}
}
-static void mc_render_slice(struct AVCodecContext *s,
- AVFrame *src, int offset[4],
- int y, int type, int height){
- int width= s->width;
- sh_video_t *sh = s->opaque;
- uint8_t *source[3]= {src->data[0], src->data[1], src->data[2]};
-
- assert(src->linesize[0]==0 && src->linesize[1]==0 && src->linesize[2]==0);
- assert(offset[0]==0 && offset[1]==0 && offset[2]==0);
-
- mpcodecs_draw_slice (sh, source, src->linesize, width, height, 0, y);
-
-}
-
#endif /* CONFIG_XVMC */