Research Article
Distortion-Based Slice Level Prioritization for Real-Time Video over QoS-Enabled Wireless Networks
Algorithm 1
Algorithm to assign priorities to slices using slice distortion, ⌊..⌋ denotes the floor operation.
pktsBuffered ← 0 | loop | receive a packet | if (new frame received = true) then | decode the frame (to be used as a reference for PSNR calculations) | | while < pktsBuffered do | move packet from buffer1 to buffer2 | calculate PSNR for the remaining packets in buffer1, put the n : PSNR result in list1 | move back packet n from buffer2 to buffer1 | ← | end while | sort list1 in ascending order according to PSNR field | remove ⌊pktsBuffered/3⌋ elements from list1 and assign Pri2 to corresponding packets in buffer1 (set NRI to “10”) | remove next ⌊pktsBuffered − ⌊pktsBuffered/3/2⌋ elements from list1 and assign Pri2 to corresponding packets in buffer1 | (set NRI to “01”) | assign Pri0 to packets in buffer1 corresponding to the remaining elements in list1 (set NRI to “00”) | flush buffer1 | pktsBuffered← 0 | else | add packet to FIFO buffer1 | pktsBuffered ← pktsBuffered + 1 | end if | end loop |
|