CN117834895A - Intra-frame bit allocation method for JPEG-XS encoder - Google Patents

Intra-frame bit allocation method for JPEG-XS encoder Download PDF

Info

Publication number
CN117834895A
CN117834895A CN202311711485.0A CN202311711485A CN117834895A CN 117834895 A CN117834895 A CN 117834895A CN 202311711485 A CN202311711485 A CN 202311711485A CN 117834895 A CN117834895 A CN 117834895A
Authority
CN
China
Prior art keywords
complexity
bit
bit number
current
selected area
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.)
Pending
Application number
CN202311711485.0A
Other languages
Chinese (zh)
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 Arcvideo Technology Co ltd
Original Assignee
Hangzhou Arcvideo 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 Hangzhou Arcvideo Technology Co ltd filed Critical Hangzhou Arcvideo Technology Co ltd
Priority to CN202311711485.0A priority Critical patent/CN117834895A/en
Publication of CN117834895A publication Critical patent/CN117834895A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an intra-frame bit allocation method of a JPEG-XS encoder, which comprises the following steps: performing wavelet transformation on an input YUV image in the vertical direction and the horizontal direction according to coding parameters to obtain transformation coefficients of the whole image after all wavelet transformation; calculating all coefficients subjected to wavelet transformation as a group according to 4 of JPEG-XS standards, and recording the largest bit count in each group; calculating the total bit number RD available for dynamic allocation and the average allocated bit number RA (i) of each selected area according to the target compression rate and the complexity condition of each selected area; according to the proportion of the complexity of the current selected area to the total complexity of the whole image, the dynamic allocation bit number of the current selected area is allocated proportionally, and the average allocation bit number of the selected area is combined to be the bit number of the current selected area; traversing the complexity of all the selected areas again, and if the complexity difference between all the continuous and adjacent selected areas is small, averaging the bit numbers of the continuous selected areas; encoding is performed.

Description

