Skip to content

Commit

Permalink
Merge branch 'Exiv2:main' into riffvideo
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedchebbii authored Nov 17, 2022
2 parents a12fd7b + 74720d8 commit 09b28cb
Show file tree
Hide file tree
Showing 23 changed files with 296 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: CIFuzz
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: "CodeQL"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_Linux_distributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- cron: 0 4 * * *

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

name: Nightly - Linux distributions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_PR_linux_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: On PRs - Linux-Ubuntu Quick Fuzz

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_PR_linux_matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Linux-Ubuntu Matrix

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan common config
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/on_PR_linux_special_builds.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Linux Special Builds

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand All @@ -24,7 +24,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
pip3 install gcovr
- name: Conan common config
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install valgrind ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan common config
run: |
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan common config
run: |
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install valgrind doxygen graphviz gettext ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan common config
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_PR_linux_staticAnalysis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Linux - Static Analysis

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand All @@ -23,7 +23,7 @@ jobs:

- name: install dependencies
run: |
pip3 install conan==1.52.0
pip3 install conan==1.54.0
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_PR_mac_matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Mac Matrix

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_PR_mac_special_builds.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Mac Special Builds

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_PR_windows_matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PRs - Windows Matrix

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Install Conan & Common config
run: |
pip.exe install "conan==1.52.0"
pip.exe install "conan==1.54.0"
conan config install https://github.com/conan-io/conanclientcert.git
conan profile new --detect default
conan profile update settings.build_type=${{matrix.build_type}} default
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on_push_BasicWinLinMac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

name: On PUSH - Basic CI for main platforms
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Install Conan & Common config
run: |
pip.exe install "conan==1.52.0"
pip.exe install "conan==1.54.0"
conan profile new --detect default
conan profile show default
conan profile update settings.compiler="Visual Studio" default
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_push_ExtraJobsForMain.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: On PUSH - Linux Special Builds for main branch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install ninja-build
pip3 install conan==1.52.0
pip3 install conan==1.54.0
pip3 install gcovr
- name: Conan common config
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on_push_clang_format.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Clang Format Checker
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]
jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.13
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.14
with:
source: '.'
exclude: './xmpsdk ./contrib'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install ninja-build gettext doxygen graphviz
pip3 install conan==1.52.0
pip3 install conan==1.54.0
- name: Conan common config
run: |
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:

