CN108235021A - A kind of band mode determining methods and device - Google Patents

A kind of band mode determining methods and device Download PDF

Info

Publication number
CN108235021A
CN108235021A CN201810024207.0A CN201810024207A CN108235021A CN 108235021 A CN108235021 A CN 108235021A CN 201810024207 A CN201810024207 A CN 201810024207A CN 108235021 A CN108235021 A CN 108235021A
Authority
CN
China
Prior art keywords
pixel value
encoding block
value
pending encoding
pending
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.)
Granted
Application number
CN201810024207.0A
Other languages
Chinese (zh)
Other versions
CN108235021B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810024207.0A priority Critical patent/CN108235021B/en
Publication of CN108235021A publication Critical patent/CN108235021A/en
Application granted granted Critical
Publication of CN108235021B publication Critical patent/CN108235021B/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/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/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/117Filters, e.g. for pre-processing or post-processing
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Landscapes

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

Abstract

An embodiment of the present invention provides a kind of band mode determining methods and device, this method to include:The pending encoding block of acquisition is scanned, obtains the pixel value of pending encoding block;Using the size of the pixel value of pending encoding block, the max pixel value and minimum pixel value of pending encoding block are determined;For each target call number, correspond to the pixel value in band positioned at first object call number respectively according to pending encoding block and target source block, it calculates pending encoding block and target offset amount in band is corresponded in first object call number, a best initial value is determined using the target offset amount of calculating, and the second preset quantity offset is determined using best initial value.The complexity of band patterns is reduced using scheme provided in an embodiment of the present invention.

Description

