mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-19 14:19:58 +01:00
full range yuv (jpeg) for 420,422, decode videoframe before completing open, scan pixel format, changed clamping were applicable in fx
git-svn-id: svn://code.dyne.org/veejay/trunk@672 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "average.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "common.h"
|
||||
vj_effect *average_init(int w, int h)
|
||||
{
|
||||
vj_effect *ve = (vj_effect *) vj_malloc(sizeof(vj_effect));
|
||||
@@ -52,19 +52,16 @@ void average_apply(VJFrame *frame, int width, int height, int val)
|
||||
for (i = 0; i < len; i++) {
|
||||
a = Y[i];
|
||||
b = ((val-1) * a + a)/val;
|
||||
if(b < 16) b = 16; else if (b > 240) b = 240;
|
||||
Y[i] = b;
|
||||
Y[i] = CLAMP_Y(b);
|
||||
}
|
||||
|
||||
for (i = 0; i < uv_len; i++) {
|
||||
a = Cb[i];
|
||||
b = ((val-1) * a + a)/val;
|
||||
if(b < 16) b = 16; else if (b > 235) b = 235;
|
||||
Cb[i] = b;
|
||||
Cb[i] = CLAMP_UV(b);
|
||||
a = Cr[i];
|
||||
b = ((val-1) * a + a )/val;
|
||||
if(b < 16) b = 16; else if (b > 235) b = 235;
|
||||
Cr[i] = b;
|
||||
Cr[i] = CLAMP_UV(b);
|
||||
}
|
||||
}
|
||||
void average_free(){}
|
||||
|
||||
Reference in New Issue
Block a user