- name: Install Conan & Common config
run: |
pip.exe install "conan==1.52.0"
pip.exe install "conan==1.54.0"
conan profile new --detect default
conan profile show default
conan profile update settings.build_type=Release default
Expand Down
78 changes: 1 addition & 77 deletions src/fujimn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ constexpr TagInfo FujiMakerNote::tagInfo_[] = {
unsignedShort, -1, printValue},
{0x1154, "PanoramaDirection", N_("Panorama direction"), N_("Panorama direction"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiPanoramaDirection)},
{0x1200, "0x1200", "0x1200", N_("Unknown"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1, printValue},
{0x1201, "AdvancedFilter", N_("Advanced filter"), N_("Advanced filter setting"), IfdId::fujiId,
SectionId::makerTags, unsignedLong, -1, EXV_PRINT_TAG(fujiAdvancedFilter)},
{0x1210, "FinePixColor", N_("FinePix Color"), N_("Fuji FinePix color setting"), IfdId::fujiId, SectionId::makerTags,
Expand Down Expand Up @@ -496,7 +495,7 @@ constexpr TagInfo FujiMakerNote::tagInfo_[] = {
SectionId::makerTags, unsignedShort, -1, printValue},
{0x1422, "ImageStabilization", N_("Image Stabilization"), N_("Image stabilization"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, printValue},
{0x1425, "SzeneRecognition", N_("Scene recognition"), N_("Scene recognition"), IfdId::fujiId, SectionId::makerTags,
{0x1425, "SceneRecognition", N_("Scene recognition"), N_("Scene recognition"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiSceneRecognition)},
{0x1431, "Rating", N_("Rating"), N_("Rating"), IfdId::fujiId, SectionId::makerTags, unsignedLong, -1, printValue},
{0x1436, "ImageGeneration", N_("Image Generation"), N_("Image generation"), IfdId::fujiId, SectionId::makerTags,
Expand Down Expand Up @@ -532,81 +531,6 @@ constexpr TagInfo FujiMakerNote::tagInfo_[] = {
{0x8003, "FrameNumber", N_("Frame Number"), N_("Frame number"), IfdId::fujiId, SectionId::makerTags, unsignedShort,
-1, printValue},
// #1402
{0xf000, "FujiIFD", N_("FujiIFD"), N_("Fujifilm IFD"), IfdId::fujiId, SectionId::makerTags, undefined, -1,
printValue},
{0xf001, "RawImageFullWidth", N_("Raw Image Full Width"), N_("Raw Image Full Width"), IfdId::fujiId,
SectionId::makerTags, undefined, -1, printValue},
{0x1001, N_("Sharpness"), N_("Sharpness"), N_("Sharpness setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiSharpness)},
{0x1002, "WhiteBalance", N_("White Balance"), N_("White balance setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiWhiteBalance)},
{0x1003, "Color", N_("Color"), N_("Chroma saturation setting"), IfdId::fujiId, SectionId::makerTags, unsignedShort,
-1, EXV_PRINT_TAG(fujiColor)},
{0x1004, "Tone", N_("Tone"), N_("Tone (contrast) setting"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1,
EXV_PRINT_TAG(fujiTone)},
{0x1010, "FlashMode", N_("Flash Mode"), N_("Flash firing mode setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiFlashMode)},
{0x1011, "FlashStrength", N_("Flash Strength"), N_("Flash firing strength compensation setting"), IfdId::fujiId,
SectionId::makerTags, signedRational, -1, printValue},
{0x1020, "Macro", N_("Macro"), N_("Macro mode setting"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1,
EXV_PRINT_TAG(fujiOffOn)},
{0x1021, "FocusMode", N_("Focus Mode"), N_("Focusing mode setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiFocusMode)},
{0x1022, "0x1022", "0x1022", N_("Unknown"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1, printValue},
{0x1030, "SlowSync", N_("Slow Sync"), N_("Slow synchro mode setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiOffOn)},
{0x1031, "PictureMode", N_("Picture Mode"), N_("Picture mode setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiPictureMode)},
{0x1032, "0x1032", "0x1032", N_("Unknown"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1, printValue},
{0x1040, "ShadowTone", N_("Shadow Tone"), N_("Shadow tone"), IfdId::fujiId, SectionId::makerTags, signedLong, -1,
EXV_PRINT_TAG(fujiSHTone)},
{0x1041, "HighlightTone", N_("Highlight Tone"), N_("Highlight tone"), IfdId::fujiId, SectionId::makerTags,
signedLong, -1, EXV_PRINT_TAG(fujiSHTone)},
{0x104d, "CropMode", N_("Crop Mode"), N_("Crop mode"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1,
EXV_PRINT_TAG(fujiCropMode)},
{0x1100, "Continuous", N_("Continuous"), N_("Continuous shooting or auto bracketing setting"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiContinuous)},
{0x1101, "SequenceNumber", N_("Sequence Number"), N_("Sequence number"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, printValue},
{0x1200, "0x1200", "0x1200", N_("Unknown"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1, printValue},
{0x1210, "FinePixColor", N_("FinePix Color"), N_("Fuji FinePix color setting"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiFinePixColor)},
{0x1300, "BlurWarning", N_("Blur Warning"), N_("Blur warning status"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiOffOn)},
{0x1301, "FocusWarning", N_("Focus Warning"), N_("Auto Focus warning status"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiOffOn)},
{0x1302, "ExposureWarning", N_("Exposure Warning"), N_("Auto exposure warning status"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiOffOn)},
{0x1400, "DynamicRange", N_("Dynamic Range"), N_("Dynamic range"), IfdId::fujiId, SectionId::makerTags,
unsignedShort, -1, EXV_PRINT_TAG(fujiDynamicRange)},
{0x1401, "FilmMode", N_("Film Mode"), N_("Film mode"), IfdId::fujiId, SectionId::makerTags, unsignedShort, -1,
EXV_PRINT_TAG(fujiFilmMode)},
{0x1402, "DynamicRangeSetting", N_("Dynamic Range Setting"), N_("Dynamic range settings"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiDynamicRangeSetting)},
{0x1403, "DevelopmentDynamicRange", N_("Development Dynamic Range"), N_("Development dynamic range"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, printValue},
{0x1404, "MinFocalLength", N_("Minimum Focal Length"), N_("Minimum focal length"), IfdId::fujiId,
SectionId::makerTags, unsignedRational, -1, printValue},
{0x1405, "MaxFocalLength", N_("Maximum Focal Length"), N_("Maximum focal length"), IfdId::fujiId,
SectionId::makerTags, unsignedRational, -1, printValue},
{0x1406, "MaxApertureAtMinFocal", N_("Maximum Aperture at Minimum Focal"), N_("Maximum aperture at minimum focal"),
IfdId::fujiId, SectionId::makerTags, unsignedRational, -1, printValue},
{0x1407, "MaxApertureAtMaxFocal", N_("Maximum Aperture at Maximum Focal"), N_("Maximum aperture at maximum focal"),
IfdId::fujiId, SectionId::makerTags, unsignedRational, -1, printValue},
{0x1431, "Rating", N_("Rating"), N_("Rating"), IfdId::fujiId, SectionId::makerTags, unsignedLong, -1, printValue},
{0x1443, "DRangePriority", N_("D Range Priority"), N_("Dynamic range priority"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiDRangePriority)},
{0x1444, "DRangePriorityFixed", N_("D Range Priority Fixed"), N_("Dynamic range priority fixed"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiDRangePriorityFixed)},
{0x1445, "DRangePriorityAuto", N_("D Range Priority Auto"), N_("Dynamic range priority auto"), IfdId::fujiId,
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(fujiDRangePriorityAuto)},
{0x8000, "FileSource", N_("File Source"), N_("File source"), IfdId::fujiId, SectionId::makerTags, asciiString, -1,
printValue},
{0x8002, "OrderNumber", N_("Order Number"), N_("Order number"), IfdId::fujiId, SectionId::makerTags, unsignedLong,
-1, printValue},
{0x8003, "FrameNumber", N_("Frame Number"), N_("Frame number"), IfdId::fujiId, SectionId::makerTags, unsignedShort,
-1, printValue},
// #1402
{0xf000, "FujiIFD", N_("FujiIFD"), N_("Fujifilm IFD"), IfdId::fujiId, SectionId::makerTags, undefined, -1,
printValue},
{0xf001, "RawImageFullWidth", N_("Raw Image Full Width"), N_("Raw Image Full Width"), IfdId::fujiId,
Expand Down
17 changes: 9 additions & 8 deletions src/makernote_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,8 @@ int sonyMisc2bSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/,
return -1;
}
int sonyMisc3cSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/, TiffComponent* pRoot) {
// From Exiftool (Tag 9400c): https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/Sony.pm
// > first byte decoded: 62, 48, 215, 28, 106 respectively
// For condition, see Exiftool (Tag 9400c):
// https://github.com/exiftool/exiftool/blob/7368629751669ba170511419b3d1e05bf0076d0e/lib/Image/ExifTool/Sony.pm#L1681

// Get the value from the image format that is being used
auto value = getExifValue(pRoot, 0x9400, Exiv2::IfdId::sony1Id);
Expand All @@ -1007,12 +1007,13 @@ int sonyMisc3cSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/,
if (value->count() < 1)
return -1;

switch (value->toInt64()) { // Using encrypted values
case 35: // 35 == 62
case 36: // 36 == 48
case 38: // 38 == 215
case 40: // 40 == 28
case 49: // 112 == 106
switch (value->toInt64()) {
case 35:
case 36:
case 38:
case 40:
case 49:
case 50:
return 0;
default:
break;
Expand Down
Loading

0 comments on commit 09b28cb

Please sign in to comment.