As you already know that I am a bit busy with learning intel SIMD like mmx, sse2 , ssse3 etc stuff. I am enjoying SIMD and playing with all these MMX, SSE versions.While working with SSSE3 after sse2 or sse3, I thought what is the advantage of SSSE3 over SSE2? Some people even ask me why there is not a dramatic change in performance after adding SSSE3. I knew the answer but thought to do some more R&D on it.
And here is my view....
I will start with some brief intro of SSE versions and also as I am in video field I will talk about integer operations only that will be my primary concern as of now.
SSE2 instructions are an extension of the SIMD introduced with the MMX technology and the SSE extensions.The key benefits of SSE2 are that both MMX ans SSE2 instructions can work on 8 XMM (128-bit, XMM0- XMM7) register along with the MMX registers (mm0-mm7), and that SSE instructions now support 64-bit floating-point values. So there was huge change between MMX and SSE2(or SSE). Now because of XMM registers instead of playing with 8 bytes, we can play 16 bytes simultaneously. So improving the performance just by double from the MMX assembly or 16 times from the C code. There are some instructions we are missing in MMX assembly which are present in SSE2 like paddsb/w, movapd,movupd, pshufw/d ,pavgb/w etc, which are very much helpful here in video compression.
While SSSE3 (Supplemental Streaming SIMD Extension 3) is an extension of SSE3 or I should say revision of SSE3. In SSE3(13 new instructions) the most notable change is the capability to work horizontally in a register, as opposed to the more or less strictly vertical operation of all previous SSE instructions. There are instructions to add and subtract the multiple values stored within a single register have been added. But note those are not for Integer operations only floating point, that's why I am talking about SSSE3.
SSSE3 contains 16 new discrete instructions over SSE3. Each can act on 64-bit MMX or 128-bit XMM registers. Therefore, Intel's manuals has 32 new instructions.The instructions are PSIGNB/W/D, PABSB/W/D, PALIGNR, PSHUFB, PMULHRSW, PMADDUBSW, PHSUBW/D, PHSUBSW, PHADDW/D and PHADDSW.So if you these, the processing block or registers are same as SSE2, no new registers.
By using SSSE3 the only advantage in video compression side integer operations is horizontally processing. So by SSSE3 we can add/subtract the data within the registers instead of adding or subtracting with other registers. So I feel SSSE3 only removes some overheads and save some cycles by using horizontal operations if your video code is having that kind of module like SAD, SSD and all, but there are be many places where transition from MMX to SSE2 gives huge improvement in performance but transition from SSE2 to SSSE3 may not give you even noticeable change. Even there will be lots of functions where SSSE3 will not be required over SSE2 in code. As to work vertically (between two registers) we sometimes do some data manipulations by padding 0's or by shuffling data between registers, and then process the data like addition/multiplication etc., those shuffling or padding are overheads that can be avoided here in SSSE3.
I guess we should not think that each next generation of SIMD will just magically double the performance of the code same like MMX to SSE/SSE2. Function module (like DCT, SAD etc.) and data fetching to those functions matters a lot to decide which SIMD we should use .... SSE2 or SSSE3 for better performance. So before converting any new code from SSE2 to SSSE3, just stop for a moment, have a close look on the module and then choose SSE2 Vs SSSE3.
Enjoy SIMD optimization.
All about my activities, thoughts, inspiration, ideas, and everything that happened around me and makes me to think over it.
Thursday, May 21, 2009
Friday, April 17, 2009
NGVC (H.265) Is On The way
While the whole multimedia world trying very hard to become mature in H.264, the bestcompression video standard till today, the new baby is in under development phase and named as 'The Next Generation Video Coding' (NCVG). In 2005 it was started by VCEG as consideration to 'H.264+'. Then after study it changed to H.265 a brand new standard instead of an extension of H.264 as a long-term video coding standard. And now latest VCEG meeting it has came up as 'NGVC' project (next-generation video coding) with backward compatibility. It is expected to be finalized in 2009-2010.
The goal of this standardization will be as follows:
1. Coding efficiency:
* NGVC should be capable of providing a bit rate reduction of 50% at the same subjective quality
2. Complexity:
* NGVC should be capable of operating with a complexity ranging from 50% to 3 times H.264/MPEG-4 AVC High Profile.
* When operated at a complexity of 50% compared to H.264/MPEG-4 AVC High Profile, NGVC should provide a 25% bit rate savings compared to H.264/MPEG-4 AVC High Profile at equivalent subjective quality.
3. Applications:
* Low-delay interactive video communications
* Surveillance
* Streaming
* Broadcast
* Digital cinema and large-screen digital imagery
* Mobile video entertainment
* Storage-based video application (camcorders, camera phones, computer files, disc media, download-and-play, etc)
KTA (key technical area) is developed as the software platform, which uses JM11 as the baseline and continuously integrates promising coding tools. The tools adopted in KTA are listed as below:
* 2-D non-separable adaptive interpolation filter (AIF) [AD08]
* separable AIF [C-0219-E]
* directional AIF [AG21]
* motion compensation with 1/8-pel motion vectors [AD09]
* adaptive prediction error coding (APEC) in spatial and frequency domain [AD07]
* adaptive quantization matrix selection (AQMS) [AD06]
* competition-based scheme for motion vector selection and coding [AC06]
* mode-dependent transform customization for intra coding [AG11]
All these techniques improve the coding performance by multi-pass encoding.
The latest published KTA software is JM11.0KTA2.3 (download here ). Some new technologies have been adopted by KTA software since July 2008. Those KTA coding tools involve the following areas:
1. Architecture
Internal Bit Depth Increasing
Extended Block Size (or called Super-MacroBlock) (C123)
2. Transformation and Quantization
Mode-Dependent Directional Transform
Very Large Block Transform
Adaptive Prediction Error Coding
Improved Adaptive Quantization Matrix Selection
Rate-Distortion-Optimization Quantization (RDO-Q)
Adaptive QP
3. Entropy Coding
Parallel Entropy Coding
4. Adaptive Loop Filter
Block/Quadtree-based Adaptive Loop Filter (C181)
5. Motion Coding
Motion Vector Prediction Competition
One-eighth-sample Motion Vector Resolution
6. Inter-Prediction
Adaptive Interpolation Filters
Separable Adaptive Interpolation Filters
Directional Adaptive Interpolation Filters
Enhanced Adaptive Interpolation Filter
Enhanced Directional Adaptive Interpolation Filter
Fixed Directional Interpolation Filters
Special Filter Positions
High Precision Filters
Switched Interpolation Filters with Offsets
These are some related helpful links:
1) ITU-T SG16’s homepage
2) The latest version of KTA is JM11.0KTA2.3 (Download here) and the latest test conditions are specified in [AH10].
3) H265.net forum instead use this H.265.net (modifying after a valuable comment...thanks for rectifying me)
So be ready to see new fun in video coding.
The goal of this standardization will be as follows:
1. Coding efficiency:
* NGVC should be capable of providing a bit rate reduction of 50% at the same subjective quality
2. Complexity:
* NGVC should be capable of operating with a complexity ranging from 50% to 3 times H.264/MPEG-4 AVC High Profile.
* When operated at a complexity of 50% compared to H.264/MPEG-4 AVC High Profile, NGVC should provide a 25% bit rate savings compared to H.264/MPEG-4 AVC High Profile at equivalent subjective quality.
3. Applications:
* Low-delay interactive video communications
* Surveillance
* Streaming
* Broadcast
* Digital cinema and large-screen digital imagery
* Mobile video entertainment
* Storage-based video application (camcorders, camera phones, computer files, disc media, download-and-play, etc)
KTA (key technical area) is developed as the software platform, which uses JM11 as the baseline and continuously integrates promising coding tools. The tools adopted in KTA are listed as below:
* 2-D non-separable adaptive interpolation filter (AIF) [AD08]
* separable AIF [C-0219-E]
* directional AIF [AG21]
* motion compensation with 1/8-pel motion vectors [AD09]
* adaptive prediction error coding (APEC) in spatial and frequency domain [AD07]
* adaptive quantization matrix selection (AQMS) [AD06]
* competition-based scheme for motion vector selection and coding [AC06]
* mode-dependent transform customization for intra coding [AG11]
All these techniques improve the coding performance by multi-pass encoding.
The latest published KTA software is JM11.0KTA2.3 (download here ). Some new technologies have been adopted by KTA software since July 2008. Those KTA coding tools involve the following areas:
1. Architecture
Internal Bit Depth Increasing
Extended Block Size (or called Super-MacroBlock) (C123)
2. Transformation and Quantization
Mode-Dependent Directional Transform
Very Large Block Transform
Adaptive Prediction Error Coding
Improved Adaptive Quantization Matrix Selection
Rate-Distortion-Optimization Quantization (RDO-Q)
Adaptive QP
3. Entropy Coding
Parallel Entropy Coding
4. Adaptive Loop Filter
Block/Quadtree-based Adaptive Loop Filter (C181)
5. Motion Coding
Motion Vector Prediction Competition
One-eighth-sample Motion Vector Resolution
6. Inter-Prediction
Adaptive Interpolation Filters
Separable Adaptive Interpolation Filters
Directional Adaptive Interpolation Filters
Enhanced Adaptive Interpolation Filter
Enhanced Directional Adaptive Interpolation Filter
Fixed Directional Interpolation Filters
Special Filter Positions
High Precision Filters
Switched Interpolation Filters with Offsets
These are some related helpful links:
1) ITU-T SG16’s homepage
2) The latest version of KTA is JM11.0KTA2.3 (Download here) and the latest test conditions are specified in [AH10].
3) H265.net forum instead use this H.265.net (modifying after a valuable comment...thanks for rectifying me)
So be ready to see new fun in video coding.
Thursday, April 16, 2009
That's why I LOVE Google
It's really really great. As we all know it's election time for Lok Sabha in India. So as a citizen of India after waiting in queue for 3-4 times around 3 hours each time, I got my Electronic Voter Id Card too. Since today onwards voting has been started. But as I was not knowing my voting booth where I can go and cast my vote. I decided to do some googling and thought of , first I will have to search for 3-4 official site by google and then I have to search again on those sites to identify my voting booth kind of tedicious work.
So I gave in google this quote "voting booth in karnataka" for search . And I got the second result is Voting For Election 2009 . Ya this is the google database page. And it's really awesome. Here not only you can find your vooting booth id but also you can check your all personal details (if official site has updated it...as google took data from there) , Parliamentary constituency, last time parliamnet members, development data, latest election news.......etc etc. I just love it.The only issue is the listed city for personal details are less. The cities are Delhi, Bangalore, Kolkata, Mumbai, Nagpur, and Pune. Hey even though if you are not belonging to these cities other than your personal details you can check other informations.
So check this page and enjoy and do contribute to Election as it decides your fututre in one way or another.
Voting For Election 2009
So I gave in google this quote "voting booth in karnataka" for search . And I got the second result is Voting For Election 2009 . Ya this is the google database page. And it's really awesome. Here not only you can find your vooting booth id but also you can check your all personal details (if official site has updated it...as google took data from there) , Parliamentary constituency, last time parliamnet members, development data, latest election news.......etc etc. I just love it.The only issue is the listed city for personal details are less. The cities are Delhi, Bangalore, Kolkata, Mumbai, Nagpur, and Pune. Hey even though if you are not belonging to these cities other than your personal details you can check other informations.
So check this page and enjoy and do contribute to Election as it decides your fututre in one way or another.
Voting For Election 2009
Sunday, April 05, 2009
March-April Update (MMX Techonoly/NASM/YASM)
I see that my planned tasks are completely frozen from last one month. Many things happened in last month which stopped my scheduled work. I had to go out of town for 15 Days, when I came back there was huge amount of work in my office. Not only huge, the overall whole work is new for me. So I am not at all getting anytime for my blog. Actually I do find a little bit time to write blog but I dont have time to do my planned technical KEP as per scheduled. But the good thing is as I told earlier I doing some new things in work, at least that is satisfactory and I am enjoying there.
Presently I am working on MMX technology. I am quite busy in writing MMX assemblies. Basically it is SIMD (single instruction multiple data) technology where we use 64 bit 8 MMX registers (MM0-MM7) to process data. So if we have data of 'char' type so we can process 8 data simlataneously.There are various instructions which Pack or unpack multiple data and operations for 1 Quand Word(64 bit), 2 Double Word(32 bit), 4 Word(16 bit) or 8 Byte(8 bit) data depends upon how we handle the data.It's quite interesting.
Now for MMX instruction assemblies I am also learning the IA32 assembler, NASM (Netwide Assembler) and also YASM. The IA32 architecture is good but not sufficient as it will support only Intel architecture ( 80x86 assembler) and writing code as inline __asm {...} without using MACRO, repeat (loop) feature is highly tedious job. NASM is an 80x86 assembler designed for portability and modularity. It supports a range of object file formats, including Linux and NetBSD/FreeBSD a.out ,ELF , COFF , Microsoft 16-bit OBJ and Win32 . It will also output plain binary files. Its syntax is designed to be simple and easy to understand, similar to Intel’s but less complex. It supports Pentium , P6 , MMX , 3DNow! , SSE and SSE2 opcodes, and has macro capability.
While Yasm is a (mostly) BSD-licensed assembler that is designed from the ground up to allow for multiple assembler syntaxes to be supported (e.g. NASM, GNU AS, etc.) in addition to multiple output object formats and multiple instruction sets. Its modular architecture allows additional object formats, debug formats, and syntaxes to be added relatively easily. It has matched and exceeded NASM’s capabilities, incorporating features such as supporting the 64-bit AMD64 architecture, parsing GNU AS syntax, and generating STABS, DWARF2, and CodeView 8(Not availlable in NASM) debugging information.
so I will be a little bit busy for this month too I feel, then I will check my status and will reschedule my KEP.
Presently I am working on MMX technology. I am quite busy in writing MMX assemblies. Basically it is SIMD (single instruction multiple data) technology where we use 64 bit 8 MMX registers (MM0-MM7) to process data. So if we have data of 'char' type so we can process 8 data simlataneously.There are various instructions which Pack or unpack multiple data and operations for 1 Quand Word(64 bit), 2 Double Word(32 bit), 4 Word(16 bit) or 8 Byte(8 bit) data depends upon how we handle the data.It's quite interesting.
Now for MMX instruction assemblies I am also learning the IA32 assembler, NASM (Netwide Assembler) and also YASM. The IA32 architecture is good but not sufficient as it will support only Intel architecture ( 80x86 assembler) and writing code as inline __asm {...} without using MACRO, repeat (loop) feature is highly tedious job. NASM is an 80x86 assembler designed for portability and modularity. It supports a range of object file formats, including Linux and NetBSD/FreeBSD a.out ,ELF , COFF , Microsoft 16-bit OBJ and Win32 . It will also output plain binary files. Its syntax is designed to be simple and easy to understand, similar to Intel’s but less complex. It supports Pentium , P6 , MMX , 3DNow! , SSE and SSE2 opcodes, and has macro capability.
While Yasm is a (mostly) BSD-licensed assembler that is designed from the ground up to allow for multiple assembler syntaxes to be supported (e.g. NASM, GNU AS, etc.) in addition to multiple output object formats and multiple instruction sets. Its modular architecture allows additional object formats, debug formats, and syntaxes to be added relatively easily. It has matched and exceeded NASM’s capabilities, incorporating features such as supporting the 64-bit AMD64 architecture, parsing GNU AS syntax, and generating STABS, DWARF2, and CodeView 8(Not availlable in NASM) debugging information.
so I will be a little bit busy for this month too I feel, then I will check my status and will reschedule my KEP.
Tuesday, March 10, 2009
Password Security
I just purchased this month (Feb)'Digit' magazine and started with the 'Editorial'. The article was based on previous month issue 'SECURITY' special. That issue had a article 'A forward you should ignore' which little bit explain How to hack Gmail passwords of others account. And unfortunately as of now the Digit Team has more than 1000 passwords of other people and their personal information those who tried to hack their own passwords or their close friends.They did a harmless data mining to those passwords and found various amusing ways and astonishing stupid ways people keep their passwords. Here are some poor ways people keep their passwords, so I am keeping it in Dont's.
Dont's:
1) password should not be 'password'
2) dont keep password which is easy to type like 'qwerty', '123456' or 'abcdefg'
3) We know that your phone number is unique one but anyone who has ever called you could potentially hack your account.
4) same rules apply for postal codes.
5) Celebrities names or any names are never good for passwords, so dont ever use 'iloveaamir', 'Johnloveyou', 'ram123' or 'michel1984'
Here are some of the ways you should do...
Do's:
1) Use alphanumeric and if possible use even punctuations.
2) Use combination of lower and upper cases.
3) Genrate some kind of rules for your passwords which can be changed periodically.
4) In addition to Rule of Passwords try to make rule for the particular site basis also. The beauty of this kind of rule is you dont have to remember lots of passwords, just remember the rule. Even if dont use the id for long time, you dont have to remember what password you used to have next time when you log in.
5) Even if you change your passwords frequently dont use only one passwords for all sites user id.
P.S.: Digit team found one very interesting password, that I cant resist to laugh after reading it 'iamloser'(millions of user, millions of mind)
And one more important thing....If a hacker really wants to hack your ID, you can do just NOTHING that's the fact ,but atleast dont convert naive to hacker.
Dont's:
1) password should not be 'password'
2) dont keep password which is easy to type like 'qwerty', '123456' or 'abcdefg'
3) We know that your phone number is unique one but anyone who has ever called you could potentially hack your account.
4) same rules apply for postal codes.
5) Celebrities names or any names are never good for passwords, so dont ever use 'iloveaamir', 'Johnloveyou', 'ram123' or 'michel1984'
Here are some of the ways you should do...
Do's:
1) Use alphanumeric and if possible use even punctuations.
2) Use combination of lower and upper cases.
3) Genrate some kind of rules for your passwords which can be changed periodically.
4) In addition to Rule of Passwords try to make rule for the particular site basis also. The beauty of this kind of rule is you dont have to remember lots of passwords, just remember the rule. Even if dont use the id for long time, you dont have to remember what password you used to have next time when you log in.
5) Even if you change your passwords frequently dont use only one passwords for all sites user id.
P.S.: Digit team found one very interesting password, that I cant resist to laugh after reading it 'iamloser'(millions of user, millions of mind)
And one more important thing....If a hacker really wants to hack your ID, you can do just NOTHING that's the fact ,but atleast dont convert naive to hacker.
Subscribe to:
Posts (Atom)