vf_colorchannelmixer: round lut entries to nearest

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-14 12:49:48 +02:00
parent f268727a8f
commit 6b13f54262
2 changed files with 66 additions and 66 deletions

View File

@ -113,25 +113,25 @@ static int config_output(AVFilterLink *outlink)
cm->lut[i][j] = buffer;
for (i = 0; i < size; i++) {
cm->lut[R][R][i] = i * cm->rr;
cm->lut[R][G][i] = i * cm->rg;
cm->lut[R][B][i] = i * cm->rb;
cm->lut[R][A][i] = i * cm->ra;
cm->lut[R][R][i] = round(i * cm->rr);
cm->lut[R][G][i] = round(i * cm->rg);
cm->lut[R][B][i] = round(i * cm->rb);
cm->lut[R][A][i] = round(i * cm->ra);
cm->lut[G][R][i] = i * cm->gr;
cm->lut[G][G][i] = i * cm->gg;
cm->lut[G][B][i] = i * cm->gb;
cm->lut[G][A][i] = i * cm->ga;
cm->lut[G][R][i] = round(i * cm->gr);
cm->lut[G][G][i] = round(i * cm->gg);
cm->lut[G][B][i] = round(i * cm->gb);
cm->lut[G][A][i] = round(i * cm->ga);
cm->lut[B][R][i] = i * cm->br;
cm->lut[B][G][i] = i * cm->bg;
cm->lut[B][B][i] = i * cm->bb;
cm->lut[B][A][i] = i * cm->ba;
cm->lut[B][R][i] = round(i * cm->br);
cm->lut[B][G][i] = round(i * cm->bg);
cm->lut[B][B][i] = round(i * cm->bb);
cm->lut[B][A][i] = round(i * cm->ba);
cm->lut[A][R][i] = i * cm->ar;
cm->lut[A][G][i] = i * cm->ag;
cm->lut[A][B][i] = i * cm->ab;
cm->lut[A][A][i] = i * cm->aa;
cm->lut[A][R][i] = round(i * cm->ar);
cm->lut[A][G][i] = round(i * cm->ag);
cm->lut[A][B][i] = round(i * cm->ab);
cm->lut[A][A][i] = round(i * cm->aa);
}
return 0;

View File

