[CinCVS] A vision of Cinelerra v3 (hopefully)

2007-08-19 Thread David McNab
Hi,

Just following up on some discussion on IRC about CinV3 options, here's
a hypothetical example based on the concept of 'libcinelerra', the main
video editing engine, on top of which any gui is very thin and very
cleanly separated.

Cheers
David



 $ gcc -c myprog.c
 $ gcc -o myprog myprog.c -lcinelerra
 $ cat myprog.c

 /*
  * myprog.c - sample Cinelerra client app for converting an arbitrary
  * video to .mov format, and de-noising the video along the way
  */

 #include stdlib.h
 #include stdio.h
 #include cinelerra.h
 #include cinelerra/plugin.h

 int main(int argc, char *argv[])
 {
 CinProject *cin;
 CinTimeline *timeline;
 CinVideoTrack *vidTrk;
 CinStereoAudioTrack *audTrk;
 CinClip *videoIn;
 CinPlugin *denoiser;
 CinRenderConfig *render;
 int err;

 // get a cin project
 if ((cin = cinProjectCreate()) == NULL) {
 fprintf(stderr, Failed to create cinelerra project\n);
 exit(1);
 }

 // set it up for standard PAL
 cinProjectSetProperty(CIN_FORMAT, CIN_FMT_PAL);

 // create tracks which inherit properties from project
 vidTrk = cinProjectAppendVideoTrack(cin, myvideo);
 audTrk = cinProjectAppendAudioTrack(cin, myaudio, 2);

 // load video to convert
 if ((videoIn = cinProjectLoadResource(cin, argv[1])) == NULL) {
 fprintf(stderr, Failed to load video %s\n, argv[1]);
 exit(1);
 }

 // place video on timeline, 1.0 seconds from start
 cinTimelineAddClip(cin-timeline, videoIn, vidTrk, audTrk, 1.0);

 // add video denoiser effect
 if ((denoiser = cinTrackAppendPlugin(vidTrk,vdenoise)) == NULL) {
 fprintf(stderr, Failed to load video denoiser\n);   
 exit(1);
 }

 // and set it so it spans the entire video clip
 cinPluginSetProperty(denoiser, CIN_PLUGIN_START, vidTrk-begin);
 cinPluginSetProperyt(denoiser, CIN_PLUGIN_END, vidTrk-end);

 // set up render command structure
 render.file = out.mov;
 render.container = CIN_CONTAINER_MOV;
 render.vcodec = CIN_VCODEC_MPEG4;
 render.fps = 25;
 render.vbw = 2000; // kbits/sec
 render.acodec = CIN_ACODEC_MP3;
 render.arate = 44100;
 render.abw = 256; // 256kbits/sec

 // now do the render
 if ((err = cinProjectRender(cin, render)) != 0) {
 fprintf(stderr, Failed to render\n);
 exit(1);
 }

 // success
 return 0;
 }




___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread j


On Aug 18, 2007, at 22:35:43, Johannes Sixt wrote:
Do you recall what platform j was using?  I assume the patch fixed  
the

build on his platform while breaking SUSE.


Sorry, I can't remember the details, not even my own arguments.  
Please search
in ML archives. I'd appreciate if you could go over this issue  
again. I don't

have the hardware to help. Let's hope that j is listening and can give
feedback.

that was on debian/etch and ubuntu/feisty amd64
the problem is/was that the mmx code in libmpeg3 is 32bit only,
while ffmepg has working 64bit mmx code.

j

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread j

for what its worth
svn up  ./autogen.sh  ./configure --enable-mmx --with-pic  make
does *not* work on my amd 64 / ubuntu box right now.


ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation  
R_X86_64_32 against `a local symbol' can not be used when making a  
shared object; recompile with -fPIC


ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read  
symbols: Bad value


did not look into it but must be a change after my patch from earlier
this year.

j

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread Graham Evans




ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation 
R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC


ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read 
symbols: Bad value


did not look into it but must be a change after my patch from earlier
this year.

j

I'm pretty sure I can help with this one - by reposting a patch posted 
earlier by Hermann (easier than tracking down and constructing a useful 
link).


Around the time of cinelerra svn 1000 I switched from fedora to debian 
sid and couldn't compile cinelerra anymore.   My distro is debian sid 
pure 64 on an amd64smp/openGL system.  I was having all sorts of fpic 
and ffmpeg problems exactly like the one above.  Hermann had a patch 
which only changed one line in a makefile and that fixed all my 
problems.  It looks like this patch has not been committed.  Perhaps it 
will help you (attached).


I'm not sure why this patch is not committed - perhaps there is some 
uncertainty whether it is sound for all build systems.


With this patch I have been building all recent svn versions up to svn 
1017 without any compile flags.


best of luck and please send in any feedback which might help this patch 
get evaluated.


Graham
--- a/quicktime/ffmpeg/libavcodec/i386/Makefile.am
+++ b/quicktime/ffmpeg/libavcodec/i386/Makefile.am
@@ -12,7 +12,7 @@ AM_CFLAGS = \
 	$(LARGEFILE_CFLAGS) \
 	$(CPU_CFLAGS) \
 	-DHAVE_MMX $(SSE_FLAGS) \
-	-O3 -prefer-non-pic \
+	-O3 \
 	-D_GNU_SOURCE -DHAVE_AV_CONFIG_H -I$(srcdir)/../.. -I../..

 libavcodeci386_la_SOURCES = \


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread Kevin Brosius
On 2007-08-19 09:04, j wrote:
 for what its worth
 svn up  ./autogen.sh  ./configure --enable-mmx --with-pic  make
 does *not* work on my amd 64 / ubuntu box right now.
 

No, probably not, but I think that's ok.  --with-pic is kind of ugly. 
You can build if that option is not specified, right?

Does removing both --enable-mmx and --with-pic build for you?  Does it
auto detect mmx and build with it anyway in that case?

 
 ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation
 R_X86_64_32 against `a local symbol' can not be used when making a
 shared object; recompile with -fPIC
 
 ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read
 symbols: Bad value
 
 did not look into it but must be a change after my patch from earlier
 this year.