A kind of band mode determining methods and device
Technical field
The present invention relates to technical field of video coding, more particularly to a kind of band mode determining methods and device.
Background technology
SAO (sample adaptive offset, sample adaptive offset) is high efficiency Video coding HEVC (High Efficiency Video Coding) introduce new encoding tool.For an encoding block, pixel value is divided into several by SAO Class, per an a kind of corresponding offset, that is to say, that all add same offset for all pixels value in certain one kind, deviate Amount ranging from -7 to 7.
SAO is there are two types of pattern, and one mode is boundary edge patterns, totally four kinds, vertical, horizontal, 45 degree and 135 degree.Such as Shown in Fig. 1, in the edge patterns of boundary, center pixel value c, adjacent pixel values are a and b, and in nine grids, a, c and b are into one Straight line, centered on c, a and b form the boundary scheme of different straight lines around c, as shown in Fig. 1 (a)~Fig. 1 (d).
Another pattern of SAO is band patterns, and in this mode, the pixel value of value range 0-255 is uniformly divided 32 bands are segmented into, the range size of each band is equal to 8.Encoder needs to select the starting point of a band first, i.e. band's is first Initial value, then continuous four bands, encoder determine an offset to each band since the starting point, and pixel value value is fallen All add same offset in some band.The 8th is such as selected with four bands started, their pixel value value range It is [64,71], [72,79], [80,87], [88,95] respectively, encoder determines an offset to each band in four bands Amount, respectively off0, off1, off2, off3, then each pixel value of the pixel value range in [64,71] adds off0, successively Analogize.
However, finding in the implementation of the present invention, at least there are the following problems for the prior art:
In a HEVC 4k real-time encoder, two logical coding structures are employed in order to make full use of multinuclear, first is logical It is full parellel coding, the second logical formal coding is to use the first logical information, wherein, since the second logical formal coding is to control step Rapid coding, and the reason for this is that since the second logical formal coding dependency is strong, can not efficiently utilize multinuclear, it is therefore desirable to encode When step is controlled.
Coding when rate-determining steps during, due to SAO parameter Estimations account for second lead to total complexity 25%, and In SAO parameter Estimations, totally 4 kinds of edge patterns, each 4 situations, totally 16 kinds, band patterns share 32 bands, so edge The complexity of pattern is the complexity half of band patterns, therefore reduces the complexity of band patterns, improves coding rate It is problem to be solved.
For above-mentioned problem to be solved, the prior art is directed to 32 bands of band patterns, needs to the best of each band Offset is estimated one by one, after the optimized migration amount of each band is estimated, then from 0-28 optionally each band it is initial Value is estimated respectively each with corresponding initial value by the method that calculation rate distortion is spent, and then determines band parameters.Thus may be used See, the prior art needs to estimate the optimized migration amount of 32 bands one by one, and being distorted cost method by calculation rate assesses Select which initial value that can bring sharpest edges to the pending encoding block for four offsets of starting point, to each Estimated one by one with optional initial value, just can determine that band patterns, thus this method determine the complexities of band parameters compared with It is high.
Invention content
The embodiment of the present invention is designed to provide a kind of band mode determining methods and device, and band moulds are reduced to realize The complexity of formula, and then improve coding rate.Specific technical solution is as follows:
The pending encoding block of acquisition is scanned, obtains the pixel value of the pending encoding block;
Using the size of the pixel value of the pending encoding block, the maximum pixel of the pending encoding block is determined Value and minimum pixel value;
For each target call number, first object rope is located at according to the pending encoding block and target source block respectively Quotation marks correspond to the pixel value in band, calculate the pending encoding block and are corresponded in band in the first object call number Target offset amount, wherein, first threshold is the minimum pixel value divided by preset value, and second threshold is removed for the max pixel value With preset value, the target call number is corresponding number of the first preset quantity band, and the target call number is more than the first threshold Which it is worth and less than second threshold, for identifying the pending encoding block pixel or the target source block pixel distribution at In band, the target source block is the corresponding source block of the pending encoding block, and the first object call number is pre- for first If either objective call number in quantity target call number, the target offset amount corresponds to defeated in band for first object call number The optimal offset gone out;
A best initial value is determined using the target offset amount of calculating, and determine that second is pre- using the best initial value If quantity offset.
Further, it in the size of the pixel value using the pending encoding block, determines described pending After or before the max pixel value and minimum pixel value of encoding block, the method further includes:
Using the pixel value of the pending encoding block, odd-line pixels value and phase in acquired pixel value are calculated The average value of absolute difference between adjacent even rows value, and the corresponding line number value of odd-numbered line is less than the corresponding line number of neighbouring even-numbered row Value;
Judge whether calculated average value is less than third threshold value;
If the average value is less than the third threshold value, the target source block and the pending encoding block are dropped and adopted Sample is to the preset ratio of the target source block area, the pending encoding block and the target source after acquisition is down-sampled Block;
The pending encoding block after will be down-sampled is returned and is performed to obtaining as the new pending encoding block The step of pending encoding block taken is scanned, the pixel value of the acquisition pending encoding block.
Further, it is described to calculate in acquired pixel value between odd-line pixels value and neighbouring even-numbered row pixel value The average value of absolute difference, including:
According to the pixel value blk (i, j) of the pending encoding block of acquisition, obtained according to following expression calculating In the pixel value taken between odd-line pixels value and neighbouring even-numbered row pixel value absolute difference average value abshv;
Expression formula is:
Wherein, w is the width of the pending encoding block, and h is the height of the pending encoding block, and w, h are even number, I is the row where pixel value in the pending encoding block, and j is the row where pixel value in the pending encoding block, I, j is natural number, and abs () is ABS function.
Further, the size of the pixel value using the pending encoding block, determines the pending volume The max pixel value and minimum pixel value of code block, including:
The pixel value of the pending encoding block is traversed, it is big by comparing the pixel value of the pending encoding block It is small, obtain the max pixel value and minimum pixel value of the pending encoding block.
Further, the size of the pixel value using the pending encoding block, determines the pending volume The max pixel value and minimum pixel value of code block, including:
The pixel value of the pending encoding block according to size is ranked up, obtains the pending encoding block Sequence after rank-ordered pixels;
The max pixel value and the minimum pixel value are chosen from the sequence.
Further, the pixel value to the pending encoding block is ranked up according to size, obtains described treat Sequence after the rank-ordered pixels of the encoding block of processing, including:
The pixel value of the pending encoding block is ranked up from big to small, obtains the pending encoding block Sequence after rank-ordered pixels.
Further, it is described to determine a best initial value, and the second preset quantity is determined using the best initial value A offset, including:
Using the target offset amount of calculating, a best initial value is determined by the method that calculation rate distortion is spent, is utilized The best initial value determines the second preset quantity offset.
Further, the third threshold value is 42/16.
A kind of band patterns determining device, the device include:
Pixel value obtains module, is scanned for the pending encoding block to acquisition, obtains the pending volume The pixel value of code block;
Pixel value determining module, for using the size of the pixel value of the pending encoding block, determining described to wait to locate The max pixel value and minimum pixel value of the encoding block of reason;
Target offset amount computing module, for being directed to each target call number, according to the pending encoding block and mesh Mark source block is located at first object call number and corresponds to pixel value in band respectively, and the calculating pending encoding block is described the One target call number corresponds to the target offset amount in band, wherein, first threshold is the minimum pixel value divided by preset value, the Two threshold values are the max pixel value divided by preset value, and the target call number is corresponding number of the first preset quantity band, The target call number is more than first threshold and less than second threshold, for identifying pending the encoding block pixel or target For source block pixel distribution in which band, the first object call number is any mesh in the first preset quantity target call number Call number is marked, the target source block is the corresponding source block of the pending encoding block, and the target offset amount is first object Call number corresponds to the optimal offset exported in band;
First offset determination module for determining a best initial value using the target offset amount of calculating, and utilizes The best initial value determines the second preset quantity offset.
Further, described device further includes:
Mean value calculation module, for using the pixel value of the pending encoding block, calculating in acquired pixel In value between odd-line pixels value and neighbouring even-numbered row pixel value absolute difference average value, and the corresponding line number value of odd-numbered line is less than The corresponding line number value of neighbouring even-numbered row;
Judgment module, for judging whether calculated average value is less than third threshold value;If less than triggering down-sampled mould Block;
The down-sampled module, for the target source block and the pending encoding block to be downsampled to the mesh The preset ratio of source block area is marked, the pending encoding block and the target source block after acquisition is down-sampled;
Down-sampled acquisition module, for the pending encoding block after will be down-sampled as new described pending Encoding block, triggering pixel value obtain module.
Further, the mean value calculation module includes:
Computational submodule, for the pixel value blk (i, j) of the pending encoding block according to acquisition, according to as follows Expression formula calculates the average value of the absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value in acquired pixel value abshv;
Expression formula is:
Wherein, w is the width of the pending encoding block, and h is the height of the pending encoding block, and w, h are even number, I is the row where pixel value in the pending encoding block, and j is the row where pixel value in the pending encoding block, I, j is natural number, and abs () is ABS function.
Further, the pixel value determining module includes:
Spider module, for traversing the pixel value of the pending encoding block, by comparing the pending coding The pixel value size of block obtains the max pixel value and minimum pixel value of the pending encoding block.
Further, the pixel value determining module includes:
First sorting sub-module is ranked up according to size for the pixel value to the pending encoding block, obtains Sequence after the rank-ordered pixels of the pending encoding block;
Submodule is chosen, for choosing the max pixel value and the minimum pixel value from the sequence.
Further, first sorting sub-module includes:
Second sequencing unit for the pixel value to the pending encoding block is ranked up, obtains institute from big to small State the sequence after the rank-ordered pixels of pending encoding block.
Further, the offset determination module includes:
Second offset determination sub-module, for using the target offset amount calculated, passing through the side of calculation rate distortion cost Method determines a best initial value, and the second preset quantity offset is determined using the best initial value.
Further, the third threshold value is 42/16.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable Instruction is stored in storage medium, when run on a computer so that computer performs any of the above-described band moulds Formula determines method.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction Product, when run on a computer so that computer performs any of the above-described band mode determining methods.
A kind of band mode determining methods and device provided in an embodiment of the present invention, can be to the pending coding of acquisition Block is scanned, and obtains the pixel value of the pending encoding block;Using the pending encoding block pixel value it is big It is small, determine the max pixel value and minimum pixel value of the pending encoding block;For each target call number, the target Call number is more than first threshold and less than second threshold, is located at first respectively according to the pending encoding block and target source block Target call number corresponds to the pixel value in band, calculates the pending encoding block and is corresponded in the first object call number Target offset amount in band;A best initial value is determined using the target offset amount of calculating, and utilize the best starting Value determines the second preset quantity offset.This method without estimating the optimized migration amount of 32 bands one by one, it is only necessary to needle To being less than first threshold and more than each the corresponding band of target call number is estimated in second threshold range, therefore, reducing The complexity of band patterns, and then improve coding rate.Certainly, it implements any of the products of the present invention or method must be needed not necessarily To reach all the above advantage simultaneously.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described.
Fig. 1 is the schematic diagram of the boundary scheme of the prior art;
The first flow chart that the band patterns of Fig. 2 embodiment of the present invention determine;
Fig. 3 is second of flow chart that the band patterns of the embodiment of the present invention determine;
Fig. 4 is the third flow chart that the band patterns of the embodiment of the present invention determine;
Fig. 5 is the structure diagram of the band mode devices of the embodiment of the present invention;
Fig. 6 is a kind of electronic equipment schematic diagram of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall in the protection scope of this application.
In a kind of realization method of the embodiment of the present invention, a kind of band mode determining methods are provided.Referring to Fig. 2, Fig. 2 For band mode determining methods provided in an embodiment of the present invention, include the following steps:
S101 is scanned the pending encoding block of acquisition, obtains the pixel value of pending encoding block;
Wherein, the points that can be expressed as sweep object, that is, pending encoding block per inch by scanning element. Unit is dots per inch dpi, and dpi values are bigger, and the effect of scanning is also better.
The representation of pixel value is obtained with the product that vertical resolution is multiplied with horizontal resolution.
S102 using the size of the pixel value of pending encoding block, determines the max pixel value of pending encoding block And minimum pixel value;
It should be noted that after the pixel value for obtaining pending encoding block, found respectively most from all pixels value Big pixel value and minimum pixel value.
Before or after S102, this method further includes:
Using the pixel value of pending encoding block, odd-line pixels value and adjacent idol in acquired pixel value are calculated The average value of absolute difference between several rows of pixel values, and the corresponding line number value of odd-numbered line is less than the corresponding line number value of neighbouring even-numbered row;
Judge whether calculated average value is less than third threshold value;
If average value is less than third threshold value, target source block and pending encoding block are downsampled to target source block area Preset ratio, obtain it is down-sampled after pending encoding block and target source block;
Pending encoding block after will be down-sampled returns to the step of performing S101 as new pending encoding block.
As it can be seen that target source block and pending encoding block are downsampled to the default of target source block area by present embodiment Ratio, and using the pending encoding block and target source block after down-sampled, determine final band mode parameters, this method drop The low complexity of band (band) pattern, and then improve coding rate.
In addition, third threshold value can be 42/16, preset ratio can be 1/2.
Wherein, absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value is calculated in acquired pixel value Average value, including:
According to the pixel value blk (i, j) of the pending encoding block of acquisition, calculated according to following expression acquired In pixel value between odd-line pixels value and neighbouring even-numbered row pixel value absolute difference average value abshv;
Expression formula is:
Wherein, w is the width of pending encoding block, and h is the height of pending encoding block, and w, h are even number, and i is waits to locate Row in the encoding block of reason where pixel value, j are the row where pixel value in pending encoding block, and i, j are natural number, Abs () is ABS function.
As it can be seen that present embodiment fast, speed can accurately obtain average value to be asked according to such as above-mentioned expression formula.
An embodiment of S102 is:
The pixel value of pending encoding block is traversed, by comparing the pixel value size of pending encoding block, is treated The max pixel value and minimum pixel value of the encoding block of processing.
As it can be seen that present embodiment is waited to locate by traversing the pixel value of pending encoding block so as to simply and rapidly obtain The max pixel value and minimum pixel value of the encoding block of reason.
The another embodiment of S102 is:
The pixel value of pending encoding block according to size is ranked up, obtains the pixel value row of pending encoding block Sequence after sequence;
It should be noted that can be sequence from big to small to the sequence of the pixel value of pending encoding block, also may be used To be sequence from small to large, the present invention does not limit this, is sequence from big to small in this step, then obtains a series of treat The sequence of the descending sequence of pixel value of the encoding block of processing.
It is clearer in order to be described to the acquisition of the sequence, now give an example:
If the pixel value of pending encoding block is:16777210、16777216、……、6777216;
It is descending to these pixel values to be ranked up, then obtain following sequence:
16777216、16777210、……、6777216;
S304 chooses max pixel value and minimum pixel value from sequence;
Based on above-mentioned example, max pixel value and minimum pixel value are chosen in the sequence obtained from sequence, it is, from 16777216th, 16777210 ..., directly acquire that the sequence is first and two pixel values of tail in 6777216, the sequence maximum pixel It is 16777216 to be worth, minimum pixel value 6777216.
Max pixel value and minimum pixel value are chosen from sequence.
As it can be seen that present embodiment by from the pixel value of pending encoding block in magnitude order after pixel value in select Take max pixel value and minimum pixel value so that rapidly and orderly obtain max pixel value and minimum pixel value, and it is wrong to be not easy choosing It is selected with leakage.
The pixel value of pending encoding block according to size is ranked up, obtains the pixel value row of pending encoding block A kind of embodiment of sequence after sequence is:
The pixel value of pending encoding block is ranked up from big to small, obtains the pixel value row of pending encoding block Sequence after sequence.
As it can be seen that present embodiment is according to the pixel value of pending encoding block, obtaining pixel value from big to small and serve as reasons Small sequence of pixel values is arrived greatly, is not only not easy choosing mistake and leakage choosing, but also easily and accurately obtain max pixel value and minimum pixel Value.
S103 for each target call number, is located at first object respectively according to pending encoding block and target source block Call number corresponds to the pixel value in band, and it is inclined in the target that first object call number is corresponded in band to calculate pending encoding block Shifting amount, wherein, first threshold be minimum pixel value divided by preset value, second threshold be max pixel value divided by preset value, target Call number is corresponding number of the first preset quantity band, and target call number is more than first threshold and less than second threshold, is used for Pending encoding block pixel or target source block pixel distribution are identified in which band, target source block is pending encoding block Corresponding source block, first object call number be the first preset quantity target call number in either objective call number, target offset Measure the optimal offset for corresponding to for first object call number and being exported in band;
Wherein, encoding block of the source block for input video or image before uncoded, source block can be source video block, source images Block.Pending encoding block is the source block being encoded, and is also reconstructed blocks, and the value range of the initial value of band is 0~28 to appoint One value, the value range of band is 0~31, and target call number is 32, that is to say, that the first preset quantity can be 32.
It should be noted that the value of pixel value is 0~255,32 parts are divided into 0~255, every part of band width is 8, 1st band initial value is 0~7, and the 2nd band is 8~15, and so on, the range of n-th of band is exactly 8* (n-1)~8* (n-1) + 7, thus minimum pixel value vmin belong to minimum pixel value divided by 8 corresponding band, max pixel value vmax belong to vmax divided by 8 corresponding band, to be represented in binary as:vmin>>3,>>It is binary shift right symbol, vmin>>3 be exactly vmin divided by 8, vmax>>3 be exactly vmax divided by 8, and the value range for needing to estimate offset is vmin>>3~vmax>>3.Wherein, the preset value 8 can be taken.
In addition, since band shares 32 parts, so initial value also most 32, i.e. i*8, i value ranges are 0~31 i.e. bands Value range, i is the quantity of band, and that carry out band filtering is continuous 4 band that initial value starts, thus the last one Band maximums can only be 28*8, general that being multiplied by 8 to be omitted when obtaining band initial values, so band initial values can be with It is 0~28 any one integer.
The optimal offset i.e. target offset amount offset estimation procedures of band in band mode parameters are briefly described below, By understanding that head band there are 32 to the description of band above, there are 8 pixels, in the prior art, need to determine each per band The target offset amount offset of band is calculated 32 times altogether.Every band needs to call a function, and input is target source block and again The target call number of building block and the band, wherein, target call number is to determine which part is pixel distribution be, such as target rope 0 is cited as, then it is 5 to calculate reconstructed blocks pixel value in 0~7 corresponding band, such as target call number, then calculates reconstructed blocks pixel value and exist 40~47 corresponding band, output are the optimal offset of current band.
And the method first step of this step is exactly the computation burden for the offset for reducing every band.It originally needs to calculate mesh It is 0~31 to mark call number, this step is only calculated less than first threshold and more than target call number each in second threshold range The target offset amount of corresponding band, remaining offset are set as 0, hence it is evident that simplify the complexity of calculating.
Offset decision processes are as follows:
If the target call number idx of a band, determine that the pixel value range that idx corresponds to band is idx*8 to idx*8+7, For the pixel value of the pixel value of reconstructed blocks of this range and its corresponding target source block is distributed in, lost by calculation rate The method really spent, the set for enabling it are G={ (pxlorg,pxlrcn)|idx×8+7≥pxlrcn>=idx × 8 }, wherein, pxlrcnIt is to reconstruct pixel value in the block, pxlorgIt is the corresponding target source of reconstructed blocks pixel in the block, offset value ranges are- 7 to 7, optimal offset can make this offset of coding obtain higher code efficiency, and determining method is exactly to lose its rate True least cost, i.e. following expression are minimum:
Wherein, rate (offset) is to be encoded to the required code checks of offset, and λ is Lagrangian constant, it and quantization Relating to parameters.
Formula is divided into two parts, first part (pxl aboveorg-pxlrcn-offset)2Be plus this offset it The sum of the difference of two squares of target source block and reconstructed blocks in the range of the band afterwards, second part λ × rate (offset) are weightings Code check.
S104 determines a best initial value, and determine second using best initial value using the target offset amount of calculating Preset quantity offset.
Wherein, the second preset quantity can be 4.
Based on the above-mentioned description to band mode parameter estimation procedures, it is known that band pattern initial value values are in 0~28 model Middle any value is enclosed, its decision process is exactly after output is the optimal offset of current band, looks for a best initial value, Four since the initial value offset is enable to obtain maximum code efficiency, then the initial value and four offset are compiled Enter code stream.Lower code check is obtained under same quality, similary code check is lower to obtain higher quality.
After the optimal offset of each band is determined, the least cost rdcost of each band is also just obtained, If the rdcost of the target call number idx of band is expressed as rdcost (idx), the determining method of band pattern initial values idxstt Exactly minimize following expression:Make the sum of the rdcost of continuous four band since this initial value minimums, i.e., it is as follows It is formula and minimum:
rdcost(idxstt)+rdcost(idxstt+1)+rdcost(idxstt+2)+rdcost(idxstt+3)。
What method provided in an embodiment of the present invention was saved is the cost for obtaining optimal offset, passes through minimum pixel first Value and max pixel value, the practical range shorter for calculating offset is needed, then by down-sampled, calculating rdcost (offset) number of pixels reduces, therefore can also save calculating.
Specifically,
Using the target offset amount of calculating, a best initial value is determined by the method that calculation rate distortion is spent, is utilized Best initial value determines the second preset quantity offset.
As it can be seen which initial value is present embodiment select as starting point by the method assessment that calculation rate distortion is spent Four offsets can bring sharpest edges to pending encoding block, improve the determining effect of band mode parameters.
It can be seen that band mode determining methods provided in an embodiment of the present invention need not calculate the target offset of each band Amount only calculates the target offset amount that band is corresponded to less than first threshold and more than target call number each in second threshold range, Remaining offset is set as 0, and determines the second preset quantity by determining a best initial value, and using best initial value Offset this method reduce the complexity of band patterns, and then improves coding rate.
As it can be seen that average value to be asked can be quickly calculated according to such as above-mentioned expression formula in present embodiment.
In a kind of realization method of the embodiment of the present invention, another band mode determining methods are provided.Referring to Fig. 3, Fig. 3 is another flow chart that the band mode parameters of the embodiment of the present invention determine, is included the following steps:
S201 is scanned the pending encoding block of acquisition, obtains the pixel value of pending encoding block;
Wherein, S201~S202 is identical with the method that S101~S102 in Fig. 2 embodiments is performed respectively.Therefore, in Fig. 2 All embodiments be suitable for Fig. 3, and can reach the same or similar advantageous effect, details are not described herein.
S202 using the size of the pixel value of pending encoding block, determines the max pixel value of pending encoding block And minimum pixel value;
S203, using the pixel value of pending encoding block, calculate in acquired pixel value odd-line pixels value and The average value of absolute difference between neighbouring even-numbered row pixel value, and the corresponding line number value of odd-numbered line is less than the corresponding row of neighbouring even-numbered row Numerical value;
In encoder, SAO is handled as unit of maximum coding unit, and the size of maximum coding unit is up to 64* 64, minimum 8*8, the general situation for using 64*64.
Absolute difference can between odd-line pixels value and neighbouring even-numbered row pixel value in pending encoding block in this step The absolute value of pixel value of 2nd row is subtracted with the pixel value for being interpreted as the 1st row, the pixel value of the 3rd row subtracts the pixel value of the 4th row Absolute value ..., the pixel value of the 63rd row subtract the 64th row pixel value absolute value.
S204, judges whether calculated average value is less than third threshold value;If average value is less than third threshold value, perform S205;If average value is greater than or equal to third threshold value, S207 is performed;
It should be noted that the average value being only calculated i.e. gradient just enables down-sampled algorithm when being less than third threshold value It is i.e. down-sampled;Third threshold value can take 42/16.
Target source block and pending encoding block are downsampled to the preset ratio of target source block area by S205, are obtained Pending encoding block and target source block after down-sampled;
Wherein, preset ratio can be 1/2.
It is noted that when if preset ratio is 1/2, down-sampled in this step is exactly by reconstructed blocks, that is, pending The pixel value of encoding block is reduced to the half of target source block, in terms of existing technologies, so as to save the calculation amount of half.
It should be noted that this step is all down-sampled by target source block and reconstructed blocks, and it is less than third threshold for average value The pending encoding block of value carries out down-sampled.
S206, will be down-sampled after pending encoding block as new pending encoding block, return and perform S201's Step;
Wherein, it returns and performs S201 to perform S201~S206.
S207 for each target call number, is located at first object respectively according to pending encoding block and target source block Call number corresponds to the pixel value in band, and it is inclined in the target that first object call number is corresponded in band to calculate pending encoding block Shifting amount, wherein, first threshold is the minimum pixel value divided by preset value, and second threshold is the max pixel value divided by presets Value, the target call number are corresponding number of the first preset quantity band, and target call number is more than first threshold and is less than the Two threshold values, for identifying pending encoding block pixel or target source block pixel distribution in which band, target source block is treats The corresponding source block of encoding block of processing, first object call number are that either objective indexes in the first preset quantity target call number Number, target offset amount corresponds to the optimal offset exported in band for first object call number;
Wherein, S207~S208 is identical with the method that S103~S104 in Fig. 2 embodiments is performed respectively.Therefore, in Fig. 2 All embodiments be suitable for Fig. 3, and can reach the same or similar advantageous effect, details are not described herein.
S208 determines a best initial value, and determine second using best initial value using the target offset amount of calculating Preset quantity offset.
It can be seen that band mode determining methods being averaged by calculation code block pixel provided in an embodiment of the present invention Value is less than the pending encoding block of third threshold value for average value, and target source block and pending encoding block is down-sampled To the preset ratio of target source block area, which presets ratio The calculating of example, and using the pending encoding block and target source block after down-sampled, calculate less than first threshold and more than second Each target call number corresponds to the target offset amount of band in threshold range, remaining offset is set as 0, and by determining one Best initial value, and determine the second preset quantity offset using best initial value, this method reduce answering for band patterns Miscellaneous degree, and then improve coding rate.
In a kind of realization method of the embodiment of the present invention, another band mode determining methods are provided.Referring to Fig. 4, Fig. 4 is another flow chart that the band mode parameters of the embodiment of the present invention determine, is included the following steps:
S301 is scanned the pending encoding block of acquisition, obtains the pixel value of pending encoding block;
Wherein, S301 is identical with the method that the S101 in Fig. 2 embodiments is performed.Therefore, all embodiments in Fig. 2 are suitable For Fig. 4, and it can reach the same or similar advantageous effect, details are not described herein.
S302 traverses the pixel value of pending encoding block, by comparing the pixel value size of pending encoding block, obtains Obtain the max pixel value and minimum pixel value of pending encoding block;
Wherein, traverse pending encoding block pixel value can be understood as to the pixel value of pending encoding block according to It singly carries out checking one time;It can be appreciated that creating two variables, it is denoted as the first variable, the second variable, the two point Pixel value maximum value and pixel value minimum value Yong Yu not be stored temporarily, and the pixel value of pending encoding block is traversed with the first variable For, such as:Assign the first variable to initial value, initial value can be 0, when pending encoding block has not been traversed by the first variable When, the first variable is compared with the current pixel not being compared with the first variable, if the first variable is more than current picture Element value, then assign current pixel value to the first variable, using the first variable after imparting current pixel value as new variable, returns The step of being compared the first variable and the current pixel not being compared with the first variable is performed, if the first variable is less than Current pixel value returns and performs the step of being compared the first variable and the current pixel not being compared with the first variable.
The pixel value traversal step corresponding with the first variable of the pending encoding block of second variable variable is similar, herein not It repeats again.
S303 according to the pixel value blk (i, j) of the pending encoding block of acquisition, is calculated according to following expression in institute In the pixel value of acquisition between odd-line pixels value and neighbouring even-numbered row pixel value absolute difference average value abshv;
Expression formula is:
Wherein, w is the width of pending encoding block, and h is the height of pending encoding block, and w, h are even number, and i is waits to locate Row in the encoding block of reason where pixel value, j are the row where pixel value in pending encoding block, and i, j are natural number, Abs () is ABS function;
It should be noted that pending coding quickly can be preparatively calculated according to such as above-mentioned expression formula in this step In block between odd-line pixels value and next neighbouring even-numbered row pixel value absolute difference average value.
S304, judges whether calculated average value is less than third threshold value;If average value is less than third threshold value, perform S305 if average value is greater than or equal to third threshold value, performs S307;
It should be noted that the average value being only calculated i.e. gradient just enables down-sampled algorithm when being less than third threshold value It is i.e. down-sampled;Third threshold value can take 42/16.
Target source block and pending encoding block are downsampled to the preset ratio of target source block area by S305, are obtained Pending encoding block and target source block after down-sampled;
Wherein, preset ratio can be 1/2.
It is noted that when if preset ratio is 1/2, down-sampled in this step is exactly by reconstructed blocks, that is, pending The pixel value of encoding block is reduced to the half of target source block, in terms of existing technologies, so as to save the calculation amount of half.
It should be noted that this step is all down-sampled by target source block and reconstructed blocks, and it is less than third threshold for average value The pending encoding block of value carries out down-sampled.
S306, will be down-sampled after pending encoding block as new pending encoding block, return and perform S301's Step;
Wherein, it returns and performs S301 to perform S301~S306.
S307 for positioned at each target call number, is located at first respectively according to pending encoding block and target source block Target call number corresponds to the pixel value in band, calculates pending encoding block and mesh in band is corresponded in first object call number Mark offset, wherein, first threshold be minimum pixel value divided by preset value, second threshold be max pixel value divided by preset value, Target call number is corresponding number of the first preset quantity band, and target call number is more than first threshold and is less than second threshold, For identifying the pending encoding block pixel of pending encoding block or source block target source block pixel distribution in which band, mesh Mark source block is the pending corresponding source block of encoding block, and first object call number is to appoint in the first preset quantity target call number One target call number, pending encoding block target offset amount correspond to the optimal offset exported in band for first object call number Amount;
Wherein, S307~S308 is identical with the method that S103~S104 in Fig. 2 embodiments is performed.Therefore, the institute in Fig. 2 There is embodiment to be suitable for Fig. 4, and can reach the same or similar advantageous effect, details are not described herein.
Using the target offset amount of calculating, a best initial value is determined by the method that calculation rate distortion is spent by S308, The second preset quantity offset is determined using best initial value.
It can be seen that band mode determining methods provided in an embodiment of the present invention are quickly preparatively obtained by as above expression formula Average value to be asked was obtained, is less than the pending encoding block of third threshold value for the average value of calculating, by target source block and treats The encoding block of processing is downsampled to the preset ratio of target source block area, the down-sampled mesh for directly saving the every band of calculating Mark offset burden preset ratio calculating, and utilization it is down-sampled after pending encoding block and target source block, it is only necessary to count The target offset amount that band is corresponded to less than first threshold and more than target call number each in second threshold range is calculated, remaining Offset is set as 0, and determines that the second preset quantity deviates by determining a best initial value, and using best initial value Amount, not only reduces the complexity of band patterns, and further improve coding rate.
With above-mentioned corresponding based on band mode determining methods, the embodiment of the present invention additionally provides a kind of band patterns and determines Device.
The embodiment of the present invention additionally provides a kind of band patterns determining device.Referring to Fig. 5, Fig. 5 is the embodiment of the present invention The structure chart of band pattern determining devices, the device include:
Pixel value obtains module 401, is scanned for the pending encoding block to acquisition, obtains pending coding The pixel value of block;
Pixel value determining module 402, for using the size of the pixel value of pending encoding block, determining pending volume The max pixel value and minimum pixel value of code block;
Target offset amount computing module 403 is located at less than first threshold and is more than every in second threshold range for being directed to A target call number corresponds to the picture in band according to pending encoding block and target source block positioned at first object call number respectively Element value calculates pending encoding block and target offset amount in band is corresponded in first object call number, wherein, target call number It is corresponding number of the first preset quantity band, for identifying pending encoding block pixel or target source block pixel distribution at which In one band, first object call number be the first preset quantity target call number in either objective call number, target offset amount The optimal offset exported in band is corresponded to for first object call number;
First offset determination module 404, for determining a best initial value, and profit using the target offset amount of calculating The second preset quantity offset is determined with best initial value.
Wherein, which can also include:
Mean value calculation module, for using the pixel value of pending encoding block, calculating in acquired pixel value The average value of absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value, and the corresponding line number value of odd-numbered line is less than adjacent The corresponding line number value of even number line;
Judgment module, for judging whether calculated average value is less than third threshold value;If less than triggering down-sampled mould Block;
Down-sampled module, for target source block and pending encoding block to be downsampled to the default of target source block area Ratio, pending encoding block and target source block after acquisition is down-sampled;
Down-sampled acquisition module, for the pending encoding block after will be down-sampled as new pending encoding block, It triggers pixel value and obtains module.
Above-mentioned mean value calculation module includes:
Computational submodule, for the pixel value blk (i, j) of the pending encoding block according to acquisition, according to being expressed as below Formula calculates the average value of the absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value in acquired pixel value abshv;
Expression formula is:
Wherein, w is the width of pending encoding block, and h is the height of pending encoding block, and w, h are even number, and i is waits to locate Row in the encoding block of reason where pixel value, j are the row where pixel value in pending encoding block, and i, j are natural number, Abs () is ABS function.
Above-mentioned pixel value determining module 402 includes:
Spider module, for traversing the pixel value of pending encoding block, by comparing the pixel of pending encoding block It is worth size, obtains the max pixel value and minimum pixel value of pending encoding block.
Above-mentioned pixel value determining module includes:
First sorting sub-module is ranked up for the pixel value to pending encoding block according to size, obtains waiting to locate Sequence after the rank-ordered pixels of the encoding block of reason;
Submodule is chosen, for choosing max pixel value and minimum pixel value from sequence.
Above-mentioned first sorting sub-module includes:
Second sequencing unit is ranked up from big to small for the pixel value to pending encoding block, is obtained pending Encoding block rank-ordered pixels after sequence.
Above-mentioned offset determination module 404 includes:
Second offset determination sub-module, for using the target offset amount calculated, passing through the side of calculation rate distortion cost Method determines a best initial value, and the second preset quantity offset is determined using best initial value.
Wherein, third threshold value is 42/16.
It can be seen that band patterns determining device provided in an embodiment of the present invention need not calculate the target offset of each band Amount only calculates the target offset amount that band is corresponded to less than first threshold and more than target call number each in second threshold range, Remaining offset is set as 0, and determines the second preset quantity by determining a best initial value, and using best initial value Offset this method reduce the complexity of band patterns, and then improves coding rate.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in fig. 6, including processor 501, communication interface 502, Memory 503 and communication bus 504, wherein, processor 501, communication interface 502, memory 503 is complete by communication bus 504 Into mutual communication,
Memory 503, for storing computer program;
Processor 501 during for performing the program stored on memory 503, realizes provided in an embodiment of the present invention one Kind band mode determining methods.
Specifically, a kind of above-mentioned band mode determining methods, including:
The pending encoding block of acquisition is scanned, obtains the pixel value of pending encoding block;
Using the size of the pixel value of pending encoding block, the max pixel value and minimum of pending encoding block are determined Pixel value;
For positioned at less than first threshold and more than target call number each in second threshold range, according to pending volume Code block and target source block are located at first object call number and correspond to pixel value in band respectively, calculate pending encoding block the One target call number corresponds to the target offset amount in band, wherein, first threshold be minimum pixel value divided by preset value, the second threshold It is worth for max pixel value divided by preset value, target call number is corresponding number of the first preset quantity band, waits to locate for identifying For the encoding block pixel or target source block pixel distribution of reason in which band, first object call number is the first preset quantity mesh Either objective call number in call number is marked, target offset amount corresponds to the optimal offset exported in band for first object call number Amount;
A best initial value is determined using the target offset amount of calculating, and the second present count is determined using best initial value Amount offset.
It can be seen that performing electronic equipment provided in this embodiment, without calculating the target offset amount of each band, only count The target offset amount that band is corresponded to less than first threshold and more than target call number each in second threshold range is calculated, remaining Offset is set as 0, and determines that the second preset quantity deviates by determining a best initial value, and using best initial value Amount, this method reduce the complexity of band patterns, and then improves coding rate.
The embodiment of above-mentioned related content band mode determining methods is provided with preceding method embodiment part Band pattern methods of determination are identical, and which is not described herein again.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc..For just It is only represented in expression, figure with a thick line, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory can include random access memory (Random Access Memory, RAM), can also include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer so that computer performs any in above-described embodiment Band mode determining methods.
In another embodiment provided by the invention, a kind of computer program product for including instruction is additionally provided, when it When running on computers so that computer performs band mode determining methods any in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and performing the computer program instructions, all or It partly generates according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium In or from a computer readable storage medium to another computer readable storage medium transmit, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is the data storage devices such as server, the data center integrated comprising one or more usable mediums.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk Solid State Disk (SSD)) etc..
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for device, For equipment, computer readable storage medium or computer program product embodiments, since it is substantially similar to embodiment of the method, So description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (17)

