Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
20th March 2006, 22:32 | #21 | Link | |
FFmpeg fan
Join Date: Dec 2003
Location: Germany
Posts: 427
|
Quote:
I wanted to express that ppl are advised to change Code:
int x = 8; int y = x/2; Code:
unsigned int x = 8; unsigned y = x >> 1; here. Hellfred Small programm to test: Code:
#include <iostream> using namespace std; int main() { unsigned int x = 8; x = x >> 1; // x/2 cout << x << endl; x = x >> 1; // x/2 cout << x << endl; unsigned int y = 2; y = y << 1; // y*2 cout << y << endl; y = y << 1; // y*2 cout << y << endl; return 0; } Code:
haibane@LapLap:~/tmp$ g++ shift.cpp -o shift haibane@LapLap:~/tmp$ ./shift 4 2 4 8 Last edited by hellfred; 20th March 2006 at 22:42. |
|
21st March 2006, 00:57 | #22 | Link | |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Quote:
Code:
int munge0(int x) { return x/2; } Code:
int munge1(int x) { return x>>1; } int munge2(unsigned int x) { return x/2; } int munge3(unsigned int x) { return x>>1; } munge1 though munge3 will be compiled into a single shift instruction. munge0 can't, because (-1)>>1 != (-1)/2 Last edited by akupenguin; 21st March 2006 at 01:08. |
|
21st March 2006, 01:39 | #23 | Link |
Registered User
Join Date: Apr 2004
Posts: 1,315
|
I'm not a video dev so don't push on me hard but maybe if they used signed int it will be also possible to verifire if integer is negative (complement to 2) by masking it with something like 0x80 and do optimisation only if integer >0
Nice decoder but still no information about it from on2 (they are too busy with a new generation of vp8/vp9 ) Last edited by IgorC; 21st March 2006 at 01:58. |
21st March 2006, 10:53 | #24 | Link |
FFmpeg fan
Join Date: Dec 2003
Location: Germany
Posts: 427
|
OT: c programming tips
Thanks for enligthning me, akupenguing.
Can you suggest a source that will teach me lots of c/c++ tweaks like the use of the shift operator for division with 2^n on unsigneded integers. I had c / c++ lessons only for about 1 year at university, and they mainly covered the basic. So I do need to learn those tricks to be ever able to understand the sourcecode of projects like x264/mplayer/ffmpeg. And understanding is required before I am able to help with such projects. Hellfred |
21st March 2006, 14:01 | #26 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
21st March 2006, 14:29 | #27 | Link | |
Registered User
Join Date: Oct 2001
Posts: 1,459
|
Quote:
(-1)>>1: sar eax, 1 (-1)/2: cdq / sub eax, edx / sar eax, 1
__________________
gabest.org |
|
22nd March 2006, 13:20 | #28 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
@dizmon
you should update your post "On2 VP7 is great in quality but it is unusable for long-term video backup puposes!" since now VP62 is opensource
__________________
Detritus Software |
22nd March 2006, 13:24 | #29 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
22nd March 2006, 13:27 | #30 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
anyone heard of a CLI VP6 encoder that input AVS?
__________________
Detritus Software |
22nd March 2006, 13:42 | #31 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
22nd March 2006, 13:43 | #32 | Link |
Registered User
Join Date: Nov 2003
Posts: 44
|
so let me get this right, there will soon be an ffmpeg build with the ability to produce VP6 based FLV files?
I currently use ffmpeg alot to produce FLV files, not sure what the video codec name is but it's pretty bad in comparison to equivelent sized WMV's i've produced. This would be great. |
22nd March 2006, 13:45 | #33 | Link | |
FFmpeg fan
Join Date: Dec 2003
Location: Germany
Posts: 427
|
Just decoder up to now
Quote:
Hellfred |
|
22nd March 2006, 14:27 | #35 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
@hellfred
Thanks for the info!
__________________
Detritus Software |
22nd March 2006, 16:31 | #37 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
CVS still online. Get it while it's avalible
__________________
Detritus Software |
22nd March 2006, 16:44 | #38 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
__________________
Detritus Software |
22nd March 2006, 22:33 | #40 | Link |
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
Want another link?
Files are still on CVS in any case: http://cvs.sourceforge.net/viewcvs.py/libvp62/ [edit] new link
__________________
Detritus Software Last edited by Sirber; 22nd March 2006 at 22:41. |
|
|