|
Added
Link Here
|
| 1 |
Description: Only export symbols defined in the decoder API. |
| 2 |
The encoder API is not final yet, so upstream exports all symbols to make |
| 3 |
development easier. For packaging we only want to expose the public API. |
| 4 |
Author: Joachim Bauch <bauch@struktur.de> |
| 5 |
--- libde265/encoder/Makefile.am |
| 6 |
+++ libde265/encoder/Makefile.am |
| 7 |
@@ -12,6 +12,18 @@ |
| 8 |
encpicbuf.h encpicbuf.cc \ |
| 9 |
sop.h sop.cc |
| 10 |
|
| 11 |
+libde265_encoder_la_CFLAGS = \ |
| 12 |
+ $(CFLAG_VISIBILITY) \ |
| 13 |
+ -DLIBDE265_EXPORTS |
| 14 |
+libde265_encoder_la_CXXFLAGS += \ |
| 15 |
+ $(CFLAG_VISIBILITY) \ |
| 16 |
+ -DLIBDE265_EXPORTS |
| 17 |
+ |
| 18 |
+if HAVE_VISIBILITY |
| 19 |
+ libde265_encoder_la_CFLAGS += -DHAVE_VISIBILITY |
| 20 |
+ libde265_encoder_la_CXXFLAGS += -DHAVE_VISIBILITY |
| 21 |
+endif |
| 22 |
+ |
| 23 |
SUBDIRS=algo |
| 24 |
libde265_encoder_la_LIBADD = algo/libde265_encoder_algo.la |
| 25 |
|
| 26 |
--- libde265/encoder/algo/Makefile.am |
| 27 |
+++ libde265/encoder/algo/Makefile.am |
| 28 |
@@ -17,5 +17,13 @@ |
| 29 |
tb-rateestim.h tb-rateestim.cc \ |
| 30 |
pb-mv.h pb-mv.cc |
| 31 |
|
| 32 |
+libde265_encoder_algo_la_CXXFLAGS += \ |
| 33 |
+ $(CFLAG_VISIBILITY) \ |
| 34 |
+ -DLIBDE265_EXPORTS |
| 35 |
+ |
| 36 |
+if HAVE_VISIBILITY |
| 37 |
+ libde265_encoder_algo_la_CXXFLAGS += -DHAVE_VISIBILITY |
| 38 |
+endif |
| 39 |
+ |
| 40 |
EXTRA_DIST = \ |
| 41 |
CMakeLists.txt |
| 42 |
--- configure.ac |
| 43 |
+++ configure.ac |
| 44 |
@@ -56,9 +56,7 @@ |
| 45 |
fi |
| 46 |
changequote([,])dnl |
| 47 |
|
| 48 |
-dnl gl_VISIBILITY |
| 49 |
-dnl : In encoder branch, we still export all library symbols : |
| 50 |
-HAVE_VISIBILITY=0 |
| 51 |
+gl_VISIBILITY |
| 52 |
AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$HAVE_VISIBILITY" != "x0"]) |
| 53 |
|
| 54 |
# Checks for header files. |
| 55 |
--- libde265/image-io.cc |
| 56 |
+++ libde265/image-io.cc |
| 57 |
@@ -186,7 +186,7 @@ |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
-LIBDE265_API PacketSink_File::~PacketSink_File() |
| 62 |
+PacketSink_File::~PacketSink_File() |
| 63 |
{ |
| 64 |
if (mFH) { |
| 65 |
fclose(mFH); |
| 66 |
@@ -194,7 +194,7 @@ |
| 67 |
} |
| 68 |
|
| 69 |
|
| 70 |
-LIBDE265_API void PacketSink_File::set_filename(const char* filename) |
| 71 |
+void PacketSink_File::set_filename(const char* filename) |
| 72 |
{ |
| 73 |
assert(mFH==NULL); |
| 74 |
|
| 75 |
@@ -202,7 +202,7 @@ |
| 76 |
} |
| 77 |
|
| 78 |
|
| 79 |
-LIBDE265_API void PacketSink_File::send_packet(const uint8_t* data, int n) |
| 80 |
+void PacketSink_File::send_packet(const uint8_t* data, int n) |
| 81 |
{ |
| 82 |
uint8_t startCode[3]; |
| 83 |
startCode[0] = 0; |
| 84 |
--- libde265/image-io.h |
| 85 |
+++ libde265/image-io.h |
| 86 |
@@ -30,17 +30,17 @@ |
| 87 |
class ImageSource |
| 88 |
{ |
| 89 |
public: |
| 90 |
- LIBDE265_API ImageSource(); |
| 91 |
- virtual LIBDE265_API ~ImageSource() { } |
| 92 |
+ ImageSource(); |
| 93 |
+ virtual ~ImageSource() { } |
| 94 |
|
| 95 |
//enum ImageStatus { Available, Waiting, EndOfVideo }; |
| 96 |
|
| 97 |
//virtual ImageStatus get_status() = 0; |
| 98 |
- virtual LIBDE265_API de265_image* get_image(bool block=true) = 0; |
| 99 |
- virtual LIBDE265_API void skip_frames(int n) = 0; |
| 100 |
+ virtual de265_image* get_image(bool block=true) = 0; |
| 101 |
+ virtual void skip_frames(int n) = 0; |
| 102 |
|
| 103 |
- virtual LIBDE265_API int get_width() const = 0; |
| 104 |
- virtual LIBDE265_API int get_height() const = 0; |
| 105 |
+ virtual int get_width() const = 0; |
| 106 |
+ virtual int get_height() const = 0; |
| 107 |
}; |
| 108 |
|
| 109 |
|
| 110 |
@@ -48,17 +48,17 @@ |
| 111 |
class ImageSource_YUV : public ImageSource |
| 112 |
{ |
| 113 |
public: |
| 114 |
- LIBDE265_API ImageSource_YUV(); |
| 115 |
- virtual LIBDE265_API ~ImageSource_YUV(); |
| 116 |
+ ImageSource_YUV(); |
| 117 |
+ virtual ~ImageSource_YUV(); |
| 118 |
|
| 119 |
- bool LIBDE265_API set_input_file(const char* filename, int w,int h); |
| 120 |
+ bool set_input_file(const char* filename, int w,int h); |
| 121 |
|
| 122 |
//virtual ImageStatus get_status(); |
| 123 |
- virtual LIBDE265_API de265_image* get_image(bool block=true); |
| 124 |
- virtual LIBDE265_API void skip_frames(int n); |
| 125 |
+ virtual de265_image* get_image(bool block=true); |
| 126 |
+ virtual void skip_frames(int n); |
| 127 |
|
| 128 |
- virtual LIBDE265_API int get_width() const { return width; } |
| 129 |
- virtual LIBDE265_API int get_height() const { return height; } |
| 130 |
+ virtual int get_width() const { return width; } |
| 131 |
+ virtual int get_height() const { return height; } |
| 132 |
|
| 133 |
private: |
| 134 |
FILE* mFH; |
| 135 |
@@ -74,20 +74,20 @@ |
| 136 |
class ImageSink |
| 137 |
{ |
| 138 |
public: |
| 139 |
- virtual LIBDE265_API ~ImageSink() { } |
| 140 |
+ virtual ~ImageSink() { } |
| 141 |
|
| 142 |
- virtual LIBDE265_API void send_image(const de265_image* img) = 0; |
| 143 |
+ virtual void send_image(const de265_image* img) = 0; |
| 144 |
}; |
| 145 |
|
| 146 |
class ImageSink_YUV : public ImageSink |
| 147 |
{ |
| 148 |
public: |
| 149 |
- LIBDE265_API ImageSink_YUV() : mFH(NULL) { } |
| 150 |
- LIBDE265_API ~ImageSink_YUV(); |
| 151 |
+ ImageSink_YUV() : mFH(NULL) { } |
| 152 |
+ ~ImageSink_YUV(); |
| 153 |
|
| 154 |
- bool LIBDE265_API set_filename(const char* filename); |
| 155 |
+ bool set_filename(const char* filename); |
| 156 |
|
| 157 |
- virtual LIBDE265_API void send_image(const de265_image* img); |
| 158 |
+ virtual void send_image(const de265_image* img); |
| 159 |
|
| 160 |
private: |
| 161 |
FILE* mFH; |
| 162 |
@@ -98,21 +98,21 @@ |
| 163 |
class PacketSink |
| 164 |
{ |
| 165 |
public: |
| 166 |
- virtual LIBDE265_API ~PacketSink() { } |
| 167 |
+ virtual ~PacketSink() { } |
| 168 |
|
| 169 |
- virtual LIBDE265_API void send_packet(const uint8_t* data, int n) = 0; |
| 170 |
+ virtual void send_packet(const uint8_t* data, int n) = 0; |
| 171 |
}; |
| 172 |
|
| 173 |
|
| 174 |
class PacketSink_File : public PacketSink |
| 175 |
{ |
| 176 |
public: |
| 177 |
- LIBDE265_API PacketSink_File(); |
| 178 |
- virtual LIBDE265_API ~PacketSink_File(); |
| 179 |
+ PacketSink_File(); |
| 180 |
+ virtual ~PacketSink_File(); |
| 181 |
|
| 182 |
- LIBDE265_API void set_filename(const char* filename); |
| 183 |
+ void set_filename(const char* filename); |
| 184 |
|
| 185 |
- virtual LIBDE265_API void send_packet(const uint8_t* data, int n); |
| 186 |
+ virtual void send_packet(const uint8_t* data, int n); |
| 187 |
|
| 188 |
private: |
| 189 |
FILE* mFH; |
| 190 |
--- libde265/configparam.h |
| 191 |
+++ libde265/configparam.h |
| 192 |
@@ -95,7 +95,7 @@ |
| 193 |
bool hasLongOption() const { return true; } //mLongOption!=NULL; } |
| 194 |
std::string getLongOption() const { return mLongOption ? std::string(mLongOption) : get_name(); } |
| 195 |
|
| 196 |
- virtual LIBDE265_API bool processCmdLineArguments(char** argv, int* argc, int idx) { return false; } |
| 197 |
+ virtual bool processCmdLineArguments(char** argv, int* argc, int idx) { return false; } |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
@@ -132,7 +132,7 @@ |
| 202 |
virtual std::string get_default_string() const { return default_value ? "true":"false"; } |
| 203 |
|
| 204 |
virtual std::string getTypeDescr() const { return "(boolean)"; } |
| 205 |
- virtual LIBDE265_API bool processCmdLineArguments(char** argv, int* argc, int idx) { set(true); return true; } |
| 206 |
+ virtual bool processCmdLineArguments(char** argv, int* argc, int idx) { set(true); return true; } |
| 207 |
|
| 208 |
bool set(bool v) { value_set=true; value=v; return true; } |
| 209 |
|
| 210 |
@@ -162,10 +162,10 @@ |
| 211 |
virtual bool has_default() const { return default_set; } |
| 212 |
|
| 213 |
void set_default(std::string v) { default_value=v; default_set=true; } |
| 214 |
- virtual LIBDE265_API std::string get_default_string() const { return default_value; } |
| 215 |
+ virtual std::string get_default_string() const { return default_value; } |
| 216 |
|
| 217 |
- virtual LIBDE265_API std::string getTypeDescr() const { return "(string)"; } |
| 218 |
- virtual LIBDE265_API bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 219 |
+ virtual std::string getTypeDescr() const { return "(string)"; } |
| 220 |
+ virtual bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 221 |
|
| 222 |
bool set(std::string v) { value_set=true; value=v; return true; } |
| 223 |
|
| 224 |
@@ -201,10 +201,10 @@ |
| 225 |
virtual bool has_default() const { return default_set; } |
| 226 |
|
| 227 |
void set_default(int v) { default_value=v; default_set=true; } |
| 228 |
- virtual LIBDE265_API std::string get_default_string() const; |
| 229 |
+ virtual std::string get_default_string() const; |
| 230 |
|
| 231 |
- virtual LIBDE265_API std::string getTypeDescr() const; |
| 232 |
- virtual LIBDE265_API bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 233 |
+ virtual std::string getTypeDescr() const; |
| 234 |
+ virtual bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 235 |
|
| 236 |
bool set(int v) { |
| 237 |
if (is_valid(v)) { value_set=true; value=v; return true; } |
| 238 |
@@ -239,7 +239,7 @@ |
| 239 |
virtual std::vector<std::string> get_choice_names() const = 0; |
| 240 |
|
| 241 |
virtual std::string getTypeDescr() const; |
| 242 |
- virtual LIBDE265_API bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 243 |
+ virtual bool processCmdLineArguments(char** argv, int* argc, int idx); |
| 244 |
|
| 245 |
const char** get_choices_string_table() const; |
| 246 |
|
| 247 |
@@ -368,10 +368,10 @@ |
| 248 |
config_parameters() : param_string_table(NULL) { } |
| 249 |
~config_parameters() { delete[] param_string_table; } |
| 250 |
|
| 251 |
- void LIBDE265_API add_option(option_base* o); |
| 252 |
+ void add_option(option_base* o); |
| 253 |
|
| 254 |
- void LIBDE265_API print_params() const; |
| 255 |
- bool LIBDE265_API parse_command_line_params(int* argc, char** argv, int* first_idx=NULL, |
| 256 |
+ void print_params() const; |
| 257 |
+ bool parse_command_line_params(int* argc, char** argv, int* first_idx=NULL, |
| 258 |
bool ignore_unknown_options=false); |
| 259 |
|
| 260 |
|
| 261 |
--- libde265/quality.h |
| 262 |
+++ libde265/quality.h |
| 263 |
@@ -26,11 +26,11 @@ |
| 264 |
#include <libde265/image.h> |
| 265 |
|
| 266 |
|
| 267 |
-LIBDE265_API uint32_t SSD(const uint8_t* img, int imgStride, |
| 268 |
+uint32_t SSD(const uint8_t* img, int imgStride, |
| 269 |
const uint8_t* ref, int refStride, |
| 270 |
int width, int height); |
| 271 |
|
| 272 |
-LIBDE265_API uint32_t SAD(const uint8_t* img, int imgStride, |
| 273 |
+uint32_t SAD(const uint8_t* img, int imgStride, |
| 274 |
const uint8_t* ref, int refStride, |
| 275 |
int width, int height); |
| 276 |
|
| 277 |
@@ -41,7 +41,7 @@ |
| 278 |
LIBDE265_API double PSNR(double mse); |
| 279 |
|
| 280 |
|
| 281 |
-LIBDE265_API uint32_t compute_distortion_ssd(const de265_image* img1, const de265_image* img2, |
| 282 |
+uint32_t compute_distortion_ssd(const de265_image* img1, const de265_image* img2, |
| 283 |
int x0, int y0, int log2size, int cIdx); |
| 284 |
|
| 285 |
#endif |