Intra-frame bit allocation method for JPEG-XS encoder
Technical Field
The invention belongs to the technical field of video coding, and particularly relates to an intra-frame bit allocation method of a JPEG-XS encoder.
Background
With the development of high and new videos such as 4K,8K and VR, the video data volume is obviously increased, and great challenges are presented to the program making and transmitting. The conventional playing field coding is difficult to simultaneously meet the requirements of low delay, low complexity and high quality required by a real-time playing scene, so the international standard organization sets the JPEG-XS coding standard. Unlike conventional codec techniques, the JPEG-XS technique has the advantages of low latency, constant quality, visual lossless, low complexity, no significant degradation in quality after multiple codecs, and the like.
In the JPEG-XS coding standard, after multiple wavelet transforms, the YUV image is divided into different bands (bands, data sets with the same number of vertical and horizontal wavelet transforms) according to the energy bands contained in the YUV image, and each pre contains one or two lines of data in each band. The relation between the pre and the band is shown in fig. 1 and 2, wherein fig. 1 is the band distribution condition in the image when 2 is decomposed horizontally 5 and vertically; FIG. 2 shows the band distribution in the presinct for horizontal decomposition 5 vertical decomposition 2.
The JPEG-XS adopts constant rate coding, each frame has the same data length, and the requirement on the bandwidth of a transmission link is more stable. However, different video contents have different coding complexity, and if the same coding bit number is allocated to all selected regions in a frame (data set with all band quantization indexes), different region quality in the picture may be inconsistent. .
Disclosure of Invention
In view of the above problems, the invention provides an intra-frame bit allocation method of a JPEG-XS encoder, which ensures more constant quality of the encoded video and greatly improves the overall subjective and objective quality by optimizing bit number allocation of different selective areas of each frame.
In order to solve the technical problems, the invention adopts the following technical scheme:
an intra bit allocation method of a JPEG-XS encoder, comprising the steps of:
performing wavelet transformation on an input YUV image in the vertical direction and the horizontal direction according to coding parameters to obtain transformation coefficients of the whole image after all wavelet transformation;
calculating all coefficients subjected to wavelet transformation as a group according to 4 of JPEG-XS standards, and recording the largest bit count in each group; counting the sum of all bitplane counts in the current selected region pre, and marking the sum as the complexity C (i) of the current pre; counting the sum of all biplane counts of the whole image, and recording the sum as the total complexity C of the current image;
calculating the total bit number RD available for dynamic allocation and the average allocated bit number RA (i) of each selected area according to the target compression rate and the complexity condition of each selected area;
according to the proportion of the complexity of the current selected area to the total complexity of the whole image, the dynamic allocation bit number of the current selected area is allocated proportionally, and the average allocation bit number of the selected area is combined to be the bit number of the current selected area;
traversing the complexity of all the selected areas again, and if the complexity difference between all the continuous and adjacent selected areas is small, averaging the bit numbers of the continuous selected areas;
coding, if the final consumed bit number of the current selected area is smaller than the allocated bit number in the coding process, the redundant bit number is evenly allocated to all the rest selected areas; if the final consumed bit number of the current selected area is larger than the allocated bit number, the remaining bit numbers of all selected areas are divided by the average value obtained by subtracting the multi-consumed bit number of the current selected area from the remaining selected area; the number of coded bits consumed by the last selection is not allowed to be greater than the number of allocated bits.
In a possible implementation manner, the calculating the total number of bits available for dynamic allocation and the average allocated number of bits of each selection according to the target compression rate and each selection complexity condition includes:
setting the total bit number of a frame of image as R, setting the maximum selected region pre complexity in the image as Cmax, setting the minimum selected region pre complexity as Cmin, setting the video compression rate as Ratio, and setting the total number of the images as Cnt;
the number of bits RD available for dynamic allocation for the current frame is calculated as:
calculating the distribution bit number RA (i) of each pre of the current frame as follows:
in a possible implementation manner, the step of proportionally distributing the dynamic distribution bit number occupied by the current selected area according to the ratio of the complexity of the current selected area to the total complexity of the whole image, and the step of combining the average distribution bit number of the selected area to be the bit number of the current selected area includes:
in one possible embodiment, the complexity difference is small, with a maximum of less than 5%.
The invention has the following beneficial effects: the method comprises the steps of performing wavelet transformation on an input image, calculating the complexity of the pre-coding, calculating the number of allocable bits, allocating the number of pre-coding bits, smoothing the allocation of the pre-coding bits, dynamically adjusting the number of pre-coding bits, analyzing the complexity of the coding pre-coding of each frame of picture, dynamically allocating the number of coding bits required by the pre-coding, and greatly improving the overall subjective and objective quality of the whole under the condition of almost no additional performance cost, and simultaneously enabling the quality of video to be more constant. And the method fully utilizes the wavelet transformation and the result generated by the bitplane count calculation which are necessary in the JPEG-XS standard realization process as input, does not bring extra calculation complexity, and has considerable application prospect.
Drawings
FIG. 1 is a diagram of the band distribution in an image of the prior art;
FIG. 2 is a schematic diagram of the distribution of band in the prespecet in the prior art;
FIG. 3 is a flowchart illustrating a method for intra-frame bit allocation for a JPEG-XS encoder according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to FIG. 3, a flowchart illustrating steps of an intra bit allocation method of a JPEG-XS encoder according to an embodiment of the present invention includes the steps of:
s1, carrying out wavelet transformation on an input YUV image in the vertical direction and the horizontal direction according to coding parameters to obtain transformation coefficients of the whole image after all wavelet transformation; the time domain signal is converted into the frequency domain signal through wavelet transformation, and meanwhile, the information entropy is mainly concentrated in the upper left corner area of the image, and the larger information entropy needs to be encoded by more bits, so that the complexity of the information entropy can be embodied.
S2, calculating all coefficients subjected to wavelet transformation as a group according to 4 of JPEG-XS standards, and recording the largest bit count in each group; counting the sum of all bitplane counts in the current selected region pre, and marking the sum as the complexity C (i) of the current pre; counting the sum of all biplane counts of the whole image, and recording the sum as the total complexity C of the current image; where the bit count is the total number of bits between the highest non-zero bit to the lowest bit in the binary number.
S3, calculating the total bit number RD available for dynamic allocation and the average allocated bit number RA (i) of each selected area according to the target compression rate and the complexity of each selected area;
s4, according to the proportion of the complexity of the current selected area to the total complexity of the whole image, the dynamic allocation bit number of the current selected area is allocated proportionally, and the average allocation bit number of the selected area is combined to be the bit number of the current selected area;
s5, traversing the complexity of all the selected areas again, and if the complexity difference between all the continuous and adjacent selected areas is small, averaging the bit numbers of the continuous selected areas.
In a specific application example, the complexity difference is smaller, for example, the maximum value of the complexity difference is smaller than 5%.
S6, coding, wherein if the final consumed bit number of the current selected area is smaller than the allocated bit number in the coding process, the redundant bit number is evenly allocated to all the rest selected areas; if the final consumed bit number of the current selected area is larger than the allocated bit number, the remaining bit numbers of all selected areas are divided by the average value obtained by subtracting the multi-consumed bit number of the current selected area from the remaining selected area; the number of coded bits consumed by the last selection is not allowed to be greater than the number of allocated bits.
In a still further embodiment of the present invention, the intra-frame bit allocation method of the JPEG-XS encoder, calculating the total number of bits available for dynamic allocation and the average number of allocated bits per bin according to the target compression rate and the complexity of each bin in S3 includes:
setting the total bit number of a frame of image as R, setting the maximum selected region pre complexity in the image as Cmax, setting the minimum selected region pre complexity as Cmin, setting the video compression rate as Ratio, and setting the total number of the images as Cnt;
the number of bits RD available for dynamic allocation for the current frame is calculated as:
calculating the distribution bit number RA (i) of each pre of the current frame as follows:
in the intra-frame bit allocation method of the JPEG-XS encoder according to still another embodiment of the present invention, in S4, according to the ratio of the complexity of the current selected area to the total complexity of the whole image, the dynamic allocation bit number occupied by the current selected area is allocated proportionally, and the average allocation bit number of the selected area is combined to be the bit number of the current selected area, which includes:
table 1 shows a bit saving table of the intra bit allocation method of the JPEG-XS encoder using the embodiments of the present invention relative to the average bit allocation method, it can be seen that for the pictures of Class A/7680x4320, the code rate is reduced by 6.69%, and the encoding time is increased by 6.08%; for a picture of Class B/7680x4320, the code rate is reduced by 3.42%, and the coding time is increased by 6.25%; for a picture of Class C/3840x2160, the code rate is reduced by 9.46%, and the coding time is increased by 6.73%; for the pictures of ClassD/3840x2160, the code rate is reduced by 3.37%, and the coding time is increased by 6.45%; for a ClassE/1920x1080 picture, the code rate is reduced by 15.47%, and the coding time is increased by 5.75%; for the pictures of ClassF/1920x1080, the code rate is reduced by 44.06%, and the coding time is increased by 19.05%.
Table 1 is a bit saving table using the implementation method of the present invention and the existing average bit allocation method
Sequence(s) BD-Rate TS(%)
Class A/7680x4320 -6.69% -6.08%
Class B/7680x4320 -3.42% -6.25%
Class C/3840x2160 -9.46% -6.73%
Class D/3840x2160 -3.37% -6.45%
Class E/1920x1080 -15.47% -5.75%
Class F/1920x1080 -44.06% -19.05%
Through the intra-frame bit allocation method of the JPEG-XS encoder, the encoding complexity of each frame picture can be dynamically analyzed, the number of encoding bits required by the predictors can be dynamically allocated, the quantization loss of each predictor can be more approximate, the picture quality in the frame is more constant, and the overall subjective and objective quality of the video is greatly improved. Meanwhile, the embodiment of the invention fully utilizes the wavelet transformation and the result generated by bitplane count calculation which are necessary in the JPEG-XS standard realization process as input, so that the improvement of the coding quality can be realized almost without increasing extra performance expenditure, and the invention has a considerable application prospect.
It should be understood that the exemplary embodiments described herein are illustrative and not limiting. Although one or more embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.

