Question: Please implement the ` vbmse: ` function found at the bottom of this file. You can follow the instructions listed below: Objective 1 : 1
Please implement the vbmse: function found at the bottom of this file. You can follow the instructions listed below:
Objective :
Implement Full Search Based Variable Block Size Motion Estimation using MIPS ISA with the circular search pattern shown in the image:
Objective Rules:
you must follow the given search pattern
you are not allowed to use special registers in your implementation
s and t registers are the only registers to store values during the execution of the program
avoid the following commands: division, mod
Objective Assumptions
Frame size : x to x where x and y dimensions can be any integer between and can be square or rectangle
Window size : One of specified dimensions in the vbsmes
Objective Strategy: You should approach the problem with three tasks:
Task : implementation of the SAD subroutine that just computes the sum of absolute difference for a given window size.
Task : implementation of the address generation for reading the corresponding frame elements based on the current position in the frame.
Task : implementation of the search pattern moves.
main:
addi $sp $sp
sw $ra$sp
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
# Start test
la $a asize
la $a frame
la $a window
jal vbsme
jal printresult
# End of test
lw $ra$sp
addi $sp $sp
jr $ra
printresult:
# Printing $v
add $a $v $zero
li $v
syscall
# Print newline.
la $a newline
li $v
syscall
# Printing $v
add $a $v $zero
li $v
syscall
# Print newline.
la $a newline
li $v
syscall
# Print newline.
la $a newline
li $v
syscall
jr $ra
# vbsme.s
text
globl vbsme
# Your program must follow circular search pattern.
# Preconditions:
# st parameter a address of the first element of the dimension info address of asize
# nd parameter a address of the first element of the frame array address of frame
# rd parameter a address of the first element of the window array address of window
# Postconditions:
# result v x coordinate of the block in the frame with the minimum SAD
# v y coordinate of the block in the frame with the minimum SAD
# Begin subroutine
vbsme:
li $v # reset $v and $V
li $v
# insert your code here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
