瀏覽單個文章
vxr
Elite Member
 
vxr的大頭照
 

加入日期: May 2002
您的住址: 地球的上面..
文章: 5,854
Exclamation

引用:
作者edw26487
另外再補充
以mpeg-2的阿甘或其他mpeg-2格式的來講
啟用高速模式→開啟顯卡加速後
畫面會有發白現象
在其他片片也有類似現象
因為這種mpeg-2開高速截不下來,所以我用照相代替,如圖5 (http://edw26487.myweb.hinet.net/ima...est/h1white.jpg)
用overlay沒有開加速後,才是正常現象,如圖6 (http://edw26487.myweb.hinet.net/ima...t/h1nowhite.jpg)
如果沒有開高速而用VMR9,那就是底下多條白線而已...
因此靠VMR9通吃大部分mpeg-2是可以,不開高速畫面就不發白
但遇阿甘這類片就改overlay來播就沒有白條以及保持畫面清晰
至於h264大概是一招打天下OK,開高速也可,對大部分而言
但對金剛來講底下會多出透明邊,這時就要透過overlay或者不開加速或者總是使用篩選器來把透明邊的影響降到最低...
以上是就我自己所擁有的樣本所做的觀察及心得
我看mpeg-2是調Cyberlink的DTV
看...


發白是有原因的..<<<====也是老梗問題了..

這問題靠Shader Code就解決了...


sampler s0 : register(s0);
float4 p0 : register(c0);
float4 p1 : register(c1);

#define width (p0[0])
#define height (p0[1])
#define counter (p0[2])
#define clock (p0[3])
#define one_over_width (p1[0])
#define one_over_height (p1[1])

#define PI acos(-1)

#define BT_709

#ifdef BT_709
#define Kb 0.0722
#define Kr 0.2126
#else
#ifdef SMPTE_240M
#define Kb 0.087
#define Kr 0.212
#else
#define Kb 0.114
#define Kr 0.299
#endif
#endif

static float3x3 r2y =
{
Kr, 1-Kr-Kb, Kb,
-Kr/(1-Kb)*0.5, -(1-Kr-Kb)/(1-Kb)*0.5, 0.5,
0.5, -(1-Kr-Kb)/(1-Kr)*0.5, -Kb/(1-Kr)*0.5,
};

static float3x3 y2r =
{
1.000, 0.000, (1-Kr)*2,
1.000, -(1-Kr)*2*Kb/(1-Kr-Kb), -(1-Kb)*2*Kr/(1-Kr-Kb),
1.000, (1-Kb)*2, 0.000,
};

// Brightness: -1.0 to 1.0, default 0.0
// Contrast: 0.0 to 10.0, default 1.0
// Hue: -180.0 to +180.0, default 0.0
// Saturation: 0.0 to 10.0, default 1.0

#define Brightness 0.0
#define Contrast 1.0
#define Hue 0.0
#define Saturation 1.0

static float2x2 HueMatrix =
{
cos(Hue * PI / 180), sin(Hue * PI / 180),
-sin(Hue * PI / 180), cos(Hue * PI / 180)
};

float4 main(float2 tex : TEXCOORD0) : COLOR
{
float4 c0 = tex2D(s0, tex);
c0.rgb = mul(r2y, c0.rgb);

// Y range is [16,235], PbPr range is [-112,112]
c0.r = (c0.r * 255 - 16) / 219;
c0.gb = (c0.gb * 255) / 224;

//c0.r = Contrast * c0.r + Brightness;
//c0.gb = mul(HueMatrix, c0.gb) * Saturation;
c0.rgb = mul(y2r, c0.rgb);
return c0;
}
舊 2007-05-07, 09:33 AM #14
回應時引用此文章
vxr離線中