Claims (4)

1. An intra-frame bit allocation method for a JPEG-XS encoder, comprising the steps of:
performing wavelet transformation on an input YUV image in the vertical direction and the horizontal direction according to coding parameters to obtain transformation coefficients of the whole image after all wavelet transformation;
calculating all coefficients subjected to wavelet transformation as a group according to 4 of JPEG-XS standards, and recording the largest bit count in each group; counting the sum of all bitplanecounts in the current selected region precyct, and marking the sum as the complexity C (i) of the current precyct; counting the sum of all biplane counts of the whole image, and recording the sum as the total complexity C of the current image;
calculating the total bit number RD available for dynamic allocation and the average allocated bit number RA (i) of each selected area according to the target compression rate and the complexity condition of each selected area;
according to the proportion of the complexity of the current selected area to the total complexity of the whole image, the dynamic allocation bit number of the current selected area is allocated proportionally, and the average allocation bit number of the selected area is combined to be the bit number of the current selected area;
traversing the complexity of all the selected areas again, and if the complexity difference between all the continuous and adjacent selected areas is small, averaging the bit numbers of the continuous selected areas;
coding, if the final consumed bit number of the current selected area is smaller than the allocated bit number in the coding process, the redundant bit number is evenly allocated to all the rest selected areas; if the final consumed bit number of the current selected area is larger than the allocated bit number, the remaining bit numbers of all selected areas are divided by the average value obtained by subtracting the multi-consumed bit number of the current selected area from the remaining selected area; the number of coded bits consumed by the last selection is not allowed to be greater than the number of allocated bits.
2. The intra-bit allocation method of a JPEG-XS encoder as recited in claim 1, wherein said calculating a total number of bits available for dynamic allocation and an average allocated number of bits per bin based on a target compression rate and each bin complexity condition comprises:
setting the total bit number of a frame of image as R, setting the maximum selected region pre complexity in the image as Cmax, setting the minimum selected region pre complexity as Cmin, setting the video compression rate as Ratio, and setting the total number of the images as Cnt;
the number of bits RD available for dynamic allocation for the current frame is calculated as:
calculating the distribution bit number RA (i) of each pre of the current frame as follows:
3. the intra-frame bit allocation method of the JPEG-XS encoder according to claim 1, wherein said proportionally allocating the number of dynamically allocated bits occupied by the current selection area according to the ratio of the complexity of the current selection area to the total complexity of the whole image, and combining the number of dynamically allocated bits of the current selection area as the number of bits of the current selection area comprises:
4. the intra-bit allocation method of a JPEG-XS encoder as recited in claim 1, wherein said complexity difference is smaller than a maximum of complexity difference of less than 5%.
CN202311711485.0A 2023-12-13 2023-12-13 Intra-frame bit allocation method for JPEG-XS encoder Pending CN117834895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311711485.0A CN117834895A (en) 2023-12-13 2023-12-13 Intra-frame bit allocation method for JPEG-XS encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311711485.0A CN117834895A (en) 2023-12-13 2023-12-13 Intra-frame bit allocation method for JPEG-XS encoder

