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
This commit is contained in:
mswitch 2002-03-16 15:49:26 +00:00
parent 14316b3379
commit 24c5ce1c3b
1 changed files with 38 additions and 7 deletions

View File

@ -6,6 +6,11 @@
*/ */
/* ChangeLog added 2002-01-10 /* 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: * 2002-03-13:
* Preliminary fame support added (it breaks after seeking, why?) * 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 */ /* Conversion needed | OSD Supported */
flag = 0x1 | 0x4; flag = 0x1 | 0x4;
break; break;
default:
printf("VO: [dxr3] Format unsupported, mail dholm@iname.com\n");
#else #else
default: 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 #endif
} }
if (noprebuf) { 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.quality = 100;
fame_params.bitrate = 0; fame_params.bitrate = 0;
fame_params.slices_per_frame = 1; fame_params.slices_per_frame = 1;
fame_params.frames_per_sequence = 25; fame_params.frames_per_sequence = (int) round(vo_fps);
fame_params.frame_rate_num = 25;
fame_params.frame_rate_den = 1;
fame_params.shape_quality = 100; fame_params.shape_quality = 100;
fame_params.search_range = 8; fame_params.search_range = 8;
fame_params.verbose = 0; fame_params.verbose = 0;
fame_params.profile = NULL; 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); outbuf = malloc(100000);
fame_init(fame_ctx, &fame_params, outbuf, 100000); fame_init(fame_ctx, &fame_params, outbuf, 100000);
@ -471,13 +498,17 @@ static uint32_t preinit(const char *arg)
char devname[80]; char devname[80];
int fdflags = O_WRONLY; 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 */ /* Open the control interface */
if (arg && !strcmp("noprebuf", arg)) { if (arg && !strcmp("noprebuf", arg)) {
printf("VO: [dxr3] Disabling prebuffering.\n"); printf("VO: [dxr3] Disabling prebuffering.\n");
noprebuf = 1; noprebuf = 1;
fdflags |= O_NONBLOCK; fdflags |= O_NONBLOCK;
} }
#endif
if (arg && !noprebuf) { if (arg && !noprebuf) {
printf("VO: [dxr3] Forcing use of device %s\n", arg); printf("VO: [dxr3] Forcing use of device %s\n", arg);
sprintf(devname, "/dev/em8300-%s", arg); sprintf(devname, "/dev/em8300-%s", arg);