[MPlayer-cvslog] r28587 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sun Feb 15 14:04:58 CET 2009
Author: reimar
Date: Sun Feb 15 14:04:57 2009
New Revision: 28587
Log:
Get rid of mc_render_slice and use the generic draw_slice instead.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sun Feb 15 13:19:36 2009 (r28586)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sun Feb 15 14:04:57 2009 (r28587)
@@ -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(struc
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
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(AVCodecCon
}
}
-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 */
More information about the MPlayer-cvslog
mailing list