[Sumover-dev] [svn commit] r3917 - in vic/branches/mpeg4: codec
postproc render
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed Nov 8 04:22:24 GMT 2006
Author: barz
Date: Wed Nov 8 04:20:59 2006
New Revision: 3917
Modified:
vic/branches/mpeg4/Makefile.in
vic/branches/mpeg4/codec/decoder-mpeg4.cpp
vic/branches/mpeg4/codec/encoder-h264.cpp
vic/branches/mpeg4/codec/encoder-mpeg4.cpp
vic/branches/mpeg4/main.cpp
vic/branches/mpeg4/postproc/config.h
vic/branches/mpeg4/render/color-swscale.cpp
vic/branches/mpeg4/render/xvideo.h
Log:
done
Modified: vic/branches/mpeg4/Makefile.in
==============================================================================
--- vic/branches/mpeg4/Makefile.in (original)
+++ vic/branches/mpeg4/Makefile.in Wed Nov 8 04:20:59 2006
@@ -89,7 +89,7 @@
OBJ_XIL = @V_OBJ_XIL@
OBJ_CRYPT = @V_OBJ_CRYPT@
CODEC_LIB = ffmpeg/libavcodec/libavcodec.a codec/x264/libx264.a codec/tmndec/libh263.a codec/tmn-x/libh263coder.a
-VIDEO_LIB = ffmpeg/postproc/libswscale.a
+VIDEO_LIB = postproc/libswscale.a
LIB = $(LIB_GRABBER) @V_LIB_TK@ @V_LIB_TCL@ @V_LIB_X11@ @V_LIB@ $(CODEC_LIB) $(VIDEO_LIB) \
../common/src/libuclmmbase.a -lm -lz -lcrypto -lpthread
@@ -374,7 +374,7 @@
cd codec/tmn && $(MAKE) clean
cd codec/tmndec && $(MAKE) realclean
cd ffmpeg && $(MAKE) clean
- cd ffmpeg/postproc && $(MAKE) clean
+ cd postproc && $(MAKE) clean
cd codec/x264 && $(MAKE) clean
rm -f codec/tmn-x/*.o codec/tmn-x/*.a
@@ -435,8 +435,8 @@
"chmod 444 $$name.tar.gz" ; \
chmod 444 $$name.tar.gz
-ffmpeg/postproc/libswscale.a:
- (cd ffmpeg/postproc; $(MAKE) CC=$(CC) CCOPT="$(CCOPT)" )
+postproc/libswscale.a:
+ (cd postproc; $(MAKE) CC=$(CC) CCOPT="$(CCOPT)" )
ffmpeg/libavcodec/libavcodec.a:
(cd ffmpeg/libavcodec; $(MAKE) CC=$(CC) CCOPT="$(CCOPT)" )
Modified: vic/branches/mpeg4/codec/decoder-mpeg4.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-mpeg4.cpp (original)
+++ vic/branches/mpeg4/codec/decoder-mpeg4.cpp Wed Nov 8 04:20:59 2006
@@ -93,7 +93,7 @@
MPEG4Decoder::~MPEG4Decoder()
{
- std::cout << "destroy mpeg4 decoder\n";
+ // std::cout << "destroy mpeg4 decoder\n";
delete stream;
}
@@ -185,7 +185,7 @@
pb->release();
debug_msg("mpeg4dec: frame error\n");
- std::cout << "mpeg4dec: frame error\n";
+ // std::cout << "mpeg4dec: frame error\n";
stream->clear();
idx = seq + 1;
return;
Modified: vic/branches/mpeg4/codec/encoder-h264.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-h264.cpp (original)
+++ vic/branches/mpeg4/codec/encoder-h264.cpp Wed Nov 8 04:20:59 2006
@@ -150,9 +150,7 @@
if (!state) {
state = true;
size(vf->width_, vf->height_);
- std::
- cout << "init x264 encoder with kbps:" << kbps << " fps:" << fps <<
- "\n";
+ //std::cout << "init x264 encoder with kbps:" << kbps << " fps:" << fps << "\n";
enc->init(vf->width_, vf->height_, kbps, fps);
enc->setGOP(gop);
frame_size = vf->width_ * vf->height_;
Modified: vic/branches/mpeg4/codec/encoder-mpeg4.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-mpeg4.cpp (original)
+++ vic/branches/mpeg4/codec/encoder-mpeg4.cpp Wed Nov 8 04:20:59 2006
@@ -157,8 +157,8 @@
if (!state) {
state = true;
size(vf->width_, vf->height_);
- std::cout << "mpeg4enc: WxH:" << vf->width_ << "x" << vf->height_;
- std::cout << "kbps:" << kbps << " fps:" << fps << "\n";
+ // std::cout << "mpeg4enc: WxH:" << vf->width_ << "x" << vf->height_;
+ // std::cout << "kbps:" << kbps << " fps:" << fps << "\n";
mpeg4.init_encoder(vf->width_, vf->height_, kbps * 1024, fps, gop);
}
bitstream = mpeg4.encode(vf->bp_, len);
Modified: vic/branches/mpeg4/main.cpp
==============================================================================
--- vic/branches/mpeg4/main.cpp (original)
+++ vic/branches/mpeg4/main.cpp Wed Nov 8 04:20:59 2006
@@ -70,7 +70,7 @@
#include <X11/Xutil.h>
extern "C" {
-#include "ffmpeg/postproc/cpudetect.h"
+#include "postproc/cpudetect.h"
#include <tk.h>
#ifdef USE_SHM
#ifdef sgi
@@ -481,7 +481,7 @@
usage(NULL);
}
-#ifndef WIN32
+#ifdef RUNTIME_CPUDETECT
/* CPU capabilities detection */
GetCpuCaps(&gCpuCaps);
printf("cpudetect: %s\n", gCpuCaps.cpuname);
Modified: vic/branches/mpeg4/postproc/config.h
==============================================================================
--- vic/branches/mpeg4/postproc/config.h (original)
+++ vic/branches/mpeg4/postproc/config.h Wed Nov 8 04:20:59 2006
@@ -5,9 +5,12 @@
#ifndef __POSTPROC_CONFIG_H__
#define __POSTPROC_CONFIG_H__ 1
+#define HAVE_SWSCALE
+#define __CPU__ 586
+#define ARCH_X86 1
+
/* Runtime CPU detection */
#define RUNTIME_CPUDETECT
-#define HAVE_SWSCALE
/* Only use during compliation */
#if defined(RUNTIME_CPUDETECT)
Modified: vic/branches/mpeg4/render/color-swscale.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-swscale.cpp (original)
+++ vic/branches/mpeg4/render/color-swscale.cpp Wed Nov 8 04:20:59 2006
@@ -1,14 +1,15 @@
-
-#ifdef HAVE_SWSCALE
-
#include <stdlib.h>
#include <stdio.h>
#include "vic_tcl.h"
#include "renderer-window.h"
#include "vw.h"
#include "renderer.h"
-#include "ffmpeg/postproc/swscale.h"
-#include "ffmpeg/postproc/cpudetect.h"
+
+#include "postproc/config.h"
+#include "postproc/swscale.h"
+#include "postproc/cpudetect.h"
+
+#ifdef HAVE_SWSCALE
class X11WindowRenderer : public WindowDitherer {
public:
@@ -54,20 +55,21 @@
sws_context = NULL;
}
int flags = SWS_FAST_BILINEAR;
- /*flags |= (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0);
+#ifdef RUNTIME_CPUDETECT
+ flags |= (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0);
flags |= (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0);
flags |= (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0);
flags |= (gCpuCaps.hasAltiVec ? SWS_CPU_CAPS_ALTIVEC : 0);
- */
- if(!outw_ || !outh_ || !width_ || !height_) return;
+#endif
+ if(!outw_ || !outh_ || !width_ || !height_) return;
sws_context = sws_getContext(width_, height_, IMGFMT_I420,
- outw_, outh_, out_format, flags, NULL, NULL, NULL);
+ outw_, outh_, out_format, flags, NULL, NULL, NULL);
// printf("X11WindowRenderer: %dx%d ==> %dx%d\n", width_, height_, outw_, outh_);
if(sws_context == NULL){
- debug_msg("X11WindowRenderer: error! cannot allocate memory for swscontext!\n");
- return;
+ debug_msg("X11WindowRenderer: error! cannot allocate memory for swscontext!\n");
+ return;
}
@@ -85,7 +87,7 @@
sws_src[1] = sws_src[0] + framesize_;
sws_src[2] = sws_src[1] + framesize_/4;
- sws_scale_ordered(sws_context, sws_src, sws_src_stride, 0, height_, sws_tar, sws_tar_stride);
+ sws_scale_ordered(sws_context, sws_src, sws_src_stride, 0, height_, sws_tar, sws_tar_stride);
}
}
protected:
Modified: vic/branches/mpeg4/render/xvideo.h
==============================================================================
--- vic/branches/mpeg4/render/xvideo.h (original)
+++ vic/branches/mpeg4/render/xvideo.h Wed Nov 8 04:20:59 2006
@@ -1,7 +1,7 @@
#ifndef _XVIDEO_H_
#define _XVIDEO_H_
-#include "ffmpeg/postproc/config.h"
+#include "postproc/config.h"
#include "vic_tcl.h"
extern "C"{
More information about the Sumover-dev
mailing list