@ -1,51 +1,51 @@
#tb 0: 1/25
0, 0, 0, 1, 304128, 0x4180ae79
0, 1, 1, 1, 304128, 0xe792dbdf
0, 2, 2, 1, 304128, 0x33114032
0, 3, 3, 1, 304128, 0xec12bf57
0, 4, 4, 1, 304128, 0x86da3c0e
0, 5, 5, 1, 304128, 0x6976e5e3
0, 6, 6, 1, 304128, 0x8434fea2
0, 7, 7, 1, 304128, 0x65bd0a72
0, 8, 8, 1, 304128, 0x65c20efe
0, 9, 9, 1, 304128, 0xc6a7b032
0, 10, 10, 1, 304128, 0xb78c312a
0, 11, 11, 1, 304128, 0x7912c07e
0, 12, 12, 1, 304128, 0xbd2f9195
0, 13, 13, 1, 304128, 0x1f040615
0, 14, 14, 1, 304128, 0x3b4a9e7d
0, 15, 15, 1, 304128, 0x7502cd0a
0, 16, 16, 1, 304128, 0x4172427f
0, 17, 17, 1, 304128, 0x81c1af1e
0, 18, 18, 1, 304128, 0xc01f62f3
0, 19, 19, 1, 304128, 0x0cbfc2eb
0, 20, 20, 1, 304128, 0xed9f1040
0, 21, 21, 1, 304128, 0xb58e35ad
0, 22, 22, 1, 304128, 0x6ed481aa
0, 23, 23, 1, 304128, 0x7f7f0bbc
0, 24, 24, 1, 304128, 0xc4b8acac
0, 25, 25, 1, 304128, 0x35110b72
0, 26, 26, 1, 304128, 0xb874a4cd
0, 27, 27, 1, 304128, 0x75783bb0
0, 28, 28, 1, 304128, 0x17457ac2
0, 29, 29, 1, 304128, 0xd453b298
0, 30, 30, 1, 304128, 0xbaca5116
0, 31, 31, 1, 304128, 0x04aeae05
0, 32, 32, 1, 304128, 0xae36fee3
0, 33, 33, 1, 304128, 0x18366c31
0, 34, 34, 1, 304128, 0x6c5e6a69
0, 35, 35, 1, 304128, 0x2509dbd5
0, 36, 36, 1, 304128, 0x1ef717a1
0, 37, 37, 1, 304128, 0x8b4ffe28
0, 38, 38, 1, 304128, 0xa0c483fb
0, 39, 39, 1, 304128, 0x1e4638a0
0, 40, 40, 1, 304128, 0x924e7ccb
0, 41, 41, 1, 304128, 0xc1097eb3
0, 42, 42, 1, 304128, 0x240a0cf5
0, 43, 43, 1, 304128, 0x5ecaafa1
0, 44, 44, 1, 304128, 0x146a0b2e
0, 45, 45, 1, 304128, 0x7f3c8cbb
0, 46, 46, 1, 304128, 0xce6cbaff
0, 47, 47, 1, 304128, 0xda3f1de4
0, 48, 48, 1, 304128, 0xd747b5e7
0, 49, 49, 1, 304128, 0xf905d3cb
0, 0, 0, 1, 304128, 0x42900c13
0, 1, 1, 1, 304128, 0xfb0439bc
0, 2, 2, 1, 304128, 0x967b9f0d
0, 3, 3, 1, 304128, 0xc2c92489
0, 4, 4, 1, 304128, 0x024499b1
0, 5, 5, 1, 304128, 0x66144785
0, 6, 6, 1, 304128, 0x0e505bcd
0, 7, 7, 1, 304128, 0xc8b26ed2
0, 8, 8, 1, 304128, 0x14b5717b
0, 9, 9, 1, 304128, 0x2ba3144a
0, 10, 10, 1, 304128, 0x1185992b
0, 11, 11, 1, 304128, 0xd55b289a
0, 12, 12, 1, 304128, 0x59f2f3be
0, 13, 13, 1, 304128, 0xfe4d6adf
0, 14, 14, 1, 304128, 0x630806cc
0, 15, 15, 1, 304128, 0x2deb2f19
0, 16, 16, 1, 304128, 0xfbffa923
0, 17, 17, 1, 304128, 0xb7770d46
0, 18, 18, 1, 304128, 0xda09bd0e
0, 19, 19, 1, 304128, 0x17a422d2
0, 20, 20, 1, 304128, 0xbb6172f5
0, 21, 21, 1, 304128, 0xcf639456
0, 22, 22, 1, 304128, 0xdb0ae1ac
0, 23, 23, 1, 304128, 0x850d6a68
0, 24, 24, 1, 304128, 0xdc8409fb
0, 25, 25, 1, 304128, 0x26216c51
0, 26, 26, 1, 304128, 0x1d0004de
0, 27, 27, 1, 304128, 0xed019a70
0, 28, 28, 1, 304128, 0xb1abd985
0, 29, 29, 1, 304128, 0xec1c14b2
0, 30, 30, 1, 304128, 0x046db068
0, 31, 31, 1, 304128, 0xa4fb1029
0, 32, 32, 1, 304128, 0x49e05e61
0, 33, 33, 1, 304128, 0x7668d6d1
0, 34, 34, 1, 304128, 0x6dd0ce9d
0, 35, 35, 1, 304128, 0x87983f5e
0, 36, 36, 1, 304128, 0xb98278cf
0, 37, 37, 1, 304128, 0x55186244
0, 38, 38, 1, 304128, 0x3135e7ea
0, 39, 39, 1, 304128, 0xdbf59a2c
0, 40, 40, 1, 304128, 0x944cdc92
0, 41, 41, 1, 304128, 0x5849dfe8
0, 42, 42, 1, 304128, 0xaf9075ba
0, 43, 43, 1, 304128, 0xb4f01118
0, 44, 44, 1, 304128, 0x4dfb711f
0, 45, 45, 1, 304128, 0xb558e732
0, 46, 46, 1, 304128, 0xb23a171e
0, 47, 47, 1, 304128, 0xb5c68065
0, 48, 48, 1, 304128, 0xcf1b122e
0, 49, 49, 1, 304128, 0x1e2d38e5