Skip to content

Commit

Permalink
Merge pull request #7 from caraesten/master
Browse files Browse the repository at this point in the history
Add FBDD noise reduction controls in Java
  • Loading branch information
dburckh authored May 6, 2024
2 parents 9b9866b + 0900f17 commit a6f8a98
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraw/src/main/cpp/anrdroidraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ extern "C" JNIEXPORT void JNICALL Java_com_homesoft_photo_libraw_LibRaw_setHighl
extern "C" JNIEXPORT void JNICALL Java_com_homesoft_photo_libraw_LibRaw_setOutputBps(JNIEnv* env, jobject jLibRaw,jint output_bps){
getLibRaw(env, jLibRaw)->imgdata.params.output_bps=output_bps;
}
extern "C" JNIEXPORT void JNICALL Java_com_homesoft_photo_libraw_LibRaw_setFbddNoiseReduction(JNIEnv* env, jobject jLibRaw, jint mode){
getLibRaw(env, jLibRaw)->imgdata.params.fbdd_noiserd=mode;
}
extern "C" JNIEXPORT void JNICALL Java_com_homesoft_photo_libraw_LibRaw_setHalfSize(JNIEnv* env, jobject jLibRaw,jboolean half_size){
getLibRaw(env, jLibRaw)->imgdata.params.half_size=half_size;
}
Expand Down
10 changes: 10 additions & 0 deletions libraw/src/main/java/com/homesoft/photo/libraw/LibRaw.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ public Map<Float, float[]> getAvailableWhiteBalanceCoefficientsWithTemps() {
public native void setOutputColorSpace(int colorSpace);
public native void setOutputBps(int outputBps);

/**
* Controls FBDD noise reduction before demosaic.
* See libraw_output_params_t.fbdd_noiserd
*
* @param mode 0 - do not use FBDD noise reduction
* 1 - light FBDD reduction
* 2 (and more) - full FBDD reduction
*/
public native void setFbddNoiseReduction(int mode);

/**
* Interpolation Quality
* See libraw_output_params_t.user_qual for a full list
Expand Down

0 comments on commit a6f8a98

Please sign in to comment.