Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@
android:largeScreens="true"
android:xlargeScreens="true"
/>

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!-- -+- -->
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="org.onepf.openiab.permission.BILLING"/>
<!-- -+- -->

<application android:icon="@drawable/icon" android:label="@string/app_name" android:hardwareAccelerated="true" android:largeHeap="true">
<!-- android:debuggable="true"> -->
Expand Down Expand Up @@ -90,22 +107,7 @@
-->

</application>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!-- -+- -->
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="org.onepf.openiab.permission.BILLING"/>
<!-- -+- -->


<!-- Uncomment for Samsung market
<uses-permission android:name="com.sec.android.iap.permission.BILLING" />
Expand Down
78 changes: 0 additions & 78 deletions assets/opencamera_modes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,32 +225,6 @@

</mode>

<!-- <mode id="movingobjects" name="objectremoval_mode_name" savename="OR">

<icon id="gui_almalence_mode_moving"/>

<vf id="com.almalence.plugins.gridvf"/>
<vf id="com.almalence.plugins.zoomvf"/>   
<vf id="com.almalence.plugins.histogramvf"/>
<vf id="com.almalence.plugins.focusvf"/>
<vf id="com.almalence.plugins.infosetvf"/>
<vf id="com.almalence.plugins.aeawlockvf"/>
<vf id="com.almalence.plugins.gyrovf"/>

    <capture id="com.almalence.plugins.objectremovalcapture" />    

    <processing id="com.almalence.plugins.objectremovalprocessing"/>    

    <filter/>    

    <export id="com.almalence.plugins.export"/>

<sku id="plugin_almalence_moving_burst"/>

<howtotext id=""/>

</mode> -->

<mode id="multishot" name="multishot_mode_name" savename="OR">

<icon id="gui_almalence_mode_moving"/>
Expand All @@ -277,58 +251,6 @@

</mode>

<!-- <mode id="groupshot" name="groupshot_mode_name" savename="GS">

<icon id="gui_almalence_mode_groupshot"/>

<vf id="com.almalence.plugins.gridvf"/>
<vf id="com.almalence.plugins.zoomvf"/>   
<vf id="com.almalence.plugins.histogramvf"/>
<vf id="com.almalence.plugins.focusvf"/>
<vf id="com.almalence.plugins.infosetvf"/>
<vf id="com.almalence.plugins.aeawlockvf"/>
<vf id="com.almalence.plugins.gyrovf"/>

    <capture id="com.almalence.plugins.groupshotcapture" />

    <processing id="com.almalence.plugins.groupshotprocessing"/>    

    <filter/>    

    <export id="com.almalence.plugins.export"/>

<sku id="plugin_almalence_groupshot"/>

<howtotext id=""/>

</mode> -->

<!-- <mode id="sequence" name="sequence_mode_name" savename="SEQ">

<icon id="gui_almalence_mode_sequence"/>

<vf id="com.almalence.plugins.gridvf"/>
<vf id="com.almalence.plugins.zoomvf"/>   
<vf id="com.almalence.plugins.histogramvf"/>
<vf id="com.almalence.plugins.focusvf"/>
<vf id="com.almalence.plugins.infosetvf"/>
<vf id="com.almalence.plugins.aeawlockvf"/>
<vf id="com.almalence.plugins.gyrovf"/>

    <capture id="com.almalence.plugins.sequencecapture" />

    <processing id="com.almalence.plugins.sequenceprocessing"/>    

    <filter/>    

    <export id="com.almalence.plugins.export"/>

<sku id="plugin_almalence_moving_burst"/>

<howtotext id=""/>

</mode> -->

<mode id="panorama_augmented" name="panorama_mode_name" savename="PANO">