This it the error I see, but it's because ffmpeg does not build with
PIC, even though the rest of the build does.  An additional problem may
be that there was trouble building the mmx portion of ffmpeg some time
ago with PIC.  I need to verify of that is why we've had so much trouble
with it.

I noticed from your older emails, j, that you were not using internal
ffmpeg.  I think that is why this was not noticed before.  If the build
was using external ffmpeg, then I would not expect to see the error you
posted.


On 2007-08-19 10:50, Graham Evans wrote:
...
 Around the time of cinelerra svn 1000 I switched from fedora to debian 
 sid and couldn't compile cinelerra anymore.   My distro is debian sid 
 pure 64 on an amd64smp/openGL system.  I was having all sorts of fpic 
 and ffmpeg problems exactly like the one above.  Hermann had a patch 
 which only changed one line in a makefile and that fixed all my 
 problems.  It looks like this patch has not been committed.  Perhaps it 
 will help you (attached).
 
 I'm not sure why this patch is not committed - perhaps there is some 
 uncertainty whether it is sound for all build systems.

Well, I think the trouble here is that either ffmpeg should follow the
PIC behavior of the rest of the build, or is broken for PIC in general.

I saw a note that debian policy required build with PIC for a time.  I
don't think that will continue, as present comments say PIC should not
be required.  I do see PIC used in the general Cin portion of the build
here on Suse.  Do you know, or can you check, if PIC was used in your
builds of the main portion of Cin, Graham?

Also, if you have a build log, would you show me the compile options of
mpegvideo_mmx when it builds?  (If it builds...  It will only build if
mmx is specified or auto detected as true.  I'd like to know if it does
not auto detect mmx also.)

Thanks all,
-- 
Kevin

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread Graham Evans



Well, I think the trouble here is that either ffmpeg should follow the
PIC behavior of the rest of the build, or is broken for PIC in general.

I saw a note that debian policy required build with PIC for a time.  I
don't think that will continue, as present comments say PIC should not
be required.  I do see PIC used in the general Cin portion of the build
here on Suse.  Do you know, or can you check, if PIC was used in your
builds of the main portion of Cin, Graham?

  

Hi Kevin

Let me know if I have gone wrong but I think I have the neccessary 
skills to answer your questions.  Note all the following tests are 
performed on cinelerra CV svn 1017 with Hermann's patch as attached to 
my last email.  This builds and runs succesfully and performs well as 
far as I can see.


Firstly - I am guessing this is a typical gcc command for cinelerra:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -DHAVE_MMX -DUSE_MMX 
-DX86_CPU -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64 -g -O2 -MT idct.lo -MD -MP -MF .deps/idct.Tpo -c 
idct.c  -fPIC -DPIC -o .libs/idct.o


I'm not sure if that includes the PIC flag you were looking for.


Also, if you have a build log, would you show me the compile options of
mpegvideo_mmx when it builds?  (If it builds...  It will only build if
mmx is specified or auto detected as true.  I'd like to know if it does
not auto detect mmx also.)

  

MMX is detected I suppose from this:
'CPU_CFLAGS='-DHAVE_MMX -DUSE_MMX -DX86_CPU '

Compile options for mpegvideo_mmx:
if /bin/sh ../../../../libtool --tag=CC --mode=compile gcc 
-DHAVE_CONFIG_H -I. -I. -I../../../..-D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_MMX -DUSE_MMX 
-DX86_CPU  -DHAVE_MMX -msse -DHAVE_BUILTIN_VECTOR -O3 -D_GNU_SOURCE 
-DHAVE_AV_CONFIG_H -I./../.. -I../.. -g -O2 -MT mpegvideo_mmx.lo -MD -MP 
-MF .deps/mpegvideo_mmx.Tpo -c -o mpegvideo_mmx.lo mpegvideo_mmx.c; \
   then mv -f .deps/mpegvideo_mmx.Tpo .deps/mpegvideo_mmx.Plo; else 