1. a kind of band mode determining methods, which is characterized in that this method includes:
The pending encoding block of acquisition is scanned, obtains the pixel value of the pending encoding block;
Using the size of the pixel value of the pending encoding block, determine the pending encoding block max pixel value and Minimum pixel value;
For positioned at each target call number, first object rope is located at according to the pending encoding block and target source block respectively Quotation marks correspond to the pixel value in band, calculate the pending encoding block and are corresponded in band in the first object call number Target offset amount, wherein, first threshold is the minimum pixel value divided by preset value, and second threshold is removed for the max pixel value With preset value, the target call number is corresponding number of the first preset quantity band, and the target call number is more than the first threshold Which it is worth and less than second threshold, for identifying the pending encoding block pixel or the source block target source block pixel distribution at In one band, the target source block is the corresponding source block of the pending encoding block, and the first object call number is first Either objective call number in preset quantity target call number, target offset amount described in the pending encoding block are the first mesh Mark call number corresponds to the optimal offset exported in band;
A best initial value is determined using the target offset amount of calculating, and the second present count is determined using the best initial value Amount offset.
2. the method as described in claim 1, which is characterized in that in the pixel value using the pending encoding block Size, after or before the max pixel value and minimum pixel value that determine the pending encoding block, the method further includes:
Using the pixel value of the pending encoding block, odd-line pixels value and adjacent idol in acquired pixel value are calculated The average value of absolute difference between several rows of pixel values, and the corresponding line number value of odd-numbered line is less than the corresponding line number value of neighbouring even-numbered row;
Judge whether calculated average value is less than third threshold value;
If the average value is less than the third threshold value, the target source block and the pending encoding block are downsampled to The preset ratio of the target source block area, the pending encoding block and the target source block after acquisition is down-sampled;
The pending encoding block after will be down-sampled is returned and is performed to acquisition as the new pending encoding block The step of pending encoding block is scanned, the pixel value of the acquisition pending encoding block.
3. method as claimed in claim 2, which is characterized in that calculating odd-line pixels value in acquired pixel value The average value of absolute difference between neighbouring even-numbered row pixel value, including:
According to the pixel value blk (i, j) of the pending encoding block of acquisition, calculated according to following expression acquired In pixel value between odd-line pixels value and neighbouring even-numbered row pixel value absolute difference average value abshv;
Expression formula is:
Wherein, w is the width of the pending encoding block, and h is the height of the pending encoding block, and w, h are even number, and i is Row in the pending encoding block where pixel value, j are the row where pixel value, i, j in the pending encoding block It is natural number, abs () is ABS function.
4. the method as described in any one of claim 1-3, which is characterized in that described using the pending encoding block The size of pixel value determines the max pixel value and minimum pixel value of the pending encoding block, including:
The pixel value of the pending encoding block is traversed, by comparing the pixel value size of the pending encoding block, is obtained Obtain the max pixel value and minimum pixel value of the pending encoding block.
5. the method as described in any one of claim 1-3, which is characterized in that described using the pending encoding block The size of pixel value determines the max pixel value and minimum pixel value of the pending encoding block, including:
The pixel value of the pending encoding block according to size is ranked up, obtains the pixel of the pending encoding block Sequence after value sequence;
The max pixel value and the minimum pixel value are chosen from the sequence.
6. method as claimed in claim 5, which is characterized in that the pixel value to the pending encoding block is according to big It is small to be ranked up, the sequence after the rank-ordered pixels of the pending encoding block is obtained, including:
The pixel value of the pending encoding block is ranked up from big to small, obtains the pixel of the pending encoding block Sequence after value sequence.
7. the method as described in right wants 6, which is characterized in that it is described to determine a best initial value, and utilize described best Initial value determines the second preset quantity offset, including:
Using the target offset amount of calculating, a best initial value is determined by the method that calculation rate distortion is spent, using described Best initial value determines the second preset quantity offset.
8. the method as described in claim 1, which is characterized in that the third threshold value is 42/16.
9. a kind of band patterns determining device, which is characterized in that the device includes:
Pixel value obtains module, is scanned for the pending encoding block to acquisition, obtains the pending encoding block Pixel value;
Pixel value determining module, for using the size of the pixel value of the pending encoding block, determining described pending The max pixel value and minimum pixel value of encoding block;
Target offset amount computing module, for being directed to each target call number, according to the pending encoding block and target source Block corresponds to the pixel value in band positioned at first object call number respectively, calculates the pending encoding block in first mesh Mark call number corresponds to target offset amount in band, wherein, first threshold is the minimum pixel value divided by preset value, the second threshold It is worth for the max pixel value divided by preset value, the target call number is corresponding number of the first preset quantity band, described Target call number is more than first threshold and less than second threshold, for identifying the pending encoding block pixel or target source block For pixel distribution in which band, the first object call number is either objective rope in the first preset quantity target call number Quotation marks, the target source block are the corresponding source block of the pending encoding block, and the target offset amount is indexed for first object The optimal offset exported in number corresponding band;
First offset determination module, for determining a best initial value using the target offset amount of calculating, and described in utilization Best initial value determines the second preset quantity offset.
10. device as claimed in claim 9, which is characterized in that described device further includes:
Mean value calculation module, for using the pixel value of the pending encoding block, calculating in acquired pixel value The average value of absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value, and the corresponding line number value of odd-numbered line is less than adjacent The corresponding line number value of even number line;
Judgment module, for judging whether calculated average value is less than third threshold value;If the average value is less than the third Threshold value triggers down-sampled module;
The down-sampled module, for the target source block and the pending encoding block to be downsampled to the target source The preset ratio of block area, the pending encoding block and the target source block after acquisition is down-sampled;
Down-sampled acquisition module, for the pending encoding block after will be down-sampled as the new pending coding Block, triggering pixel value obtain module.
11. device as claimed in claim 10, which is characterized in that the mean value calculation module includes:
Computational submodule, for the pixel value blk (i, j) of the pending encoding block according to acquisition, according to being expressed as below Formula calculates the average value of the absolute difference between odd-line pixels value and neighbouring even-numbered row pixel value in acquired pixel value abshv;
Expression formula is:
Wherein, w is the width of the pending encoding block, and h is the height of the pending encoding block, and w, h are even number, and i is Row in the pending encoding block where pixel value, j are the row where pixel value, i, j in the pending encoding block It is natural number, abs () is ABS function.
12. the device as described in any one of claim 9-11, which is characterized in that the pixel value determining module includes:
Spider module, for traversing the pixel value of the pending encoding block, by comparing the pending encoding block Pixel value size obtains the max pixel value and minimum pixel value of the pending encoding block.
13. the device as described in any one of claim 9-11, which is characterized in that the pixel value determining module includes:
First sorting sub-module is ranked up for the pixel value to the pending encoding block according to size, obtains described Sequence after the rank-ordered pixels of pending encoding block;
Submodule is chosen, for choosing the max pixel value and the minimum pixel value from the sequence.
14. device as claimed in claim 13, which is characterized in that first sorting sub-module includes:
Second sequencing unit is ranked up from big to small for the pixel value to the pending encoding block, obtains described treat Sequence after the rank-ordered pixels of the encoding block of processing.
15. the device as described in right wants 14, which is characterized in that the offset determination module includes:
Second offset determination sub-module, for using the target offset amount calculated, the method spent by calculation rate distortion to be true A fixed best initial value, the second preset quantity offset is determined using the best initial value.
16. device as claimed in claim 10, which is characterized in that the third threshold value is 42/16.
17. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein, processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor during for performing the program stored on memory, realizes any method and steps of claim 1-8.
CN201810024207.0A 2018-01-10 2018-01-10 Band mode determination method and device Active CN108235021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810024207.0A CN108235021B (en) 2018-01-10 2018-01-10 Band mode determination method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810024207.0A CN108235021B (en) 2018-01-10 2018-01-10 Band mode determination method and device

Publications (2)

Publication Number Publication Date
CN108235021A true CN108235021A (en) 2018-06-29
CN108235021B CN108235021B (en) 2020-06-19

Family

ID=62640404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810024207.0A Active CN108235021B (en) 2018-01-10 2018-01-10 Band mode determination method and device

Country Status (1)

Country Link
CN (1) CN108235021B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220510A (en) * 2012-01-20 2013-07-24 索尼公司 Flexible band offset mode in sample adaptive offset in HEVC
CN103442229A (en) * 2013-08-27 2013-12-11 复旦大学 Bit rate estimation method of SAO mode decision applied to encoder of HEVC standard
CN103647975A (en) * 2013-12-02 2014-03-19 国家广播电影电视总局广播科学研究院 Improved sample adaptive offset filtering method based on histogram analysis
US20140307772A1 (en) * 2013-04-12 2014-10-16 Sony Corporation Image processing apparatus and image processing method
EP2869554A1 (en) * 2012-06-27 2015-05-06 Panasonic Intellectual Property Corporation of America Image coding method, image decoding method, image coding device, image decoding device, and image coding and decoding apparatus
CN104641640A (en) * 2012-07-16 2015-05-20 三星电子株式会社 Video encoding method and video encoding apparatus and video decoding method and video decoding apparatus for signaling SAO parameter

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220510A (en) * 2012-01-20 2013-07-24 索尼公司 Flexible band offset mode in sample adaptive offset in HEVC
EP2869554A1 (en) * 2012-06-27 2015-05-06 Panasonic Intellectual Property Corporation of America Image coding method, image decoding method, image coding device, image decoding device, and image coding and decoding apparatus
CN104641640A (en) * 2012-07-16 2015-05-20 三星电子株式会社 Video encoding method and video encoding apparatus and video decoding method and video decoding apparatus for signaling SAO parameter
US20140307772A1 (en) * 2013-04-12 2014-10-16 Sony Corporation Image processing apparatus and image processing method
CN103442229A (en) * 2013-08-27 2013-12-11 复旦大学 Bit rate estimation method of SAO mode decision applied to encoder of HEVC standard
CN103647975A (en) * 2013-12-02 2014-03-19 国家广播电影电视总局广播科学研究院 Improved sample adaptive offset filtering method based on histogram analysis

