Retourner au contenu associé (journal : Backdoor dans OpenBSD ?)
Posté par Moonz le 16 décembre 2010 à 18:08. En réponse au journal Backdoor dans OpenBSD ?. Évalué à 2.
float *data; int width, height; float avg = 0; int pos, x, y; for(y = 0, pos = 0; y < height; ++y, pos += pitch) { for(x = 0; x < width; ++x, ++pos) { moy += data[pos]; } } avg /= width * height; for(y = 0, pos = 0; y < height; ++y, pos += pitch) { for(x = 0; x < width; ++x, ++pos) { data[pos] -= avg; } }
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Les chinois du FBI...
Posté par Moonz . En réponse au journal Backdoor dans OpenBSD ?. Évalué à 2.
float *data;
int width, height;
float avg = 0;
int pos, x, y;
for(y = 0, pos = 0; y < height; ++y, pos += pitch) {
for(x = 0; x < width; ++x, ++pos) {
moy += data[pos];
}
}
avg /= width * height;
for(y = 0, pos = 0; y < height; ++y, pos += pitch) {
for(x = 0; x < width; ++x, ++pos) {
data[pos] -= avg;
}
}
(oui, je sais, tu peux faire une macro, mais c’est encore plus moche)