CN106101703B - A kind of screen video compression method towards digital KVM switcher - Google Patents

A kind of screen video compression method towards digital KVM switcher Download PDF

Info

Publication number
CN106101703B
CN106101703B CN201610447078.7A CN201610447078A CN106101703B CN 106101703 B CN106101703 B CN 106101703B CN 201610447078 A CN201610447078 A CN 201610447078A CN 106101703 B CN106101703 B CN 106101703B
Authority
CN
China
Prior art keywords
mode
current block
code stream
coding
data
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
CN201610447078.7A
Other languages
Chinese (zh)
Other versions
CN106101703A (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.)
HANGZHOU BTS COMPUTER CO Ltd
Original Assignee
HANGZHOU BTS COMPUTER 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 HANGZHOU BTS COMPUTER CO Ltd filed Critical HANGZHOU BTS COMPUTER CO Ltd
Priority to CN201610447078.7A priority Critical patent/CN106101703B/en
Publication of CN106101703A publication Critical patent/CN106101703A/en
Application granted granted Critical
Publication of CN106101703B publication Critical patent/CN106101703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/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/186Methods 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 a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution

Abstract

The invention discloses a kind of screen video compression methods towards digital KVM switcher, include the following steps:(1) a frame screen video data are inputted;(2) code stream is written into the frame originating point information of current video frame;(3) a uncoded chromatic component subframe is obtained from current video frame;(4) a uncoded data block is obtained from current chroma component sub-frame;(5) coding information and reconstruction data of the current block under each candidate coding pattern are calculated, and chooses final coding mode;(6) code stream is written into the coding information of current block;(7) it repeats step (4) and arrives (6);(8) byte-aligned processing is carried out to the code stream that current video frame has been written into;(9) it repeats step (3) and arrives (8);(10) frame synchronization head escape processing is carried out to the code stream that current video frame generates.The present invention effectively reduces the entirety and peak-data amount of screen video code stream under limited computation complexity, while keeping good reconstruction video quality.

Description

