CN106713928B - Video encoding and decoding method and device - Google Patents

Video encoding and decoding method and device Download PDF

Info

Publication number
CN106713928B
CN106713928B CN201611255198.3A CN201611255198A CN106713928B CN 106713928 B CN106713928 B CN 106713928B CN 201611255198 A CN201611255198 A CN 201611255198A CN 106713928 B CN106713928 B CN 106713928B
Authority
CN
China
Prior art keywords
picture
resolution
similarity
video frame
video
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
Application number
CN201611255198.3A
Other languages
Chinese (zh)
Other versions
CN106713928A (en
Inventor
全浩伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN201611255198.3A priority Critical patent/CN106713928B/en
Publication of CN106713928A publication Critical patent/CN106713928A/en
Application granted granted Critical
Publication of CN106713928B publication Critical patent/CN106713928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video coding and decoding method, which comprises the following steps: dividing a video frame into a plurality of non-overlapping picture blocks, and calculating the similarity of each picture block in a preset time period; according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream; and sending the compressed code stream of the additional video frame picture corresponding to the compression ratio information to a client, and decoding the compressed code stream by the client according to the received compressed code stream of the additional video frame picture corresponding to the compression ratio. The invention also discloses a video coding and decoding device. The invention can reduce the requirement of video transmission bandwidth, and the displayed picture is more in line with the requirement of human eyes.

Description

Video encoding and decoding method and device
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a method and an apparatus for video encoding and decoding.
Background
As hardware device technology and user experience requirements become higher, the resolution of video pictures also becomes higher. The resolution of the television program signals in the current market is gradually improved from HD, FHD, 4K and even 8K, so that the requirements on television hardware equipment and signal transmission bandwidth are correspondingly improved.
At present, the transmission modes of digital television video signals include coaxial cable transmission, internet transmission, satellite transmission and other ways. Each transmission path has certain bandwidth limitations. For high-resolution video signals, such as 4K signals, the mainstream television products on the market already support 4K video decoding and 4K screen display, but the bottleneck limiting the popularization of 4K video is that the 4K code stream capacity is too large, and the requirement of the required transmission bandwidth is too high. Taking internet transmission as an example, the network bandwidth of a common household at present often cannot meet the requirement of watching a 4K video in a flow, and if the video is directly coded, the display of a decoded image is blurred or distorted, so that the use experience of a user is affected, and the 4K video is difficult to popularize.
Disclosure of Invention
The invention mainly aims to provide a video coding and decoding method and device, and aims to solve the technical problem that the use experience of a user is influenced due to the fact that the decoded image is blurred or distorted due to the fact that a video is directly coded in the prior art.
To achieve the above object, the present invention provides a video encoding method, including the steps of:
dividing a video frame into a plurality of non-overlapping picture blocks, and calculating the similarity of each picture block in a preset time period;
according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream;
and sending the compressed code stream with the additional video frame picture corresponding to the compression ratio information to the client.
Optionally, the step of calculating the similarity of each picture block in a preset time period includes:
acquiring the RGB value of an initial frame and the RGB value of an end frame of the picture block in a preset time period;
and calculating the similarity of the picture blocks in a preset time period according to the RGB value of the initial frame and the RGB value of the end frame.
Optionally, the step of performing compression coding on the video frame picture according to the similarity of the picture blocks includes:
comparing the similarity of the picture blocks of each video frame with a preset similarity;
if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, performing resolution reduction coding on the video frame picture, and if the similarity of the video frame picture blocks is less than the preset similarity, keeping the original resolution of the video frame picture.
In addition, to achieve the above object, the present invention further provides a video decoding method, including:
analyzing the obtained compressed code stream and extracting a corresponding compression ratio in the compressed code stream;
decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture;
the method comprises the steps of obtaining the physical resolution of a display interface, adjusting the resolution of a picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted.
Optionally, the step of obtaining the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture with the adjusted resolution includes:
comparing the physical resolution of the display interface with the resolution of a picture;
and if the resolution of the picture is consistent with the physical resolution of the display interface, displaying the picture, otherwise, adjusting the resolution of the picture to be consistent with the physical resolution of the display interface and then displaying.
In order to achieve the above object, the present invention provides a video encoding apparatus, including:
the computing module is used for dividing the video frame into a plurality of non-overlapping picture blocks and computing the similarity of each picture block in a preset time period;
the coding module is used for carrying out compression coding on the video frame pictures according to the similarity of the picture blocks to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream;
and the sending module is used for sending the compressed code stream after the additional video frame picture corresponds to the compression ratio information to the client.
Optionally, the calculation module comprises:
the acquisition unit is used for acquiring the RGB value of an initial frame and the RGB value of an end frame of the picture block in a preset time period;
and the calculating unit is used for calculating the similarity of the picture blocks in a preset time period according to the RGB value of the initial frame and the RGB value of the end frame.
Optionally, the encoding module comprises:
the first comparison unit is used for comparing the similarity of each video frame picture block with a preset similarity;
and the coding unit is used for performing resolution reduction coding on the video frame picture if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, and keeping the original resolution of the video frame picture if the similarity of the video frame picture blocks is less than the preset similarity.
Further, to achieve the above object, the present invention also provides a video decoding apparatus comprising:
the receiving module is used for analyzing the obtained compressed code stream and extracting the corresponding compression ratio in the compressed code stream;
the decoding module is used for decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture;
and the adjusting module is used for acquiring the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface and displaying the picture with the adjusted resolution.
Optionally, the adjusting module includes:
the second comparison unit is used for comparing the physical resolution of the display interface with the resolution of a picture;
and the adjusting unit is used for displaying the picture if the resolution of the picture is consistent with the physical resolution of the display interface, or adjusting the resolution of the picture to be consistent with the physical resolution of the display interface and then displaying the picture.
The invention provides a video coding and decoding method and a device, which are characterized in that a video frame is divided into a plurality of non-overlapping picture blocks, and the similarity of each picture block in a preset time period is calculated; then according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream; sending the compressed code stream with the additional video frame picture corresponding to the compression ratio information to the client; in addition, after receiving the compressed code stream of the compression ratio information corresponding to the additional video frame picture, the client extracts the corresponding compression ratio of each picture in the compressed code stream; decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture; the method comprises the steps of obtaining the physical resolution of a display interface, adjusting the resolution of a picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted.
Drawings
FIG. 1 is a flowchart illustrating a video encoding method according to a first embodiment of the present invention;
FIG. 2 is a detailed flowchart of the step of calculating the similarity of each picture block in the preset time period in FIG. 1;
FIG. 3 is a detailed flowchart of the step of compressing and encoding the video frame according to the similarity of the picture blocks in FIG. 1;
FIG. 4 is a flowchart illustrating a video decoding method according to a first embodiment of the present invention;
FIG. 5 is a flowchart illustrating a detailed process of the steps of obtaining the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted in FIG. 4;
FIG. 6 is a block diagram of a video encoding apparatus according to a first embodiment of the present invention;
FIG. 7 is a block diagram illustrating a refinement function of the computing block of FIG. 6;
FIG. 8 is a schematic diagram of a refinement function module of the coding module of FIG. 6;
FIG. 9 is a block diagram illustrating functional blocks of a video decoding apparatus according to a first embodiment of the present invention;
fig. 10 is a schematic diagram of a detailed functional module of the adjusting module in fig. 9.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a video coding method.
Referring to fig. 1, fig. 1 is a flowchart illustrating a video encoding method according to a first embodiment of the present invention;
in this embodiment, the video encoding method includes:
step S10, dividing the video frame into a plurality of non-overlapping picture blocks, and calculating the similarity of each picture block in a preset time period;
in the present embodiment, the video frame is an image extracted from a video, and the video frame may be divided into m parts by width, n parts by height, i.e. dividing the whole video frame image into m x n non-overlapping picture blocks, where m and n are preferably both 2, and of course m and n may also be any value other than 2, i.e. the whole video frame image is divided into 2 x 2 picture blocks, and then according to the preset time period T, that is, every time interval T, a video frame code stream picture is taken for recording, the picture block is defined as P1[ T1, m1, n1], where t1 denotes a certain point in time, m denotes the mth picture block in the horizontal direction, n denotes the nth picture block in the vertical direction, then, the current time is T2 after every time period T, when the picture block is defined as P2[ T2, m1, n1], and the similarity calculation method between the picture blocks at T1 and T2 is as follows: and f in the above step can be compared and calculated according to the RGB value change degrees of the two picture blocks, and can also be compared and calculated according to the gray value ratio of the two picture blocks.
Further, referring to fig. 2, the step S10 may include:
step S11, acquiring the RGB value of the initial frame and the RGB value of the end frame of the picture block in a preset time period;
step S12, calculating the similarity of the picture blocks in a preset time period according to the RGB values of the initial frame and the end frame.
In this embodiment, after dividing a video frame into a plurality of non-overlapping picture blocks, the RGB values of the initial frame and the end frame of the picture block in a preset time period may be obtained, then the RGB values of the initial frame and the end frame of the picture block in the preset time period are subtracted to obtain a difference value, and then the absolute value of the difference value is taken to obtain the similarity of each picture block in the preset time period. In the specific implementation process, the similarity can be calculated by comparing the gray value ratios of the two picture blocks.
Step S20, according to the similarity of the picture block, compressing and coding the video frame picture, generating a compressed code stream, and adding the compression ratio information corresponding to each video frame picture in the compressed code stream;
after the similarity of the picture blocks is obtained, the video frame picture blocks can be compression-coded according to the similarity of the picture blocks, for example, if the similarity between the picture block at the time t1 and the picture block at the time t2 is high, the picture is considered to have no change and is not a point concerned by human eyes, and resolution reduction processing can be performed on the picture to reduce the transmission requirement. On the other hand, if the similarity between the picture block at the time t1 and the picture block at the time t2 is low, it is considered that the change of the picture is large and the picture is a point of interest to human eyes, and since the quality of the video image is degraded by decoding the encoded image, the original resolution is adopted for the image of interest to human eyes, and the resolution reduction processing is not performed. After the video frame pictures are compressed and coded, a compressed code stream is obtained, and then compression ratio information corresponding to each video frame picture is added in the compressed code stream so as to transmit the compression ratio information to a client.
And step S30, sending the compressed code stream with the compression ratio information corresponding to the video frame picture to the client.
And after adding the compression ratio information corresponding to each video frame picture to the compressed code stream, sending the compressed code stream added with the compression ratio information corresponding to the video frame picture to the client.
In the video encoding method provided by this embodiment, a video frame is divided into a plurality of non-overlapping picture blocks, and the similarity of each picture block in a preset time period is calculated; then according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream; and sending the compressed code stream after the additional video frame picture corresponds to the compression ratio information to the client, and carrying out coding compression on the picture with higher similarity and not carrying out coding compression on the picture with lower similarity, thereby reducing the broadband requirement required by video transmission.
Further, referring to fig. 3, a second embodiment of the video coding method of the present invention is proposed based on the first embodiment of the video coding method of the present invention.
In this embodiment, the step S20 may include:
step S21, comparing the similarity of each video frame picture block with a preset similarity;
and step S22, if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, performing resolution reduction coding on the video frame picture, and if the similarity of the video frame picture blocks is less than the preset similarity, keeping the original resolution of the video frame picture.
In this embodiment, after the similarity of each picture is obtained through calculation, the similarity of each video frame picture block may be compared with a preset similarity, and if the similarity of the video frame picture block is greater than or equal to the preset similarity, it is considered that the change of this picture in a preset time period is small, resolution reduction coding may be performed on the video frame picture. If the similarity of the video frame picture blocks is smaller than the preset similarity, the change of the picture in a preset time period is considered to be large, the resolution reduction coding is not carried out on the video frame picture, and the original resolution is reserved.
In the video encoding method provided by this embodiment, the similarity of each video frame picture block is compared with a preset similarity; if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, the video frame picture is subjected to resolution reduction coding, if the similarity of the video frame picture blocks is less than the preset similarity, the original resolution of the video frame picture is reserved, coding compression is performed on the video frame picture with higher picture similarity, coding compression is not performed on the video frame picture with lower picture similarity, and therefore the requirement of a broadband required by video transmission is reduced.
The invention further provides a video decoding method.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video decoding method according to a first embodiment of the present invention.
In this embodiment, the video decoding method may include:
step S40, analyzing the obtained compressed code stream and extracting the corresponding compression ratio in the compressed code stream;
in this embodiment, when a video frame is encoded, a mode of encoding video frame blocks is adopted, and compression ratios of each block are usually different, so that resolutions of the blocks after encoding are inconsistent, and when a compressed code stream of compression ratio information corresponding to an additional video frame picture sent by a server is received, the compressed code stream cannot be directly decoded and played, but a corresponding compression ratio of each picture in the compressed code stream needs to be extracted, so as to decode the video frame picture blocks according to the corresponding compression ratio.
Step S50, decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture;
after the corresponding compression ratio is obtained through extraction, the compressed code stream is decoded according to the corresponding compression ratio, and the corresponding resolution of each picture can be obtained after decoding.
And step S60, acquiring the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture block with the adjusted resolution.
After the corresponding resolution of each module picture is obtained, because the display effects of different resolutions are different, the physical resolution of the display interface needs to be further obtained, then the resolution of the picture is adjusted according to the physical resolution of the display interface, and the picture with the adjusted resolution is displayed.
Further, referring to fig. 5, the step S60 may include:
step S61, comparing the physical resolution of the display interface with the resolution of the module picture;
and step S62, if the resolution of the picture is consistent with the physical resolution of the display interface, displaying the picture, otherwise, adjusting the resolution of the picture to be consistent with the physical resolution of the display interface and then displaying.
After the physical resolution of the display interface is obtained, the physical resolution of the display interface is compared with the resolution of the picture, if the resolution of the picture is consistent with the physical resolution of the display interface, the picture can be directly displayed without adjusting the resolution, and if the resolution of the picture is smaller than the physical resolution of the display interface, the resolution of the picture is enlarged to be consistent with the physical resolution of the display interface and then displayed.
In the video decoding method provided by the embodiment, a compressed code stream with a corresponding compression ratio of an additional video frame picture is received, and the corresponding compression ratio of each picture in the compressed code stream is extracted; then decoding the video according to the corresponding compression ratio to obtain the resolution of each picture; and then acquiring the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted, so that the displayed picture is more in line with the watching requirement of human eyes, and the user experience is improved.
The present invention further provides a video encoding apparatus.
Referring to fig. 6, fig. 6 is a functional block diagram of a video encoding apparatus according to a first embodiment of the invention.
In this embodiment, the video encoding apparatus includes:
the calculating module 10 is configured to divide a video frame into a plurality of non-overlapping picture blocks, and calculate a similarity of each picture block within a preset time period;
in the present embodiment, the video frame is an image extracted from a video, and the video frame may be divided into m parts by width, n parts by height, i.e. dividing the whole video frame image into m x n non-overlapping picture blocks, where m and n are preferably both 2, and of course m and n may also be any value other than 2, i.e. the whole video frame image is divided into 2 x 2 picture blocks, and then according to the preset time period T, that is, every time interval T, a video frame code stream picture is taken for recording, the picture block is defined as P1[ T1, m1, n1], where t1 denotes a certain point in time, m denotes the mth picture block in the horizontal direction, n denotes the nth picture block in the vertical direction, then, the current time is T2 after every time period T, when the picture block is defined as P2[ T2, m1, n1], and the similarity calculation method between the picture blocks at T1 and T2 is as follows: and f in the above step can be compared and calculated according to the RGB value change degrees of the two picture blocks, and can also be compared and calculated according to the gray value ratio of the two picture blocks.
Further, referring to fig. 7, the calculation module 10 may include:
an obtaining unit 11, configured to obtain an RGB value of an initial frame and an RGB value of an end frame of the picture block in a preset time period;
and a calculating unit 12, configured to calculate a similarity of the picture block in a preset time period according to the RGB values of the initial frame and the end frame.
In this embodiment, after dividing a video frame into a plurality of non-overlapping picture blocks, the RGB values of the initial frame and the end frame of the picture block in a preset time period may be obtained, then the RGB values of the initial frame and the end frame of the picture block in the preset time period are subtracted to obtain a difference value, and then the absolute value of the difference value is taken to obtain the similarity of the picture block in the preset time period. In the specific implementation process, the similarity can be calculated by comparing the gray value ratios of the two picture blocks.
The encoding module 20 is configured to perform compression encoding on the video frame pictures according to the similarity of the picture blocks to generate a compressed code stream, and attach compression ratio information corresponding to each video frame picture to the compressed code stream;
after the similarity of the picture blocks is obtained, the picture blocks of the video frame may be compression-encoded according to the similarity of the picture blocks, for example, if the similarity between the picture block at the time t1 and the picture block at the time t2 is high, it is considered that the picture has no change and is not a point of attention of human eyes, and the picture may be subjected to resolution reduction processing to reduce the transmission requirement. On the other hand, if the similarity between the picture block at the time t1 and the picture block at the time t2 is low, it is considered that the change of the picture is large and the picture is a point of interest to human eyes, and since the quality of the video image is degraded by decoding the encoded image, the original resolution is adopted for the image of interest to human eyes, and the resolution reduction processing is not performed. After the video frame pictures are compressed and coded, a compressed code stream is obtained, and then compression ratio information corresponding to each video frame picture is added in the compressed code stream so as to transmit the compression ratio information to a client.
And the sending module 30 is configured to send the compressed code stream to the client after the video frame picture corresponds to the compression ratio information.
And after adding the compression ratio information corresponding to each video frame picture to the compressed code stream, sending the compressed code stream added with the compression ratio information corresponding to the video frame picture to the client.
In the video encoding apparatus provided in this embodiment, a video frame is divided into a plurality of non-overlapping picture blocks, and the similarity of each picture block in a preset time period is calculated; then according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream; and sending the compressed code stream after the additional video frame picture corresponds to the compression ratio information to the client, and carrying out coding compression on the picture with higher similarity and not carrying out coding compression on the picture with lower similarity, thereby reducing the broadband requirement required by video transmission.
Further, referring to fig. 8, a second embodiment of the video encoding apparatus of the present invention is proposed based on the first embodiment of the video encoding apparatus of the present invention.
In this embodiment, the sending module 20 may include:
a first comparison unit 21, configured to compare the similarity of each video frame picture block with a preset similarity;
and the encoding unit 22 is configured to perform resolution reduction encoding on the video frame picture if the similarity of the video frame picture block is greater than or equal to the preset similarity, and retain the original resolution of the video frame picture if the similarity of the video frame picture block is less than the preset similarity.
In this embodiment, after the similarity of each picture block is obtained through calculation, the similarity of each video frame picture block may be compared with a preset similarity, and if the similarity of the video frame picture block is greater than or equal to the preset similarity, it is considered that the change of this picture in a preset time period is small, resolution reduction coding may be performed on the video frame picture. If the similarity of the video frame picture blocks is smaller than the preset similarity, the change of the picture in a preset time period is considered to be large, the resolution reduction coding is not carried out on the video frame picture, and the original resolution is reserved.
The video coding apparatus provided in this embodiment compares the similarity of each video frame picture block with a preset similarity; if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, the video frame picture is subjected to resolution reduction coding, if the similarity of the video frame picture blocks is less than the preset similarity, the original resolution of the video frame picture is reserved, coding compression is performed on the video frame picture with higher picture similarity, coding compression is not performed on the video frame picture with lower picture similarity, and therefore the requirement of a broadband required by video transmission is reduced.
The invention further provides a video decoding device.
Referring to fig. 9, fig. 9 is a functional block diagram of a video decoding apparatus according to a first embodiment of the invention.
In this embodiment, the video decoding apparatus may include:
the receiving module 40 is configured to parse the obtained compressed code stream and extract a corresponding compression ratio in the compressed code stream;
in this embodiment, when a video frame is encoded, a mode of encoding video frames in blocks is adopted, and compression ratios between blocks are usually different, so that resolutions between blocks after encoding are inconsistent, and therefore, when a compressed code stream of additional video frame pictures corresponding to compression ratio information sent by a server is received, decoding and playing cannot be directly performed, but a corresponding compression ratio of each picture in the compressed code stream needs to be extracted, so that the compressed code stream is decoded according to the corresponding compression ratio.
The decoding module 50 is configured to decode the compressed code stream according to the corresponding compression ratio to obtain a resolution of each module picture;
after the corresponding compression ratio is obtained through extraction, the compressed code stream is decoded according to the corresponding compression ratio, and the corresponding resolution of each picture can be obtained after decoding.
The adjusting module 60 is configured to obtain a physical resolution of the display interface, adjust a resolution of the picture according to the physical resolution of the display interface, and display the picture block with the adjusted resolution.
After the corresponding resolution of each module picture is obtained, because the display effects of different resolutions are different, the physical resolution of the display interface needs to be further obtained, then the resolution of the picture is adjusted according to the physical resolution of the display interface, and the picture with the adjusted resolution is displayed.
Further, referring to fig. 10, the adjusting module 60 may include:
a second comparison unit 61, configured to compare a physical resolution of the display interface with a resolution of a picture;
and an adjusting unit 62, configured to display the picture if the resolution of the picture is consistent with the physical resolution of the display interface, or adjust the resolution of the picture to be consistent with the physical resolution of the display interface and then display the picture if the resolution of the picture is not consistent with the physical resolution of the display interface.
After the physical resolution of the display interface is obtained, the physical resolution of the display interface is compared with the resolution of the picture, if the resolution of the picture is consistent with the physical resolution of the display interface, the picture can be directly displayed without adjusting the resolution, and if the resolution of the picture is smaller than the physical resolution of the display interface, the resolution of the picture is enlarged to be consistent with the physical resolution of the display interface and then displayed.
The video decoding device provided by the embodiment receives a compressed code stream with a corresponding compression ratio of an additional video frame picture, and extracts the corresponding compression ratio of each picture in the compressed code stream; then, decoding the video according to the corresponding compression ratio to obtain the resolution of each module picture; and then acquiring the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted, so that the displayed picture is more in line with the watching requirement of human eyes, and the user experience is improved.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A video encoding method, characterized in that the video encoding method comprises the steps of:
dividing a video frame into a plurality of non-overlapping picture blocks, and calculating the similarity of each picture block in a preset time period;
according to the similarity of the picture blocks, carrying out compression coding on the video frame pictures to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream;
sending the compressed code stream with the additional video frame picture corresponding to the compression ratio information to the client;
wherein, the step of performing compression coding on the video frame picture according to the similarity of the picture blocks comprises:
comparing the similarity of the picture blocks of each video frame with a preset similarity;
if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, performing resolution reduction coding on the video frame picture, and if the similarity of the video frame picture blocks is less than the preset similarity, keeping the original resolution of the video frame picture.
2. The video coding method of claim 1, wherein the step of calculating the similarity of each picture block within a preset time period comprises:
acquiring the RGB value of an initial frame and the RGB value of an end frame of the picture block in a preset time period;
and calculating the similarity of the picture blocks in a preset time period according to the RGB value of the initial frame and the RGB value of the end frame.
3. A video decoding method, characterized in that the video decoding method comprises the steps of:
analyzing the obtained compressed code stream and extracting the corresponding compression ratio of each picture in the compressed code stream, wherein the compressed code stream is obtained by encoding according to the video encoding method of claim 1 or 2;
decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture;
the method comprises the steps of obtaining the physical resolution of a display interface, adjusting the resolution of a picture according to the physical resolution of the display interface, and displaying the picture after the resolution is adjusted.
4. The video decoding method according to claim 3, wherein the step of obtaining the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface, and displaying the picture after the resolution adjustment comprises:
comparing the physical resolution of the display interface with the resolution of a picture;
and if the resolution of the picture is consistent with the physical resolution of the display interface, displaying the picture, otherwise, adjusting the resolution of the picture to be consistent with the physical resolution of the display interface and then displaying.
5. A video encoding apparatus, characterized in that the video encoding apparatus comprises:
the computing module is used for dividing the video frame into a plurality of non-overlapping picture blocks and computing the similarity of each picture block in a preset time period;
the coding module is used for carrying out compression coding on the video frame pictures according to the similarity of the picture blocks to generate a compressed code stream, and adding compression ratio information corresponding to each video frame picture in the compressed code stream;
the sending module is used for sending the compressed code stream which is added with the video frame picture and corresponds to the compression ratio information to the client;
wherein the encoding module comprises:
the first comparison unit is used for comparing the similarity of each video frame picture block with a preset similarity;
and the coding unit is used for performing resolution reduction coding on the video frame picture if the similarity of the video frame picture blocks is greater than or equal to the preset similarity, and keeping the original resolution of the video frame picture if the similarity of the video frame picture blocks is less than the preset similarity.
6. The video encoding apparatus of claim 5, wherein the calculation module comprises:
the acquisition unit is used for acquiring the RGB value of an initial frame and the RGB value of an end frame of the picture block in a preset time period;
and the calculating unit is used for calculating the similarity of the picture blocks in a preset time period according to the RGB value of the initial frame and the RGB value of the end frame.
7. A video decoding apparatus, characterized in that the video decoding apparatus comprises:
a receiving module, configured to parse an obtained compressed code stream and extract a corresponding compression ratio of each picture in the compressed code stream, where the compressed code stream is obtained by the video encoding apparatus according to claim 5 or 6;
the decoding module is used for decoding the compressed code stream according to the corresponding compression ratio to obtain the resolution of each picture;
and the adjusting module is used for acquiring the physical resolution of the display interface, adjusting the resolution of the picture according to the physical resolution of the display interface and displaying the picture with the adjusted resolution.
8. The video decoding apparatus of claim 7, wherein the adjustment module comprises:
the second comparison unit is used for comparing the physical resolution of the display interface with the resolution of a picture;
and the adjusting unit is used for displaying the picture if the resolution of the picture is consistent with the physical resolution of the display interface, or adjusting the resolution of the picture to be consistent with the physical resolution of the display interface and then displaying the picture.
CN201611255198.3A 2016-12-29 2016-12-29 Video encoding and decoding method and device Active CN106713928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611255198.3A CN106713928B (en) 2016-12-29 2016-12-29 Video encoding and decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611255198.3A CN106713928B (en) 2016-12-29 2016-12-29 Video encoding and decoding method and device

Publications (2)

Publication Number Publication Date
CN106713928A CN106713928A (en) 2017-05-24
CN106713928B true CN106713928B (en) 2020-04-10

Family

ID=58904691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611255198.3A Active CN106713928B (en) 2016-12-29 2016-12-29 Video encoding and decoding method and device

Country Status (1)

Country Link
CN (1) CN106713928B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378631A (en) * 2013-08-12 2015-02-25 三星电子株式会社 Method for selecting resolution with minimum distortion value and device performing the method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005055607A1 (en) * 2003-12-08 2005-06-16 Electronics And Telecommunications Research Institute System and method for encoding and decoding an image using bitstream map and recording medium thereof
CN101594537B (en) * 2009-06-04 2011-07-27 北京京北方信息技术有限公司 Massive image data compression method
CN102724500B (en) * 2012-06-05 2015-10-14 沙基昌 A kind of compressing/decompressing method of video data and system
CN102857758B (en) * 2012-09-03 2015-02-04 上海算芯微电子有限公司 Reusable pixel processing method and reusable video processing chip
CN103281539B (en) * 2013-06-07 2016-10-05 华为技术有限公司 Method, device and the terminal that a kind of image coding and decoding processes
CN103716575A (en) * 2013-12-11 2014-04-09 乐视致新电子科技(天津)有限公司 Display device and display control method capable of adjusting definition
CN104853208B (en) * 2015-05-13 2018-05-04 大唐移动通信设备有限公司 A kind of method for video coding and device
CN105744275B (en) * 2016-02-22 2019-04-05 青岛海信电器股份有限公司 A kind of input of video data, output method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378631A (en) * 2013-08-12 2015-02-25 三星电子株式会社 Method for selecting resolution with minimum distortion value and device performing the method

Also Published As

Publication number Publication date
CN106713928A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US20190089987A1 (en) Encoding apparatus, decoding apparatus, and control methods therefor
CN108833975B (en) Video playing processing method and device
EP3751862A1 (en) Display method and device, television set, and storage medium
KR102013461B1 (en) System and method for enhanced remote transcoding using content profiling
US20150156557A1 (en) Display apparatus, method of displaying image thereof, and computer-readable recording medium
US20130156113A1 (en) Video signal processing
CA2886174C (en) Video compression method
US20070217505A1 (en) Adaptive Decoding Of Video Data
CN202799004U (en) Video playback terminal and video playback system
US10158861B2 (en) Systems and methods for improving video compression efficiency
US10085015B1 (en) Method and system for measuring visual quality of a video sequence
CN105681720A (en) Video playing processing method and device
TW201540045A (en) Adaptive processing of video streams with reduced color resolution
CN110572673B (en) Video encoding and decoding method and device, storage medium and electronic device
CN108769600B (en) Desktop sharing system based on video stream frame rate adjustment and desktop sharing method thereof
US9215468B1 (en) Video bit-rate reduction system and method utilizing a reference images matrix
EP2429192A1 (en) Video signal processing
US9456192B2 (en) Method of coding and transmission of progressive video using differential signal overlay
CN106713928B (en) Video encoding and decoding method and device
CN110662071A (en) Video decoding method and apparatus, storage medium, and electronic apparatus
Xue et al. Towards viewing quality optimized video adaptation
US20080159592A1 (en) Video processing method and system
Deshpande 36.4: SUbjective and objective visual quality evaluation of 4K video using AVC and HEVC compression
US20210099723A1 (en) Creating different video stream representations
TW201501516A (en) Multi-stream images display system, multi-stream images display apparatus and method thereof

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