Skip to content

Commit

Permalink
add doc for real-world test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffr5 committed Feb 27, 2023
1 parent c756d16 commit 0fb8f4c
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 45 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ tmp_video*
__pycache__
.vscode
python/*
.ipynb_checkpoints
.ipynb_checkpoints
unit_tests/*
notebooks/*
15 changes: 15 additions & 0 deletions Test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## FFMPEG HDF5 Filter
* Lossy and lossless compressions supprted filter based on ffmpeg.

## Getting Started
- [x] compile ffmepg and libraries, run `bash compile_ffmpeg.sh`
- [x] download current repo and compile this filter, run `bash compile_hdf5_filter.sh`


## Tests

| Compression ratio| Parameters |
| -----------------| ----------- |
| 5 | 6 6 64 64 64 0 401 400 5 0 0 |
| 12 | 6 6 64 64 64 0 403 400 15 0 0 |
| 20 | 6 6 64 64 64 0 402 400 20 0 0 |
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ hash -r
cd $HOME
mkdir ffmpeg_sources bin
setupCondaEnv
# installCmake
# installNasm
# installYasm
compileLibX264
Expand Down
File renamed without changes.
44 changes: 22 additions & 22 deletions src/ffmpeg_h5filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,38 +218,38 @@ static void find_preset(int p_id, char *preset)
strcpy(preset, "veryslow");
break;
/* h264, hevc, av1_nvenc */
case FFH5_PRESET_H264_FASTEST:
case FFH5_PRESET_HEVC_FASTEST:
case FFH5_PRESET_H264NV_FASTEST:
case FFH5_PRESET_HEVCNV_FASTEST:
case FFH5_PRESET_AV1NV_FASTEST:
strcpy(preset, "p1");
break;
case FFH5_PRESET_H264_FASTER:
case FFH5_PRESET_HEVC_FASTER:
case FFH5_PRESET_H264NV_FASTER:
case FFH5_PRESET_HEVCNV_FASTER:
case FFH5_PRESET_AV1NV_FASTER:
strcpy(preset, "p2");
break;
case FFH5_PRESET_H264_FAST:
case FFH5_PRESET_HEVC_FAST:
case FFH5_PRESET_H264NV_FAST:
case FFH5_PRESET_HEVCNV_FAST:
case FFH5_PRESET_AV1NV_FAST:
strcpy(preset, "p3");
break;
case FFH5_PRESET_H264_MEDIUM:
case FFH5_PRESET_HEVC_MEDIUM:
case FFH5_PRESET_H264NV_MEDIUM:
case FFH5_PRESET_HEVCNV_MEDIUM:
case FFH5_PRESET_AV1NV_MEDIUM:
strcpy(preset, "p4");
break;
case FFH5_PRESET_H264_SLOW:
case FFH5_PRESET_HEVC_SLOW:
case FFH5_PRESET_H264NV_SLOW:
case FFH5_PRESET_HEVCNV_SLOW:
case FFH5_PRESET_AV1NV_SLOW:
strcpy(preset, "p5");
break;
case FFH5_PRESET_H264_SLOWER:
case FFH5_PRESET_HEVC_SLOWER:
case FFH5_PRESET_H264NV_SLOWER:
case FFH5_PRESET_HEVCNV_SLOWER:
case FFH5_PRESET_AV1NV_SLOWER:
strcpy(preset, "p6");
break;
case FFH5_PRESET_H264_SLOWEST:
case FFH5_PRESET_HEVC_SLOWEST:
case FFH5_PRESET_H264NV_SLOWEST:
case FFH5_PRESET_HEVCNV_SLOWEST:
case FFH5_PRESET_AV1NV_SLOWEST:
strcpy(preset, "p7");
break;
Expand Down Expand Up @@ -381,23 +381,23 @@ static void find_tune(int t_id, char *tune)
strcpy(tune, "stillimage");
break;
/* h264, hevc, av1_nvenc */
case FFH5_TUNE_H264_HQ:
case FFH5_TUNE_HEVC_HQ:
case FFH5_TUNE_H264NV_HQ:
case FFH5_TUNE_HEVCNV_HQ:
case FFH5_TUNE_AV1NV_HQ:
strcpy(tune, "hq");
break;
case FFH5_TUNE_H264_LL:
case FFH5_TUNE_HEVC_LL:
case FFH5_TUNE_H264NV_LL:
case FFH5_TUNE_HEVCNV_LL:
case FFH5_TUNE_AV1NV_LL:
strcpy(tune, "ll");
break;
case FFH5_TUNE_H264_ULL:
case FFH5_TUNE_HEVC_ULL:
case FFH5_TUNE_H264NV_ULL:
case FFH5_TUNE_HEVCNV_ULL:
case FFH5_TUNE_AV1NV_ULL:
strcpy(tune, "ull");
break;
case FFH5_TUNE_H264_LOSSLESS:
case FFH5_TUNE_HEVC_LOSSLESS:
case FFH5_TUNE_H264NV_LOSSLESS:
case FFH5_TUNE_HEVCNV_LOSSLESS:
case FFH5_TUNE_AV1NV_LOSSLESS:
strcpy(tune, "lossless");
break;
Expand Down
44 changes: 22 additions & 22 deletions src/ffmpeg_h5filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ enum PresetIDEnum
FFH5_PRESET_X264_SLOWER = 17,
FFH5_PRESET_X264_VERYSLOW = 18,
/* h264_nvenc */
FFH5_PRESET_H264_FASTEST = 100,
FFH5_PRESET_H264_FASTER = 101,
FFH5_PRESET_H264_FAST = 102,
FFH5_PRESET_H264_MEDIUM = 103,
FFH5_PRESET_H264_SLOW = 104,
FFH5_PRESET_H264_SLOWER = 105,
FFH5_PRESET_H264_SLOWEST = 106,
FFH5_PRESET_H264NV_FASTEST = 100,
FFH5_PRESET_H264NV_FASTER = 101,
FFH5_PRESET_H264NV_FAST = 102,
FFH5_PRESET_H264NV_MEDIUM = 103,
FFH5_PRESET_H264NV_SLOW = 104,
FFH5_PRESET_H264NV_SLOWER = 105,
FFH5_PRESET_H264NV_SLOWEST = 106,
/* x265 */
FFH5_PRESET_X265_ULTRAFAST = 200,
FFH5_PRESET_X265_SUPERFAST = 201,
Expand All @@ -88,13 +88,13 @@ enum PresetIDEnum
FFH5_PRESET_X265_SLOWER = 207,
FFH5_PRESET_X265_VERYSLOW = 208,
/* hevc_nvenc */
FFH5_PRESET_HEVC_FASTEST = 300,
FFH5_PRESET_HEVC_FASTER = 301,
FFH5_PRESET_HEVC_FAST = 302,
FFH5_PRESET_HEVC_MEDIUM = 303,
FFH5_PRESET_HEVC_SLOW = 304,
FFH5_PRESET_HEVC_SLOWER = 305,
FFH5_PRESET_HEVC_SLOWEST = 306,
FFH5_PRESET_HEVCNV_FASTEST = 300,
FFH5_PRESET_HEVCNV_FASTER = 301,
FFH5_PRESET_HEVCNV_FAST = 302,
FFH5_PRESET_HEVCNV_MEDIUM = 303,
FFH5_PRESET_HEVCNV_SLOW = 304,
FFH5_PRESET_HEVCNV_SLOWER = 305,
FFH5_PRESET_HEVCNV_SLOWEST = 306,
/* svtav1 */
FFH5_PRESET_SVTAV1_ULTRAFAST = 400,
FFH5_PRESET_SVTAV1_SUPERFAST = 401,
Expand Down Expand Up @@ -155,10 +155,10 @@ enum TuneTypeEnum
FFH5_TUNE_X264_FILM = 16,
FFH5_TUNE_X264_STILLIMAGE = 17,
/* h264_nvenc */
FFH5_TUNE_H264_HQ = 100,
FFH5_TUNE_H264_LL = 101,
FFH5_TUNE_H264_ULL = 102,
FFH5_TUNE_H264_LOSSLESS = 103,
FFH5_TUNE_H264NV_HQ = 100,
FFH5_TUNE_H264NV_LL = 101,
FFH5_TUNE_H264NV_ULL = 102,
FFH5_TUNE_H264NV_LOSSLESS = 103,
/* x265 */
FFH5_TUNE_X265_PSNR = 200,
FFH5_TUNE_X265_SSIM = 201,
Expand All @@ -167,10 +167,10 @@ enum TuneTypeEnum
FFH5_TUNE_X265_ZEROLATENCY = 204,
FFH5_TUNE_X265_ANIMATION = 205,
/* hevc_nvenc */
FFH5_TUNE_HEVC_HQ = 300,
FFH5_TUNE_HEVC_LL = 301,
FFH5_TUNE_HEVC_ULL = 302,
FFH5_TUNE_HEVC_LOSSLESS = 303,
FFH5_TUNE_HEVCNV_HQ = 300,
FFH5_TUNE_HEVCNV_LL = 301,
FFH5_TUNE_HEVCNV_ULL = 302,
FFH5_TUNE_HEVCNV_LOSSLESS = 303,
/* svtav1 */
FFH5_TUNE_SVTAV1_VQ = 400,
FFH5_TUNE_SVTAV1_PSNR = 401,
Expand Down

0 comments on commit 0fb8f4c

Please sign in to comment.