Also Published As

Publication number Publication date
CN108235021B (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN108184115B (en) HEVC intra-frame CU partition and PU prediction mode selection method and system
CN110839155B (en) Method and device for motion estimation, electronic equipment and computer-readable storage medium
CN106296578B (en) Image processing method and device
CN102860005B (en) Block elimination filtering controls
Ruiz et al. Fast intra mode decision algorithm based on texture orientation detection in HEVC
CN104982035B (en) The method encoded for the sequence to digital picture
CN106028047B (en) A method of the fast mode decision and PU of the intra prediction based on Hadamard transformation divide
US11259029B2 (en) Method, device, apparatus for predicting video coding complexity and storage medium
CN110072112B (en) Intra-frame prediction method, encoder and storage device
CN110062230B (en) Image coding method and device
US20090028429A1 (en) Image processing apparatus, computer readable medium storing program, method and computer data signal
CN109819250A (en) A kind of transform method and system of the full combination of multicore
CN115118977B (en) Intra-frame prediction encoding method, system, and medium for 360-degree video
Chen et al. Rough mode cost–based fast intra coding for high-efficiency video coding
Park CU encoding depth prediction, early CU splitting termination and fast mode decision for fast HEVC intra-coding
CN104811730A (en) Video image intra-frame encoding unit texture analysis and encoding unit selection method
CN108235021A (en) A kind of band mode determining methods and device
CN113132725A (en) Deblocking filtering optimization method, device, equipment and medium
CN103841385A (en) Image dithering processing method and device
CN108322741A (en) A kind of method and device of determining coding mode
Jiménez-Moreno et al. Bayesian adaptive algorithm for fast coding unit decision in the High Efficiency Video Coding (HEVC) standard
CN115623205A (en) Encoding processing method and device, electronic equipment and storage medium
CN109951707B (en) Target motion vector selection method and device, electronic equipment and medium
Gao et al. A fast HEVC inter CU size decision algorithm based on multi-class learning
WO2020140244A1 (en) Video image processing method and device, and storage medium

Legal Events

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