arXiv:2610.18558cs.CROct 2026

Manuscript Offprint

arXiv:2610.18558

Prompt-Segmentation Meets ROI Encryption: Fine-Grained Video Protection Based on Diffusion Isolation

Xiang Zhang, Haoyan Lu, Ziqiang Li, Ziwen He, Zhenshan Tan, Fei Peng, Zhangjie Fu

Abstract

Region-of-interest (ROI) selective encryption in H.265/HEVC aims to protect sensitive content while preserving the utility of non-ROI regions. Existing coding-unit (CU)-level approaches still suffer from substantial encryption redundancy for two reasons. First, existing approaches map object-detection bounding boxes to CUs, producing regular rectangular regions, which poorly match the shape of irregular ROI boundaries, such as facial contours. Second, their coding-tree-unit (CTU)-based diffusion isolation expands the protected footprint in fixed 64×6464 \times 64 blocks, causing encryption-induced distortion to spread over a large number of non-ROI pixels. To address the aforementioned shortcomings, we propose a prompt segmentation-guided CU-level ROI encryption algorithm, which mainly consists of two core components. The first component is a prompt segmentation-guided fine-grained ROI encryption pipeline. It maps pixel-level ROI masks to CUs according to an ROI-overlap threshold, refines boundary CUs to 8×88 \times 8 granularity, and applies format-compliant encryption to multiple syntax elements in the mapped ROI CUs. The second is a dual diffusion isolation strategy to address the encryption diffusion problem. For spatial isolation, the encoder refines non-ROI boundary regions into 8×88 \times 8 CUs and uses PCM mode to bypass intra-frame prediction. For temporal isolation, it removes motion-vector candidates whose reference blocks overlap ROI CUs. Experimental results demonstrate that the proposed method generates encryption regions that more closely match irregular ROI boundaries, effectively confines distortion to the ROI.

1 Introduction

Videos shared, stored, and analyzed across social media, surveillance, telemedicine, and other platforms often contain identifiable information, including faces and license plates. Unauthorized access to these regions creates privacy risks during video transmission, storage, and analysis (Padilla-López, Chaaraoui, and Flórez-Revuelta 2015). Privacy-preserving video coding must therefore protect sensitive regions while preserving the visual utility of non-sensitive content.

Naive video encryption protects the entire bitstream but also conceals non-sensitive content and incurs unnecessary encryption overhead (Stutz and Uhl 2012). Selective encryption addresses this limitation by encrypting only designated syntax elements while preserving format compliance with the video coding standard (Sullivan et al. 2012).

Figure

Figure 1: Comparison between existing methods and our method.

As one of the most widely adopted video coding standards, H.265/HEVC has inspired extensive research on selective encryption. Among these approaches, ROI selective encryption (Dufaux and Ebrahimi 2008b,a; Carrillo, Kalva, and Magliveras 2008; Unterweger et al. 2016; Zhang, Seo, and Wang 2018; Hosny et al. 2022; Cho, Song, and Youn 2024; Farajallah et al. 2015; Tew, Wong, and Phan 2016; Taha et al. 2018; Yu and Kim 2023; Amael, Kim, and Kim 2025; Li et al. 2024; Zhang et al. 2025) has attracted considerable attention because it further confines protection to sensitive regions while keeping the remaining visual content accessible.

Existing H.265/HEVC ROI encryption schemes operate primarily at Tile or CU level. Tile-based methods encrypt fixed rectangular regions, when a face occupies only part of a Tile, the surrounding background is inevitably encrypted together with the ROI (Farajallah et al. 2015; Tew, Wong, and Phan 2016; Taha et al. 2018; Zhang et al. 2025). Although CU-based methods employ finer encryption units, they still suffer from two major limitations. First, as shown in Figure 1(a), mapping rectangular detection boxes directly to CUs produces block-shaped regions that poorly fit irregular face contours, causing unnecessary background encryption (Yu and Kim 2023; Amael, Kim, and Kim 2025). Second, existing diffusion isolation mechanisms rely on 64×6464 \times 64-sized CTUs, even with encryption units refined to the CU level, diffusion is only controlled within larger CTUs, causing encryption-induced distortion to spread to a large number of non-ROI.

To address these limitations, we propose a prompt segmentation-guided ROI selective encryption scheme with dual diffusion isolation. As shown in Figure 1(b), the scheme first converts each detected ROI box into a pixel-level segmentation mask and labels CUs as ROI or non-ROI according to a mask-overlap threshold. Then, we encrypt selected intra prediction modes, motion information, and residual coefficients with an AES-CTR keystream while preserving valid H.265/HEVC syntax. Finally, we propose a dual diffusion isolation strategy based on PCM mode and MV restriction to address the encryption diffusion problem. The main contributions are as follows:

• A prompt segmentation-guided fine-grained ROI encryption pipeline: We propose a boundary-aware CU mapping mechanism combining with prompt segmentation to refine irregular ROI boundaries to 8×88 \times 8 granularity. Then, standard format-compliant selective encryption is applied to intra-prediction modes, motion information, and residual coefficients in the mapped ROI CUs. This design improves contour alignment and reduces unnecessary background encryption while preserving valid H.265/HEVC syntax.

• A dual diffusion isolation strategy based on PCM mode and MV restriction: Our diffusion isolation strategy contains spatial and temporal isolation. For spatial isolation, we refine non-ROI CUs that may reference encrypted ROI CUs to an 8×88 \times 8 size and encodes them in PCM mode, preventing the spatial propagation of encryption-induced distortion. For temporal isolation, we discard motion-vector candidates whose reference blocks overlap ROI CUs, preventing temporal propagation.

• Extensive experiments have verified the effectiveness of the encryption algorithm: We evaluate the proposed scheme on 35 sequences spanning resolutions from 176×144176 \times 144 to 4096×21604096 \times 2160 against four representative Tile- and CU-level baselines. The scheme achieves the highest IoU and lowest ERR in all seven resolution groups and restores non-ROI PSNR from 32.86 to 42.92 dB through diffusion isolation mechanism.