diff --git a/multimedia/jmref/Makefile b/multimedia/jmref/Makefile index 55d3dd6f7017..125ca0358cba 100644 --- a/multimedia/jmref/Makefile +++ b/multimedia/jmref/Makefile @@ -3,6 +3,7 @@ PORTNAME= jmref PORTVERSION= 19.0 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= http://iphome.hhi.de/suehring/tml/download/ DISTNAME= jm${PORTVERSION} @@ -10,15 +11,24 @@ DISTNAME= jm${PORTVERSION} MAINTAINER= swills@FreeBSD.org COMMENT= JM Reference Software +LICENSE= ISO_IEC ITU +LICENSE_COMB= multi +LICENSE_NAME_ISO_IEC= ISO/IEC Source Code License +LICENSE_NAME_ITU= ISO/IEC Source Code License +LICENSE_FILE_ISO_IEC= ${WRKSRC}/COPYRIGHT_ISO_IEC.txt +LICENSE_FILE_ITU= ${WRKSRC}/COPYRIGHT_ISO_IEC.txt +LICENSE_PERMS_ISO_IEC= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept +LICENSE_PERMS_ITU= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + USES= dos2unix gmake zip + +MAKE_JOBS_UNSAFE= yes + WRKSRC= ${WRKDIR}/JM PLIST_FILES= bin/ldecod bin/lencod \ bin/rtp_loss bin/rtpdump -DOS2UNIX_FILES= Makefile -MAKE_JOBS_UNSAFE= yes - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/ldecod.exe \ ${STAGEDIR}${PREFIX}/bin/ldecod diff --git a/multimedia/jmref/files/patch-Makefile b/multimedia/jmref/files/patch-Makefile index b757a9cdb3d0..0e4a5b2a4a21 100644 --- a/multimedia/jmref/files/patch-Makefile +++ b/multimedia/jmref/files/patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2012-09-02 12:58:20.533707959 -0400 -+++ Makefile 2012-09-02 12:58:32.071710098 -0400 -@@ -20,8 +20,6 @@ +--- Makefile.orig 2020-09-29 10:45:14 UTC ++++ Makefile +@@ -20,8 +20,6 @@ OPENMP?= 0 LLVM = $(shell $(CC) --version | grep LLVM) ifneq ($(LLVM),) CFLAGS+=-Qunused-arguments diff --git a/multimedia/jmref/files/patch-ldecod_inc_configfile.h b/multimedia/jmref/files/patch-ldecod_inc_configfile.h new file mode 100644 index 000000000000..3346e6c81c89 --- /dev/null +++ b/multimedia/jmref/files/patch-ldecod_inc_configfile.h @@ -0,0 +1,11 @@ +--- ldecod/inc/configfile.h.orig 2015-06-19 11:50:48 UTC ++++ ldecod/inc/configfile.h +@@ -18,7 +18,7 @@ + //#define LEVEL_IDC 21 + + +-InputParameters cfgparams; ++extern InputParameters cfgparams; + + #ifdef INCLUDED_BY_CONFIGFILE_C + // Mapping_Map Syntax: diff --git a/multimedia/jmref/files/patch-ldecod_inc_defines.h b/multimedia/jmref/files/patch-ldecod_inc_defines.h new file mode 100644 index 000000000000..356119db021e --- /dev/null +++ b/multimedia/jmref/files/patch-ldecod_inc_defines.h @@ -0,0 +1,22 @@ +--- ldecod/inc/defines.h.orig 2020-09-29 10:22:20 UTC ++++ ldecod/inc/defines.h +@@ -229,7 +229,7 @@ typedef enum { + } I8x8PredModes; + + // Color components +-enum { ++typedef enum { + Y_COMP = 0, // Y Component + U_COMP = 1, // U Component + V_COMP = 2, // V Component +@@ -237,7 +237,9 @@ enum { + G_COMP = 4, // G Component + B_COMP = 5, // B Component + T_COMP = 6 +-} ColorComponent; ++} ColorComponent_t; ++ ++extern ColorComponent_t ColorComponent; + + enum { + EOS = 1, //!< End Of Sequence diff --git a/multimedia/jmref/files/patch-ldecod_src_configfile.c b/multimedia/jmref/files/patch-ldecod_src_configfile.c new file mode 100644 index 000000000000..7f8b36e29963 --- /dev/null +++ b/multimedia/jmref/files/patch-ldecod_src_configfile.c @@ -0,0 +1,12 @@ +--- ldecod/src/configfile.c.orig 2020-09-29 10:22:20 UTC ++++ ldecod/src/configfile.c +@@ -66,6 +66,9 @@ + #include "configfile.h" + #define MAX_ITEMS_TO_PARSE 10000 + ++InputParameters cfgparams; ++char errortext[ET_SIZE]; ++ + static void PatchInp (InputParameters *p_Inp); + + /*! diff --git a/multimedia/jmref/files/patch-ldecod_src_ldecod.c b/multimedia/jmref/files/patch-ldecod_src_ldecod.c new file mode 100644 index 000000000000..f3cbefe25d1d --- /dev/null +++ b/multimedia/jmref/files/patch-ldecod_src_ldecod.c @@ -0,0 +1,11 @@ +--- ldecod/src/ldecod.c.orig 2020-09-29 10:22:20 UTC ++++ ldecod/src/ldecod.c +@@ -77,7 +77,7 @@ + // Decoder definition. This should be the only global variable in the entire + // software. Global variables should be avoided. + DecoderParams *p_Dec; +-char errortext[ET_SIZE]; ++extern char errortext[ET_SIZE]; + + // Prototypes of static functions + static void Report (VideoParameters *p_Vid); diff --git a/multimedia/jmref/files/patch-lencod_inc_configfile.h b/multimedia/jmref/files/patch-lencod_inc_configfile.h new file mode 100644 index 000000000000..6ac95d9e982d --- /dev/null +++ b/multimedia/jmref/files/patch-lencod_inc_configfile.h @@ -0,0 +1,11 @@ +--- lencod/inc/configfile.h.orig 2015-06-19 11:50:52 UTC ++++ lencod/inc/configfile.h +@@ -20,7 +20,7 @@ + #define PROFILE_IDC 88 + #define LEVEL_IDC 21 + +-InputParameters cfgparams; ++extern InputParameters cfgparams; + + + #ifdef INCLUDED_BY_CONFIGFILE_C diff --git a/multimedia/jmref/files/patch-lencod_inc_defines.h b/multimedia/jmref/files/patch-lencod_inc_defines.h new file mode 100644 index 000000000000..0287eec0cee2 --- /dev/null +++ b/multimedia/jmref/files/patch-lencod_inc_defines.h @@ -0,0 +1,118 @@ +--- lencod/inc/defines.h.orig 2020-09-29 10:32:12 UTC ++++ lencod/inc/defines.h +@@ -77,7 +77,7 @@ + + + //AVC Profile IDC definitions +-enum { ++extern enum { + NO_PROFILE = 0, //!< disable profile checking for experimental coding (enables FRExt, but disables MV) + FREXT_CAVLC444 = 44, //!< YUV 4:4:4/14 "CAVLC 4:4:4" + BASELINE = 66, //!< YUV 4:2:0/8 "Baseline" +@@ -164,7 +164,7 @@ enum { + + + // Available MB modes +-enum { ++extern enum { + PSKIP = 0, + BSKIP_DIRECT = 0, + P16x16 = 1, +@@ -188,13 +188,13 @@ enum { + #define NO_INTRA_PMODE 9 + + // Direct Mode types +-enum { ++extern enum { + DIR_TEMPORAL = 0, //!< Temporal Direct Mode + DIR_SPATIAL = 1 //!< Spatial Direct Mode + } DirectModes; + + // CAVLC block types +-enum { ++extern enum { + LUMA = 0, + LUMA_INTRA16x16DC = 1, + LUMA_INTRA16x16AC = 2, +@@ -207,7 +207,7 @@ enum { + } CAVLCBlockTypes; + + // CABAC block types +-enum { ++extern enum { + LUMA_16DC = 0, + LUMA_16AC = 1, + LUMA_8x8 = 2, +@@ -233,7 +233,7 @@ enum { + } CABACBlockTypes; + + // Color components +-enum { ++typedef enum { + Y_COMP = 0, // Y Component + U_COMP = 1, // U Component + V_COMP = 2, // V Component +@@ -241,8 +241,9 @@ enum { + G_COMP = 4, // G Component + B_COMP = 5, // B Component + T_COMP = 6 +-} ColorComponent; ++} ColorComponent_t; + ++extern ColorComponent_t ColorComponent; + + #define LEVEL_NUM 6 + #define TOTRUN_NUM 15 +@@ -255,7 +256,7 @@ enum { + #define SHIFT_QP 12 + + // 4x4 intra prediction modes +-enum { ++extern enum { + VERT_PRED = 0, + HOR_PRED = 1, + DC_PRED = 2, +@@ -268,7 +269,7 @@ enum { + } I4x4PredModes; + + // 16x16 intra prediction modes +-enum { ++extern enum { + VERT_PRED_16 = 0, + HOR_PRED_16 = 1, + DC_PRED_16 = 2, +@@ -276,7 +277,7 @@ enum { + } I16x16PredModes; + + // 8x8 chroma intra prediction modes +-enum { ++extern enum { + DC_PRED_8 = 0, + HOR_PRED_8 = 1, + VERT_PRED_8 = 2, +@@ -291,7 +292,7 @@ enum { + }; + + // MV Prediction types +-enum { ++extern enum { + MVPRED_MEDIAN = 0, + MVPRED_L = 1, + MVPRED_U = 2, +@@ -341,14 +342,14 @@ enum { + #define NUM_ONE_CTX 5 + #define NUM_ABS_CTX 5 + +-enum // JLT : on-the-fly levels/modes ++extern enum // JLT : on-the-fly levels/modes + { + OTF_L0 = 0, // Disable, interpolate & store all positions + OTF_L1 = 1, // Store full pel & interpolated 1/2 pel positions; 1/4 pel positions interpolate on-the-fly + OTF_L2 = 2 // Store only full pell positions; 1/2 & 1/4 pel positions interpolate on-the-fly + } OTFMode; + +-enum ++extern enum + { + OTF_ME = 0, + OTF_MC = 1 diff --git a/multimedia/jmref/files/patch-lencod_inc_global.h b/multimedia/jmref/files/patch-lencod_inc_global.h new file mode 100644 index 000000000000..2afb0738f829 --- /dev/null +++ b/multimedia/jmref/files/patch-lencod_inc_global.h @@ -0,0 +1,11 @@ +--- lencod/inc/global.h.orig 2015-06-19 11:50:52 UTC ++++ lencod/inc/global.h +@@ -1606,7 +1606,7 @@ extern void make_frame_picture_JV( VideoParameters *p_ + + + +-char errortext[ET_SIZE]; //!< buffer for error message for exit with error() ++extern char errortext[ET_SIZE]; //!< buffer for error message for exit with error() + extern void setup_coding_layer(VideoParameters *p_Vid); + + static inline int is_FREXT_profile(unsigned int profile_idc) diff --git a/multimedia/jmref/files/patch-lencod_src_configfile.c b/multimedia/jmref/files/patch-lencod_src_configfile.c new file mode 100644 index 000000000000..6aec025bb862 --- /dev/null +++ b/multimedia/jmref/files/patch-lencod_src_configfile.c @@ -0,0 +1,12 @@ +--- lencod/src/configfile.c.orig 2020-09-29 10:22:20 UTC ++++ lencod/src/configfile.c +@@ -70,6 +70,9 @@ + #include "img_io.h" + #include "ratectl.h" + ++InputParameters cfgparams; ++char errortext[ET_SIZE]; ++ + static void PatchInp (VideoParameters *p_Vid, InputParameters *p_Inp); + static int TestEncoderParams (Mapping *Map, int bitdepth_qp_scale[3]); + static int DisplayEncoderParams (Mapping *Map); diff --git a/multimedia/jmref/files/patch-lencod_src_rdopt.c b/multimedia/jmref/files/patch-lencod_src_rdopt.c new file mode 100644 index 000000000000..c573b5604428 --- /dev/null +++ b/multimedia/jmref/files/patch-lencod_src_rdopt.c @@ -0,0 +1,11 @@ +--- lencod/src/rdopt.c.orig 2020-09-29 10:35:54 UTC ++++ lencod/src/rdopt.c +@@ -834,7 +834,7 @@ distblk rdcost_for_8x8blocks (Macroblock *currMB, // - + } + + //----- coded block pattern (for CABAC only) ----- +- if (!currSlice->symbol_mode == CAVLC) ++ if (!(currSlice->symbol_mode == CAVLC)) + { + dataPart = &(currSlice->partArr[partMap[SE_CBP]]); + eep_dp = &(dataPart->ee_cabac);