<icon id="gui_almalence_mode_panorama"/>
Expand Down
Binary file removed camera2libs/core_dex2jar.jar
Binary file not shown.
Binary file added camera2libs/framework2_dex2jar.jar
Binary file not shown.
Binary file modified camera2libs/framework_dex2jar.jar
100644 → 100755
Binary file not shown.
Binary file modified jni/almashot/armeabi-v7a/libalmalib_eval.a
Binary file not shown.
Binary file modified jni/almashot/x86/libalmalib_eval.a
Binary file not shown.
13 changes: 8 additions & 5 deletions jni/dro/almashot-dro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ extern "C" JNIEXPORT jint JNICALL Java_com_almalence_plugins_processing_simple_A
jfloat max_amplify,
jboolean local_mapping,
jint filterStrength,
jint strongFilter,
jint pullUV
jint pullUV,
jfloat dark_noise_pass,
jfloat gamma
)
{
int i, x, y;
Expand Down Expand Up @@ -188,9 +189,9 @@ extern "C" JNIEXPORT jint JNICALL Java_com_almalence_plugins_processing_simple_A
float max_limit[3] = {3.0f,2.0f,2.0f};

if (local_mapping)
Dro_ComputeToneTable(hist_loc[x][y], lookup_table[x][y], 0.5, 64, 0.5f, min_limit, max_limit, max_amplify);
Dro_ComputeToneTable(hist_loc[x][y], lookup_table[x][y], gamma, 64, 0.5f, min_limit, max_limit, max_amplify);
else
Dro_ComputeToneTable(hist, lookup_table[x][y], 0.5, 64, 0.5f, min_limit, max_limit, max_amplify);
Dro_ComputeToneTable(hist, lookup_table[x][y], gamma, 64, 0.5f, min_limit, max_limit, max_amplify);
}


Expand All @@ -200,8 +201,8 @@ extern "C" JNIEXPORT jint JNICALL Java_com_almalence_plugins_processing_simple_A
local_mapping ? NULL:lookup_table[0][0],
local_mapping ? lookup_table:NULL,
filterStrength,
strongFilter,
pullUV, 5,
dark_noise_pass,
sx, sy);
}

Expand Down Expand Up @@ -253,6 +254,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_almalence_plugins_capture_video_Realt
jboolean force_update,
jint uv_desat,
jint dark_uv_desat,
jfloat dark_noise_pass,
jfloat mix_factor,
jfloat gamma, // default = 0.5
jfloat max_black_level, // default = 16
Expand All @@ -278,6 +280,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_almalence_plugins_capture_video_Realt
force_update,
uv_desat,
dark_uv_desat,
dark_noise_pass,
mix_factor,
gamma,
max_black_level,
Expand Down
83 changes: 46 additions & 37 deletions jni/include/almashot/dro.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, MISUSE OR
INABILITY TO USE THE SOFTWARE OR RELATED DOCUMENTATION.

COPYRIGHT 2012, ALMALENCE, INC.
COPYRIGHT 2012-2014, ALMALENCE, INC.

---------------------------------------------------------------------------

Expand Down Expand Up @@ -78,26 +78,23 @@ void Dro_GetHistogramNV21
// Input:
// hist - pointer to histogram with 256 elements
// Output:
// lookup_table[256] - filled with tone-table multipliers (in q5.10 fixed-point format)
// lookup_table - filled with tone-table multipliers (in q5.10 fixed-point format)
//
// Parameters:
// gamma - Defines how 'bright' the output image will be. Lower values cause brighter output.
// Default: 0.5
// max_black_level - threshold for black level correction. Default: 16
// black_level_atten - how much to attenuate black level. Default: 0.5
// min_limit[3] - Minimum limit on contrast reduction. Range: [0..0.9]. Default: 0.5
// min_limit[3] - Minimum limit on contrast reduction. Range: [0..0.9]. Default: {0.5, 0.5, 0.5}
// max_limit[3] - Maximum limit on contrast enhancement. Range: [1..10]. Default:
// [0] - for shadows, [1] - for midtones, [2] - for highlights.
// max_limit[3] - Maximum limit on contrast enhancement. Range: [1..10].
// [0] - for shadows, default: 4 - for hdr-like effects, 3 for more balanced results
// [1] - for midtones, default: 2
// [2] - for highlights, default: 2
// {4.0, 2.0, 2.0} - for hdr-like effects;
// {3.0, 2.0, 2.0} - for more balanced results.
// global_limit - Maximum limit on total brightness amplification. Recommended: 4
// Return:
// pointer to lookup_table.
Int32 *Dro_ComputeToneTable
void Dro_ComputeToneTable
(
Uint32 *hist,
Int32 *lookup_table,
Uint32 hist[256],
Int32 lookup_table[256],
float gamma,
float max_black_level,
float black_level_atten,
Expand All @@ -107,6 +104,39 @@ Int32 *Dro_ComputeToneTable
);


// ComputeToneTableLocal - same as ComputeToneTable, but compute 3x3 tone tables.
// Input:
// hist_loc - 3x3 histograms each with 256 elements
// Output:
// lookup_table_loc - filled with multipliers for each of 3x3 image areas
//
// Parameters:
// gamma - Defines how 'bright' the output image will be. Lower values cause brighter output.
// Default: 0.5
// max_black_level - threshold for black level correction. Default: 16
// black_level_atten - how much to attenuate black level. Default: 0.5
// min_limit[3] - Minimum limit on contrast reduction. Range: [0..0.9]. Default: {0.5, 0.5, 0.5}
// max_limit[3] - Maximum limit on contrast enhancement. Range: [1..10]. Default:
// [0] - for shadows, [1] - for midtones, [2] - for highlights.
// {4.0, 2.0, 2.0} - for hdr-like effects;
// {3.0, 2.0, 2.0} - for more balanced results.
// global_limit - Maximum limit on total brightness amplification. Recommended: 4
// mix_factor - Defines the level of inter-dependence of image areas. Range: [0..1].
// Recommended: 0.2
void Dro_ComputeToneTableLocal
(
Uint32 hist_loc[3][3][256],
Int32 lookup_table_loc[3][3][256],
float gamma,
float max_black_level,
float black_level_atten,
float min_limit[3],
float max_limit[3],
float global_limit,
float mix_factor
);


// ApplyToneTableNV21 - apply lookup_table[256] to YUV.
//
// Input:
Expand Down Expand Up @@ -156,35 +186,13 @@ int Dro_ApplyToneTableFilteredNV21
Int32 lookup_table[256],
Int32 lookup_local[3][3][256],
int filter,
int strong_filter,
int uv_desat,
int dark_uv_desat,
float dark_noise_pass,
int sx,
int sy
);

// Description:
// Detects if a new histogram is sufficiently different from the base one.
// If so - new histogram is copied into base.
// It is further detected if scene is changed.
//
// Return:
//
// 0 = no tone table update is needed
// hist_base remain untouched
//
// 1 = tone update is needed, but no scene change (slowly advance to the new table)
// hist_base updated with the new hist
//
// 2 = tone update is needed, scene change (switch to the new table immediately)
// hist_base updated with the new hist
//
int Dro_CheckToneUpdateNeeded
(
Uint32 *hist,
Uint32 *hist_base
);


//
// Example:
Expand Down Expand Up @@ -237,12 +245,13 @@ void Dro_StreamingRender
int force_update,
int uv_desat,
int dark_uv_desat,
float dark_noise_pass,
float mix_factor,
float gamma, // default = 0.5
float max_black_level, // default = 16
float black_level_atten, // default = 0.5
float min_limit[3], // default = 0.5 0.5 0.5
float max_limit[3], // default = 3 2 2
float min_limit[3], // default = {0.5, 0.5, 0.5}
float max_limit[3], // default = {3.0, 2.0, 2.0}
unsigned int texture_out
);

Expand Down
Loading