## 3 Proposed Solution
### Forward Error Correction
\right]\)
7: Calculate the Syndrome \(S=(S_{1},S_{2},\ldots,S_{n})\), i.e., in (7,4) block codes \(S=(S_{1},S_{2},S_{3})\)
8:if\(S=0|S_{1}=0\) AND \(S_{2}=0\) AND \(S_{3}=0\)then
9: PRINT \"No Error in the codeword\"
10:else
11: Find error pattern \(E\) against Syndrome \(S\) in the Syndrome Table. 12: Calculate \(C=C^{\prime}+E\) // Erroneous bit will be altered via this operation
13:endif
14: Extract the information bits from the codeword
15: Forward it to Decryptor
16:endwhile
```

**Algorithm 2** Pseudocode of Implemented FEC Method: Destination/Receiver Side

## 4 Experimental Results and Performance Evaluation

Experiments were carried out on an Intel Core 2 Duo Processor with 4 GB RAM and a 64-bit operating system. The GE model and FEC mechanism were both simulated in the C++ programming language. The JSVM encoder (version 9.19) was used for the compression of videos as a single-layer H.264/AVC bitstream. The Main/High profile was chosen, as the Baseline profile of JSVM does not support CABAC encoding. The Intra and Inter frames (I+P+B) were encoded and selectively encrypted in a bitstream generated for a Group of Pictures (GOP) size and Intra period, which was equal to 16 and with a chroma subsampling pattern of 4:2:0. Experiments were performed at different Quantization Parameter (QP) values (i.e., 8, 12, 24, 36, and 48). The proposed scheme was tested on ten (10) test videos having different color pixels, motion activity, texture, and resolution. The results are taken on different resolutions, such as Common Intermediate Format (CIF) (352 \(\times\) 288 pixels/frame), 4 CIF (704 \(\times\) 480 pixels/frame), and High Definition (HD) (1280 \(\times\) 720 pixels/frame) with different frame rates (CIF at 30 fps, while 4 CIF and HD at 60 fps). All test videos are publicly available at Derf's collection [60]. The visual results and subjective quality of the videos are shown in Figure 5, which exhibits the implemented scheme's effect on tested CIF, 4 CIF, and HD videos at various stages. Figure 5 (d1, d2, d3) shows the decoded form of videos given in Figure 5 (c1, c2, c3), respectively, where a significant degradation in the visual quality can be observed. Figure 5 (e1, e2, e3) presents the decoded videos after recovering by using FEC, where video quality improvement can be visually observed. Experiments were also performed at five QP values (8, 12, 24, 36, and 48). QP, which is reciprocal to the video quality, is also a representation of the quality of perception, with lower QPs representing higher quality video from a range for H.264/AVC and HEVC from 0 to 51. Figure 6 shows the comparative effect of FEC at different QP values (12, 24, 36 and 48) on decrypted videos with and without FEC. The impact of PSNR at different QPs on test videos is summarized in Table 1. The visual results show that an overall increase in visual quality after applying FEC, particularly at QP 24. Figure 5: Visual representation of the effect of the implemented FEC scheme on different resolution test videos (**a1–a3**) Original video frames, (**b1–b3**) Selectively encrypted video frame, (**c1–c3**) Error-affected encrypted video frame, (**d1–d3**) Decrypted video frame without applying FEC and (**e1–e3**) Decrypted video frame with FEC applied. ### Video Quality Analysis

The selectively encrypted test videos with channel errors (induced using the GE channel model) were evaluated before and after the application of FEC. The quantitative evaluation employed various video quality metrics such as Peak Signal to Noise Ratio (PSNR) [61], Structural Similarity Index Measure (SSIM) [62], Mean Squared Error (MSE) [63], and Video Quality Model (VQM) [64]. In addition to the assessment of blurring and blocking effects [65], histogram analysis is also performed on the original and recovered videos. #### 4.1.1 Psnr

PSNR [57] is used for quality estimation in terms of the reconstruction of 'lossy' compression and the noise (error) introduced in the signal (original data) during transmission.