CN111405292B - Video encryption method based on H.265 video coding standard - Google Patents
Video encryption method based on H.265 video coding standard Download PDFInfo
- Publication number
- CN111405292B CN111405292B CN202010185539.4A CN202010185539A CN111405292B CN 111405292 B CN111405292 B CN 111405292B CN 202010185539 A CN202010185539 A CN 202010185539A CN 111405292 B CN111405292 B CN 111405292B
- Authority
- CN
- China
- Prior art keywords
- video
- video frame
- ori
- encrypted
- coding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/46—Embedding additional information in the video signal during the compression process
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Abstract
The invention relates to a video encryption method based on H.265 video coding standard, which is characterized by comprising the following steps: step (1), inputting a video frame sequence V in an original YUV formatori(ii) a Step (2) from VoriStarting to record the dividing information of all CUs of each video frame by the second video frame; step (3), copy VoriThe Y component of each video frame constitutes a new video sequence Vy(ii) a Step (4), for VyProcessing to obtain a foreground binary image Psn(ii) a Step (5) of selecting VoriA CU to be subjected to encryption processing in the second video frame; step (6), encoding the current video frame according to the H.265 standard, and performing encryption operation after CU division and entropy encoding; continuing to execute the operations (5) and (6) on the next video frame, and repeating the steps; until V is completedoriAnd finally, generating an encrypted video coding code stream. Compared with the prior art, the method has better perception encryption effect and keeps lower computation complexity.
Description
Technical Field
The invention relates to a video encryption method based on H.265 video coding standard.
Background
The rapid development of video applications has covered various areas of our daily lives. With the continuous high-definition of video pictures, ultra-high-definition video consumption begins to become the mainstream of online pay video applications. However, due to the anonymity and openness of the network, the video data is often maliciously attacked in the transmission process, and the copyright of the video information is threatened. As the increasing definition of video data is accompanied by the increase of data volume, new and more efficient video coding standards are continuously updated. At present, a new generation of High Efficiency Video Coding (HEVC) is gradually applied to Video Coding applications. In order to protect video resources more efficiently, a video encryption method and an encoding standard need to be combined.
At present, a full-frame encryption mode is mostly adopted in a video encryption method based on HEVC, namely, encryption of a whole video frame is carried out in three stages of conversion or entropy coding before coding, and the video encryption method has higher encryption space and security. However, if the full-frame encryption mode is used for commercial high-definition video, the computation complexity is high, the requirements on software and hardware are high, the time consumed for data processing is long, and the real-time video communication is not facilitated.
The main content and the quality in the video are paid more attention to by the user, the main information in the video is perceptually encrypted, the calculation complexity of the encryption method can be reduced, the quality of the video can be reduced to a certain degree, the user cannot acquire the high-quality video with accurate information before decryption, and a good copyright protection effect is achieved.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a video encryption method based on the h.265 video coding standard, which can reduce the computational complexity and start a better encryption effect, aiming at the above prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a video encryption method based on H.265 video coding standard is characterized by comprising the following steps:
step (1), inputting a video frame sequence in an original YUV format, and recording the video frame sequence in the original YUV format as VoriThe size of the video frame is marked as w x h;
step (2) of adding VoriCoding according to H.265 standard, and in the process of coding according to H.265 standard, V is codedoriEach video frame in the video coding unit is divided into a plurality of coding units, and the coding units of the video frames to be coded are marked as CU; from VoriThe second video frame starts to record the partition information of all CUs of each video frame, and the partition information is stored in a first array vector1 in the form of (pt1x, pt1y, pt2x and pt2y), wherein pt1x, pt1y, pt2x and pt2y respectively represent the horizontal coordinate of the upper left point, the vertical coordinate of the upper left point, the horizontal coordinate of the lower right point and the vertical coordinate of the lower right point of the current CU;
step (3), copy VoriThe Y component of each video frame in the video sequence constitutes a new video sequence, which is labeled Vy;
Step (4), for VyThe treatment specifically comprises the following steps:
step (4-1) of adding VyIs marked as PnAnd Pn+1Obtaining a difference map P by differencing two adjacent video framesdn,
Pdn=|Pn-Pn+1|,n=1,2,3,…;
Step (4-2), and comparing the difference value graph P obtained in the step (4-1)dnBinaryzation is carried out according to a preset threshold value T, and binary images P are correspondingly obtained respectivelytn,n=1,2,3,…;PtnThe binarization rule of the middle pixel point is as follows: when P is presentdnWhen the image value of the middle pixel point is more than or equal to T, PtnReplacing the image value of the corresponding position with 255; when P is presentdnWhen the image value of the middle pixel point is less than T, PtnThe image value of the corresponding position is replaced by 0;
step (4-3) for PtnAnd n is 1,2,3, … to obtain foreground binary image Psn,n=1,2,3,…;
Step (5) of selecting VoriAnd storing the horizontal and vertical coordinates of the upper left point of the CU in a second vector2, wherein the CU to be encrypted in the second video frame comprises the following specific steps:
step (5-1) of adding VoriThe second video frame in (2) corresponds to a binary image Ps1Extracting the corresponding binary images P one by one from the first CU of the second video frames1The pixel values of the pixels of the middle horizontal and vertical coordinates in the horizontal and vertical coordinate range corresponding to the first CU are counted, if the number of the pixels of the middle horizontal and vertical coordinates exceeds K%, K is a preset threshold value, the CU is determined as an encrypted CU, and the horizontal and vertical coordinates (pt1x, pt1y) of the upper left point of the CU are stored in a second vector 2;
step (5-2), each CU corresponds to one point in the first array vector1, and other CUs are executed according to the same method in the step (5-1) until the points (pt1x, pt1y, pt2x, pt2y) meet the condition that pt2x is w-1 and pt2y is h-1, which indicates that the judgment of the current video frame is finished;
step (6), continuing to encode the current video frame according to the H.265 standard, and performing encryption operation on the current video frame in two stages of CU division and entropy coding in the process of encoding according to the H.265 standard;
clearing the vector2, and continuing to execute the operations (5) and (6) on the next video frame; the third frame corresponds to the binary image Ps2The fourth frame corresponds to the binary image Ps3And so on in turn; until V is completedoriAnd finally, generating an encrypted video coding code stream.
As an improvement, in the step 6, the specific operation steps include:
performing Arnold transformation on YUV three component data of a CU to be encrypted in a video frame, performing 2 times of Arnold transformation if the size of the CU to be encrypted is 4 × 4, performing 3 times of Arnold transformation if the size of the CU to be encrypted is 8 × 8, and performing 4 times of Arnold transformation if the size of the CU to be encrypted is 16 × 16; performing 6 Arnold transformations if the size of the CU to be encrypted is 32 x 32;
and (6-2) carrying out XOR encryption on the symbols of the binary syntax element transformation coefficients by using a Logistic chaotic sequence in the video frame entropy coding stage.
Compared with the prior art, the method has the advantages that the specific CU containing the moving object in the video frame is positioned by a frame difference method, only the encryption operation is carried out on the part of CU, the calculation amount is concentrated to the important part in the video, the better perception encryption effect is achieved, and the lower calculation complexity is kept; in the improved scheme, the scrambling of the CU stage and the syntax element encryption of the entropy coding stage are combined, so that the cracking difficulty is increased, and the higher safety is ensured.
Drawings
Fig. 1 is a flowchart of a video encryption method based on the h.265 video coding standard according to an embodiment of the present invention. .
Detailed Description
The invention is described in further detail below with reference to the accompanying examples.
The video encryption method based on the h.265 video coding standard as shown in fig. 1 is characterized by comprising the following steps:
step (1), inputting a video frame sequence in an original YUV format, and recording the video frame sequence in the original YUV format as VoriThe size of the video frame is marked as w x h; video sequence V usedoriIs a standard test sequence basketalldrill, wherein w is 832, h is 480;
step (2) of adding VoriCoding according to H.265 standard, and in the process of coding according to H.265 standard, V is codedoriEach video frame in the video coding unit is divided into a plurality of coding units, and the coding units of the video frames to be coded are marked as CU; from VoriThe second video frame starts to record the partition information of all CUs of each video frame, and the partition information is stored in a first array vector1 in the form of (pt1x, pt1y, pt2x and pt2y), wherein pt1x, pt1y, pt2x and pt2y respectively represent the horizontal coordinate of the upper left point, the vertical coordinate of the upper left point, the horizontal coordinate of the lower right point and the vertical coordinate of the lower right point of the current CU;
step (3), copy VoriThe Y component of each video frame in the video sequence constitutes a new video sequence, which is labeled Vy;
Step (4), for VyThe treatment specifically comprises the following steps:
step (4-1) of adding VyAre recorded asPnAnd Pn+1Obtaining a difference map P by differencing two adjacent video framesdn:
Pdn=|Pn-Pn+1|,n=1,2,3,…;
Step (4-2), and comparing the difference value graph P obtained in the step (4-1)dnBinaryzation is carried out according to a preset threshold value T, and binary images P are correspondingly obtained respectivelytn,n=1,2,3,…;PtnThe binarization rule of the middle pixel point is as follows: when P is presentdnWhen the image value of the middle pixel point is more than or equal to T, PtnReplacing the image value of the corresponding position with 255; when P is presentdnWhen the image value of the middle pixel point is less than T, PtnThe image value of the corresponding position is replaced by 0; in the present embodiment, T is 50;
step (4-3) for PtnAnd n is 1,2,3, … to obtain foreground binary image Psn,n=1,2,3,…;
Step (5) of selecting VoriAnd storing the horizontal and vertical coordinates of the upper left point of the CU in a second vector2, wherein the CU to be encrypted in the second video frame comprises the following specific steps:
step (5-1) of adding VoriThe second video frame in (2) corresponds to a binary image Ps1Extracting the corresponding binary images P one by one from the first CU of the second video frames1The pixel values of the pixels of the middle horizontal and vertical coordinates in the horizontal and vertical coordinate range corresponding to the first CU are counted, if the number of the pixels exceeds K%, and K is a preset threshold value, in the embodiment, K is 50, the CU is determined as an encrypted CU, and the horizontal and vertical coordinates (pt1x, pt1y) of the upper left point of the CU are stored in a second vector 2;
step (5-2), each CU corresponds to one point in the first array vector1, and other CUs are executed according to the same method in the step (5-1) until the points (pt1x, pt1y, pt2x, pt2y) meet the condition that pt2x is w-1 and pt2y is h-1, which indicates that the judgment of the current video frame is finished;
step (6), continuing to encode the current video frame according to the H.265 standard, and performing encryption operation on the current video frame in two stages of CU division and entropy coding in the process of encoding according to the H.265 standard;
clearing the vector2, and continuing to execute the operations (5) and (6) on the next video frame; the third frame corresponds to the binary image Ps2The fourth frame corresponds to the binary image Ps3And so on in turn; until V is completedoriAnd finally, generating an encrypted video coding code stream.
In the step 6, the specific operation steps include:
performing Arnold transformation on YUV three component data of a CU to be encrypted in a video frame, performing 2 times of Arnold transformation if the size of the CU to be encrypted is 4 × 4, performing 3 times of Arnold transformation if the size of the CU to be encrypted is 8 × 8, and performing 4 times of Arnold transformation if the size of the CU to be encrypted is 16 × 16; performing 6 Arnold transformations if the size of the CU to be encrypted is 32 x 32;
and (6-2) carrying out XOR encryption on the symbols of the binary syntax element transformation coefficients by using a Logistic chaotic sequence in the video frame entropy coding stage.
Claims (1)
1. A video encryption method based on H.265 video coding standard is characterized by comprising the following steps:
step (1), inputting a video frame sequence in an original YUV format, and recording the video frame sequence in the original YUV format as VoriThe size of the video frame is marked as w x h;
step (2) of adding VoriCoding according to H.265 standard, and in the process of coding according to H.265 standard, V is codedoriEach video frame in the video coding unit is divided into a plurality of coding units, and the coding units of the video frames to be coded are marked as CU; from VoriThe second video frame starts to record the partition information of all CUs of each video frame, and the partition information is stored in a first array vector1 in the form of (pt1x, pt1y, pt2x and pt2y), wherein pt1x, pt1y, pt2x and pt2y respectively represent the horizontal coordinate of the upper left point, the vertical coordinate of the upper left point, the horizontal coordinate of the lower right point and the vertical coordinate of the lower right point of the current CU;
step (3), copy VoriY-score of each video frame in the video streamThe new video sequence is composed, marked as Vy;
Step (4), for VyThe treatment specifically comprises the following steps:
step (4-1) of adding VyIs marked as PnAnd Pn+1Obtaining a difference map P by differencing two adjacent video framesdn,
Pdn=|Pn-Pn+1|,n=1,2,3,…;
Step (4-2), and comparing the difference value graph P obtained in the step (4-1)dnBinaryzation is carried out according to a preset threshold value T, and binary images P are correspondingly obtained respectivelytn,n=1,2,3,…;PtnThe binarization rule of the middle pixel point is as follows: when P is presentdnWhen the image value of the middle pixel point is more than or equal to T, PtnReplacing the image value of the corresponding position with 255; when P is presentdnWhen the image value of the middle pixel point is less than T, PtnThe image value of the corresponding position is replaced by 0;
step (4-3) for PtnAnd n is 1,2,3, … to obtain foreground binary image Psn,n=1,2,3,…;
Step (5) of selecting VoriAnd storing the horizontal and vertical coordinates of the upper left point of the CU in a second vector2, wherein the CU to be encrypted in the second video frame comprises the following specific steps:
step (5-1) of adding VoriThe second video frame in (2) corresponds to a binary image Ps1Extracting the corresponding binary images P one by one from the first CU of the second video frames1The pixel values of the pixels of the middle horizontal and vertical coordinates in the horizontal and vertical coordinate range corresponding to the first CU are counted, if the number of the pixels of the middle horizontal and vertical coordinates exceeds K%, K is a preset threshold value, the CU is determined as an encrypted CU, and the horizontal and vertical coordinates (pt1x, pt1y) of the upper left point of the CU are stored in a second vector 2;
step (5-2), each CU corresponds to one point in the first array vector1, and other CUs are executed according to the same method in the step (5-1) until the points (pt1x, pt1y, pt2x, pt2y) meet the condition that pt2x is w-1 and pt2y is h-1, which indicates that the judgment of the current video frame is finished;
and (6) continuing to encode the current video frame according to the H.265 standard, and performing encryption operation in two stages of CU division and entropy coding in the process of encoding according to the H.265 standard, wherein the method specifically comprises the following steps:
performing Arnold transformation on YUV three component data of a CU to be encrypted in a video frame, performing 2 times of Arnold transformation if the size of the CU to be encrypted is 4 × 4, performing 3 times of Arnold transformation if the size of the CU to be encrypted is 8 × 8, and performing 4 times of Arnold transformation if the size of the CU to be encrypted is 16 × 16; performing 6 Arnold transformations if the size of the CU to be encrypted is 32 x 32;
step (6-2), carrying out XOR encryption on symbols of the binary syntax element transformation coefficients by using a Logistic chaotic sequence in the video frame entropy coding stage;
clearing the vector2, and continuing to execute the operations (5) and (6) on the next video frame; the third frame corresponds to the binary image Ps2The fourth frame corresponds to the binary image Ps3And so on in turn; until V is completedoriAnd finally, generating an encrypted video coding code stream.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010185539.4A CN111405292B (en) | 2020-03-17 | 2020-03-17 | Video encryption method based on H.265 video coding standard |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010185539.4A CN111405292B (en) | 2020-03-17 | 2020-03-17 | Video encryption method based on H.265 video coding standard |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111405292A CN111405292A (en) | 2020-07-10 |
CN111405292B true CN111405292B (en) | 2022-04-15 |
Family
ID=71430914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010185539.4A Active CN111405292B (en) | 2020-03-17 | 2020-03-17 | Video encryption method based on H.265 video coding standard |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111405292B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107222751A (en) * | 2017-06-23 | 2017-09-29 | 宁波大学科学技术学院 | 3D HEVC deep video information concealing methods based on multi-view point video feature |
CN107959885A (en) * | 2017-12-12 | 2018-04-24 | 华中科技大学 | A kind of HEVC/H.265 video encryption methods and video ciphertext method for testing motion |
CN108833924A (en) * | 2018-06-22 | 2018-11-16 | 东北大学 | It is a kind of based on more security level video encryption algorithms H.265 |
CN109167999A (en) * | 2018-09-04 | 2019-01-08 | 宁波工程学院 | A kind of HEVC video-encryption and decryption method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9451296B2 (en) * | 2014-08-19 | 2016-09-20 | At&T Intellectual Property I, L.P. | Extracting data from advertisement files for ad insertion |
-
2020
- 2020-03-17 CN CN202010185539.4A patent/CN111405292B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107222751A (en) * | 2017-06-23 | 2017-09-29 | 宁波大学科学技术学院 | 3D HEVC deep video information concealing methods based on multi-view point video feature |
CN107959885A (en) * | 2017-12-12 | 2018-04-24 | 华中科技大学 | A kind of HEVC/H.265 video encryption methods and video ciphertext method for testing motion |
CN108833924A (en) * | 2018-06-22 | 2018-11-16 | 东北大学 | It is a kind of based on more security level video encryption algorithms H.265 |
CN109167999A (en) * | 2018-09-04 | 2019-01-08 | 宁波工程学院 | A kind of HEVC video-encryption and decryption method |
Non-Patent Citations (3)
Title |
---|
An Efficient Format Compliant Video Encryption Scheme for HEVC Bitstream;Mingxuan Yang 等;《2015 IEEE International Conference on Progress in Informatics and Computing (PIC)》;20151231;全文 * |
一种基于H.265的高效选择性加密算法;赵春晖 等;《沈阳大学学报(自然科学版)》;20190630;全文 * |
基于Logistic和Arnold变换的HEVC选择性加密方案;周怡钊 等;《计算机应用》;20191010;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111405292A (en) | 2020-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108028941B (en) | Method and apparatus for encoding and decoding digital images by superpixel | |
US11689713B2 (en) | Predicted frame generation by deformable convolution for video coding | |
EA032859B1 (en) | Tiered signal decoding and signal reconstruction | |
Wang et al. | A novel high-performance reversible data hiding scheme using SMVQ and improved locally adaptive coding method | |
CN110337811A (en) | The method, apparatus and computer system of motion compensation | |
CN108353175A (en) | The method and apparatus of prediction processing vision signal caused by coefficient of utilization | |
Wang et al. | Multi-scale convolutional neural network-based intra prediction for video coding | |
Jiang et al. | Mlic: Multi-reference entropy model for learned image compression | |
EP4336829A1 (en) | Feature data encoding method and apparatus and feature data decoding method and apparatus | |
US20200193565A1 (en) | Multi-level temporal resolution increase of video | |
Rajalakshmi et al. | ZLBM: zero level binary mapping technique for video security | |
Gao et al. | Structure-preserving motion estimation for learned video compression | |
CN115836525A (en) | Method and system for prediction from multiple cross components | |
CN111405292B (en) | Video encryption method based on H.265 video coding standard | |
Kekre et al. | Image Reconstruction using Fast Inverse Half tone and Huffman Coding Technique | |
Liang et al. | Invertible color-to-grayscale conversion using lossy compression and high-capacity data hiding | |
KR19980018127A (en) | A picture coding method, a picture decoding method, a picture coding apparatus using the method, a picture decoding apparatus and a recording medium for recording the method | |
JP5566406B2 (en) | Method for predicting block of image data, decoding and encoding device for realizing the method | |
CN112929669B (en) | Image encoding and decoding method and device | |
CN106954074B (en) | Video data processing method and device | |
WO2022077490A1 (en) | Intra prediction method, encoder, decoder, and storage medium | |
WO2000018133A1 (en) | Encoding device and method, and decoding device and method | |
Peng et al. | An optimized algorithm based on generalized difference expansion method used for HEVC reversible video information hiding | |
CN106998471B (en) | Video hiding method and video extracting method for modifying prediction mode | |
Perumal et al. | Sparse data encoder and decoder to improve security in video steganography |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |