diff options
author | mswitch <mswitch@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-16 15:49:26 +0000 |
---|---|---|
committer | mswitch <mswitch@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-16 15:49:26 +0000 |
commit | 24c5ce1c3bdfd0a113b3548b82f28d9ecfae33c9 (patch) | |
tree | 728e786e9f610c27da43d75d9315d08be7d5e67e /libvo/vo_dxr3.c | |
parent | 14316b337915d8e933d07f3d70efe9df3ac64e0c (diff) | |
download | mpv-24c5ce1c3bdfd0a113b3548b82f28d9ecfae33c9.tar.bz2 mpv-24c5ce1c3bdfd0a113b3548b82f28d9ecfae33c9.tar.xz |
Fixed some bugs with fame, had to disable prebuffering with fame though
as sync drifts off. But fame is alot more stable than avcodec and so far
I've noticed a small quality increase with some videos (not all).
Will have to work some more on the sync stuff... This one should be
stable though..
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5135 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_dxr3.c')
-rw-r--r-- | libvo/vo_dxr3.c | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index a625bc9309..d2d5213ae9 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -6,6 +6,11 @@ */ /* ChangeLog added 2002-01-10 + * 2002-03-16: + * Fixed problems with fame, it gives a better picture than avcodec, + * but is slightly slower. Most notably the wobbling effect is gone + * with fame. + * * 2002-03-13: * Preliminary fame support added (it breaks after seeking, why?) * @@ -164,11 +169,9 @@ uint32_t control(uint32_t request, void *data, ...) /* Conversion needed | OSD Supported */ flag = 0x1 | 0x4; break; - default: - printf("VO: [dxr3] Format unsupported, mail dholm@iname.com\n"); #else default: - printf("VO: [dxr3] You have disabled libavcodec support (Read DOCS/codecs.html)!\n"); + printf("VO: [dxr3] You have disabled libavcodec/libfame support (Read DOCS/codecs.html)!\n"); #endif } if (noprebuf) { @@ -276,14 +279,38 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32 fame_params.quality = 100; fame_params.bitrate = 0; fame_params.slices_per_frame = 1; - fame_params.frames_per_sequence = 25; - fame_params.frame_rate_num = 25; - fame_params.frame_rate_den = 1; + fame_params.frames_per_sequence = (int) round(vo_fps); fame_params.shape_quality = 100; fame_params.search_range = 8; fame_params.verbose = 0; fame_params.profile = NULL; + if (vo_fps < 24.0) { + fame_params.frame_rate_num = 24000; + fame_params.frame_rate_den = 1001; + } else if (vo_fps < 25.0) { + fame_params.frame_rate_num = 24; + fame_params.frame_rate_den = 1; + } else if (vo_fps < 29.0) { + fame_params.frame_rate_num = 25; + fame_params.frame_rate_den = 1; + } else if (vo_fps < 30.0) { + fame_params.frame_rate_num = 30000; + fame_params.frame_rate_den = 1001; + } else if (vo_fps < 50.0) { + fame_params.frame_rate_num = 30; + fame_params.frame_rate_den = 1; + } else if (vo_fps < 55.0) { + fame_params.frame_rate_num = 50; + fame_params.frame_rate_den = 1; + } else if (vo_fps < 60.0) { + fame_params.frame_rate_num = 60000; + fame_params.frame_rate_den = 1001; + } else { + fame_params.frame_rate_num = 60; + fame_params.frame_rate_den = 1; + } + outbuf = malloc(100000); fame_init(fame_ctx, &fame_params, outbuf, 100000); @@ -471,13 +498,17 @@ static uint32_t preinit(const char *arg) char devname[80]; int fdflags = O_WRONLY; +#ifdef USE_LIBFAME + printf("VO: [dxr3] You are using fame, due to a small problem I have to disable prebuffering\n"); + noprebuf = 1; +#else /* Open the control interface */ if (arg && !strcmp("noprebuf", arg)) { printf("VO: [dxr3] Disabling prebuffering.\n"); noprebuf = 1; fdflags |= O_NONBLOCK; } - +#endif if (arg && !noprebuf) { printf("VO: [dxr3] Forcing use of device %s\n", arg); sprintf(devname, "/dev/em8300-%s", arg); |