2009-03-24 19:40
Regarding software scaling: Even if your VGA card and driver support hardware scaling, you may want to try SwScaler, for better quality (at the cost of high CPU usage). Note that SwScaler can do some kinds of filtering (blur/sharpen, chroma shifting), too; see the -ssf option. You can select the scaling method with the -sws option, from nearest-neighbor (pixelized) to bicubic spline (very nice).
Summary
MPlayer is a very scalable player. Fr
|
2009-03-24 19:40 CPU speed
Is your CPU fast enough for DivX playback? It depends on the VGA support. Why? Let's have a look at two corner cases. I have a PII 250MHz for testing, equipped with a Matrox G200 AGP card. It's able to play DVDs in fullscreen and even 720x576 DivX files. A friend of mine has a 1GHz PIII with an S3 Trio3D. He is unable to play DVD fullscreen, since his card has no native drivers -- not even Xv support, even DGA is broken, just pure X11 works. He has to use soft |
2009-03-24 19:38 MPlayer是一个电影播放器.它主要是写给linux系统的,但它可以在大部份的类unix系统上运行,甚至在一些其他类型系统,譬如OSX, QNX,(不知何故)甚至Windows.虽然它是一个 桌面/最终面向用户 的应用程序,但它还达不到应有的友善程度.以前,我甚至告诉一些新手(刚从windows系统转过来的),让他们尝试使用xine而不是命令行方式的 MPlayer.
MPlayer发展神速.最新的MPlayer 0.90 RC系列拥有一个非常漂亮,可换皮肤,有着通常GUI功能的GUI操作界面,并带有一些隐藏(文档中未公开)的功能和复活节彩蛋(译者注:复活节彩蛋是指 程序 |
2009-03-24 19:37 视频质量/过滤器
如果你的电影质量不好(雪花大,图象交错,色彩不匀...),而且你的CPU还有一些空闲(译者注:意思是CPU没有占用100%),你可以试试MPlayer的一些过滤器.
对于交错扫描的视频(当有镜头快速移动时,你可以看到图象在逐线显示,有头发丝效果),你可以试试用-vop pp=0x20000参数.如果那还不满意,试试0x10000,0x40000和0x80000.对于低质量转换的NTSC格式电影,可以试试-vop dint参数或FFmpeg的过滤器,-vop pp=fd:c或-vop lavcdeint.如果你的CPU被严重占用(反交错扫描运算是一项极耗CPU运算的工作),试试一个差劲点的反 |
2009-02-27 13:50 附录 B Solaris 线程示例: barrier.c(剧终)
barrier.c 程序演示了 Solaris 线程的屏障实现。有关屏障的定义,请参见在共享内存并行计算机上并行化循环。
示例 B–1 Solaris 线程示例: barrier.c
#define _REENTRANT
/* Include Files */
#include <thread.h>
|
2009-02-27 13:49
/*
* Print Local Output: Called by the search thread after it is done searching
* a single file. If any oputput was saved (matching lines), the lines are
* displayed as a group on stdout.
*/
int
print_local_output(out_t *out, work_t *wt)
{
out_t *pp, *op;
int out_count = 0;
|
2009-02-27 13:48 OUT:
if (flags & TG_PROGRESS) {
if (progress)
fprintf(stderr,".\n");
else
fprintf(stderr,"\n");
}
/* we are done, print |
2009-02-27 13:46 /*
* Main: This is where the fun starts
*/
int
main(int argc, char **argv)
{
int c,out_thr_flags;
long max_open_files = 0l, ncpus = 0l;
extern int optind;
extern char *optarg;
int |
2009-02-27 13:43
附录 A 样例应用程序:多线程 grep
本附录提供样例程序 tgrep,其中显示了 find(1) 与 grep(1) 组合后的多线程版本。
tgrep 的说明
tgrep 支持除常规 grep 的 -w 单词搜索选项和可独占使用选项以外的所有选项。
缺省情况下,tgrep 搜索与以下命令类似:
find . -exec grep [options] pattern {} \;
对于大型目录分层结构,tgrep 比 find 命令获取结果的速度更快,具体速度取决于可用的处理器数目。在单处理器计算机上,tgrep 的速度大约是 find 的两倍;在包含四个处理器的计算
|
2009-02-27 13:36 第 9 章 编程原则
本章提供有关使用线程进行编程的一些建议。大多数建议同时适用于 Solaris 和 POSIX 线程,但效用会有所不同,需要注意其行为。本章着重讲解从单线程思维到多线程思维的转变。本章讨论以下主题:
|
2009-02-27 13:34
thr_keycreate 语法
#include <thread.h>
int thr_keycreate(thread_key_t *keyp,
void (*destructor) (void *value));
keyp 为每个绑定线程单独维护特定的值。所有的线程最初都会绑定到专用元素 keyp,该元素可用于访问其线程特定数据。创建键时,对于所有活动线程,将为新键赋予值 NULL。此外在创建线程时,还会为以前在新线程中创建的所有键赋予值 NULL。
destructor 函数是可选的,可以将其与每个 keyp 相关联。线程退出时,如果 key
|
2009-02-27 12:56 第 7 章 编译和调试
本章介绍如何编译和调试多线程程序。本章论述以下主题:
编译多线程应用程序
许多选项可用于头文件、定义标志和链接。
为编译做准备
|
2009-02-27 12:49
abs(计算整型数的绝对值)
相关函数
labs, fabs
表头文件
#include<stdlib.h>
定义函数
int abs (int j)
函数说明
abs()用来计算参数j的绝对值,然后将结果返回。
返回值
返回参数j的绝对值结果。
范例
#ingclude <stdlib.h>
main(){
int ansert;
answer = abs(-12);
printf("|-12| = %d\n", answer);
}
执行 |
2009-02-27 12:47
Linux 用户管理工具介绍
本文主要介绍Linux系统的用户和用户组的查询、添加、修改及删除等管理工具
Linux是一个多用户的操作系统,她有完美的用户管理工具,这些工具包括用户的查询、添加、修改,以及用户之间相互切换的工具等;通过这些工具,我们能安全、轻松的完成用户管理;
一、与用户管理相关的配置文件
1、/etc/passwd 和/etc/groups
在linux系统下,对用户和用户组进行添加、修改、删除等操作的最终目的都是通过修改用户和组的配置文件来实现的,这些主要配置文件主要有: /
|
2009-02-27 12:45 守护进程
守护进程是一种运行在非交互模式下的程序。一般来说,守护进程任务是和联网区域有关的:它们等待连接,以便通过连接提供服务。Linux 可以使用从 Web 服务器到 ftp 服务器的很多守护进程。
| /etc/syslogd.conf |
syslogd 守护进程的配置文件。syslogd 是一种守护进程,它负责记 | |
| | |