Publications (1)

Publication Number Publication Date
CN117834895A true CN117834895A (en) 2024-04-05

Family

ID=90523561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311711485.0A Pending CN117834895A (en) 2023-12-13 2023-12-13 Intra-frame bit allocation method for JPEG-XS encoder

Country Status (1)

Country Link
CN (1) CN117834895A (en)

Similar Documents

Publication Publication Date Title
CN1037888C (en) Apparatus for hierarchically dividing video signals
CN108322747B (en) Coding unit division optimization method for ultra-high definition video
US10445901B2 (en) Image displaying method including image encoding method and image decoding method
CN108200431B (en) Bit allocation method for video coding code rate control frame layer
KR0141824B1 (en) Image compressing method & apparatus of variable length
CN1082769C (en) Post-processing method and apparatus for use in an image signal decoding system
CN104333754B (en) Based on the SHVC enhancement-layer video coding methods that predictive mode is quickly selected
CN101707714A (en) Image processing method and device of multi-picture video session
CN103647975B (en) Improved sample adaptive offset filtering method based on histogram analysis
CN112369025A (en) Context-based binary arithmetic coding and decoding
CN1502207A (en) Method of performing video encoding rate control using bit budget
CN1875635A (en) Transform domain sub-sampling for video transcoding
CN114143557B (en) Low-complexity coding method for wavelet transformation high-frequency coefficient of video image
CN1240090A (en) Data efficient quantization table for digital video signal processor
CN112218084B (en) High-efficiency video coding standard frame-level code rate control method facing surveillance video
CN106454383A (en) High-rate digital video compression processing system
US6687304B1 (en) Efficient video data data access using fixed ratio compression
CN117834895A (en) Intra-frame bit allocation method for JPEG-XS encoder
CN110971900A (en) Code rate control method suitable for 4K and 8K ultrahigh-definition motion flat video
CN113542753B (en) AVS3 video coding method and encoder
CN108737826B (en) Video coding method and device
CN103237210A (en) Bit allocation method and bit allocation system in audio coding
CN102427529B (en) Video coding and compressing method
CN106231300B (en) HEVC complexity control method based on coding unit hierarchy
CN114339263A (en) Lossless processing method for video data

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