rm -f .deps/mpegvideo_mmx.Tpo; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_MMX -DUSE_MMX 
-DX86_CPU -DHAVE_MMX -msse -DHAVE_BUILTIN_VECTOR -O3 -D_GNU_SOURCE 
-DHAVE_AV_CONFIG_H -I./../.. -I../.. -g -O2 -MT mpegvideo_mmx.lo -MD -MP 
-MF .deps/mpegvideo_mmx.Tpo -c mpegvideo_mmx.c  -fPIC -DPIC -o 
.libs/mpegvideo_mmx.o



Thanks all,
  
And a quick comment about ffmpeg external option - my understanding is 
that ffmpeg versions since about August 2006 are incompatible with the 
current cinelerra.  There is already a bug filed about that.  I think 
the recommended way to build cinelerra at present is to somehow get 
internal ffmpeg working.  On debian etch + going to a version of ffmpeg 
early enough to get a successful build breaks dependencies in lots of 
unrelated deb packages.


Graham

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread j


On Aug 19, 2007, at 14:30:25, Kevin Brosius wrote:

Does removing both --enable-mmx and --with-pic build for you?  Does it
auto detect mmx and build with it anyway in that case?

trying again with just ./configure
mmx is enabled, build fails with
fmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation  
R_X86_64_32 against `a local symbol' can not be used when making a  
shared object; recompile with -fPIC
ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read  
symbols: Bad value



I noticed from your older emails, j, that you were not using internal
ffmpeg.  I think that is why this was not noticed before.  If the  
build
was using external ffmpeg, then I would not expect to see the error  
you

posted.
right, bundled ffmpeg never worked for me on 64bit - keep forgetting  
that...


Also, if you have a build log, would you show me the compile  
options of

mpegvideo_mmx when it builds?  (If it builds...  It will only build if
mmx is specified or auto detected as true.  I'd like to know if it  
does

not auto detect mmx also.)


gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -D_LARGEFILE_SOURCE - 
D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_MMX -DUSE_MMX - 
DX86_CPU -DHAVE_MMX -msse -DHAVE_BUILTIN_VECTOR -O3 -D_GNU_SOURCE - 
DHAVE_AV_CONFIG_H -I./../.. -I../.. -g -O2 -MT mpegvideo_mmx.lo -MD - 
MP -MF .deps/mpegvideo_mmx.Tpo -c mpegvideo_mmx.c -o .libs/ 
mpegvideo_mmx.o


j

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread Robbt
I was running into the same error, until I disabled mmx. I finally was
able to compile Cinelerra with AMD64 ubuntu, for the first time ever,
before I always had to muddy up my repositories with stuff from Debian
unstable that made upgrading a pain and installing certain software from
repositories difficult.

Does anyone know if MMX optimizations will make enough of a performance
difference that I should try recompiling with the fix. I will check my
logs to see if I used --with-pic, I think that I did.




 for what its worth
 svn up  ./autogen.sh  ./configure --enable-mmx --with-pic  make
 does *not* work on my amd 64 / ubuntu box right now.


 ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation
 R_X86_64_32 against `a local symbol' can not be used when making a
 shared object; recompile with -fPIC

 ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read
 symbols: Bad value

 did not look into it but must be a change after my patch from earlier
 this year.

 j

 ___
 Cinelerra mailing list
 Cinelerra@skolelinux.no
 https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra




___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Re: [Cinelerra-commits] r1007 - in trunk/hvirtual: . libmpeg3/video

2007-08-19 Thread Kevin Brosius
On 2007-08-19 10:50, Graham Evans wrote:
 
 
  ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation 
  R_X86_64_32 against `a local symbol' can not be used when making a 
  shared object; recompile with -fPIC
 
  ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read 
  symbols: Bad value
 
  did not look into it but must be a change after my patch from earlier
  this year.
 
  j
 
 I'm pretty sure I can help with this one - by reposting a patch posted 
 earlier by Hermann (easier than tracking down and constructing a useful 
 link).
 
 Around the time of cinelerra svn 1000 I switched from fedora to debian 
 sid and couldn't compile cinelerra anymore.   My distro is debian sid 
 pure 64 on an amd64smp/openGL system.  I was having all sorts of fpic 
 and ffmpeg problems exactly like the one above.  Hermann had a patch 
 which only changed one line in a makefile and that fixed all my 
 problems.  It looks like this patch has not been committed.  Perhaps it 
 will help you (attached).
 
 I'm not sure why this patch is not committed - perhaps there is some 
 uncertainty whether it is sound for all build systems.
 
 With this patch I have been building all recent svn versions up to svn 
 1017 without any compile flags.
 
 best of luck and please send in any feedback which might help this patch 
 get evaluated.

Thanks Graham,

I suspect no one knew the full impact of this change.

I think it will fix my build problem also.

Does anyone have a system that builds without -fPIC on a 64 bit platform
(either amd64 or Intel?)  I think that is the only case that may break
with the change.  I don't see any results for this case, although there
are some comments that fPIC should not be needed in all cases.

-- 
Kevin

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


[CinCVS] Keyboard ShortCut referance guide

2007-08-19 Thread Jay

hello people
greetings from the fibra;
i am sending a small image file thate makes an easy graphical referance 
for the keyboard shortcuts
inline: atajosCinelerraeb.gif