A kind of screen video compression method towards digital KVM switcher
Technical field
The present invention relates to digital video signal processing fields, and in particular to a kind of screen towards digital KVM switcher regards Frequency compression method.
Background technology
Digital kvm system is the multicomputer handover management system of IP based network, can realize and use a set of keyboard (Keyboard), display (Video), mouse (Mouse) carry out remote control multiple stage computers, include mainly number KVM switchings Device and main control platform.Digital KVM switcher is digitized to the output signal of computer display and network transmission, so as to Screen video is shown in the client of main control platform.In addition, digital KVM switcher also receives keyboard and mouse from main control platform Information is marked, and is converted into the input signal of local computer, to realize remote control of the main control platform to local computer. Since operating frequency is relatively low, the data volume after signal is digitized into is also smaller for keyboard and mouse, may not need compression and directly passes It send, the network bandwidth of occupancy is less.Display causes since the resolution ratio and frame per second of the screen video of output are all higher through number The video data volume after change is huge, can not directly transmit.Therefore, digital KVM switcher only regards the screen of display output Frequency is efficiently compressed, and could be real-time transmitted to by network screen video data under limited network bandwidth long-range Main control platform.The screen video scene of digital KVM switcher acquisition includes mainly operating system scene, application software scene and net Page scene etc., the resolution ratio of screen video includes the typical resolution from 640 × 350 to 1920 × 1200.In computer system In, the display video of output uses RGB color degree space, i.e., each pixel in image include a R component, a G component and One B component, each component usually indicate that value range is 0~255 with 8 bits.The screen video of digital kvm system output Although abundant in content various, there are very strong temporal correlation, the method that video compress may be used carries out at compression it Reason.Simultaneously there is notable difference in the screen video of KVM and the common natural video frequency of video camera shooting again, it includes some by calculating The graph image that machine generates, people require the clarity of these pictures very high, it is easy to discover the loss of picture.Therefore, Digital KVM switcher should carry out Efficient Compression to screen video, while also keep preferable video image quality.
Since the nineties in last century, International Telecommunication Union (ITU) and International Organization for standardization (ISO) are proposed a series of Video compression standard, including H.261, MPEG-1, H.262/MPEG-2, H.263, MPEG-4, H.264/AVC and H.265/ HEVC.The video encoding standard of mainstream is H.264/AVC ITU and ISO were issued in 2003 at present, newest Video coding mark Standard is H.265/HEVC ITU and ISO were issued in 2013.Nature of the above-mentioned video encoding standard mainly for camera acquisition Video scene is compressed, and is mainly used in the fields such as video monitoring, video conference, DTV and digital camera, and adopt With YUV chrominance spaces.YUV chrominance spaces include a luminance signal Y and two carrier chrominance signals U, V, can pass through RGB color degree Space is converted to (see classical English books " the Video Demystified of video field:A Handbook for the Digital Engineer, FifthEdition ", Keith Jack, 2007).In the video of YUV444 formats, Y, U and V tri- The sampling rate of a component is identical, and each pixel includes three component datas, and after 8 bit quantizations, uncompressed is every A pixel occupies 3 bytes.In the video of YUV420 formats, there are one Y-component data, every 2 × 2 pixel sides for each pixel Battle array there are one U component datas and a V component data, i.e. U, V component in the horizontal direction with all carry out two on vertical direction/ One extracts.In order to improve video compression efficiency, and in view of the human eye feature low to the resolution ratio of U, V component, these video pressures Contracting standard mainly compresses YUV420 formats.Screen video can be adopted after the color space convert of RGB to YUV Coding compression is carried out with these compression standards, but since these compression standards use prediction plus transformation plus the mixing of entropy coding volume Code frame, overall calculation complexity is very big, can dramatically increase the cost of implementation and computation delay of digital KVM switcher, reduces aobvious Show the response speed of picture.In addition, these compression standards do not consider the feature of screen video, directly application will introduce easy quilt The video quality loss that user discovers.
The video compression technology of digital KVM switcher, which does not require nothing more than, to be reduced the data volume of video code flow, keeps output video Code stream it is steady, with improve main control platform show picture response speed, also require the computation complexity of compression algorithm itself no Can be excessively high, to reduce algorithm cost of implementation.Chinese patent (the proprietary term of Patent No. 03816346.2:Video compression system) profit With on computer screen redundancy and user's acceptable video loss carry out video compress.Though the compression method of the patent Right computation complexity is relatively low, but it carries out the data compression of Pixel-level based on RGB color degree space, using the fixed code of byte-aligned Flow structure, overall compression efficiency is not high, especially whole to the screen video scene compression efficiency of gradual change texture and complex texture It is relatively low.In addition, the compression method of the patent is during video scene is from simple textures screen switching to complex texture picture The video code flow transient data amount of generation is excessive, can cause network transmission congestion, seriously affects the sound that main control platform shows picture Answer speed.Chinese patent (the proprietary term of Patent No. 98120137.7:The transmission side of computor-keyboard, mouse and VGA screen signals Method) three kinds of vision signals of VGA screens and additional transmission signal line are utilized, VGA screen signals are transmitted into afield main control computer, Enable user that can normally operate object computer.The patent is using specific transmission line and transport protocol transmission screen video letter Number, it cannot be transmitted on general digital network, be restricted using distance.Patent No. 200610080828.8 Chinese patent (proprietary term:A kind of video-frequency compression method) by controlling the variation of quantization parameter realize the flat of KVM video code flows Steady output improves the response speed that KVM shows picture.But the implementation of the patent needs enterprising on existing video standard basis Row, overall calculation complexity is relatively high, can obviously increase processing delay and the cost of implementation of video compress.In addition, the patent Video-frequency compression method is due to needing to carry out screen switching detection to every frame and will calculate quantization parameter to each macro block, into one Step increases its computation complexity.
Invention content
In order to overcome the overall transfer data volume of screen video data in digital kvm system huge and complicated video scene The excessive problem of lower peak transmission data volume, the present invention provides a kind of screen video compression method towards digital KVM devices, Screen video data are compressed under limited computation complexity, be effectively reduced screen video code stream overall amount of data and Peak-data amount, and keep good reconstruction video quality.
A kind of screen video compression method towards digital KVM switcher, includes the following steps:
(1) a frame screen video data are inputted;
(2) code stream is written into the frame originating point information of current video frame;
(3) a uncoded chromatic component subframe is obtained from current video frame as current chroma component sub-frame, to this Subframe carries out data block division, and calculates the total number of data block;
(4) a uncoded data block is obtained from current chroma component sub-frame as current block;
(5) coding information and reconstruction data of the current block under each candidate coding pattern are calculated, and chooses final coding Pattern and reconstruction data;
(6) coding information of current block is written by code stream according to the final coding mode of current block;
(7) it repeats step (4) and arrives (6), complete the coding of all data blocks and reconstruction in current chroma component sub-frame;
(8) bit padding is carried out to realize byte-aligned to the code stream that current video frame has been written into;
(9) it repeats step (3) and arrives (8), complete the coding of all chromatic component subframes and reconstruction in current video frame;
(10) frame synchronization head escape processing is carried out to the code stream that current video frame generates, exports final compressed bit stream.
In step (1), a frame screen video data refer to that a frame of KVM switcher acquisition uses YUV colorations The screen video image in space is used for the video compress of subsequent step.The pixel resolution of the frame image is H0×V0, wherein H0 For horizontal resolution, i.e., the pixel number in horizontal direction, V0For vertical resolution ratio, i.e. pixel on vertical direction Number.The specific chrominance space format for the screen video data that the present invention supports is one kind in YUV420, YUV422 and YUV444, Y, each component datas of U and V are indicated with 8 bits, and each screen video frame is divided into three chromatic component subframes:All Y points It measures data and forms H1×V1Two-dimensional data array, be denoted as Y-component subframe, wherein H1Indicate Y-component subframe in the horizontal direction Data amount check, V1Indicate the data amount check of Y-component subframe in the vertical direction;All U component datas form H2×V2Two-dimemsional number According to array, it is denoted as U component sub-frames, wherein H2Indicate the data amount check of U component sub-frames in the horizontal direction, V2Indicate U component sub-frames Data amount check in the vertical direction;All V component data form H3×V3Two-dimensional data array, be denoted as V component subframe, Middle H3Indicate the data amount check of V component subframe in the horizontal direction, V3Indicate the data amount check of V component subframe in the vertical direction. In these three YUV chrominance space formats, the horizontal direction data amount check H of Y-component subframe1Equal to the level point of current frame image Resolution H0, the vertical direction data amount check V of Y-component subframe1Equal to the vertical resolution ratio V of current frame image0;The water of U component sub-frames Square to data amount check H2With vertical direction data amount check V2, V component subframe horizontal direction data amount check H3With vertical direction number According to number V3, with H0、V0Between numerical relation be shown in Table 1.
Table 1
In step (2), the frame originating point information includes:
1) the frame synchronization leader of 4 byte representations knows SyncF, first three byte value is 0xFF, and the 4th byte value is 0xFE, the beginning for identifying a frame code stream.Code stream must be written in SyncF from byte-aligned, and must be transmitted by byte order It is first transmitted to the higher bit position of decoding end, each byte, forms the bit stream of 4 byte representations (32 bits).SyncF is written The value (being 0xFF) of first three byte of code stream is different from value (0xFE) of last byte, this makes that code stream is written prior to SyncF Byte (belonging to former frame code stream) be any numerical value all will not with first three byte of SyncF composition SyncF, can be to avoid solution Wrong localization of the code end to frame head initial position.
2) resolution ratio for the present frame screen video image that 6 bits indicate identifies PicR, and value range is 1 to 24, Indicate 24 kinds of typical resolutions in digital kvm system respectively, the corresponding screen video image horizontal resolution H of each value0 With vertical resolution ratio V02 are shown in Table, 0,25 to 63 totally 40 numerical value are reserved.The PicR occurrences of code stream are written by actually entering screen The resolution ratio table of comparisons 2 of video image obtains.
Table 2
PicR Horizontal resolution H0 Vertical resolution ratio V0
1 640 350
2 640 400
3 640 480
4 720 400
5 768 576
6 800 600
7 848 480
8 1024 768
9 1152 864
10 1280 720
11 1280 768
12 1280 800
13 1280 960
14 1280 1024
15 1360 768
16 1366 768
17 1440 900
18 1400 1050
19 1600 900
20 1600 1024
21 1600 1200
22 1680 1050
23 1920 1080
24 1920 1200
3) the chrominance space format identification (FID) ColorF that 3 bits indicate, the coloration that characterization current video frame specifically uses are empty Between format, be worth for 0b000 indicate use YUV420 formats, be worth for 0b001 indicate use YUV422 formats, be worth for 0b010 indicate Using YUV444 formats, 0b011 to 0b111 is reserved.Present frame use U and the V component data amount check of YUV422 formats for The half of YUV444 formats;Use U and the V component data amount check of YUV420 formats for the half of YUV422 formats, only The a quarter of YUV444 formats.Since human eye is relatively low to the resolution ratio of U and V component data, YUV420 formats are selected to have non- Very close to the coloration well as subjective video quality of YUV422 and YUV444 formats, YUV422 formats is selected to have more close to YUV444 lattice The coloration well as subjective video quality of formula.Therefore, the specific value of ColorF can be according to digital kvm system to chroma video quality and pressure The demand of contracting ratio is flexibly chosen, and YUV444 formats then may be selected to chroma video quality requirement highest, require most compression ratio It is high then YUV420 formats may be selected, chroma video quality and compression ratio are required higher, then YUV422 formats may be selected.
4) the data block partition mode that 4 bits indicate identifies BPMODE, characterization is to each chromatic component subframe progress data The base unit h that block dividesp×vp, i.e. horizontal direction master data number hpWith vertical direction master data number vp, BPMODEValue It indicates to use 4 × 4 partition modes for 0b0000, is worth and indicates to use 8 × 4 partition modes for 0b0001, be worth and adopted for 0b0010 expressions With 4 × 8 partition modes, it is worth and indicates to use 8 × 8 partition modes for 0b0011, reserve 12 numerical value from 0b0100 to 0b1111. The h of 4 × 4 partition modespEqual to 4, vpEqual to 4;The h of 8 × 4 partition modespEqual to 8, vpEqual to 4;The h of 4 × 8 partition modespDeng In 4, vpEqual to 8;The h of 8 × 8 partition modespEqual to 8, vpEqual to 8.Compression effect can be improved using smaller block dividing mode Rate, but since block number increases, can also increase additional calculation amount.Therefore, digital kvm system can be according to calculation amount and pressure The demand of contracting ratio selects BPMODEOccurrence can be by BP if requiring calculation amount small as possibleMODEValue be set as 0b0011, If, can be by BP it is required that compression ratio is big as possibleMODEValue be set as 0b0000, it is other in the case of due to BPMODEBe set as 0b0001 or 0b0010 has the calculation amount of same levels, can select occurrence according to the compression ratio size under typical case scene.
5) the enabled mark TP of the inter-prediction that 1 bit indicatesEN, value is that 0b0 indicates that the coding of present frame does not allow to make With inter-prediction, i.e., it cannot predict that current frame data, value indicate present frame for 0b1 using the reconstruction data of previous coded frame Coding allow use inter-prediction, that is, allow to predict current frame data using the reconstruction data of previous coded frame.TPENValue is 0b1 can effectively improve the compression efficiency of present frame, but the encoding code stream of present frame is also made to have time domain dependence.If present frame Code stream error code is lost or occurred in transmit process, it will so that reconstruction errors is diffused up in time domain side, until there is TPENValue Until frame for 0b0.TP in the present inventionENSetting have following limitation:(a) present frame is the 1st coded frame, then TPENIt can only It is set as 0b0.(b) the resolution ratio mark PicR of current frame video image is different from former frame, then TPENIt may be only configured to 0b0. (c) the chrominance space format identification (FID) ColorF of present frame is different from former frame, then TPENIt may be only configured to 0b0.In other situations Under, TP in present frameENValue the application demand of compression ratio and bit error rate situation can be arranged according to digital kvm system. In addition, no matter TPENValue how to be arranged, the present invention all allow present frame carry out spatial prediction, that is, use present frame in it is encoded The reconstruction data of data predict the data to be encoded in present frame.
6) the frame level image quality mode PicQ that 2 bits indicate characterizes the subjective quality of present frame coding and rebuilding image Grade, value are that 0b00 indicates lossless mode, are worth and damage clear pattern for 0b01 expressions, are worth and damage equilibrium model for 0b10 expressions Formula reserves 0b11;If it is 1 that present frame, which uses lossless mode, frame level quantization step QStep values,;If present frame is used and is damaged Clear pattern, then its frame level quantization step QStep value is 2;If present frame uses and damages balanced mode, frame level quantization step It is 4 for QStep values.The value of QStep is bigger, and quantization error is bigger, and the QStep for damaging balanced mode is damage clear pattern two Times, reconstruction image clarity is just poorer than damaging clear pattern.QStep will be used in subsequent step to the prediction residual amount of progress Change and inverse quantization, in order to promote the computational efficiency of prediction residual quantization and inverse quantization, QStep values of the invention are all 2 power, Quantization and the division in de-quantization process and multiplying are all converted to shift operation in this way.Present frame frame level quantifies in the present invention Shift amount shift takes the integer that logarithm obtains equal to QStep by 2.When QStep values are 1, then shift values are 0;When QStep values It is 2, then shift values are 1;When QStep values are 4, then shift values are 2;By the present invention in that being shifted with shift to realize Quantization and inverse quantization are carried out to prediction residual.In order to ensure the gross of video image, in the present invention, the maximum value of QStep is only To 4.
7) the frame number FrameN that 16 bits indicate:The FrameN values of first coded frame are set as 0, follow-up every frame FrameN be equal to its former frame FrameN add 1, when FrameN values be more than 65535, then it is set as 0 again.
For the ease of the description of number of bits and numerical value, 0b is the prefix that binary mode numerical value indicates in the present invention, Number afterwards is binary numeral, and the coding information numerical value that code stream is written equally can be used other system modes to indicate, for example, ten into System and hexadecimal, cannot limit protection scope of the present invention to be indicated only with binary mode.
In step (2), code stream is written in frame originating point information in the following order:
The frame sync identifications SyncF of 4 bytes is written in (2-1) from byte-aligned;
The resolution ratio that present frame screen video image is written in (2-2) identifies PicR;
Chrominance space format identification (FID) ColorF is written in (2-3);
(2-4) writing data blocks partition mode identifies BPMODE
The enabled mark TP of inter-prediction is written in (2-5)EN
Frame level image quality mode PicQ is written in (2-6);
The frame number FrameN of present frame is written in (2-7).
Further, in step (2), each numerical value be its higher bit position be first written code stream (first pass through network biography It is sent to decoding end), code stream is written behind position in low bit;All reserved numerical value will not all use in an encoding process, can both improve Decoding end is to the error detecing capability of preamble bitstream, while also the follow-up semantic extension for the present invention provides space.
In step (3), it is as follows:
(3-1) presses sequence acquisition one uncoded coloration point of Y-component subframe, U component sub-frames, V component subframe first Quantum frame is as current chroma component sub-frame, HkAnd VkRespectively current chroma component sub-frame in the horizontal direction on vertical direction Data amount check, k be current chroma component sub-frame index, k values be 1 indicate Y-component subframe, k values be 2 indicate U component sub-frames, K values are 3 expression V component subframes;
(3-2) is then according to the BP in step (2)MODEIt obtains data block and divides base unit hP×vP, hPFor horizontal direction The data amount check of division, vPThe data amount check divided for vertical direction;
(3-3) and then base unit h is divided according to data blockP×vPIt is by the sequence of raster scanning that current chroma component is sub Frame is divided into the two-dimensional rectangle data block to be encoded of multiple h × v sizes, and h is the data amount check of data block in the horizontal direction, V is the data amount check of data block in the vertical direction;For the data block not comprising right margin, h values are BP in step (2)MODE Corresponding hp;For the data block not comprising lower boundary, v is BP in step (2)MODECorresponding vp;For the number comprising right margin According to block, if the horizontal direction data amount check H of current chroma component sub-framekIt can be by hpDivide exactly, then h values are hp, otherwise h values are HkExcept hp Obtained remainder;For the data block comprising lower boundary, if the vertical direction data amount check V of current chroma component sub-framekIt can be by vp Divide exactly, then v values are vp, otherwise v values are VkExcept vpObtained remainder;
The data block number H of current chroma component sub-frame horizontal direction is finally calculated in (3-4) by formula (1)blk, press The data block number V of current chroma component sub-frame vertical direction is calculated in formula (2)blk, it is calculated currently by formula (3) The data block total number N of chromatic component subframeblk
Nblk=Hblk×Vblk (3)
In step (3), the sequence of the raster scanning is field of video compression commonly since the upper left corner from a left side The sequence traversed from top to bottom to the right side.
In step (4), h × v size is obtained from current chroma component sub-frame not by the sequence of raster scanning Two-dimensional rectangle data block is encoded as current block.
In step (5), the candidate coding pattern includes:
1) interframe associative mode (IC_MODE):
Current block selects IC_MODE as its effective candidate coding pattern there are two condition in the present invention, wherein first Condition is:Present frame has been written into the enabled mark TP of inter-prediction of code streamENValue is 0b1, that is, allows the weight using previous coded frame Build data prediction current frame data.
It is encoded using the pattern, the coding information and reconstruction data of current block are calculated as follows to obtain:
For current each initial data P in the block, predicted value PredICFor identical chromatic component in previous coded frame The reconstruction data of frame and same spatial location, prediction residual DICIt is calculated by formula (4), prediction residual symbol SignICIt presses Formula (5) is calculated, quantifies residual error QDICIt is calculated by formula (6), formula (7) and formula (8), rebuilds data RICBy public affairs Formula (9) is calculated.
DIC=P-PredIC (4)
In formula (5), SignICValue is that the symbol of 0 expression prediction residual is just, to be worth the symbol for indicating prediction residual for 1 It is negative.In formula (6), QDIC TmpQuantify residual error temporarily for IC_MODE,>>Symbolic indication shift right operation, | DIC| it indicates to DIC It takes absolute value, | DIC| add half (the i.e. QStep2 of QStep2>>1) it is to round up to final quantization result;For The quantified precision of IC_MODE prediction residual amplitudes is improved, what the present invention used in formula (6) halve quantization step QStep2 It is calculated by formula (8), if QStep is more than the half that 1, QStep2 values are frame level quantization step QStep, if QStep etc. In 1, then QStep2 values are 1;Halve shift amount shift2 takes Logarithmic calculation to obtain by QStep2 by 2, i.e., when QStep2 values are 1 When, the value of shift2 is 0, and when QStep2 values are 2, the value of shift2 is 1.In formula (7), in order to improve frame level image matter Amount is the compression efficiency of static scene in the case of damaging balanced mode, works as QDICValue is 1 and QStep2 values when being 2, by QDICBy force System be set to 0, with increase in current block quantify residual error be zero number, improve subsequent compression efficiency, it is other in the case of QDICIt keeps not Become.In formula (9),<<Symbolic indication shift left operation, min () are the smaller value function for taking two input datas, and max () is The larger value function for taking two input datas, to ensure to rebuild data between 0 to 255, i.e., in the range of the expression of 8 bits. In order to avoid quantify and de-quantization process in division and multiplying, the present invention is in the quantization operations of formula (6) with to the right Displacement replaces division, and multiplication is replaced with shifted left in the inverse quantization operation of formula (9).
In order to enable decoding end by each data of formula (9) reconstruction current block, the present invention will indicate IC_MODE first Coding mode identify ModeIDICIt is incorporated into code stream, is indicated with 2 bits, value 0b00 enables decoding end according to coding mode Mark obtains the coding mode of current block, and then obtains PredICIt is rebuild with realizing.
Then according to all QD of current blockICIn maximum value QDIC maxEach QD is calculated by formula (10)ICIt is incorporated into code stream Number of bits QDBitsIC.In formula (10), work as QDIC maxValue is 0, shows all QD of current blockICValue is all 0, then is not necessarily to disappear The each QD of loss-rate spy's actual codingIC, the present invention is by QDBitsICValue be set to 0;Work as QDIC maxMore than 0, then all QD of current blockIC Ranging from [the 0, QD of valueIC max], each QDICAt least useA bit indicates, in order to reduce QD to the greatest extentIC's Number of coded bits, the present invention is by QDBitsICValue be set to it is minimum
Then according to the QDBits being calculatedICThe stand growth model that 1 bit is indicated identifies AZFlagICIt is incorporated into code stream:When QDBitsICValue is equal to 0, then by AZFlagICValue is set to 0b1, indicates the QD of current blockICIt is all zero, without by QDBitsICIt is incorporated into Code stream;Work as QDBitsICValue is more than 0, then by AZFlagICValue is set to 0b0, indicates that there are non-zero QD for current blockIC, must be by QDBitsIC It is incorporated into code stream.In order to reduce number of coded bits and consider QDBitsICTypical ranges, the present invention is unified to be limited only with 3 bits By QDBitsICIt is incorporated into code stream, QDBitsICRanging from [0,7] allowed.
Therefore, the present invention in current block select IC_MODE as its effective candidate coding pattern second condition for QDBitsICNo more than 7.Work as QDBitsICMore than 7, then it can not be incorporated into code stream with 3 bits, in this case IC_MODE The final coding mode that current block can not be become, i.e., be not effective candidate coding pattern of current block, after must terminating the pattern It is continuous to calculate.Such case only appears in (shift2 values are 0, i.e., do not shift) in the case that QStep2 values are 1, and due to regarding Frequency evidence has very strong correlation, most of QD in the time domainICValue be both less than 128, can be within the scope of the expression of 7 bits.
Finally according to QDBitsICIn two kinds of situation to the Sign of each dataICAnd QDICIt is encoded:
(a) work as QDBitsICValue is more than 0, and there are non-zero QD for current blockIC, then by all QD of current blockICAnd SignICAll compile Enter code stream, wherein each SignICIt is indicated with 1 bit, each QDICUse QDBitsICA bit indicates.
(b) work as QDBitsICValue is equal to 0, the QD of current blockICIt is all zero, i.e. current block is that IC_MODE quantifies residual error complete zero Block, then SignICThe reconstructed results of formula (9) are not influenced, all Sign in current blockICAnd QDICCode stream need not be all incorporated into.For The code efficiency of still frame scene is improved, the present invention is supported to multiple continuous QDICStand growth model carries out Unified coding.Therefore The present invention is then written to the consecutive identical monodrome block identification ContiFlag of 1 bit expressionIC, value 0b0 indicates only complete to 1 Zero piece is encoded, and terminates the coding of current block;Its value is that 0b1 is indicated to the continuous QD from current BOB(beginning of block)ICStand growth model (its Number is denoted as ContiCntIC, 1) value, which is more than, carries out Unified coding.The present invention is by ContiCntICValue after subtracting 1 is used ContiCntBitsICA bit expression is incorporated into code stream.In order to reduce ContiCntICNumber of coded bits, the present invention press formula (11) divide four kinds of situations that ContiCntBits is calculatedIC, the ContiCntBits in the case of first threeICAll it is ContiCntIC Corresponding upper limit value takes logarithm to obtain by 2, and finally a kind of situation is NblkIt rounds up to obtain after taking logarithm by 2.In formula (11) In, NblkFor the data block number of current chroma component sub-frame, it is calculated by step (3).In order to keep decoding end correct Parse ContiCntIC, it is being incorporated into ContiCntICIt before must be first by ContiCntBitsICIdentification information be incorporated into code stream.In order to Reduce ContiCntBitsICNumber of coded bits, and consider ContiCntBitsICValue only there are four types of situation, the present invention is only With 2 bits by ContiCntBitsICCode identification (be denoted as ContiCntBitsIdxIC) it is incorporated into code stream, ContiCntBitsIdxICWith ContiCntBitsICCorrespondence such as formula (12) shown in.
According to the above coding information, coding consumption is carried out to the continuous blocks of current block or current BOB(beginning of block) using IC_MODE Number of coded bits CBitsICIt is calculated by formula (13).
2) monodrome raw mode (SO_MODE):
Current block selects SO_MODE as its effective candidate coding pattern only there are one condition in the present invention:Current block is All data of monodrome block, i.e. current block are equal, and are all the monodrome P of current blockS
It is encoded using the pattern, coding side must be by the pattern information and P of SO_MODESInformation is incorporated into code stream.In order to carry The picture quality that height is encoded using the pattern, the pattern is not to PSQuantified, coding mode is the data block of SO_MODE Reconstruction data all be PS.The compression efficiency that is encoded of the pattern is used in order to improve, the pattern is by PSIt is incorporated into the mode of code stream There are two types of:(a) directly with 8 bits by PSIt is incorporated into code stream;(b) when the coding mode of the adjacent upper block in space is also SO_MODE And its PSWith the P of current blockSIt is equal, then it need not be by PSIt is incorporated into code stream, decoding end can obtain P from decoded upper blockS。 In order to improve the compression efficiency for using the pattern, the present invention is supported to consecutive identical monodrome block (its number from current BOB(beginning of block) It is denoted as ContiCntSO, 1) value, which is more than, carries out Unified coding.
In order to enable decoding end obtain current block reconstruction data or current block headed by continuous blocks reconstruction data, this It is as follows that the code stream that invention uses SO_MODE to be encoded is incorporated into mode:(a) coding mode of SO_MODE is identified first ModeIDSOIt is incorporated into code stream, 2 bits indicate, are worth for 0b01.(b) and then by 1 bit the monodrome coding mode indicated CodPsFlagSOIt is incorporated into code stream, value is that 0b0 indicates that the coding mode of upper block is SO_MODE and the monodrome P of topSWith it is current The monodrome P of blockSIt is equal, the monodrome P of current blockSIt is not incorporated into code stream, decoding end from upper block by obtaining PSTo realize current block Data reconstruction, value are that 0b1 indicates the monodrome P for indicating 8 bitsSIt is incorporated into code stream, decoding end obtains P by parsing code streamSCome real The data reconstruction of existing current block.(c) the consecutive identical monodrome block identification ContiFlag for again indicating 1 bitSOIt is incorporated into code stream, when ContiFlagSOValue be 0b0, indicate only have current block be incorporated into code stream, terminate the coding of current block;Work as ContiFlagSOValue For 0b1, the continuous ContiCnt headed by current block is indicatedSOA block carries out the P between coding and each piece using SO_MODES It is equal, then by ContiCntSOValue ContiCntBits after subtracting 1SOA bit expression is incorporated into code stream.In order to reduce ContiCntSOThe number of coded bits for subtracting 1, the present invention is according to ContiCntSOIt is calculated by four kinds of situations of formula (14) point ContiCntBitsSO, the ContiCntBits in the case of first threeSOAll it is ContiCntSOCorresponding upper limit value takes logarithm by 2 It obtains, finally a kind of situation is NblkIt rounds up to obtain after taking logarithm by 2.In order to enable decoding end correctly to parse ContiCntSO, it is being incorporated into ContiCntSOIt must be first by ContiCntBits before subtracting 1SOCoding information be incorporated into code stream.In order to subtract Small ContiCntBitsSONumber of coded bits, and consider ContiCntBitsSOValue only there are four types of situation, the present invention only uses 2 bits are by ContiCntBitsSOCode identification (be denoted as ContiCntBitsIdxSO) it is incorporated into code stream, ContiCntBitsIdxSOWith ContiCntBitsSOCorrespondence such as formula (15) shown in.
According to the above coding information, coding consumption is carried out to the continuous blocks of current block or current BOB(beginning of block) using SO_MODE Number of coded bits CBitsSOIt is calculated by formula (16).
CBitsSO=2+1+8 × CodPsFlagSO+1+ContiFlagSO×(2+ContiCntBitsSO) (16)
3) horizontal point-by-point pattern (HP_MODE):
HP_MODE carries out prediction point-by point using the reconstruction data of adjacent position on the left of horizontal direction, and to prediction residual into Row shift quantization, displacement inverse quantization and reconstruction:To current each initial data P in the block, when P is in current chroma component sub-frame Left margin, then the predicted value Pred of PHP128 are set as, otherwise PredHPAll it is the reconstruction data R of the spaces P adjacent left-hand positionL;P Prediction residual DHPIt is calculated by formula (17), prediction residual symbol SignHPIt is calculated by formula (18), quantifies residual error QDHPIt is calculated by formula (19), rebuilds data RHPIt is calculated by formula (20).
DHP=P-PredHP (17)
QDHP=(| DHP|+(QStep > > 1)) > > shift (19)
In order to allow decoding end that can rebuild each data of current block by formula (20), coding side first must be by HP_MODE Coding mode identify ModeIDHPIt is incorporated into code stream, ModeID in the present inventionHPIt is indicated, is worth for 0b100 with 3 bits.Decoding end exists After parsing code stream obtains the coding mode mark ModeID of current block, when ModeID values are ModeIDHP, then illustrate that current block uses HP_MODE is encoded, and then obtains each Pred of current blockHP
Then according to the maximum quantization residual error QD of current blockHP maxEach QD is calculated by formula (21)HPIt is incorporated into the bit of code stream Number QDBitsHP.In formula (21), work as QDHP maxEqual to 0, show all QD of current blockHPAll it is 0, i.e. current block is HP_MODE Quantify residual error stand growth model, is then not necessarily to consume each QD of bits of encodedHP, the present invention is by QDBitsHPIt is set to 0;Work as QDHP maxMore than 0, Then all QD of current blockHPRanging from [0, QDHP max], each QDHPAt least useA bit expression, this hair It is bright by QDBitsHPIt is set toIn order to reduce code stream bit number and consider QDBitsHPTypical ranges, The QDBits that the present invention will be indicated only with 3 bitsHPIt is incorporated into code stream, QDBitsHPRanging from [0,7] allowed.
Therefore, the present invention in current block select HP_MODE as its effective candidate coding pattern unique conditional for: QDBitsHPNo more than 7.Work as QDBitsHPMore than 7, then it can not be incorporated into code stream with 3 bits, in this case HP_MODE The final coding mode that current block can not be become, i.e., be not effective candidate coding pattern of current block, after must terminating the pattern It is continuous to calculate.
Finally according to QDBitsHPBy the Sign of each dataHPAnd QDHPIt is incorporated into code stream:Work as QDBitsHPEqual to 0, show to work as Preceding piece of QDHPAll it is 0, SignHPThe reconstructed results of formula (20), therefore all Sign in current block are not influencedHPAnd QDHPNot It needs to be incorporated into code stream;Work as QDBitsHPMore than 0, showing current block, there are some QDHPMore than 0, the present invention is all by current block QDHPAnd SignHPIt is all incorporated into code stream, wherein each SignHPIt is indicated with 1 bit, each QDHPUse QDBitsHPA bit table Show.
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using HP_MODEHPIt presses Formula (22) is calculated.
4) vertical point-by-point pattern (VP_MODE):
VP_MODE carries out prediction point-by point using the reconstruction data of adjacent position above vertical direction, and to prediction residual into Row shift quantization, displacement inverse quantization and reconstruction:To current each initial data P in the block, when P is in current chroma component sub-frame Coboundary, then the predicted value Pred of PVP128 are set as, otherwise PredVPAll it is the reconstruction data R of the spaces P position adjacent and aboveU;P Prediction residual DVPIt is calculated by formula (23), prediction residual symbol SignVPIt is calculated by formula (24), quantifies residual error QDVPIt is calculated by formula (25), rebuilds data RVPIt is calculated by formula (26).
DVP=P-PredVP (23)
QDVP=(| DVP|+(QStep > > 1)) > > shift (25)
In order to allow decoding end that can rebuild each data of current block by formula (26), coding side first must be by VP_MODE Coding mode identify ModeIDVPIt is incorporated into code stream, ModeID in the present inventionVPIt is indicated, is worth for 0b101 with 3 bits.Decoding end exists After parsing code stream obtains the coding mode mark ModeID of current block, when ModeID values are ModeIDVP, then illustrate that current block uses VP_MODE is encoded, and then obtains each Pred of current blockVP
Then according to the maximum quantization residual error QD of current blockVP maxEach QD is calculated by formula (27)VPIt is incorporated into the bit of code stream Number QDBitsVP.In formula (27), work as QDVP maxEqual to 0, show all QD of current blockVPValue is all 0, i.e. current block is VP_ MODE quantifies residual error stand growth model, then is not necessarily to consume each QD of bits of encodedVP, the present invention is by QDBitsVPIt is set to 0;Work as QDVP maxGreatly In 0, then all QD of current blockVPRanging from [0, QDVP max], each QDVPAt least useA bit expression, The present invention is by QDBitsVPIt is set toIn order to reduce code stream bit number and consider QDBitsVPCommon model It encloses, the QDBits that the present invention will be indicated only with 3 bitsVPIt is incorporated into code stream, QDBitsVPRanging from [0,7] allowed.
Therefore, the present invention in current block select VP_MODE as its effective candidate coding pattern unique conditional for: QDBitsVPNo more than 7.Work as QDBitsVPMore than 7, then it can not be incorporated into code stream with 3 bits, in this case VP_MODE The final coding mode that current block can not be become, i.e., be not effective candidate coding pattern of current block, after must terminating the pattern It is continuous to calculate.
Finally according to QDBitsVPBy the Sign of each dataVPAnd QDVPIt is incorporated into code stream:Work as QDBitsVPEqual to 0, show to work as Preceding piece of QDVPAll it is 0, SignVPThe reconstructed results of formula (26) are not influenced, at this time all Sign in current blockVPAnd QDVPNot It needs to be incorporated into code stream;Work as QDBitsVPMore than 0, showing current block, there are some QDVPMore than 0, therefore the present invention is by current block institute Some QDVPAnd SignVPIt is all incorporated into code stream, wherein each SignVPIt is indicated with 1 bit, each QDVPUse QDBitsVPA ratio Spy indicates.
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using VP_MODEVPIt presses Formula (28) is calculated.
5) level of complexity pattern (CH_MODE):
It is encoded using the pattern, there are two types of optional coding modes for each row of data of current block:Horizontal forecast quantization side Formula and direct quantification manner.
In all data lines using horizontal forecast quantification manner, the reconstruction number of adjacent position on the left of horizontal direction is used Shift quantization, displacement inverse quantization and reconstruction are carried out according to progress prediction point-by point, and to prediction residual:It is original to each of current line Data P, when P is in the left margin of current chroma component sub-frame, then the predicted value Pred of PCH128 are set as, otherwise PredCHAll it is P The reconstruction data R of space adjacent left-hand positionL;The prediction residual D of PCHIt is calculated by formula (29), prediction residual symbol SignCHIt is calculated by formula (30), quantifies residual error QDCHIt is calculated by formula (31), rebuilds data RCHBased on formula (32) It obtains.
DCH=P-PredCH (29)
QDCH=(| DCH|+(QStep > > 1)) > > shift (31)
In all data lines using direct quantification manner, without any prediction, to each original number of current line According to P, directly presses formula (33) and calculate quantized data QPCH, and by the reconstruction data R of formula (34) calculating PCH
QPCH=(P+ (QStep > > 1)) > > shift (33)
RCH=QPCH< < shift (34)
In order to enable decoding end by all data lines of formula (32) or (34) reconstruction current block, the present invention first will The coding mode of CH_MODE identifies ModeIDCHIt is incorporated into code stream, is indicated with 4 bits, is worth for 0b1100.Then it presses from top to bottom Sequentially by the coding mode RowMode of every rowCHIt is incorporated into code stream, each RowModeCHIt is indicated with 1 bit, (v is to work as to total v bit Preceding piece of data amount check in the vertical direction, the as number of data lines of current block).The RowMode of current lineCHValue is that 0b0 is indicated It is that 0b1 indicates current line using the coding mode directly quantified that current line, which uses the coding mode of horizontal forecast quantization, value,.
Then to being encoded respectively using the data line of horizontal forecast quantification manner and the data line of direct quantification manner:
In all data lines using horizontal forecast quantification manner, in order to enable decoding end to rebuild number by formula (32) According to coding side must be by all QD in current blockCHAnd SignCHInformation be incorporated into code stream:The present invention is first from all QD of current blockCHIn Select maximum value QDCH max, then by each QD of formula (35) calculatingCHIt is incorporated into the bit number QDBits of code streamCH.In formula (35), Work as QDCH maxEqual to 0, show all QD of current blockCHAll it is 0, i.e., current block is that CH_MODE quantifies residual error stand growth model, then is not necessarily to Bit is consumed to encode QDCH, the present invention is by QDBitsCHIt is set to 0;Work as QDCH maxMore than 0, then all QD of current blockCHRange area Between be [0, QDCH max], each QDCHAt least useA bit indicates, the present invention is by QDBitsCHIt is set toIn order to reduce QDBitsCHEncoding code stream bit number, the present invention will indicate only with 3 bits QDBitsCHIt is incorporated into code stream, QDBitsCHAllowable range be [0,7], corresponding QDCHAllowable range be [0,127].
Therefore, the present invention in current block select CH_MODE as its effective candidate coding pattern unique conditional for: QDBitsCHNo more than 7.Work as QDBitsCH(there is QD more than 7CHMore than 127), then it can not be incorporated into code stream with 3 bits, In this case CH_MODE can not become the final coding mode of current block, i.e., be not effective candidate coding pattern of current block, The follow-up calculating of the pattern must be terminated.To often going using horizontal forecast quantification manner, when there are QD for itCHMore than 127, then the row To lead to CH_MODE not using horizontal forecast quantification manner is effective candidate coding pattern of current block.In this case, when Preceding piece can be changed to the coding mode of current line another direct quantification manner, avoid being calculated by formula (35) QDBitsCHRange beyond [0,7].
In all data lines using direct quantification manner, in order to enable decoding end to rebuild data by formula (34), Coding side must be by all QP of current blockCHIt is incorporated into code stream, the present invention is by each QPCHUse QPBitsCHA bit expression is incorporated into code Stream.Since P is indicated with 8 bits, QP that P is obtained after formula (33) shift quantizationCHOnly it need to subtract shift bit table with 8 Show can (shift quantify for frame level shift amount), therefore QPBits in the present inventionCHIt is calculated by formula (36).In formula (36) in, QPBitsCHCalculating only, present frame all QPBits related with shiftCHIt is all equal.Decoding end can first pass through Frame level image quality mode PicQ in frame originating point information obtains shift, then QPBits is calculated by formula (36)CH.Therefore, it is Reduction number of coded bits, the present invention is by the QPBits of current blockCHIt is incorporated into code stream.
QPBitsCH=8-shift (36)
The present invention is with specific reference to RowMode in current blockCHValue is the line number n and QDBits of 0b1CHDivide three kinds of situations will Coding information (the QP of each dataCH、QDCHAnd SignCH) it is incorporated into code stream:
I. when n values be equal to current block line number v when, then all data of current block all use direct quantification manner, only need by Each QPCHUse QPBitsCHA bit is incorporated into code stream, need not be by QDBitsCH、QDCHAnd SignCHIt is incorporated into code stream.
Ii. when n values are less than the line number v and QDBits of current blockCHWhen equal to 0, all QD of current blockCHAll it is 0, SignCH R in formula (32) is not influencedCHCalculating, there is no need to by SignCHAnd QDCHIt is incorporated into code stream.In this case, the present invention is first The QDBits that 3 bits are indicatedCHIt is incorporated into code stream, then by each QPCHUse QPBitsCHA bit is incorporated into code stream.
Iii. in the case of other, n values are less than line number v, QDBits of current blockCHMore than 0 and less than or equal to 7, need institute Some SignCHAnd QDCHIt is incorporated into code stream.In this case, the QDBits that the present invention first indicates 3 bitsCHIt is incorporated into code stream, then will Each SignCHCode stream is incorporated into 1 bit, by each QDCHUse QDBitsCHA bit is incorporated into code stream, finally will be each QPCHUse QPBitsCHA bit is incorporated into code stream.
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using CH_MODECHIt presses Formula (37) is calculated:
6) complicated vertical pattern (CV_MODE):
It is encoded using the pattern, there are two types of optional coding modes for every column data of current block:Vertical prediction quantization side Formula and direct quantification manner.
In all data row using vertical prediction quantification manner, which uses adjacent position above vertical direction It rebuilds data and carries out prediction point-by point, and shift quantization, displacement inverse quantization and reconstruction are carried out to prediction residual:To when every in forefront A initial data P, when P is in the coboundary of current chroma component sub-frame, then the predicted value Pred of PCVIt is 128, otherwise PredCV All it is the reconstruction data R of the spaces P position adjacent and aboveU;The prediction residual D of PCVIt is calculated by formula (38), prediction residual symbol Number SignCVIt is calculated by formula (39), quantifies residual error QDCVIt is calculated by formula (40), rebuilds data RCVBy formula (41) It is calculated.
DCV=P-PredCV (38)
QDCV=(| DCV|+(QStep > > 1)) > > shift (40)
In using all data of direct quantification manner row, without any prediction, to each original number when forefront According to P, directly presses formula (42) and calculate quantized data QPCV, and by the reconstruction data R of formula (43) calculating PCV
QPCV=(P+ (QStep > > 1)) > > shift (42)
RCV=QPCV< < shift (43)
In order to enable decoding end to be arranged by all data of formula (41) or (43) reconstruction current block, the present invention is first by table Show the coding mode mark ModeID of CV_MODECVIt is incorporated into code stream, is indicated with 4 bits, is worth for 0b1101.It presses again from left to right Sequentially by the coding mode ColMode of each columnCVIt is incorporated into code stream, each ColModeCVIt is indicated with 1 bit, (h is to work as to total h bit Preceding piece of data amount check in the horizontal direction, as the data columns of current block).ColModeCVValue is that 0b0 is indicated when forefront is adopted With the coding mode of vertical prediction quantization, value is that 0b1 is indicated when forefront is using the coding mode directly quantified.
Then to being encoded respectively using the data row of vertical prediction quantification manner and the data row of direct quantification manner:
In all data row using vertical prediction quantification manner, in order to enable decoding end to rebuild number by formula (41) According to coding side must be by all QD of current blockCVAnd SignCVInformation be incorporated into code stream:The present invention is first from all QD of current blockCVMiddle choosing Go out maximum value QDCV max, then by each QD of formula (44) calculatingCVIt is incorporated into the bit number QDBits of code streamCV.In formula (44), when QDCV maxEqual to 0, show all QD of current blockCVAll it is 0, i.e., current block is that CV_MODE quantifies residual error stand growth model, then is not necessarily to disappear Loss-rate spy encodes QDCV, the present invention is by QDBitsCVIt is set to 0;Work as QDCV maxMore than 0, then all QD of current blockCVRange intervals It is [0, QDCV max], each QDCVAt least useA bit indicates, the present invention is by QDBitsCVIt is set toIn order to reduce QDBitsCVEncoding code stream bit number, the present invention will indicate only with 3 bits QDBitsCVIt is incorporated into code stream, QDBitsCVAllowable range be [0,7], corresponding QDCVAllowable range be [0,127].
Therefore, the present invention in current block select CV_MODE as its effective candidate coding pattern unique conditional for: QDBitsCVNo more than 7.Work as QDBitsCV(there is QD more than 7CVMore than 127), then it can not be incorporated into code stream with 3 bits, In this case CV_MODE can not become the final coding mode of current block, i.e., be not effective candidate coding pattern of current block, The follow-up calculating of the pattern must be terminated.To each column using vertical prediction quantification manner, when there are QD for itCVMore than 127, then the row To lead to CV_MODE not using vertical prediction quantification manner is effective candidate coding pattern of current block.In this case, when Preceding piece can will be changed to another direct quantification manner when the coding mode in forefront, avoid being calculated by formula (44) QDBitsCVRange beyond [0,7].
In using all data of direct quantification manner row, in order to enable decoding end to rebuild data by formula (43), Coding side must be by all QP of current blockCVIt is incorporated into code stream, the present invention is by each QPCVUse QPBitsCVA bit indicates.Since P is It is indicated with 8 bits, the QP that P is obtained after formula (42) shift quantizationCVIt only need to subtract shift bit with 8 to indicate (shift is that frame level quantifies shift amount), therefore QPBits in the present inventionCVIt is calculated by formula (45).In formula (45), QPBitsCVCalculating only, present frame all QPBits related with shiftCVIt is all equal.Decoding end can first pass through frame head letter Frame level image quality mode PicQ in breath obtains shift, then QPBits is calculated by formula (45)CV.Therefore, in order to reduce Number of coded bits, the present invention is not by the QPBits of current blockCVIt is incorporated into code stream.
QPBitsCV=8-shift (45)
Then according to ColMode in current blockCVValue is the columns m and QDBits of 0b1CVDivide three kinds of situations will be per number According to coding information (QPCV、QDCVAnd SignCV) it is incorporated into code stream, it is specific as follows:
I. when m values are equal to the columns h of current block, all data of current block all use direct quantification manner, do not have QDBitsCV、QDCVAnd SignCV, only need to be by each QPCVUse QPBitsCVA bit is incorporated into code stream.
Ii. when m values are less than the columns h and QDBits of current blockCVWhen equal to 0, due to all QD of current blockCVAll it is 0, SignCVR in formula (41) is not influencedCVCalculating, there is no need to by SignCVAnd QDCVIt is incorporated into code stream.In this case, this hair The bright QDBits for first indicating 3 bitsCVIt is incorporated into code stream, then by each QPCVUse QPBitsCVA bit is incorporated into code stream.
Iii. in the case of other, m values are less than columns h, QDBits of current blockCVMore than 0 and be less than or equal to 7, need by SignCVAnd QDCVAll actually it is incorporated into code stream.In this case, the QDBits that the present invention first indicates 3 bitsCVIt is incorporated into code stream, then By each SignCVCode stream is incorporated into 1 bit, by each QDCVUse QDBitsCVA bit is incorporated into code stream, finally will be each QPCVUse QPBitsCVA bit is incorporated into code stream.
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using CH_MODECVIt presses Formula (46) is calculated:
7) adaptive point-by-point pattern (AP_MODE):
Current block selects AP_MODE as its effective candidate coding pattern there are two condition in the present invention, wherein first Condition is:Current block does not include the coboundary data and left margin data of current chroma component sub-frame.
It is encoded using the pattern, to current each initial data P in the block, predicted value PredAPBy formula (47) It is calculated.In formula (47), RLReconstruction data, R for the space adjacent left-hand position of PUIt is weighed adjacent and above for the space of P Build data, RULFor the reconstruction data of the adjacent top-left position in space of P.Work as RULWith RUDifference amplitude be less than or equal to RULWith RLDifference Different amplitude then shows that the horizontal direction correlation for rebuilding data is more than vertical direction correlation, and the present invention is by RLPrediction as P Otherwise value shows that the vertical direction correlation for rebuilding data is more than horizontal direction correlation, the present invention is by RUPrediction as P Value.The prediction residual D of PAPIt is calculated by formula (48), prediction residual symbol is calculated by formula (49), quantifies residual error QDAPIt is calculated by formula (50), rebuilds data RAPIt is calculated by formula (51).
DAP=P-PredAP (48)
QDAP=(| DAP|+(QStep > > 1)) > > shift (50)
It, first must be by the coding of AP_MODE in order to enable decoding end by each data of formula (51) reconstruction current block Pattern identification ModeIDAPIt is incorporated into code stream, ModeID in the present inventionAPIt is indicated, is worth for 0b1110 with 4 bits.Decoding end is in parsing code After stream obtains the coding mode mark ModeID of current block, when ModeID values are ModeIDAP, then illustrate that current block uses AP_ MODE is encoded, and then obtains each Pred of current blockAP
Then according to the maximum quantization residual error QD of current blockAP maxEach QD is calculated by formula (52)APIt is incorporated into the bit of code stream Number QDBitsAP.In formula (52), work as QDAP maxEqual to 0, show all QD of current blockAPAll it is 0, i.e. current block is AP_MODE Quantify residual error stand growth model, is then not necessarily to consume each QD of bits of encodedAP, the present invention is by QDBitsAPIt is set to 0;Work as QDAP maxMore than 0, Then all QD of current blockAPRanging from [0, QDAP max], each QDAPAt least useA bit expression, this hair It is bright by QDBitsAPIt is set toIn order to reduce code stream bit number and consider QDBitsAPTypical ranges, The QDBits that the present invention will be indicated only with 3 bitsAPIt is incorporated into code stream, QDBitsAPAllowable range be [0,7].
Therefore, the present invention in current block select AP_MODE as its effective candidate coding pattern second condition for: QDBitsAPNo more than 7.Work as QDBitsAPMore than 7, then it can not be incorporated into code stream with 3 bits, in this case AP_MODE The final coding mode that current block can not be become, i.e., be not effective candidate coding pattern of current block, after must terminating the pattern It is continuous to calculate.
Finally according to QDBitsAPBy the Sign of each dataAPAnd QDAPIt is incorporated into code stream:Work as QDBitsAPEqual to 0, show to work as Preceding piece of QDAPAll it is 0, SignAPThe reconstructed results of formula (51), therefore all Sign in current block are not influencedAPAnd QDAPNot It needs to be incorporated into code stream;Work as QDBitsAPMore than 0, showing current block, there are QDAPMore than 0, therefore the present invention is all by current block SignAPAnd QDAPAll it is incorporated into code stream, wherein SignAPIt is indicated with 1 bit, QDAPUse QDBitsAPA bit indicates.
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using AP_MODEAPIt presses Formula (53) is calculated.
8) direct quantitative mode (DQ_MODE):
All data blocks can select the pattern as its effective candidate coding pattern.The pattern has been compiled according to present frame Enter the frame level image quality mode PicQ in the frame originating point information of code stream, is divided into following two realization methods:
(a) whole quantification manners:
In following three kinds of situations, DQ_MODE is realized using whole quantification manners:(a-1) frame level image quality mode is nothing Damage pattern (the PicQ values of write-in code stream are 0);(a-2) frame level image quality mode is to damage clear pattern (write-in code stream 1) PicQ values are;(a-3) frame level image quality mode is to damage balanced mode (the PicQ values of write-in code stream are 2) and current chroma Component sub-frame is U or V component subframe.DQ_MODE is as follows using the concrete methods of realizing of whole quantification manners:
To each initial data P in current block, the present invention is without prediction, directly using quantization, the side for rebuilding and encoding Formula:First press the quantized data QP that formula (54) calculates PDQ1, then calculated by formula (55) and rebuild data RDQ1, finally press formula (56) It calculates quantization tables of data and shows bit number QPBitsDQ1.In order to enable decoding end by the data of formula (55) reconstruction current block, originally Invention will indicate that the coding mode of DQ_MODE identifies ModeID firstDQIt is incorporated into code stream, is indicated with 4 bits, is worth for 0b1111;It connects It each QPDQ1Use QPBitsDQ1A bit number is incorporated into code stream.P is indicated with 8 bits in the present invention, and P is shifted by formula (54) After quantization, QPDQ1Only need to 8 subtract shift bit indicate can (shift be frame level quantization shift amount), therefore QPBitsDQ1 It is calculated by formula (56).According to formula (56), all QPBits in present frameDQ1It is all equal, it is only related with shift, and Shift can be obtained by the frame level image quality mode PicQ of encoded code stream, therefore QPBitsDQ1Code stream need not be incorporated into.
QPDQ1=(P+ (QStep > > 1)) > > shift (54)
RDQ1=QPDQ1< < shift (55)
QPBitsDQ1=8-shift (56)
According to the above coding information, the coding of coding consumption is carried out to current block using whole quantification manners of DQ_MODE Bit number CBitsDQ1It is calculated by formula (57).
CBitsDQ1=4+h × v × QPBitsDQ1 (57)
(b) level halves quantification manner:
When frame level image quality mode is to damage balanced mode (the PicQ values of write-in code stream are 2) and current chroma component Frame is Y-component subframe, then DQ_MODE halves quantification manner using level and encoded, and concrete methods of realizing is as follows:
Current block first often takes adjacent two data P by sequence from left to right in the horizontal direction(2*i,j)And P(2*i+1,j), Their mean value is calculated as a new data P '(i,j), as shown in formula (58), i and j are respectively the horizontal position of new data block Index and vertical position index;For being in the data block of chromatic component subframe right margin, if its h is odd number, often row is last One P(2*i,j)There is no paired P(2*i+1,j), the present invention is directly by P '(i,j)It is set as P(2*i,j).Current block passes through level side To resolution ratio halve after all P ' compositions new data blocks for obtaining formula (59) is first pressed to each data P ' in new data block Calculate its quantized data QPDQ2, then calculate it by formula (60) and rebuild data R ', it is corresponding with P ' finally to press formula (61) calculating P(2*i,j)And P(2*i+1,j)Two rebuild data RDQ2 (2*i,j)And RDQ2 (2*i+1,j)
P'(i,j)=(P(2*i,j)+P(2*i+1,j)) > > 1 (58)
QPDQ2=(P'+ (QStep > > 1)) > > shift (59)
R'=QPDQ2< < shift (60)
In order to enable decoding end by the data of formula (60) and (61) reconstruction current block, the present invention is first by DQ_MODE Coding mode identify ModeIDDQIt is incorporated into code stream, is indicated with 4 bits, is worth for 0b1111;Then by each QPDQ2Use QPBitsDQ2 A bit number is incorporated into code stream.P is indicated with 8 bits in the present invention, and P ' is also indicated with 8 bits, after formula (59) shift quantization, QPDQ2It only need to subtract shift bit with 8 to indicate, therefore QPBitsDQ2It is calculated by formula (62).According to formula (62), All QPBits of present frameDQ2It is all equal, it is only related with shift, therefore QPBitsDQ2Code stream need not be incorporated into.
QPBitsDQ2=8-shift (62)
According to the above coding information, quantification manner is halved using the level of DQ_MODE, coding consumption is carried out to current block Number of coded bits CBitsDQ2It is calculated by formula (63).
CBitsDQ2=4+ ((h+1) > > 1) × v × QPBitsDQ2 (63)
For the ease of unified presentation, the present invention will carry out current block using DQ_MODE the number of coded bits of coding consumption It is denoted as CBitsDQ, according to specific implementation, value CBitsDQ1Or CBitsDQ2
Formula (63) is compared with formula (57), although QPBitsDQ2With QPBitsDQ1It is equal, but due to of quantized data Number reduces half, significantly reduces number of coded bits.In order to obtain preferable video quality while improving compression ratio, this Invention is all that horizontal resolution is more than vertical resolution ratio, therefore DQ_MODE halves quantization side in view of typical screen video Formula only selects to carry out half extraction to horizontal direction data, and is reduced using the mode for taking mean value in extraction process The loss of well as subjective video quality.Since decoding end can obtain the reality of DQ_MODE according to PicQ and chromatic component subframe type Existing mode, therefore each piece of DQ_MODE realization methods are not incorporated into code stream by the present invention, reduce number of coded bits.Multiple Under miscellaneous screen video scene switching, the temporal correlation between video data reduces, the candidate coding pattern in addition to DQ_MODE Forecasting efficiency significantly reduces, and number of coded bits is more, and DQ_MODE halves quantification manner since level can be used, only to half Video data compressed, significantly reduce the peak-data amount of video code flow.
In step (5), effective candidate coding pattern refers to the candidate allowed directly as final coding mode Coding mode is to be directed to individual data block, and effective candidate coding pattern between data block has differences.The continuous blocks It is required that the coded sequence of data block is adjacent in current chroma component sub-frame.
Due in step (5), the quantization residual error number of bits (QDBits of all candidate patternsXX, subscript XX be IC, Each candidate pattern is corresponded to when HP, VP, CH, CV or AP respectively) unify to be indicated with 3 bits, it is convenient for decoding end analytic uniform, permits Perhaps maximum value is 7.In the case where the inter frame image quality of present frame is lossless mode, quantization step is all 1, candidate code There is the case where QDBits is more than 7 in pattern IC_MODE, HP_MODE, VP_MODE, CH_MODE, CV_MODE and AP_MODE, Cause them to cannot function as effective candidate coding pattern of current block, i.e., can not become final coding mode.And DQ_MODE due to Its QPBitsDQ1Or QPBitsDQ2Without being incorporated into code stream, limited without effectively candidate, it is ensured that each block at least one have Candidate coding pattern is imitated, the case where no coding mode can be used is avoided the occurrence of.
In step (5), candidate coding pattern HP_MODE, VP_MODE, CH_MODE, CV_MODE and AP_MODE are being counted When calculating coding information, all use the mode predicted while rebuilding, i.e. space adjacent current each data in the block Data are rebuild by the predicted value as current data.
In step (5), the binary value of each coding mode mark is not mutually prefix, decimal value is not mutually equal, and And under exemplary screen video scene, final coding mode counts the less number of bits table of the higher pattern identification of ratio Show, effectively reduces coding total bit number, as shown in table 3.
Table 3
Coding mode identifies Decimal value Number of bits Binary value
ModeIDIC 0 2 0b00
ModeIDSO 1 2 0b01
ModeIDHP 4 3 0b100
ModeIDVP 5 3 0b101
ModeIDCH 12 4 0b1100
ModeIDCV 13 4 0b1101
ModeIDAP 14 4 0b1110
ModeIDDQ 15 4 0b1111
In step (5), current block can from its effective candidate coding pattern an optional pattern directly as final Coding mode.In order to improve computation complexity of the video compress than the selection of, reduction mode and obtain good video image quality, Can by the following method with the preferably final coding mode of sub-step:
(5-1) is if SO_MODE is effective candidate coding pattern of current block or for from the consecutive identical list of current BOB(beginning of block) It is worth effective candidate coding pattern of block, then the final coding mould of the continuous blocks directly as current block or from current BOB(beginning of block) Formula, and by the reconstruction data group under the pattern at the final reconstructed block of corresponding position, and termination pattern selects in advance;Otherwise it holds Row is in next step.
(5-2) if IC_MODE be current block effective candidate coding pattern and current block there are non-zero quantised residual error, count Calculate the bit number CBits that current block uses the pattern-coding that need to consumeIC, and execute next step;If IC_MODE is having for current block Whether the quantization residual error for imitating candidate coding pattern and current block is zero, then be also IC_ from next BOB(beginning of block) detection subsequent block MODE quantifies residual error stand growth model, until detecting quantization residual error non-full zero block or the last one block, and directly by IC_MODE The final coding mode of continuous blocks as current block or from current BOB(beginning of block), by the reconstruction data group under the pattern at corresponding position The final reconstructed block set, and termination pattern selects in advance;Other situations execute next step.
(5-3) calculates the coding information for carrying out prediction quantization to current block using HP_MODE;If HP_MODE is current block Effective candidate coding pattern and current block there are non-zero quantised residual errors, then calculating current block need to be consumed using the pattern-coding Bit number CBitsHP, and execute next step;If HP_MODE is that the quantization of the effective candidate coding pattern and current block of current block is residual Difference is zero, then directly as the final coding mode of current block, and the reconstruction data under the pattern is formed current block Final reconstructed block, and in advance terminate current block model selection;Other situations execute next step.
(5-4) calculates the coding information for carrying out prediction quantization to current block using VP_MODE;If VP_MODE is current block Effective candidate coding pattern and current block there are non-zero quantised residual errors, then calculating current block need to be consumed using the pattern-coding Bit number CBitsVP, and execute next step;If VP_MODE is that the quantization of the effective candidate coding pattern and current block of current block is residual Difference is zero, then directly as the final coding mode of current block, and the reconstruction data under the pattern is formed current block Final reconstructed block, and in advance terminate current block model selection;Other situations execute next step.
(5-5) calculates the coding information for carrying out prediction quantization to current block using AP_MODE;If AP_MODE is current block Effective candidate coding pattern and current block there are non-zero quantised residual errors, then calculating current block need to be consumed using the pattern-coding Bit number CBitsAP, and execute next step;If AP_MODE is that the quantization of the effective candidate coding pattern and current block of current block is residual Difference is zero, then directly as the final coding mode of current block, and the reconstruction data under the pattern is formed current block Final reconstructed block, and in advance terminate current block model selection;Other situations execute next step.
(5-6) is unsatisfactory for the condition or its CBits as the effective candidate coding pattern of current block as HP_MODEHPMore than threshold Value TH1, then first calculate using CH_MODE to current block carry out prediction quantization coding information, if then CH_MODE meet at For the condition of the effective candidate coding pattern of current block, then calculates and coding is carried out to current block using CH_MODE need the ratio consumed Special number CBitsCH.The value range of TH1 is [6, h × v × QPBitsCH], TH1 is bigger, and CH_MODE becomes final coding mode Possibility with regard to smaller.Current block coding mode RowMode often capable at CH_MODECHIt is determined according to formula (64), intermediate value It indicates that current line uses direct quantification manner for 1, is worth and indicates that current line uses horizontal forecast quantification manner for 0,Indicate current line maximum quantization residual error QDCH row-maxThe minimum number of coded bits needed, threshold value THCH Ranging from [0,7], value is smaller, is more about to select direct quantification manner.
(5-7) is unsatisfactory for the condition or its CBits as the effective candidate coding pattern of current block as VP_MODEVPMore than threshold Value TH2, then first calculate using CV_MODE to current block carry out prediction quantization coding information, if then CV_MODE meet at For the condition of the effective candidate coding pattern of current block, then calculates and coding is carried out to current block using CV_MODE need the ratio consumed Special number CBitsCV.The value range of TH2 is [6, h × v × QPBitsCV], TH2 is bigger, and CV_MODE becomes final coding mode Possibility with regard to smaller.The coding mode ColMode of current block each column at CV_MODECVIt is determined according to formula (65), value is 1 expression works as forefront and uses direct quantification manner, is worth and indicates to use prediction quantification manner vertically when forefront for 0,It indicates to work as forefront maximum quantization residual error QDCV col-maxThe minimum number of coded bits needed, threshold value THCV Ranging from [0,7], value is smaller, and more row will select direct quantification manner.
(5-8) is if the DQ_MODE of current chroma component sub-frame is worked as using whole quantification manners according to formula (66) decision The preceding piece of quantization for whether calculating DQ_MODE and reconstruction data, ENDQ1Value indicates that current block calculates the quantization and again of DQ_MODE for 1 Data are built, is worth and is not calculated the quantization of DQ_MODE for 0 expression current block and rebuild data, CBitsMINIndicate calculated each pattern Middle to encode the minimum value for needing consumes bit number, shift is that the frame level that frame level quantization step QStep takes logarithm to obtain by 2 quantifies to move Position digit.
If the DQ_MODE of current chroma component sub-frame halves quantification manner using level, i.e., when frame level image quality mode It is Y-component subframe to damage balanced mode and current chroma component sub-frame, then determines whether current block calculates DQ_ by formula (67) The quantization of MODE and reconstruction data, ENDQ2Value indicates that current block calculates quantization and the reconstruction data of DQ_MODE for 1, is worth and is indicated for 0 Current block does not calculate the quantization of DQ_MODE and rebuilds data;TotalBitsYIndicate the encoding ratio that current Y-component subframe has consumed Special number, η are coefficient of comparisons, less than 1.0, typical value ranging from [0.2,0.8], and H1For the horizontal resolution of Y-component subframe, V1 For the vertical resolution ratio of Y-component subframe.
Current block is after formula (66) or formula (67) judgement, if ENDQ1Or ENDQ2Value is 1, then calculates current block use The quantization of DQ_MODE and reconstruction data, and calculate and the bit number CBits that coding needs consume is carried out using DQ_MODEDQ, value For CBitsDQ1Or CBitsDQ2
(5-9) is selected finally to compile from the effective candidate coding pattern estimated by the minimum principle of consumption number of coded bits Pattern, it is identical in number of coded bits, select coding mode ident value smaller as final coding mode;It will be current Reconstruction data group of the block under final coding mode provides prediction ginseng at the final reconstructed block of corresponding position for the coding of subsequent block It examines.
According to the final coding mode of current block code stream is written in coding information by the step (6) in order, specific point Eight kinds of situations below:
The final coding mode of (6-1) current block is IC_MODE, then code stream is written in coding information as follows:
(a) coding mode that write-in 2 bit of code stream indicates identifies ModeIDIC, value 0b00.
(b) stand growth model that write-in 1 bit of code stream indicates identifies AZBFlagIC
If (c) AZBFlagICValue is 0b1, then shows that current block is that IC_MODE quantifies residual error stand growth model, jump to step (f), Otherwise show that current block there are non-zero quantised residual error, executes next step.
(d) the quantization residual error number of bits QDBits for indicating 3 bitsICCode stream is written.
(e) sequence of raster scanning is first pressed by all prediction residual symbol Sign of current blockICCode stream is written, each SignICIt is indicated with 1 bit;Again in the same order by all quantization residual error QD of current blockICCode stream, each QD is writtenICWith QDBitsICA bit indicates;In all SignICAnd QDICIt is all written after code stream, terminates the code stream write-in of current block.
(f) the consecutive identical monodrome block identification ContiFlag that write-in 1 bit of code stream indicatesIC:If only to individually quantifying residual error Stand growth model is encoded, then ContiFlagICValue is 0b0, and terminates the code stream write-in of current block;If to from current BOB(beginning of block) Continuous ContiCntICA quantization residual error stand growth model is encoded, then ContiFlagICValue is 0b1, and executes next step.
(g) first by ContiCntICNumber of coded bits identify ContiCntBitsIdxICCode stream is written using 2 bits, then By ContiCntICSubtract 1 and uses ContiCntBitsICCode stream is written in a bit, finally terminates the code stream write-in of current block.Decoding End can pass through ContiCntBitsIdxICObtain ContiCntBitsIC:If ContiCntBitsIdxICValue is 0b00, then right Answer ContiCntBitsICValue is 2;Work as ContiCntBitsIdxICValue is 0b01, then corresponds to ContiCntBitsICValue is 6;If ContiCntBitsIdxICValue is 0b10, corresponding ContiCntBitsICValue is 11;If ContiCntBitsIdxICValue is 0b11, Then correspond to ContiCntBitsICValue is
The final coding mode of (6-2) current block is monodrome raw mode SO_MODE, then as follows by coding information Code stream is written:
(a) coding mode that 2 bits of write-in indicate identifies ModeIDSO, binary value 0b01.
(b) the monodrome coding mode CodPsFlag that 1 bit of write-in indicatesSO
If (c) CodPsFlagSOValue is equal to 0b1, then the single-value data P indicated 8 bitssCode stream is written;If CodPsFlagSOValue be equal to 0b0, show the adjacent top coded block of current block space final coding mode be SO_MODE and The single-value data P of its single-value data and current blocksIt is equal, therefore not by PsCode stream is written.
(d) the consecutive identical monodrome block identification ContiFlag that 1 bit of write-in indicatesSO
If (e) ContiFlagSOValue is equal to 0b0, indicates only to encode current block, then the code stream for terminating current block is write Enter;If ContiFlagSOValue is equal to 0b1, indicates the ContiCnt from current BOB(beginning of block)SOThe coding mode of a consecutive data block is all For SO_MODE and their monodrome it is all equal, then be first written 2 bits expression ContiCntSONumber of coded bits identifies ContiCntBitsIdxSO, then by ContiCntSOSubtract 1 and uses ContiCntBitsSOA bit indicates write-in code stream.Decoding end can To pass through ContiCntBitsIdxSOObtain ContiCntBitsSO:Work as ContiCntBitsIdxSOValue is 0b00, then corresponds to ContiCntBitsSOValue is 2;Work as ContiCntBitsIdxSOValue is 0b01, then corresponds to ContiCntBitsSOValue is 6;Then when ContiCntBitsIdxSOValue is 0b10, corresponding ContiCntBitsSOValue is 11;Work as ContiCntBitsIdxSOValue is 0b11, Then correspond to ContiCntBitsSOValue is
The final coding mode of (6-3) current block is horizontal point-by-point pattern HP_MODE, then as follows by coding information Code stream is written:
(a) coding mode that write-in 3 bit of code stream indicates identifies ModeIDHP, binary value 0b100.
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesHP
If (c) QDBitsHPValue is 0, then terminates the code stream write-in of current block;If QDBitsHPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockHPCode stream, each Sign is writtenHPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockHPCode stream, each QD is writtenHPUse QDBitsHPA bit indicates.
The final coding mode of (6-4) current block is vertical point-by-point pattern VP_MODE, then as follows by current block Code stream is written in coding information:
(a) coding mode that write-in 3 bit of code stream indicates identifies ModeIDVP, binary value 0b101.
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesVP
If (c) QDBitsVPValue is 0, then terminates the code stream write-in of current block;If QDBitsVPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockVPCode stream, each Sign is writtenVPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockVPCode stream, each QD is writtenVPUse QDBitsVPA bit indicates.
The final coding mode of (6-5) current block is level of complexity pattern CH_MODE, then as follows by current block Code stream is written in coding information:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDCH, binary value 0b1100.
(b) sequence from top to bottom is pressed by the coding mode RowMode of each row of dataCHCode stream is written, often goes RowModeCHIt is indicated with 1 bit.
(c) according to RowModeCHThree kinds of situations of distribution point of value or less are encoded:
(c-1) if the RowMode of all write-in code streamsCHValue is all 0b1, i.e., the data of all rows are all compiled using directly quantization Code mode then presses the sequence of raster scanning by all quantized data QP of current blockCHCode stream, each QP is writtenCHUse QPBitsCH A bit indicates.
(c-2) if the RowMode of write-in code streamCHValue is all 0b0, i.e., the data of all rows all use horizontal forecast quantization to compile Code mode, then be written the quantization residual error number of bits QDBits indicated with 3 bits firstCH;If then QDBitsCHMore than 0, then The sequence of raster scanning is first pressed by all prediction residual symbol Sign of current blockCHCode stream, each Sign is writtenCHWith 1 bit table Show, then quantization residual error QD in the same order that current block is allCHCode stream, each QD is writtenCHUse QDBitsCHA bit table Show.
(c-3) if the RowMode of write-in code streamCHValue is 0b0 and is that 0b1 exists, then write-in first is indicated with 3 bits Quantify residual error number of bits QDBitsCH;If then QDBitsCHMore than 0, then first current block is owned by the sequence of raster scanning Prediction residual symbol SignCHCode stream, each Sign is writtenCHIt is indicated with 1 bit, then in the same order owns current block Quantization residual error QDCHCode stream, each QD is writtenCHUse QDBitsCHA bit indicates;The sequence for finally pressing raster scanning will be current All quantized data QP of blockCHCode stream, each QP is writtenCHUse QPBitsCHA bit indicates.
The final coding mode of (6-6) current block is complicated vertical pattern CV_MODE, then as follows by current block Code stream is written in coding information:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDCV, binary value 0b1101.
(b) sequence from left to right is pressed by each column coding mode ColModeCVCode stream, the ColMode of each column is writtenCVIn code It is indicated with 1 bit in stream.
(c) according to ColModeCVThree kinds of situations of distribution point of value or less are encoded:
(c-1) if the ColMode of all write-in code streamsCVValue is all 0b1, i.e., the data of all row are all using directly quantization side Formula then presses the sequence of raster scanning by all quantized data QPCVCode stream, each QP is writtenCVUse QPBitsCVA bit indicates.
(c-2) if the ColMode of all write-in code streamsCVValue is all 0b0, i.e., the data of all row all use vertical premeasuring The quantization residual error number of bits QDBits indicated with 3 bits is then written in change mode firstCV;If then QDBitsCVMore than 0, then The sequence of raster scanning is first pressed by all prediction residual symbol Sign of current blockCVCode stream, each Sign is writtenCVWith 1 bit table Show, then quantization residual error QD in the same order that current block is allCVCode stream, each QD is writtenCVUse QDBitsCVA bit table Show.
(c-3) if the ColMode of write-in code streamCVValue is 0b0 and is that 0b1 exists, then write-in first is indicated with 3 bits Quantify residual error number of bits QDBitsCV;If then QDBitsCVMore than 0, then first current block is owned by the sequence of raster scanning Prediction residual symbol SignCVCode stream, each Sign is writtenCVIt is indicated with 1 bit, then in the same order owns current block Quantization residual error QDCVCode stream, each QD is writtenCVUse QDBitsCVA bit indicates;The sequence for finally pressing raster scanning will be current All quantized data QP of blockCVCode stream, each QP is writtenCVUse QPBitsCVA bit indicates.
The final coding mode of (6-7) current data block is adaptive point-by-point Mode A P_MODE, then will work as follows Code stream is written in preceding piece of coding information:
(a) coding mode that write-in 4 bit of code stream indicates identifies ModeIDAP, binary value 0b1110.
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesAP
If (c) QDBitsAPValue is 0, then terminates the code stream write-in of current block;If QDBitsAPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockAPCode stream, each Sign is writtenAPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockAPCode stream, each QD is writtenAPUse QDBitsAPA bit indicates.
The final coding mode of (6-8) current data block is direct quantitative mode DQ_MODE, then as follows will coding Code stream is written in information:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDDQ, binary value 0b1111.
If (b), DQ_MODE is using the coding mode that all quantifies, by the sequence of raster scanning by all quantized datas QPDQ1Code stream, each QP is writtenDQ1Use QPBitsDQ1A bit indicates;If DQ_MODE halves the coding staff of quantization using level Formula then presses the sequence of raster scanning by all quantized data QPDQ2Code stream, each QP is writtenDQ2Use QPBitsDQ2A bit indicates.
The step (8) carries out byte-aligned processing to the code stream that present frame has been written into, and the specific method is as follows:If current The total bit number TotalBits that frame has been written into code stream is not 8 multiple, then fills the bit that several values are zero toward code stream tail portion Data, filling number is 8 to subtract rem (rem is the remainder that TotalBits is obtained by 8 remainders), and code stream becomes word after filling Section alignment;If the encoded code stream total bit number TotalBits of present frame has been 8 multiple, without filling.
The step (8) carries out code stream byte after the completion of the last one data block coding of each chromatic component subframe Registration process, it is ensured that the multiple that the encoding code stream bit number of each chromatic component subframe is 8 makes the present invention be embodied When support to carry out sub-frame level parallel encodings by three chromatic component subframes, and the code stream of three subframes is connected directly between in order Together, without carrying out integral shift processing to code stream when code stream connects, processing speed is improved.
The step (10) carries out frame sync identifications escape processing to the code stream after present frame frame sync identifications, specifically Method is as follows:To each byte after the frame sync identifications of present frame code stream, the byte and thereafter 3 bytes are read in order Data, composition 4 byte data FourBytes (byte first read is in higher bit position), when FourBytes values be 0xFFFFFFFD, A byte data is then inserted into after 0xFD in code stream, is worth for 0x00;When FourBytes values be 0xFFFFFFFE, then by code 0xFE in stream replaces with 0xFD, and a byte data is inserted into after 0xFD, is worth for 0x01.Decoding end is in present frame code stream Must be last in 0xFFFFFFFD00 by all continuous five byte values in present frame code stream first before being parsed and being rebuild A byte 0x00 is deleted, and all continuous five byte values are replaced with 0xFE for the 4th byte 0xFD in 0xFFFFFFFD01, and The last byte 0x01 is deleted.
Digital KVM switcher carries out coding compression to the screen video that computer exports, under limited network bandwidth Realize the quick transmission of screen video.The present invention designs candidate coding pattern under the feature for fully considering screen video, is having The compression efficiency of screen video is improved under the computation complexity of limit.For the complete phase of pixel value of split screen in the middle part of screen video Together, the present invention devises monodrome raw mode, supports to carry out Unified coding to continuous identical monodrome block;In order to improve picture gradually The compression efficiency of change, the present invention devise horizontal point-by-point pattern and vertical point-by-point pattern;In order to improve the pressure of complex texture picture Contracting efficiency, the present invention devise adaptive prediction pattern, level of complexity pattern and complicated vertical pattern;In order to improve mutation picture Compression efficiency, the present invention devises direct quantitative mode;In order to improve the compression efficiency of still frame, the present invention devises frame Between associative mode, support to quantization residual error force zero setting, and to continuously quantify residual error stand growth model carry out Unified coding.
The video-frequency compression method of the present invention is suitable for carrying out data compression to the screen video that digital KVM switcher acquires. Compared with prior art, the present invention has advantageous effect below:
1) support the classification for rebuilding video quality configurable, user can flexibly select according to application demand.
2) there is preferable compression efficiency to each exemplary screen video scene, while keeps good reconstruction video quality.
3) the peak-data amount of the lower video code flow of complex screen video scene switching is significantly reduced.
4) overall calculation complexity is low, is suitble to realize on embeded processor, effectively reduces the reality of digital KVM switcher Ready-made and processing delay.
Description of the drawings
Fig. 1 is the basic flow chart of the method for the present invention;
Fig. 2 is the code flow structure figure of frame originating point information, and current code stream indicates that the image resolution ratio of present frame is 1366 × 768, Chrominance space format is YUV420, and block, which divides, uses 8 × 4 partition modes, and inter-prediction is enabled to close, using damaging balanced mode Compression is the 1st coded frame;
Fig. 3 is that the data block of chromatic component subframe divides figure.
Specific implementation mode
Illustrate the specific implementation mode of the present invention with example below in conjunction with the accompanying drawings, it is noted that below for resolution ratio Data compression is carried out for 1366 × 768 screen video, in the specific ablation process of compressed bit stream, the present embodiment is deposited by big end Storage pattern is written, and the higher bit position of code stream byte, the mode of description is preferentially written in the high-bit data of data to be compressed Only one of typical application mode of digital KVM switcher.Within the scope of the invention, those skilled in the art can be with root Some other alternate embodiments is used according to demand.
A kind of screen video compression method towards digital KVM switcher, as shown in Figure 1, including the following steps:
(1) a frame screen video data are inputted:
The one frame screen video data are collected by digital KVM switcher, and the screen inputted in the present embodiment regards Frequency is 1366 × 768 (the i.e. horizontal resolution H of image according to YUV chrominance spaces, image resolution ratio is used0It is 1366, vertical point Resolution is V0Include 1049088 pixels altogether for 768).In order to reduce the compressed code fluxion of high-resolution screen video to the greatest extent According to amount, the chrominance space format that the present embodiment is selected is YUV420, it has less U component datas compared with YUV422 and YUV444 With V component data.Current video frame is divided into three chromatic component subframes, and all Y-component datas form H1×V12-D data Array is denoted as Y-component subframe, horizontal resolution H1Equal to 1366, vertical resolution ratio V1Equal to 768;All U component datas groups At H2×V2Two-dimensional data array, U component sub-frames are denoted as, according to table 1, horizontal resolution H2Equal to 683, vertical resolution ratio V2Equal to 384;All V component data form H3×V3Two-dimensional data array, be denoted as V component subframe, according to table 1, level point Resolution H3Equal to 683, vertical resolution ratio V3Equal to 384.
(2) code stream is written into the frame originating point information of current video frame in the following order:
(2-1) from byte-aligned be written 4 bytes frame sync identifications SyncF, first three byte value be 0xFF, the 4th A byte value is 0xFE.
The resolution ratio for the current screen video image that (2-2) write-in is indicated with 6 bits identifies PicR.The screen of the present embodiment Video resolution is 1366 × 768, and according to table 2 in invention content, PicR values are 0b001111.
The chrominance space format identification (FID) ColorF indicated with 3 bits is written in (2-3).The chrominance space format of the present embodiment is YUV420 formats, ColorF values are 0b000.
(2-4) write-in identifies BP with the data block partition mode that 4 bits indicateMODE.In order in Current high resolution screen Preferable compression efficiency is obtained under video, the present embodiment selects 8 × 4 partition modes, BPMODEValue is 0b0001.
The enabled mark TP of inter-prediction that (2-5) write-in is indicated with 1 bitEN.Present frame is first coded frame, then does not permit Perhaps time domain prediction is used, the present embodiment is by TPENIt is set to 0b0;Present frame is not first coded frame, then allows pre- using time domain It surveys, in order to improve the compression efficiency of screen video, the present embodiment all allows to use inter-prediction, TPENValue is 0b1.
The frame level image quality mode PicQ indicated with 2 bits is written in (2-6).It is regarded to reduce high-resolution screen to the greatest extent The bit stream data amount of frequency, it is to damage balanced mode that the present embodiment, which selects frame level image quality mode, and PicQ values are 0b10.
The frame number FrameN for the present frame that (2-7) write-in is indicated with 16 bits.Present frame is first frame, then FrameN values It is 0.A frame is often subsequently encoded, FrameN values add 1, when FrameN is equal to 65536, then FrameN are first reset to 0, then will Code stream is written in FrameN.
In step (2), each numerical value be its high order bit be first written code stream (first passing through transmission of network to decoding end), Code stream is written after low-order bit.The present embodiment is written one during code stream is written, by each bit priority and stores byte Higher bit position.Fig. 2 show the present embodiment using the preamble information bitstream structure chart under big end memory module.
(3) from current video frame a uncoded color is obtained by the sequence of Y-component subframe, U component sub-frames, V component subframe Component sub-frame is spent as current chroma component sub-frame, and grating is pressed to current subframe according to 8 × 4 partition modes of step (2) selection The sequence of scanning carries out data block division, and the data block number H in current subframe horizontal direction is calculated by formula (1)blk, by public affairs Formula (2) calculates the data block number V on current subframe vertical directionblk, data to be encoded block in the subframe is calculated by formula (3) Total number Nblk.The specific data block of three chromatic component subframes divides the resolution as shown in figure 3, Y-component subframe in the present embodiment Rate is 1366 × 768,171 blocks of horizontal direction, 192 blocks of vertical direction, totally 32832 blocks;U component sub-frames and V component The resolution ratio of frame is all 683 × 384, and horizontal direction has 86 blocks, vertical direction to have 96 blocks, entire subframe respectively to have 8256 A block.
(4) a uncoded data block is obtained from current chroma component sub-frame as current block:
The two-dimemsional number to be encoded of h × v size is obtained from current chroma component sub-frame by the sequence of raster scanning According to block.According to the BP of write-in code stream in step (2)MODEData block dividing unit is obtained, BP in the present embodimentMODEValue is 0b0001, Data block dividing unit is 8 × 4, the data amount check h that corresponding horizontal direction dividesPIt is 8, the number that corresponding vertical direction divides According to number vPIt is 4.In Y-component subframe, including the block size of right margin was 6 × 4 (h is equal to 6, v and is equal to 4), other pieces big Small is all basic division size 8 × 4 (h is equal to 8, v and is equal to 4);In U component sub-frames, including the block size of right margin is 3 × 4 (h is equal to 3, v and is equal to 4), other pieces of size is all basic division size 8 × 4;In V component subframe, include the block of right margin Size was 3 × 4 (h is equal to 3, v and is equal to 4), and other pieces of size is all to divide size 8 × 4 substantially.
(5) coding information and reconstruction data of the current block under each effective candidate coding pattern are calculated, and is chosen final Coding mode and reconstruction data.In order to improve computation complexity of the video compress than the selection of, reduction mode and obtain good regard Frequency picture quality, the present embodiment carry out model selection with method according to the following steps, with preferred final coding mode, and obtain final Rebuild data:
(5-1) is if SO_MODE is effective candidate coding pattern of current block or for from the consecutive identical list of current BOB(beginning of block) It is worth effective candidate coding pattern of block, then the final coding mould of the continuous blocks directly as current block or from current BOB(beginning of block) Formula, and by the reconstruction data group under the pattern at the final reconstructed block of corresponding position, and termination pattern selects in advance.
(5-2) if IC_MODE be current block effective candidate coding pattern and current block there are non-zero quantised residual error, press Formula (13) calculates the bit number CBits that current block uses the pattern-coding that need to consumeIC;If IC_MODE is the effective of current block Whether the quantization residual error of candidate coding pattern and current block is zero, then be also IC_ from next BOB(beginning of block) detection subsequent block MODE quantifies residual error stand growth model, until detecting quantization residual error non-full zero block or the last one block, and directly by IC_MODE The final coding mode of continuous blocks as current block or from current BOB(beginning of block), by the reconstruction data group under the pattern at corresponding position The final reconstructed block set, and termination pattern selects in advance;
(5-3) if HP_MODE be current block effective candidate coding pattern and current block there are non-zero quantised residual error, press Formula (22) calculates the bit number CBits that current block uses the pattern-coding that need to consumeHP;If HP_MODE is the effective of current block The quantization residual error of candidate coding pattern and current block is zero, then directly as the final coding mode of current block, and will The reconstructed block of reconstruction data composition current block under the pattern, and termination pattern selects in advance.
(5-4) if VP_MODE be current block effective candidate coding pattern and current block there are non-zero quantised residual error, press Formula (28) calculates the bit number CBits that current block uses the pattern-coding that need to consumeVP;If VP_MODE is the effective of current block The quantization residual error of candidate coding pattern and current block is zero, then directly as the final coding mode of current block, and will The reconstructed block of reconstruction data composition current block under the pattern, and termination pattern selects in advance.
(5-5) if AP_MODE be current block effective candidate coding pattern and current block there are non-zero quantised residual error, press Formula (53) calculates the bit number CBits that current block uses the pattern-coding that need to consumeAP;If AP_MODE is the effective of current block The quantization residual error of candidate coding pattern and current block is zero, then directly as the final coding mode of current block, and will The reconstructed block of reconstruction data composition current block under the pattern, and termination pattern selects in advance.
(5-6) is if HP_MODE is unsatisfactory for the requirement as the effective candidate coding pattern of current block or its CBitsHPIt is more than TH1 then calculates the coding information for carrying out prediction quantization to current block using CH_MODE first, if then CH_MODE satisfactions become The condition of the effective candidate coding pattern of current block, then calculated by formula (37) and coding needs are carried out to current block using CH_MODE The bit number CBits of consumptionCH.TH1 takes h × v × QPBits in the present embodimentCH/2;Current block volume often capable at CH_MODE Code mode RowModeCHIt is determined according to formula (64), the TH of formula (64) in the present embodimentCHTake 4.
(5-7) is if VP_MODE is unsatisfactory for the requirement as the effective candidate coding pattern of current block or its CBitsVPIt is more than TH2 then calculates the coding information for carrying out prediction quantization to current block using VP_MODE first, if then VP_MODE satisfactions become The condition of the effective candidate coding pattern of current block, then calculated by formula (46) and coding needs are carried out to current block using CV_MODE The bit number CBits of consumptionCV.TH2 takes h × v × QPBits in the present embodimentCV/2;The volume of current block each column at CV_MODE Code mode ColModeCVIt is determined according to formula (65), the TH of formula (65) in the present embodimentCVTake 6.
(5-8) is if DQ_MODE determines whether current block calculates DQ_MODE using whole quantification manners, by formula (66) Quantization and rebuild data, the present embodiment takes coefficient of comparisons η in formula (66) to be taken as 0.5;If DQ_MODE uses the level amount of halving Change mode then determines whether current block calculates quantization and the reconstruction data of DQ_MODE by formula (67).Current block passes through formula (66) or after formula (67) judgement, if ENDQ1Or ENDQ2Value is 1, then needs the quantization for calculating DQ_MODE and rebuild data, and press Formula (57) or (63) are calculated carries out the bit number CBits that coding needs consume using DQ_MODE to current blockDQ, value is CBitsDQ1Or CBitsDQ2
(5-9) is selected finally to compile from the effective candidate coding pattern estimated by the minimum principle of consumption number of coded bits Pattern, it is identical in number of coded bits, select coding mode ident value smaller as final coding mode;It will be final Reconstruction data group under coding mode provides prediction reference at the final reconstructed block of corresponding position for the coding of subsequent block.
(6) coding information of current block is written by code stream according to the final coding mode of current block, specific point or less eight kinds Situation:
If the final coding mode of current block is IC_MODE code stream is written as follows in coding information by (6-1):
(a) coding mode that write-in 2 bit of code stream indicates identifies ModeIDIC, value 0b00.
(b) stand growth model that write-in 1 bit of code stream indicates identifies AZBFlagIC
If (c) AZBFlagICValue is 0b1, then shows that current block is quantization residual error stand growth model, jump to step (f), otherwise table There is quantization residual error non-zero in bright current block, execute next step.
(d) the quantization residual error number of bits QDBits for indicating 3 bitsICCode stream is written.
(e) sequence of raster scanning is first pressed by all prediction residual symbol Sign of current blockICCode stream is written, each SignICIt is indicated with 1 bit;Again in the same order by all quantization residual error QD of current blockICCode stream, each QD is writtenICWith QDBitsICA bit indicates;In all SignICAnd QDICIt is all written after code stream, terminates the code stream write-in of current block.
(f) the consecutive identical monodrome block identification ContiFlag that write-in 1 bit of code stream indicatesIC
If (g) ContiFlagICValue is 0b0, and expression is encoded to individually quantifying residual error stand growth model, then terminates current block Coding.If ContiFlagICValue is 0b1, indicates the ContiCnt from current BOB(beginning of block)ICThe coding mode of a consecutive data block All it is IC_MODE and is all quantization residual error stand growth model, then first by ContiCntICNumber of coded bits mark ContiCntBitsIdxICCode stream is written using 2 bits, then by ContiCntICSubtract 1 and uses ContiCntBitsICIt is a to compare feature Enter code stream.
(6-2) as follows believes coding if the final coding mode of current block is monodrome raw mode SO_MODE Breath write-in code stream:
(a) coding mode that 2 bits of write-in indicate identifies ModeIDSO
(b) the monodrome coding mode CodPsFlag that 1 bit of write-in indicatesSO
If (c) CodPsFlagSOValue is equal to 0b1, then the single-value data P indicated 8 bitssCode stream is written;If CodPsFlagSOValue be equal to 0b0, show the adjacent top coded block of current block space final coding mode be SO_MODE and The single-value data P of its single-value data and current blocksIt is equal, therefore not by PsCode stream is written.
(d) the consecutive identical monodrome block identification ContiFlag that 1 bit of write-in indicatesSO
If (e) ContiFlagSOValue is equal to 0b0, indicates only to encode current block, then terminates the coding of current block;If ContiFlagSOValue is equal to 0b1, indicates the ContiCnt from current BOB(beginning of block)SOThe coding mode of a consecutive data block is all SO_ The ContiCnt of 2 bits expression is then first written in MODE and their monodrome is all equalSONumber of coded bits identifies ContiCntBitsIdxSO, then by ContiCntSOSubtract 1 and uses ContiCntBitsSOA bit indicates write-in code stream.
(6-3) as follows believes coding if the final coding mode of current block is horizontal point-by-point pattern HP_MODE Breath write-in code stream:
(a) coding mode that write-in 3 bit of code stream indicates identifies ModeIDHP
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesHP
If (c) QDBitsHPValue is 0, then terminates the code stream write-in of current block;If QDBitsHPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockHPCode stream, each Sign is writtenHPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockHPCode stream, each QD is writtenHPUse QDBitsHPA bit indicates.
(6-4) is if the final coding mode of current block is vertical point-by-point pattern VP_MODE, as follows by current block Coding information be written code stream:
(a) coding mode that write-in 3 bit of code stream indicates identifies ModeIDVP, binary value 0b101.
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesVP
If (c) QDBitsVPValue is 0, then terminates the code stream write-in of current block;If QDBitsVPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockVPCode stream, each Sign is writtenVPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockVPCode stream, each QD is writtenVPUse QDBitsVPA bit indicates.
(6-5) is if the final coding mode of current block is level of complexity pattern CH_MODE, as follows by current block Coding information be written code stream:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDCH
(b) sequence from top to bottom is pressed by the coding mode RowMode of each row of dataCHCode stream is written, often goes RowModeCHIt is indicated with 1 bit.
(c) according to RowModeCHThree kinds of situations of distribution point of value or less are encoded:
(c-1) if the RowMode of all write-in code streamsCHValue is all 0b1, then owns current block by the sequence of raster scanning Quantized data QPCHCode stream, each QP is writtenCHUse QPBitsCHA bit indicates.
(c-2) if the RowMode of write-in code streamCHValue is all 0b0, then the quantization residual error ratio indicated with 3 bits is written first Special digit QDBitsCH;If then QDBitsCHMore than 0, then the sequence of raster scanning is first pressed by all prediction residuals of current block Symbol SignCHCode stream, each Sign is writtenCHIndicated with 1 bit, then by raster scanning sequence by all quantizations of current block Residual error QDCHCode stream, each QD is writtenCHUse QDBitsCHA bit indicates.
(c-3) if the RowMode of write-in code streamCHValue is 0b0 and is that 0b1 exists, then write-in first is indicated with 3 bits Quantify residual error number of bits QDBitsCH;If then QDBitsCHMore than 0, then first current block is owned by the sequence of raster scanning Prediction residual symbol SignCHCode stream, each Sign is writtenCHIndicated with 1 bit, then by raster scanning sequence by current block All quantization residual error QDCHCode stream, each QD is writtenCHUse QDBitsCHA bit indicates;The sequence for finally pressing raster scanning will All quantized data QP of current blockCHCode stream, each QP is writtenCHUse QPBitsCHA bit indicates.
(6-6) is if the final coding mode of current block is complicated vertical pattern CV_MODE, as follows by current block Coding information be written code stream:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDCV
(b) sequence from left to right is pressed by each column coding mode ColModeCVCode stream, the ColMode of each column is writtenCVIn code It is indicated with 1 bit in stream.
(c) according to ColModeCVThree kinds of situations of distribution point of value or less are encoded:
(c-1) if the ColMode of all write-in code streamsCVValue is all 0b1, then presses the sequence of raster scanning by all quantizations Data QPCVCode stream, each QP is writtenCVUse QPBitsCVA bit indicates.
(c-2) if the ColMode of all write-in code streamsCVValue is all 0b0, then it is residual that the quantization indicated with 3 bits is written first Poor number of bits QDBitsCV;If then QDBitsCVMore than 0, then the sequence of raster scanning is first pressed by all predictions of current block Sign of the residues SignCVCode stream, each Sign is writtenCVIt is indicated with 1 bit, then quantization in the same order that current block is all Residual error QDCVCode stream, each QD is writtenCVUse QDBitsCVA bit indicates.
(c-3) if the ColMode of write-in code streamCVValue is 0b0 and is that 0b1 exists, then write-in first is indicated with 3 bits Quantify residual error number of bits QDBitsCV;If then QDBitsCVMore than 0, then first current block is owned by the sequence of raster scanning Prediction residual symbol SignCVCode stream, each Sign is writtenCVIt is indicated with 1 bit, then in the same order owns current block Quantization residual error QDCVCode stream, each QD is writtenCVUse QDBitsCVA bit indicates;The sequence for finally pressing raster scanning will be current All quantized data QP of blockCVCode stream, each QP is writtenCVUse QPBitsCVA bit indicates.
(6-7) as follows will if the final coding mode of current data block is adaptive point-by-point Mode A P_MODE Code stream is written in the coding information of current block:
(a) coding mode that write-in 4 bit of code stream indicates identifies ModeIDAP
(b) the quantization residual error number of bits QDBits that write-in 3 bit of code stream indicatesAP
If (c) QDBitsAPValue is 0, then terminates the code stream write-in of current block;If QDBitsAPValue is more than 0, then first presses grating The sequence of scanning is by all prediction residual symbol Sign of current blockAPCode stream, each Sign is writtenAPIt is indicated, then pressed with 1 bit Identical sequence is by all quantization residual error QD of current blockAPCode stream, each QD is writtenAPUse QDBitsAPA bit indicates.
(6-8) will be compiled as follows if the final coding mode of current data block is direct quantitative mode DQ_MODE Code stream is written in code information:
(a) coding mode that 4 bits of write-in indicate identifies ModeIDDQ
If (b), DQ_MODE is using the realization method that all quantifies, by the sequence of raster scanning by all quantized datas QPDQ1Code stream, each QP is writtenDQ1Use QPBitsDQ1A bit indicates;If DQ_MODE uses the realization method for halving quantization, By the sequence of raster scanning by all quantized data QPDQ2Code stream, each QP is writtenDQ2Use QPBitsDQ2A bit indicates.
(7) it repeats step (4) and arrives (6), complete the coding of all data blocks and reconstruction in current chroma component sub-frame.
(8) bit padding is carried out to realize byte-aligned to the code stream that current video frame has been written into:If present frame has been written into The total bit number TotalBits of code stream is not 8 multiple, then toward code stream tail portion filling bit 0, filling number subtracts rem for 8 (rem is the remainder that TotalBits is obtained by 8 remainders), code stream becomes byte-aligned after filling;If the encoded code of present frame Stream total bit number TotalBits is 8 multiple, then without bit padding.
(9) it repeats step (3) and arrives (8), complete the coding of all chromatic component subframes and reconstruction in current video frame.
(10) frame synchronization head escape processing is carried out to the code stream that current video frame generates, exports final compressed bit stream:It is right Each byte after the frame sync identifications of present frame code stream reads the byte and the thereafter data of 3 bytes, composition 4 in order (byte first read is placed on the higher bit bit byte of FourBytes to byte data FourBytes, that is, presses big end pattern and form FourBytes), when FourBytes values are 0xFFFFFFFD, then a byte data is inserted into after 0xFD in code stream, is worth and is 0x00;When FourBytes values be 0xFFFFFFFE, then the 0xFE in code stream is replaced with into 0xFD, and one is inserted into after 0xFD A byte data is worth for 0x01;The code stream of current video frame exports its final compressed bit stream after escape is handled.

Claims (21)

1. a kind of screen video compression method towards digital KVM switcher, which is characterized in that include the following steps:
(1) a frame screen video data are inputted:
The one frame screen video data refer to that a frame of KVM switcher acquisition uses the screen video figure of YUV chrominance spaces The pixel resolution of picture, the frame image is H0×V0, it is divided into three chromatic component subframes, all Y-component datas form H1×V1 Y-component subframe, all U component datas form H2×V2U component sub-frames, all V component data form H3×V3V component Subframe;
(2) code stream is written into the frame originating point information of current video frame, the frame originating point information includes:
The frame synchronization leader of 4 byte representations knows SyncF, first three byte value is 0xFF, and the 4th byte value is 0xFE;
The resolution ratio for the present frame screen video image that 6 bits indicate identifies PicR, and value range is 1 to 24, Mei Gequ It is worth corresponding digital kvm system screen video image horizontal resolution H0With vertical resolution ratio V0It is as follows;
The chrominance space format identification (FID) ColorF that 3 bits indicate, the chrominance space format that characterization current video frame specifically uses, Value is that 0b000 indicates to use YUV420 formats, is worth and indicates to use YUV422 formats for 0b001, is worth and indicates to use for 0b010 YUV444 formats reserve 5 numerical value of 0b011 to 0b111;
The data block partition mode that 4 bits indicate identifies BPMODE, characterization is to the progress data block division of each chromatic component subframe Base unit hp×vp, it is worth and indicates to use 4 × 4 partition modes for 0b0000, is worth and indicates to divide mould using 8 × 4 for 0b0001 Formula is worth and indicates to use 4 × 8 partition modes for 0b0010, is worth and indicates to use 8 × 8 partition modes for 0b0011, reserves from 0b0100 To 12 numerical value of 0b1111;
The enabled mark TP of inter-prediction that 1 bit indicatesEN, value is that 0b0 indicates that the coding of present frame does not allow to use interframe Prediction, value are that 0b1 indicates that the coding of present frame allows to use inter-prediction;
The frame level image quality mode PicQ that 2 bits indicate characterizes the subjective quality grade of present frame coding and rebuilding image, Value is that 0b00 indicates lossless mode, is worth and damages clear pattern for 0b01 expressions, is worth and damages balanced mode for 0b10 expressions, reserves 0b11;If it is 1 that present frame, which uses lossless mode, frame level quantization step QStep values,;If present frame uses and damages clear mould Formula, then its frame level quantization step QStep value is 2;If present frame is using balanced mode is damaged, frame level quantization step is QStep values are 4;The frame level quantization shift amount shift of present frame is that QStep takes the integer that logarithm obtains by 2;
The frame number FrameN that 16 bits indicate;
(3) a uncoded chromatic component subframe is obtained from current video frame as current chroma component sub-frame, by current color Degree component sub-frame is divided into the two-dimensional rectangle data block to be encoded of multiple h × v sizes, and calculates the total number of its data block Nblk
(4) it presses from the sequence of raster scanning and obtains a uncoded two-dimensional rectangle data block work from current chroma component sub-frame For current block;
(5) it calculates coding information of the current block under each candidate coding pattern and rebuilds data, and from effective candidate code mould Final coding mode and final reconstruction data are chosen in formula;
(6) coding information of current block is written by code stream according to the final coding mode of current block;
(7) it repeats step (4) to (6) and completes the coding of all data blocks and reconstruction in current chroma component sub-frame;
(8) bit padding is carried out to realize byte-aligned to the code stream that current video frame has been written into;
(9) it repeats step (3) to (8) and completes the coding of all chromatic component subframes and reconstruction in current video frame;
(10) frame synchronization head escape processing is carried out to the code stream that current video frame generates, exports final compressed bit stream.
2. screen video compression method as described in claim 1, which is characterized in that frame originating point information is by such as in the step (2) Under be sequentially written in code stream:
Frame sync identifications SyncF is written in (2-1) from byte-aligned;
(2-2) is written image resolution ratio and identifies PicR;
Chrominance space format identification (FID) ColorF is written in (2-3);
(2-4) writing data blocks partition mode identifies BPMODE
The enabled mark TP of inter-prediction is written in (2-5)EN
Frame level image quality mode PicQ is written in (2-6);
Frame number FrameN is written in (2-7).
3. screen video compression method as described in claim 1, which is characterized in that the step (3) comprises the following steps:
(3-1) presses uncoded chromatic component of sequence acquisition one of Y-component subframe, U component sub-frames, V component subframe first Frame, HkAnd VkRespectively for current chroma component sub-frame in the horizontal direction with the data amount check on vertical direction, k is current chroma point The index of quantum frame, k values are 1 expression Y-component subframe, and k values are 2 expression U component sub-frames, and k values indicate V component subframe for 3;
(3-2) is then according to BPMODEIt obtains data block and divides base unit hp×vp, hpFor horizontal direction divide data amount check, vpThe data amount check divided for vertical direction;
(3-3) and then base unit h is divided according to data blockp×vpCurrent chroma component sub-frame is drawn by the sequence of raster scanning It is divided into the two-dimensional rectangle data block to be encoded of multiple h × v sizes, h and v are respectively to pass through the data block divided in the horizontal direction Data amount check on upper and vertical direction;
The data block number H of current chroma component sub-frame horizontal direction is finally calculated in (3-4) by formula (1)blk, by formula (2) the data block number V of current chroma component sub-frame vertical direction is calculatedblk, current chroma is calculated by formula (3) The data block total number N of component sub-frameblk
Nblk=Hblk×Vblk (3)。
4. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes interframe associative mode IC_MODE:
It is encoded using the pattern, for current each initial data P in the block, predicted value PredICFor previous coded frame In the reconstruction data of identical chromatic component subframe and same spatial location, prediction residual DICIt is calculated, predicts by formula (4) Sign of the residues SignICIt is calculated by formula (5), quantifies residual error QDICIt is calculated by formula (6), formula (7) and formula (8) It arrives, rebuild data RICIt is calculated by formula (9);In formula (5), SignICValue be 0 expression prediction residual symbol be just, Value is that the symbol of 1 expression prediction residual is negative;In formula (6), QDIC TmpQuantify residual error, calculating process temporarily for IC_MODE The quantization step QStep2 that halves used is calculated by formula (8), is halved shift amount shift2 and is taken logarithm by 2 by QStep2 It is calculated;In formula (7), work as QDICValue is 1 and QStep2 values when being 2, by QDICPressure is set to 0, it is other in the case of QDIC It remains unchanged;In formula (8), QStep is frame level quantization step;
DIC=P-PredIC (4)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The IC_MODE coding modes that 2 bits indicate identify ModeIDIC, value 0b00;
The stand growth model that 1 bit indicates identifies AZFlagIC, value 0b0, there are non-zero QD for expression current blockIC, value 0b1, Indicate the QD of current blockICIt is all zero;
The each QD of current block that 3 bits indicateICNumber of coded bits QDBitsIC, which only need to be in AZFlagICValue To be incorporated into code stream when 0b0, value is calculated by formula (10), QD in formulaIC maxFor all QD of current blockICIn maximum value;
The Sign that 1 bit indicatesICAnd QDBitsICThe QD that a bit indicatesIC, all Sign of current blockICAnd QDICIt only need to be QDBitsICIt is incorporated into code stream when more than 0;
The consecutive identical monodrome block identification ContiFlag that 1 bit indicatesIC, value is that 0b0 indicates only to carry out current stand growth model Coding, value are that 0b1 is indicated to the continuous ContiCnt from current BOB(beginning of block)ICA stand growth model is encoded, and the coding information is only It need to be in AZFlagICValue is incorporated into code stream when being 0b1;
ContiCntBitsICThe ContiCnt that a bit indicatesICValue after subtracting 1, wherein ContiCntBitsICBy formula (11) It is calculated, which only need to be in ContiFlagICValue is incorporated into code stream when being 0b1;
The ContiCntBits that 2 bits indicateICCode identification ContiCntBitsIdxIC, ContiCntBitsIdxICBy public affairs Formula (12) is calculated, which only need to be in ContiFlagICValue is incorporated into code stream when being 0b1;
According to the above coding information, using IC_MODE the continuous blocks of current block or current BOB(beginning of block) are carried out with the volume of coding consumption Code bit number CBitsICIt is calculated by formula (13), and current block selects IC_MODE as its effective candidate coding pattern It needs to meet two conditions, first condition is the enabled mark TP of inter-prediction that present frame has been written into code streamENValue is 0b1, the Two conditions are QDBitsICNo more than 7;
5. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes monodrome raw mode SO_MODE:
It is encoded using the pattern, current block is without predicting and quantifying, and all initial data and all reconstruction data are all It is equal, it is denoted as monodrome PS
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The SO_MODE coding modes that 2 bits indicate identify ModeIDSO, it is worth for 0b01;
The monodrome coding mode CodPsFlag that 1 bit indicatesSO, value is that 0b0 indicates the adjacent upper block of current block space Coding mode is SO_MODE and the monodrome P of upper blockSWith the monodrome P of current blockSIt is equal, the monodrome P of current blockSIt is not incorporated into code Stream, decoding end obtain P from upper blockS, value is the monodrome P that 0b1 indicates current blockSIt will be incorporated into code stream, decoding end is directly from code stream Obtain PS
The monodrome P that 8 bits indicateS, the coding information is only in CodPsFlagSOValue is incorporated into code stream when being 0b1;
The consecutive identical monodrome block identification ContiFlag that 1 bit indicatesSOIt is incorporated into code stream, value is that 0b0 indicates there was only current block It is incorporated into code stream, current block end-of-encode, value is continuous ContiCnt of the 0b1 expressions headed by current blockSOA block uses SO_ MODE carries out the P between coding and each pieceSEqual, following coding information is also incorporated into code stream by current block;
ContiCntBitsSOThe ContiCnt that a bit indicatesSOValue after subtracting 1, ContiCntBitsSOIt is calculated by formula (14) It obtains, the coding information is only in ContiFlagSOValue be 0b1 when be incorporated into code stream;
The ContiCntBits that 2 bits indicateSOCode identification ContiCntBitsIdxSO, ContiCntBitsIdxSOWith ContiCntBitsSOCorrespondence such as formula (15) shown in;
According to the above coding information, using SO_MODE the continuous blocks of current block or current BOB(beginning of block) are carried out with the volume of coding consumption Code bit number CBitsSOIt is calculated by formula (16), current block selects SO_MODE to only have as its effective candidate coding pattern One condition, that is, it is monodrome block to require current block, and all initial data are equal;
CBitsSO=2+1+8 × CodPsFlagSO+1+ContiFlagSO×(2+ContiCntBitsSO) (16)。
6. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes horizontal point-by-point pattern HP_MODE:
It is encoded using the pattern, to current each initial data P in the block, when P is in a left side for current chroma component sub-frame Boundary, then the predicted value Pred of PHPIt is 128, otherwise PredHPAll it is the reconstruction data R of the spaces P adjacent left-hand positionL;The prediction of P Residual error DHPIt is calculated by formula (17), prediction residual symbol SignHPIt is calculated by formula (18), quantifies residual error QDHPBy public affairs Formula (19) is calculated, rebuilds data RHPIt is calculated by formula (20);
DHP=P-PredHP (17)
QDHP=(| DHP|+(QStep > > 1)) > > shift (19)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The coding mode for the HP_MODE that 3 bits indicate identifies ModeIDHP, it is worth for 0b100;
The each QD of current block that 3 bits indicateHPNumber of coded bits QDBitsHP, value is calculated by formula (21), QDHP maxFor all QD of current blockHPIn maximum value;
The Sign that 1 bit indicatesHPAnd QDBitsHPThe QD that a bit indicatesHP, all Sign of current blockHPAnd QDHPIt only need to be QDBitsHPIt is incorporated into code stream when more than 0;
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using HP_MODEHPBy formula (22) it is calculated, current block selects HP_MODE, and as its effective candidate coding pattern, only there are one conditions, i.e. QDBitsHPNo More than 7;
7. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes vertical point-by-point pattern VP_MODE:
It is encoded using the pattern, to current each initial data P in the block, when P is in the upper of current chroma component sub-frame Boundary, then the predicted value Pred of PVP128 are set as, otherwise PredVPAll it is the reconstruction data R of the spaces P position adjacent and aboveU;P's is pre- Survey residual error DVPIt is calculated by formula (23), prediction residual symbol SignVPIt is calculated by formula (24), quantifies residual error QDVPIt presses Formula (25) is calculated, rebuilds data RVPIt is calculated by formula (26);
DVP=P-PredVP (23)
QDVP=(| DVP|+(QStep > > 1)) > > shift (25)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The coding mode for the VP_MODE that 3 bits indicate identifies ModeIDVP
The each QD of current block that 3 bits indicateVPNumber of coded bits QDBitsVP, value is calculated by formula (27), QDVP maxFor all QD of current blockVPIn maximum value;
The Sign that 1 bit indicatesVPAnd QDBitsVPThe QD that a bit indicatesVP, all Sign of current blockVPAnd QDVPIt only need to be QDBitsVPIt is incorporated into code stream when more than 0;
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using VP_MODEVPBy formula (28) it is calculated, current block selects VP_MODE, and as its effective candidate coding pattern, only there are one conditions, i.e. QDBitsVPNo More than 7;
8. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes level of complexity pattern CH_MODE:
It is encoded using the pattern, each row of data selection horizontal forecast quantification manner of current block or direct quantification manner carry out Coding:
In all data lines using horizontal forecast quantification manner, to each initial data P, when P is in current chroma component The left margin of subframe, then the predicted value Pred of PCH128 are set as, otherwise PredCHAll it is the reconstruction number of the spaces P adjacent left-hand position According to RL;The prediction residual D of PCHIt is calculated by formula (29), prediction residual symbol SignCHIt is calculated, quantifies by formula (30) Residual error QDCHIt is calculated by formula (31), rebuilds data RCHIt is calculated by formula (32);
In all data lines using direct quantification manner, each of which initial data P directly presses formula (33) and calculates quantization number According to QPCH, and by the reconstruction data R of formula (34) calculating PCH
DCH=P-PredCH (29)
QDCH=(| DCH|+(QStep > > 1)) > > shift (31)
QPCH=(P+ (QStep > > 1)) > > shift (33)
RCH=QPCH< < shift (34)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The CH_MODE coding modes that 4 bits indicate identify ModeIDCH, it is worth for 0b1100;
The row coding mode RowMode that often 1 bit of row indicatesCH, it is worth and indicates that current line uses horizontal forecast quantification manner for 0b0 It is encoded, value is that 0b1 indicates that current line is encoded using direct quantification manner;
The each QD of current block that 3 bits indicateCHNumber of coded bits QDBitsCH, it is calculated by formula (35), QDCH maxFor All QD of current blockCHIn maximum value, QDBitsCHOnly there need to be the data line using horizontal forecast quantification manner in current block In the case of be incorporated into code stream;
The Sign that 1 bit indicatesCHAnd QDBitsCHThe QD that a bit indicatesCH, all SignCHAnd QDBitsCHOnly need QDBitsCHIt is incorporated into code stream in the case of more than 0;
QPBitsCHThe QP that a bit indicatesCH, wherein QPBitsCHIt is calculated by formula (36), all QPCHIt only need to be in current block It is incorporated into code stream in the case of in the presence of the data line using direct quantification manner;
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using CH_MODECHBy formula (37) it is calculated, n is the number of data lines that current block selects direct quantification manner in formula;Current block selects CH_MODE as it The unique conditional of effective candidate coding pattern is QDBitsCHNo more than 7;
QPBitsCH=8-shift (36)
9. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes complicated vertical pattern CV_MODE:
It is encoded using the pattern, the vertical prediction quantification manner of every column data selection of current block or direct quantification manner carry out Coding:
In all data row using vertical prediction quantification manner, to each initial data P, when P is in current chroma component The coboundary of subframe, then the predicted value Pred of PCV128 are set as, otherwise PredCVAll it is the reconstruction number of the spaces P position adjacent and above According to RU;The prediction residual D of PCVIt is calculated by formula (38), prediction residual symbol SignCVIt is calculated, quantifies by formula (39) Residual error QDCVIt is calculated by formula (40), rebuilds data RCVIt is calculated by formula (41);
In using all data of direct quantification manner row, each of which initial data P directly presses formula (42) and calculates quantization number According to QPCV, and by the reconstruction data R of formula (43) calculating PCV
DCV=P-PredCV (38)
QDCV=(| DCV|+(QStep > > 1)) > > shift (40)
QPCV=(P+ (QStep > > 1)) > > shift (42)
RCV=QPCV< < shift (43)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The CV_MODE coding modes that 4 bits indicate identify ModeIDCV, it is worth for 0b1101;
The row coding mode ColMode that 1 bit of each column indicatesCV, it is worth and is indicated for 0b0 when forefront is using vertical prediction quantification manner It is encoded, value is that 0b1 is indicated when forefront is encoded using direct quantification manner;
The each QD of current block that 3 bits indicateCVNumber of coded bits QDBitsCV, it is calculated by formula (44), QDCV maxFor All QD of current blockCVIn maximum value, QDBitsCVOnly there need to be the data row using vertical prediction quantification manner in current block In the case of be incorporated into code stream;
The Sign that 1 bit indicatesCVAnd QDBitsCVThe QD that a bit indicatesCV, all SignCVAnd QDBitsCVOnly need QDBitsCVIt is incorporated into code stream in the case of more than 0;
QPBitsCVThe QP that a bit indicatesCV, wherein QPBitsCVIt is calculated by formula (45), all QPCVIt only need to be in current block It is incorporated into code stream in the case of in the presence of the data row using direct quantification manner;
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using CV_MODECVBy formula (46) it is calculated, m is the data columns that current block selects direct quantification manner in formula;Current block selects CV_MODE as it The unique conditional of effective candidate coding pattern is QDBitsCVNo more than 7;
QPBitsCV=8-shift (45)
10. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes adaptive point-by-point Mode A P_MODE:
It is encoded using the pattern, to current each initial data P in the block, predicted value PredAPIt is calculated by formula (47) It obtains, the prediction residual D of PAPIt is calculated by formula (48), prediction residual symbol SignAPIt is calculated, measures by formula (49) Change residual error QDAPIt is calculated by formula (50), rebuilds data RAPIt is calculated by formula (51);In formula (47), RLFor P skies Between the reconstruction data of adjacent left-hand position, RUFor the spaces P the reconstruction data of position, R adjacent and aboveULFor the adjacent upper left position in the spaces P The reconstruction data set;
DAP=P-PredAP (48)
QDAP=(| DAP|+(QStep > > 1)) > > shift (50)
It is encoded using the pattern, needs further exist for following coding information being incorporated into code stream:
The AP_MODE coding modes that 4 bits indicate identify ModeIDAP, it is worth for 0b1110;
The each QD of current block that 3 bits indicateAPNumber of coded bits QDBitsAP, value is calculated by formula (52), QDAP maxFor all QD of current blockAPIn maximum value;
The Sign that 1 bit indicatesAPAnd QDBitsAPThe QD that a bit indicatesAP, all Sign of current blockAPAnd QDAPIt only need to be QDBitsAPIt is incorporated into code stream when more than 0;
According to the above coding information, the number of coded bits CBits of coding consumption is carried out to current block using AP_MODEAPBy formula (53) it is calculated, current block selects AP_MODE as its effective candidate coding pattern there are two condition, and first condition is to work as The preceding piece of coboundary data and left margin data for not including current chroma component sub-frame, second condition are QDBitsAPIt is not more than 7;
11. screen video compression method as described in claim 1, which is characterized in that the candidate code mould in the step (5) Formula includes direct quantitative mode DQ_MODE:
It is encoded using the pattern, current block is without prediction, if the PicQ values in frame level coding information are 2 and current chroma Component sub-frame is Y-component subframe, then the pattern halves quantification manner using level and realizes, otherwise the pattern is using all quantization sides Formula is realized;
When DQ_MODE uses whole quantification manners, to each initial data P in current block, the quantization of P is first calculated by formula (54) Data QPDQ1, then calculated by formula (55) and rebuild data RDQ1
When the whole quantification manners of DQ_MODE uses, need further exist for following coding information being incorporated into code stream:
The coding mode for the DQ_MODE that 4 bits indicate identifies ModeIDDQ, it is worth for 0b1111;
QPBitsDQ1The QP that a bit indicatesDQ1, quantized data number of coded bits QPBitsDQ1It is calculated by formula (56);
According to the above coding information, DQ_MODE carries out current block using whole quantification manners the number of coded bits of coding consumption CBitsDQ1It is calculated by formula (57);
QPDQ1=(P+ (QStep > > 1)) > > shift (54)
RDQ1=QPDQ1< < shift (55)
QPBitsDQ1=8-shift (56)
CBitsDQ1=4+h × v × QPBitsDQ1 (57)
When DQ_MODE halves quantification manner using level, then current block is first often taken by sequence from left to right in the horizontal direction Adjacent two data P(2*i,j)And P(2*i+1,j), their mean value is calculated as a new data P '(i,j), as shown in formula (58), I and j is respectively the horizontal position index and vertical position index of new data block, for being in the number of chromatic component subframe right margin According to block, if its h be odd number, often go the last one P(2*i,j)There is no paired P(2*i+1,j), then directly by P '(i,j)It is set as P(2*i,j);All P ' compositions new data blocks that current block obtains after the resolution ratio of horizontal direction halves, in new data block Each data P ', first calculates its quantized data QP by formula (59)DQ2, then calculate it by formula (60) and rebuild data R ', finally press Formula (61) calculates P corresponding with P '(2*i,j)And P(2*i+1,j)Two rebuild data RDQ2 (2*i,j)And RDQ2 (2*i+1,j)
P'(i,j)=(P(2*i,j)+P(2*i+1,j)) > > 1 (58)
QPDQ2=(P'+ (QStep > > 1)) > > shift (59)
R'=QPDQ2< < shift (60)
When DQ_MODE halves quantification manner using level, need further exist for following coding information being incorporated into code stream:
The coding mode for the DQ_MODE that 4 bits indicate identifies ModeIDDQ, it is worth for 0b1111;
QPBitsDQ2The QP that a bit indicatesDQ2, quantized data number of coded bits QPBitsDQ2It is calculated by formula (62);
According to the above coding information, DQ_MODE halves the encoding ratio that quantification manner carries out current block coding consumption using level Special number CBitsDQ2It is calculated by formula (63);
QPBitsDQ2=8-shift (62)
CBitsDQ2=4+ ((h+1) > > 1) × v × QPBitsDQ2 (63)。
12. the screen video compression method stated such as any one of claim 4 to claim 11, which is characterized in that the step (5) final coding mode can be chosen according to the following steps:
(5-1) is if SO_MODE is effective candidate coding pattern of current block or for from the consecutive identical monodrome block of current BOB(beginning of block) Effective candidate coding pattern, then the final coding mode of the continuous blocks directly as current block or from current BOB(beginning of block), And by the reconstruction data group under the pattern at the final reconstructed block of corresponding position, and termination pattern selects in advance;
(5-2) if IC_MODE is effective candidate coding pattern of current block and current block there are non-zero quantised residual error, calculating is worked as The bit number CBits that the preceding piece of use pattern-coding need to consumeIC;If IC_MODE be current block effective candidate coding pattern and Whether the quantization residual error of current block is zero, then be also that IC_MODE quantifies residual error complete zero from next BOB(beginning of block) detection subsequent block Block, until detecting quantization residual error non-full zero block or until the last one block, and directly using IC_MODE as current block or from working as The final coding mode of the continuous blocks of preceding BOB(beginning of block), by the reconstruction data group under the pattern at the final reconstruction of corresponding position Block, and termination pattern selects in advance;
(5-3) if HP_MODE is effective candidate coding pattern of current block and current block there are non-zero quantised residual error, calculating is worked as The bit number CBits that the preceding piece of use pattern-coding need to consumeHP;If HP_MODE be current block effective candidate coding pattern and The quantization residual error of current block is zero, then directly as the final coding mode of current block, and by the reconstruction under the pattern Data form the final reconstructed block of current block, and terminate current block model selection in advance;
(5-4) if VP_MODE is effective candidate coding pattern of current block and current block there are non-zero quantised residual error, calculating is worked as The bit number CBits that the preceding piece of use pattern-coding need to consumeVP;If VP_MODE be current block effective candidate coding pattern and The quantization residual error of current block is zero, then directly as the final coding mode of current block, and by the reconstruction under the pattern Data form the final reconstructed block of current block, and terminate current block model selection in advance;
(5-5) if AP_MODE is effective candidate coding pattern of current block and current block there are non-zero quantised residual error, calculating is worked as The bit number CBits that the preceding piece of use pattern-coding need to consumeAP;If AP_MODE be current block effective candidate coding pattern and The quantization residual error of current block is zero, then directly as the final coding mode of current block, and by the reconstruction under the pattern Data form the final reconstructed block of current block, and terminate current block model selection in advance;
(5-6) is unsatisfactory for the condition or its CBits as the effective candidate coding pattern of current block as HP_MODEHPMore than threshold value TH1 then calculates the coding information for carrying out prediction quantization to current block using CH_MODE first, if then CH_MODE satisfactions become The condition of the effective candidate coding pattern of current block, then calculate and the bit that coding needs consume is carried out to current block using CH_MODE Number CBitsCH, the wherein value range of TH1 is [6, h × v × QPBitsCH];Current block coding staff often capable at CH_MODE Formula RowModeCHIt is determined according to formula (64), intermediate value is that 1 expression current line uses direct quantification manner, is worth and indicates current for 0 Row uses horizontal forecast quantification manner,Indicate current line maximum quantization residual error QDCH row-maxIt needs Minimum number of coded bits, threshold value THCHValue range be [0,7];
(5-7) is unsatisfactory for the condition or its CBits as the effective candidate coding pattern of current block as VP_MODEVPMore than threshold value TH2 then calculates the coding information for carrying out prediction quantization to current block using CV_MODE first, if then CV_MODE satisfactions become The condition of the effective candidate coding pattern of current block, then calculate and the bit that coding needs consume is carried out to current block using CV_MODE Number CBitsCV, the wherein value range of TH2 is [6, h × v × QPBitsCV];The coding staff of current block each column at CV_MODE Formula ColModeCVIt is determined according to formula (65), intermediate value is that 1 expression works as forefront using direct quantification manner, is worth and indicates current for 0 Row predict quantification manner using vertical,It indicates to work as forefront maximum quantization residual error QDCV col-maxIt needs Minimum number of coded bits, threshold value THCVValue range be [0,7];
(5-8) is if the DQ_MODE of current chroma component sub-frame determines current block using whole quantification manners according to formula (66) Whether calculate the quantization of DQ_MODE and rebuilds data, ENDQ1Value indicates that current block calculates quantization and the reconstruction number of DQ_MODE for 1 According to, be worth for 0 expression current block do not calculate DQ_MODE quantization and rebuild data, CBitsMINIt indicates to compile in calculated each pattern Code needs the minimum value of consumes bit number;
If the DQ_MODE of current chroma component sub-frame halves quantification manner using level, determine that current block is by formula (67) The no quantization for calculating DQ_MODE and reconstruction data, ENDQ2Value indicates that current block calculates quantization and the reconstruction data of DQ_MODE for 1, Value is that 0 expression current block does not calculate the quantization of DQ_MODE and rebuilds data, TotalBitsYIndicate that current Y-component subframe has disappeared The number of coded bits of consumption, η are coefficient of comparisons, are less than 1.0, typical value ranging from [0.2,0.8];
Current block is after formula (66) or formula (67) judgement, if ENDQ1Or ENDQ2Value is 1, then calculates current block and use DQ_ The quantization of MODE and reconstruction data, and calculate and the bit number CBits that coding needs consume is carried out using DQ_MODEDQ, value is CBitsDQ1Or CBitsDQ2
(5-9) is selected finally to encode mould from the effective candidate coding pattern estimated by the minimum principle of consumption number of coded bits Formula, it is identical in number of coded bits, select coding mode ident value smaller as final coding mode;Current block is existed Reconstruction data group under final coding mode at corresponding position final reconstructed block.
13. screen video compression method as claimed in claim 4, which is characterized in that the step (6) if in current block Final coding mode is interframe associative mode IC_MODE, then code stream is written in coding information as follows:
(a) coding mode is identified into ModeIDICCode stream is written;
(b) stand growth model is identified into AZBFlagICCode stream is written;
If the AZBFlag of code stream (c) is writtenICValue is 0b1, then jumps to step (f);
It (d) will quantization residual error number of bits QDBitsICCode stream is written;
(e) sequence of raster scanning is first pressed by all prediction residual symbol SignICCode stream is written, then in the same order by institute Some quantization residual error QDICCode stream is written, finally terminates the code stream write-in of current block;
(f) the consecutive identical monodrome block identification ContiFlag of write-in code streamICIf ContiFlagICValue is 0b0, then terminates current block Code stream write-in;
(g) first by ContiCntICNumber of coded bits identify ContiCntBitsIdxICCode stream is written, then by ContiCntICSubtract 1 write-in code stream.
14. screen video compression method as claimed in claim 5, which is characterized in that the step (6) if in current block Final coding mode is monodrome raw mode SO_MODE, then code stream is written in coding information as follows:
(a) coding mode is identified into ModeIDSOCode stream is written;
(b) by monodrome coding mode CodPsFlagSOCode stream is written;
If (c) CodPsFlagSOValue is equal to 0b1, then by single-value data PsCode stream is written;
(d) by consecutive identical monodrome block identification ContiFlagSOCode stream is written;
If (e) ContiFlagSOValue is equal to 0b1, then first by ContiCntSONumber of coded bits identify ContiCntBitsIdxSO Code stream is written, then by ContiCntSOThe write-in code stream that subtracts 1.
15. screen video compression method as claimed in claim 6, which is characterized in that the step (6) if in current block Final coding mode is horizontal point-by-point pattern HP_MODE, then code stream is written in coding information as follows:
(a) coding mode is identified into ModeIDHPCode stream is written;
It (b) will quantization residual error number of bits QDBitsHPCode stream is written;
If (c) QDBitsHPValue is more than 0, then first presses the sequence of raster scanning by all prediction residual symbol Sign of current blockHPIt writes Enter code stream, then quantization residual error QD in the same order that current block is allHPCode stream is written.
16. screen video compression method as claimed in claim 7, which is characterized in that the step (6) if in current block Final coding mode is vertical point-by-point pattern VP_MODE, then code stream is written in the coding information of current block as follows:
(a) coding mode is identified into ModeIDVPCode stream is written;
It (b) will quantization residual error number of bits QDBitsVPCode stream is written;
If (c) QDBitsVPValue is more than 0, then first presses the sequence of raster scanning by all prediction residual symbol SignVPCode is written Stream, then in the same order by all quantization residual error QDVPCode stream is written.
17. screen video compression method as claimed in claim 8, which is characterized in that the step (6) if in current block Final coding mode is level of complexity pattern CH_MODE, then code stream is written in the coding information of current block as follows:
(a) coding mode is identified into ModeIDCHCode stream is written;
(b) sequence from top to bottom is pressed by the coding mode RowMode of each row of dataCHCode stream is written;
Or less (c) point code streams are written in three kinds of situations:
(c-1) if the RowMode of all write-in code streamsCHValue is all 0b1, then presses the sequence of raster scanning by all amounts of current block Change data QPCHCode stream is written;
(c-2) if the RowMode of write-in code streamCHValue is all 0b0, then first will quantization residual error number of bits QDBitsCHCode is written Stream;If then QDBitsCHMore than 0, then the sequence of raster scanning is first pressed by all prediction residual symbol Sign of current blockCHIt writes Enter code stream, then quantization residual error QD in the same order that current block is allCHCode stream is written;
(c-3) if the RowMode of write-in code streamCHValue is 0b0 and is that 0b1 exists, then will quantify residual error number of bits first QDBitsCHCode stream is written;If then QDBitsCHMore than 0, then the sequence for first pressing raster scanning is residual by all predictions of current block Poor symbol SignCHCode stream, then quantization residual error QD in the same order that current block is all is writtenCHCode stream is written;Finally press light The sequence of grid scanning is by all quantized data QP of current blockCHCode stream is written.
18. screen video compression method as claimed in claim 9, which is characterized in that the step (6) if in current block Final coding mode is complicated vertical pattern CV_MODE, then code stream is written in its coding information as follows:
(a) coding mode is identified into ModeIDCVCode stream is written;
(b) sequence from left to right is pressed by each column coding mode ColModeCVCode stream is written;
Or less (c) point code streams are written in three kinds of situations:
(c-1) if the ColMode of all write-in code streamsCVValue is all 0b1, then presses the sequence of raster scanning by all quantized datas QPCVCode stream is written;
(c-2) if the ColMode of all write-in code streamsCVValue is all 0b0, then first will quantization residual error number of bits QDBitsCVIt writes Enter code stream;If then QDBitsCVMore than 0, then the sequence of raster scanning is first pressed by all prediction residual symbols of current block SignCVCode stream, then quantization residual error QD in the same order that current block is all is writtenCVCode stream is written;
(c-3) if the ColMode of write-in code streamCVValue is 0b0 and is that 0b1 exists, then will quantify residual error number of bits first QDBitsCVCode stream is written;If then QDBitsCVMore than 0, then the sequence for first pressing raster scanning is residual by all predictions of current block Poor symbol SignCVCode stream, then quantization residual error QD in the same order that current block is all is writtenCVCode stream is written;Finally press light The sequence of grid scanning is by all quantized data QP of current blockCVCode stream is written.
19. screen video compression method as claimed in claim 10, which is characterized in that the step (6) if in current block Final coding mode be adaptive point-by-point Mode A P_MODE, then code stream is written into its coding information as follows:
(a) coding mode is identified into ModeIDAPCode stream is written;
It (b) will quantization residual error number of bits QDBitsAPCode stream is written;
If (c) QDBitsAPValue is more than 0, then first presses the sequence of raster scanning by all prediction residual symbol SignAPCode is written Stream, then in the same order by all quantization residual error QDAPCode stream is written.
20. screen video compression method as claimed in claim 11, which is characterized in that the step (6) if in current block Final coding mode be direct quantitative mode DQ_MODE, then as follows by its coding information be written code stream:
(a) coding mode is identified into ModeIDDQCode stream is written;
If (b), DQ_MODE is using the realization method that all quantifies, by the sequence of raster scanning by all quantized data QPDQ1It writes Enter code stream;If DQ_MODE halves the realization method of quantization using level, by the sequence of raster scanning by all quantized datas QPDQ2Code stream is written.
21. screen video compression method as described in claim 1, which is characterized in that the step (10) is to present frame code Stream carries out frame sync identifications escape processing, and the specific method is as follows:
To each byte after the frame sync identifications of present frame code stream, the byte and the thereafter data of 3 bytes are read in order, 4 byte data FourBytes are formed, wherein first reading byte is placed on higher bit position;When FourBytes values be 0xFFFFFFFD, then A byte data is inserted into after 0xFD in code stream, is worth for 0x00, when FourBytes values are 0xFFFFFFFE, then by code stream In 0xFE replace with 0xFD, and be inserted into a byte data after 0xFD, be worth for 0x01;Decoding end present frame code stream into Must be the last one in 0xFFFFFFFD00 by all continuous five byte values in present frame code stream first before row parsing and reconstruction Byte 0x00 is deleted, and all continuous five byte values is replaced with 0xFE for the 4th byte 0xFD in 0xFFFFFFFD01, and will The last byte 0x01 is deleted.
CN201610447078.7A 2016-06-20 2016-06-20 A kind of screen video compression method towards digital KVM switcher Active CN106101703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610447078.7A CN106101703B (en) 2016-06-20 2016-06-20 A kind of screen video compression method towards digital KVM switcher

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610447078.7A CN106101703B (en) 2016-06-20 2016-06-20 A kind of screen video compression method towards digital KVM switcher

Publications (2)

Publication Number Publication Date
CN106101703A CN106101703A (en) 2016-11-09
CN106101703B true CN106101703B (en) 2018-11-06

Family

ID=57238173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610447078.7A Active CN106101703B (en) 2016-06-20 2016-06-20 A kind of screen video compression method towards digital KVM switcher

Country Status (1)

Country Link
CN (1) CN106101703B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196660A (en) * 2017-04-24 2017-09-22 南京数维康信息科技有限公司 Low power consumption data compression algorithm
CN107801031B (en) * 2017-11-09 2019-10-18 广州物启科技有限公司 A kind of lossless compression-encoding method to pure three primary colors image data
CN109510984B (en) * 2018-10-26 2021-02-05 和宇健康科技股份有限公司 Compression coding quantization method
CN109561306B (en) * 2018-10-26 2021-08-06 上海九吾尊易信息科技有限公司 Bandwidth compression quantization method
CN117121485A (en) * 2021-04-12 2023-11-24 Oppo广东移动通信有限公司 Video encoding and decoding method and system and video encoder and decoder

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984327A (en) * 2006-05-16 2007-06-20 华为技术有限公司 Video-frequency compression method
CN101046735A (en) * 2006-03-30 2007-10-03 华为技术有限公司 Video data compression method
CN101976131A (en) * 2010-10-26 2011-02-16 深圳市云舒网络技术有限公司 Dot interlaced sampling algorithm-based keyboard, video and mouse (KVM) system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7321623B2 (en) * 2002-10-01 2008-01-22 Avocent Corporation Video compression system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046735A (en) * 2006-03-30 2007-10-03 华为技术有限公司 Video data compression method
CN1984327A (en) * 2006-05-16 2007-06-20 华为技术有限公司 Video-frequency compression method
CN101976131A (en) * 2010-10-26 2011-02-16 深圳市云舒网络技术有限公司 Dot interlaced sampling algorithm-based keyboard, video and mouse (KVM) system and method

Also Published As

Publication number Publication date
CN106101703A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106101703B (en) A kind of screen video compression method towards digital KVM switcher
RU2665299C1 (en) Device and method of coding video and device and method of decoding video based on hierarchical information on the structure of a coded block
US10805644B2 (en) Device and method for entropy encoding and decoding
CN111800641B (en) Image coding and decoding method and device adopting different kinds of reconstructed pixels in same mode
CN100581252C (en) Method for improving entropy coding
US9215463B2 (en) Image encoding/decoding method and device
KR102071764B1 (en) Picture coding and decoding methods and devices
CN101132534B (en) Context-based adaptive variable length coding for adaptive block transforms
CN104067617B (en) The method of decoding video signal
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
CN101828405A (en) Image coding device, image decoding device, image coding method, and image decoding method
CN108293119A (en) Modification in video coding for the transformation coefficient of non-square converter unit
CN106170092A (en) Fast encoding method for lossless coding
CN104349171A (en) Image compression encoding and decoding devices without visual loss, and encoding and decoding methods
CN105323583A (en) Encoding method, decoding method, encoding/decoding system, encoder and decoder
CN107211145A (en) The almost video recompression of virtually lossless
CN105284112A (en) Method and device for determining the value of a quantization parameter
CN105100814A (en) Methods and devices for image encoding and decoding
CN104581177A (en) Image compression method and device combining block matching with string matching
CN104754362A (en) Image compression method using fine division block matching
CN104811731A (en) Multilayer sub-block matching image compression method
CN106031173A (en) Flicker detection and mitigation in video coding
CN104935945B (en) The image of extended reference pixel sample value collection encodes or coding/decoding method
CN109587431A (en) A kind of multi-channel video code stream merging method, device, equipment and storage medium
CN102256126A (en) Method for coding mixed image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant