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
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Gradle
.gradle/
**/build/

# Android local config
local.properties

# Android Studio / IntelliJ IDEA
.idea/
*.iml

# Android native build outputs
.cxx/
**/.cxx/
.externalNativeBuild/
**/.externalNativeBuild/

# APK/AAB outputs
*.apk
*.ap_
*.aab

# Java / Kotlin build artifacts
*.class

# Logs
*.log

# OS metadata
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ Add ``` android:extractNativeLibs="false" ``` to application in the Manifest.xml
### Build scripts (FFmpeg .so binaries configuration)
The FFmpeg binaries for this project were assembled with help of [ffmpeg-android-maker](https://github.com/Javernaut/ffmpeg-android-maker) by Javernaut (Oleksandr Berezhnyi).
Custom Amplituda configuration (`configuration-build.sh`) is available in the root directory of the project.
Current binaries are built from FFmpeg 7.1.4 (`ffmpeg-7.1.4.tar.xz`, SHA-256 `71f4aac3573ed9060489cb62526a6c7dda815ae10993789611acd7be9fa9fbf4`).

## Feedback
<a href="https://mail.google.com">andriy.serb1@gmail.com</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "version_major.h"

#define LIBAVFORMAT_VERSION_MINOR 7
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 102

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= (GET_BYTE);\
val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
unsigned int tmp = (GET_BYTE) - 128;\
unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
Expand All @@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = (GET_16BIT);\
val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = (GET_16BIT) - 0xDC00;\
val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}

/**
* Gets the specified Dolby Vision Display Management (DM) metadata
* @param index must be non negative and below data->num_ext_blocks
*/
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "7.1.1"
#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;

#endif /* AVUTIL_HWCONTEXT_QSV_H */

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
* @return the pointer to the filled buffer or NULL if sample_fmt is
* unknown or in case of other errors
* @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "version_major.h"

#define LIBAVFORMAT_VERSION_MINOR 7
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 102

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= (GET_BYTE);\
val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
unsigned int tmp = (GET_BYTE) - 128;\
unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
Expand All @@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = (GET_16BIT);\
val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = (GET_16BIT) - 0xDC00;\
val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}

/**
* Gets the specified Dolby Vision Display Management (DM) metadata
* @param index must be non negative and below data->num_ext_blocks
*/
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "7.1.1"
#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;

#endif /* AVUTIL_HWCONTEXT_QSV_H */

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
* @return the pointer to the filled buffer or NULL if sample_fmt is
* unknown or in case of other errors
* @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "version_major.h"

#define LIBAVFORMAT_VERSION_MINOR 7
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 102

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif

Expand Down
8 changes: 4 additions & 4 deletions amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= (GET_BYTE);\
val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
unsigned int tmp = (GET_BYTE) - 128;\
unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
Expand All @@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = (GET_16BIT);\
val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = (GET_16BIT) - 0xDC00;\
val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}

/**
* Gets the specified Dolby Vision Display Management (DM) metadata
* @param index must be non negative and below data->num_ext_blocks
*/
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "7.1.1"
#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;

#endif /* AVUTIL_HWCONTEXT_QSV_H */

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
* @return the pointer to the filled buffer or NULL if sample_fmt is
* unknown or in case of other errors
* @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);

Expand Down
Binary file modified amplituda/src/main/cpp/ffmpeg/x86/lib/libavcodec-amplituda.so
Binary file not shown.
Binary file modified amplituda/src/main/cpp/ffmpeg/x86/lib/libavformat-amplituda.so
Binary file not shown.
Binary file modified amplituda/src/main/cpp/ffmpeg/x86/lib/libavutil-amplituda.so
Binary file not shown.
Binary file modified amplituda/src/main/cpp/ffmpeg/x86/lib/libswresample-amplituda.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "version_major.h"

#define LIBAVFORMAT_VERSION_MINOR 7
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 102

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= (GET_BYTE);\
val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
unsigned int tmp = (GET_BYTE) - 128;\
unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
Expand All @@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = (GET_16BIT);\
val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = (GET_16BIT) - 0xDC00;\
val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}

/**
* Gets the specified Dolby Vision Display Management (DM) metadata
* @param index must be non negative and below data->num_ext_blocks
*/
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "7.1.1"
#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;

#endif /* AVUTIL_HWCONTEXT_QSV_H */

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
* @return the pointer to the filled buffer or NULL if sample_fmt is
* unknown or in case of other errors
* @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);

Expand Down
Binary file modified amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavcodec-amplituda.so
Binary file not shown.
Binary file not shown.
Binary file modified amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavutil-amplituda.so
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion configuration-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ EXTRA_LDFLAGS="-Wl,-z,max-page-size=16384 $DEP_LD_FLAGS"
--sysroot=${SYSROOT_PATH} \
--cc=${FAM_CC} \
--cxx=${FAM_CXX} \
--stdc=gnu17 \
--ld=${FAM_LD} \
--ar=${FAM_AR} \
--as=${FAM_CC} \
Expand All @@ -42,7 +43,7 @@ EXTRA_LDFLAGS="-Wl,-z,max-page-size=16384 $DEP_LD_FLAGS"
--extra-cflags="-O3 -fPIC $DEP_CFLAGS" \
--extra-ldflags="$EXTRA_LDFLAGS" \
--enable-shared \
--enable-network \
--disable-network \
--disable-static \
--disable-vulkan \
--disable-gpl \
Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.github.massoudss:waveformSeekBar:5.0.2'
implementation project(":amplituda")
}
Loading