+
+MAKEFLAGS_GENERAL="-j6"
+BUILD_TYPE="Relwithdebinfo"
CMAKE=/usr/bin/cmake
-CCMAKE_CC=gcc-6
-CCMAKE_CXX=g++-6
-
-MAKEFLAGS_BASE="-fvect-cost-model=dynamic -ftree-vectorize \
- -ftree-loop-distribute-patterns \
- -ftree-loop-optimize -ftree-loop-if-convert-stores \
- -fbranch-probabilities -fbranch-target-load-optimize \
- -fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops \
- -funroll-loops \
- -fgraphite-identity \
- -floop-nest-optimize \
- -msse -msse2 \
+CCMAKE_CC=clang-3.9
+CCMAKE_CXX=clang++-3.9
+
+MAKEFLAGS_BASE=" \
+ -Wreserved-user-defined-literal \
+ -fslp-vectorize \
+ -fvectorize -funroll-loops \
+ -msse -msse2 \
"
+
+MAKEFLAGS_CXX="-g -O3 -std=c++03 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
+MAKEFLAGS_CC="-g -O3 -std=c11 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
+MAKEFLAGS_LIB_CXX="-flto -g -O3 -std=c++03 ${MAKEFLAGS_BASE} -DNDEBUG"
+MAKEFLAGS_LIB_CC="-flto -g -O3 -std=c11 ${MAKEFLAGS_BASE} -DNDEBUG"
+
+
+#CCMAKE_CC=gcc-6
+#CCMAKE_CXX=g++-6
+#
#MAKEFLAGS_BASE="-fvect-cost-model=dynamic -ftree-vectorize \
+# -ftree-loop-distribute-patterns \
# -ftree-loop-optimize -ftree-loop-if-convert-stores \
-# -msse -msse2 \
+# -fbranch-probabilities -fbranch-target-load-optimize \
+# -fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops \
+# -funroll-loops \
+# -fgraphite-identity \
# -floop-nest-optimize \
+# -msse -msse2 \
# "
-
-MAKEFLAGS_CXX="-g -O2 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
-MAKEFLAGS_CC="-g -O2 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
-#MAKEFLAGS_CXX="-g -O0 -flto -DNDEBUG"
-#MAKEFLAGS_CC="-g -O0 -flto -DNDEBUG"
+#MAKEFLAGS_CXX="-g -O2 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
+#MAKEFLAGS_CC="-g -O2 ${MAKEFLAGS_BASE} -flto -DNDEBUG"
+#MAKEFLAGS_LIB_CXX="-flto -g -O2 ${MAKEFLAGS_BASE} -DNDEBUG"
+#MAKEFLAGS_LIB_CC="-flto -g -O2 ${MAKEFLAGS_BASE} -DNDEBUG"
-MAKEFLAGS_LIB_CXX="-flto -g -O2 ${MAKEFLAGS_BASE} -DNDEBUG"
-MAKEFLAGS_LIB_CC="-flto -g -O2 ${MAKEFLAGS_BASE} -DNDEBUG"
-MAKEFLAGS_GENERAL="-j2"
-BUILD_TYPE="Relwithdebinfo"
-CMAKE_LINKFLAG="-g -flto=6 -fwhole-program -O2 ${MAKEFLAGS_BASE}"
-CMAKE_DLL_LINKFLAG="-g -flto=6 -O2 ${MAKEFLAGS_BASE}"
+CMAKE_APPENDFLAG="-DUSE_MOVIE_SAVER=ON -DUSE_MOVIE_LOADER=ON"
+CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DLIBAV_ROOT_DIR=/usr/local/ffmpeg-3.1.1"
+CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DQT5_ROOT_PATH=/opt/Qt5.3.2/5.3/gcc_64"
+
+#CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DCMAKE_AR:STRING=gcc-ar-6 -DCMAKE_NM:STRING=gcc-nm-6 -DCMAKE_RANLIB:STRING=gcc-ranlib-6"
+
+CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DCMAKE_AR:STRING=llvm-ar-3.9 -DCMAKE_NM:STRING=llvm-nm-3.9 -DCMAKE_RANLIB:STRING=llvm-ranlib-3.9"
+CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DCMAKE_AS:STRING=llvm-asr-3.9"
+
+
+
+CMAKE_LINKFLAG="-g -O3 ${MAKEFLAGS_BASE}"
+CMAKE_DLL_LINKFLAG="-g -O3 ${MAKEFLAGS_BASE}"
LIB_INSTALL="/usr/local/lib/x86_64-linux-gnu/"
#LIB_INSTALL="/usr/local/lib/"
#LIB_INSTALL="/usr/lib/x86_64-linux-gnu/"
-CMAKE_APPENDFLAG="-DUSE_MOVIE_SAVER=ON -DUSE_MOVIE_LOADER=ON -DCMAKE_AR:STRING=gcc-ar-6 -DCMAKE_NM:STRING=gcc-nm-6 -DCMAKE_RANLIB:STRING=gcc-ranlib-6"
-CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DLIBAV_ROOT_DIR=/usr/local/ffmpeg-3.0.2"
-CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DQT5_ROOT_PATH=/opt/Qt5.3.2/5.3/gcc_64"
-
"new: width = %d, height = %d, format = %s\n",
src_width, src_height, av_get_pix_fmt_name(pix_fmt),
frame->width, frame->height,
- av_get_pix_fmt_name(frame->format));
+ av_get_pix_fmt_name((enum AVPixelFormat)frame->format));
return -1;
}
if((old_dst_width != dst_width) || (old_dst_height != dst_height)) { // You sould allocate on opening.
* this is required since rawvideo expects non aligned data */
if(sws_context == NULL) {
sws_context = sws_getContext(frame->width, frame->height,
- frame->format,
+ (enum AVPixelFormat) frame->format,
dst_width, dst_height,
AV_PIX_FMT_BGRA,
SCALE_FLAGS, NULL, NULL, NULL);
decoded = FFMIN(ret, pkt.size);
if (*got_frame) {
- size_t unpadded_linesize = frame->nb_samples * av_get_bytes_per_sample(frame->format);
+ size_t unpadded_linesize = frame->nb_samples * av_get_bytes_per_sample((enum AVSampleFormat)frame->format);
char str_buf[AV_TS_MAX_STRING_SIZE] = {0};
AVCodecContext *c = audio_stream->codec;
int dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_context, c->sample_rate) + frame->nb_samples,
}
if(!now_pausing) {
if(video_dst_data[0] != NULL) {
- uint32_t q;
+ uint32_t *q;
video_mutex->lock();
for(int yy = 0; yy < dst_height; yy++) {
q = (uint32_t *)(&(video_dst_data[0][yy * video_dst_linesize[0]]));
switch ((*codec)->type) {
case AVMEDIA_TYPE_AUDIO:
- setup_audio(c, codec);
+ setup_audio(c, (void **)codec);
ost->st->time_base = (AVRational){ 1, c->sample_rate };
break;
case AVMEDIA_TYPE_VIDEO:
int encode_video = 0, encode_audio = 0;
raw_options_list = NULL;
- video_st = { 0 };
- audio_st = { 0 };
+ //video_st = { 0 };
+ //audio_st = { 0 };
+ memset(&video_st, 0x00, sizeof(video_st));
+ memset(&audio_st, 0x00, sizeof(audio_st));
+
/* Initialize libavcodec, and register all codecs and formats. */
av_register_all();