In spo600 course, I took FLIF as my project. FLIF is a picture format that is able to lossless compress pictures. There are 3 stages for the project: Benchmarking, Profiling and optimizing. In the first stage, I found the project and benchmarked the program using the use case that built by my self. If youContinue reading “Project solution”
Author Archives: swang206
Lab 6 – Algorithm selection
In this lab, I will look at 3 different approaches that deals with audio volume. This is the 3 approaches that the course provided: Three approaches to this problem are provided: 1. The basic or Naive algorithm (vol1.c). This approach multiplies each sound sample by 0.75, casting from signed 16-bit integer to floating point andContinue reading “Lab 6 – Algorithm selection”
Stage 3 – optimization
Examine the code: This is the loop that takes most of time of the program. To examine the loop, I need to know the run time of every loop so that I added timer to the beginning and the ending of the loop. the result is that with the increasing of value ‘i’, the loopsContinue reading “Stage 3 – optimization”
Project Stage 2 – Profiling FLIF
Introduction In this stage, I will try to find out with function takes most CPU resources and see if there is possibility to reduce the runtime without effect or with a tiny effect to the output. I choose “gprof” as the profiler on Linux machine. The reason why I choose it is that it givesContinue reading “Project Stage 2 – Profiling FLIF”
Lab 5 – X86_64
In the last blog, we finished the program that prints “Hello World” 30 times on Aarch64 machine, now we are going to code the same program on X86_64 machine using assembly language. Step 1: start with a basic hello world program Step 2: loop 30 times output Step 3: deal with the second digit outputContinue reading “Lab 5 – X86_64”
Lab 5 – Aarch 64
In Lab 5, we will try to disassembly some C programs to look at how their assembly code is generated, and write a simple “Hello Word” program using assembly language. Disassembly hello programs on Aarch64 machine The <main> section is the code that inside of int main(){…} hello: hello2: hello3: Lab 5 on Aarch64 stepContinue reading “Lab 5 – Aarch 64”
Project stage 1 – profiling
Project: FLIF https://github.com/FLIF-hub/FLIF “ FLIF is a lossless image format based on MANIAC compression. MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding) is a variant of CABAC (context-adaptive binary arithmetic coding), where the contexts are nodes of decision trees which are dynamically learned at encode time. FLIF outperforms PNG, FFV1, lossless WebP, lossless BPG and lossless JPEG2000Continue reading “Project stage 1 – profiling”
Complier Bootstrapping
Compiler bootstrapping means that the a compiler is coded by it’s own language. For example, a C compiler may write in C. ?????????????????? This is an Chicken-And-Egg question right??? Where is the first version of the language’s complier from? More exactly, which language implemented first Compiler? No question, it is written in Machine Code. AfterContinue reading “Complier Bootstrapping”
LAB 3
Lab 3 Code: The lab we created a shape that will bounce around the screen. To do this, we created a x/y coordinator location function to locate the screen using X and y: code: This function takes col and row as X and Y value. After processed, it stores the pointer that point to theContinue reading “LAB 3”
Modern CPU and OS – System call
Think about a situation, program A wants to send an message to screen. As we know, the modern CPUs are running on protected mode, which means that program A is not able to perform that task by itself – program A cannot access the hardware, OS, other program memory area, etc. To finish this task,Continue reading “Modern CPU and OS – System call”