CN114255153A - Ultrahigh-definition image hybrid processing method and device - Google Patents

Ultrahigh-definition image hybrid processing method and device Download PDF

Info

Publication number
CN114255153A
CN114255153A CN202111448298.9A CN202111448298A CN114255153A CN 114255153 A CN114255153 A CN 114255153A CN 202111448298 A CN202111448298 A CN 202111448298A CN 114255153 A CN114255153 A CN 114255153A
Authority
CN
China
Prior art keywords
instruction set
image
target
source image
target image
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
CN202111448298.9A
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.)
Totem Vision Guangzhou Digital Technology Co ltd
Original Assignee
Beijing Xinaote Totem 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 Xinaote Totem Technology Co ltd filed Critical Beijing Xinaote Totem Technology Co ltd
Priority to CN202111448298.9A priority Critical patent/CN114255153A/en
Publication of CN114255153A publication Critical patent/CN114255153A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides a method and a device for hybrid processing of ultra-high definition images, wherein the method comprises the following steps: determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order; determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment; and calling the target instruction set, acquiring a source image and a target image, and selecting pixel points of the source image and the target image for mixing processing. The embodiment of the invention can preferentially call the instruction set with high processing capability to perform parallel operation on the pixel points of the mixed ultra-high definition image, thereby improving the processing efficiency and realizing the full utilization of the optimal performance of the machine.

Description

Ultrahigh-definition image hybrid processing method and device
Technical Field
The invention relates to the field of broadcast television, in particular to an ultra-high-definition image hybrid processing method and an ultra-high-definition image hybrid processing device.
Background
With the development of Ultra High Definition (UHD) technology, the resolution of video images is improved from 1920 × 1080 of High Definition (HD) to 3840 × 2160 of 4K and 7680 × 4320 of 8K, and R, G, B is improved to 10 bits, 12 bits or even 14 bits per color by 8-bit representation of one byte, the color level is increased, the operation amount of ultra high definition image mixing is far greater than that of high definition images, and with the image processing based on the SEE2 instruction set in the prior art, the function call overhead is large and the processing efficiency is low.
And at present, the CPU and the compiler can support the vector processing capability of an x86 architecture microprocessor to be expanded to an instruction set with more digits, the processing capability is greatly improved, and the optimal performance of the machine cannot be fully utilized only by using an SSE2 instruction set to process images.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide an ultra high definition image mix processing method and a corresponding ultra high definition image mix processing apparatus that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses an ultra high definition image hybrid processing method, which is applied to a terminal device, and the method includes:
determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order;
determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment;
and calling the target instruction set, acquiring a source image and a target image, and selecting pixel points of the source image and the target image for mixing processing.
Optionally, before selecting the pixel points of the source image and the target image to perform the mixing processing, the method further includes:
and shifting the source image data and the target image data, and adjusting the bit number of the source image data and the target image data to a preset bit number N, wherein N is a natural number.
Optionally, before selecting the pixel points of the source image and the target image to perform the mixing processing, the method further includes:
judging whether special pixel points exist in the selected pixel points of the source image and the target image;
marking bit recording is carried out on the special pixel points; what is needed isThe special pixel point has Alpha value of 0 or 2N-1 pixel point;
modifying Alpha value of the special pixel point to be 1 to 2N-any value of 2.
Optionally, after selecting the pixel points of the source image and the target image to perform the mixing processing, the method further includes:
and after the mixing processing is finished, shifting the mixed image by using the target instruction set, and recovering the original bit number.
Optionally, after performing a shift operation on the mixed image by using the target instruction set and restoring the original bit number, the method further includes:
and restoring the pixel point value corresponding to the mark bit record in the mixed image into the pixel point value of the source image or the target image.
Optionally, the method further comprises:
if the terminal equipment does not support the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, acquiring a source image and a target image;
and carrying out image mixing on the pixel points of the source image and the target image in a pixel-by-pixel serial manner.
The embodiment of the invention also discloses an ultra-high definition image hybrid processing device, which is applied to terminal equipment and comprises the following components:
the first determining module is used for determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order;
the second determining module is used for determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment;
and the calling module is used for calling the target instruction set, acquiring a source image and a target image, and selecting pixel points of the source image and the target image for mixing processing.
Optionally, the apparatus further comprises:
and the first shifting module is used for performing shifting operation on the source image and the target image data before selecting pixel points of the source image and the target image for mixing processing, and adjusting the bit number of the source image and the target image data to be a preset bit number N, wherein N is a natural number.
Optionally, before selecting the pixel points of the source image and the target image to perform the blending process, the apparatus further includes:
the judging module is used for judging whether special pixel points exist in the selected pixel points of the source image and the target image or not before the pixel points of the source image and the target image are selected for mixing processing;
the recording module is used for recording the marking position of the special pixel point; the special pixel point has an Alpha value of 0 or 2N-1 pixel point;
a modification module for modifying Alpha value of the special pixel point to 1 to 2N-any value of 2.
Optionally, after selecting the pixel points of the source image and the target image to perform the mixing processing, the apparatus further includes:
and the second shifting module is used for shifting the mixed image by using the target instruction set after the mixing processing is finished, and recovering the original bit number.
Optionally, after performing a shift operation on the mixed image by using the target instruction set and restoring the original bit number, the apparatus further includes:
and the recovery module is used for recovering the pixel point value corresponding to the mark bit record in the mixed image into the pixel point value of the source image or the target image.
Optionally, the method further comprises:
an obtaining module, configured to obtain a source image and a target image if the terminal device does not support the AVX512 instruction set, the AVX2 instruction set, and the SSE2 instruction set;
and the mixing module is used for carrying out image mixing on the pixel points of the source image and the target image in a pixel-by-pixel serial mode.
The embodiment of the invention also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program when executed by the processor implementing the steps of the ultra high definition image blending processing method as described above.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the ultra-high definition image mixing processing method.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, after a user detects the SIMD instruction set supported by the terminal equipment and determines that the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set are supported by the terminal equipment, the instruction set with high processing capability can be preferentially called by setting the priorities of the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, so that the parallel operation is carried out on the pixel points of the mixed ultra-high-definition images, the processing efficiency is improved, and the optimal performance of the machine is fully utilized.
Drawings
Fig. 1 is a flowchart illustrating steps of an ultra-high definition image blending processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of another ultra-high definition image blending processing method according to an embodiment of the present invention;
fig. 3 is a block diagram of an ultra-high-definition image hybrid processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
In the prior art, for an 8-bit high-definition image, an SEE2 instruction set is used to perform a mixing processing mode on the image, and 4 pixels are mixed at a time. With the development of Ultra High Definition (UHD) technology, the computation of ultra high definition image mixing is much larger than that of high definition images, and the image processing function call cost using SEE2 is higher and the processing efficiency is lower.
Moreover, the current CPU and compiler can support the SSE2 instruction set extending the vector processing capability to 128 bits, the AVX2 instruction set extending to 256 bits, the AVX512 instruction set extending to 512 bits, etc. in the x86 architecture microprocessor, and the image is processed only by using the SSE2 instruction set, which cannot fully utilize the optimal performance of the machine.
In order to solve the above technical problems, the present application provides a method for hybrid processing of ultra high definition images, which has a core concept that priority orders of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set in the instruction set are determined by checking an instruction set supported by a terminal device, a target instruction set is determined according to the priority order of the instruction set supported by the terminal device, and then the instruction set is used for hybrid processing of ultra high definition images, so that image processing efficiency is improved, and optimal performance of the terminal device is fully utilized.
Referring to fig. 1, a flowchart illustrating steps of an ultra-high-definition image mixing processing method provided in an embodiment of the present invention is applied to a terminal device, where the method specifically includes the following steps:
step 101, determining an instruction set supported by terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order.
The SSE2 instruction set is a streaming data single instruction multiple data expansion instruction set 2, is a SIMD instruction set with an IA-32 architecture, and compared with SSE, SSE2 uses 144 new instructions, expands the MMX technology and the SSE technology, and improves the operation performance of a large number of application programs. Based on the ultra high definition image blending processing of the SSE2 instruction set, a 128-bit integer command can operate 2 pixels at a time in parallel.
The AVX2 instruction set is an advanced vector extension instruction set, which is an instruction set in an x86 architecture microprocessor, and the AVX2 instruction set extends most integer command operations to 256 bits, and introduces Fused Multiply Accumulate (FMA) operation, thereby further improving the running performance of a large number of application programs. Ultra high definition image blending processing based on the AVX2 instruction set may operate 4 pixels at a time in parallel.
The AVX512 instruction set further expands the AVX instruction to 512 bits by using a new EVEX prefix code, compared with the AVX2, the width and the number of data registers and the width of an FMA unit are increased by one time, so that 32 times of double-precision and 64 times of single-precision floating point operations or 8 64 bits and 16 32 bits of integers can be packed in each clock cycle, and therefore, unprecedented strong performance can be brought in intensive computing application scenes such as image/audio/video processing, data analysis, scientific computing, data encryption and compression, artificial intelligence/deep learning and the like, the theoretical floating point performance is doubled, and the performance of the integer computing is increased by about 33%. The ultra-high-definition image blending process based on the AVX512 instruction set can operate 8 pixels at a time in parallel.
In a specific application, CPU information is acquired through a CPUID instruction so as to detect the support of a CPU and a compiler on SIMD (single instruction multiple data stream) instruction set extension, wherein the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set are prioritized according to the processing capacity. For example, the processing capability of the AVX512 instruction set is greater than the AVX2 instruction set and greater than the SSE2 instruction set, and correspondingly, the AVX512 instruction set has a higher priority than the AVX2 instruction set and a higher priority than the SSE2 instruction set.
And 102, determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment.
After the terminal equipment is determined to support the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, the target instruction set is determined according to the priorities of the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set.
103, calling the target instruction set to acquire a source image and a target image; and selecting pixel points of the source image and the target image for mixing processing.
Detecting and determining a SIMD instruction set supported by the terminal equipment, if a processor and a compiler in the terminal equipment simultaneously support the AVX512 instruction set, calling an ultra-high-definition image mixing program of the AVX512 instruction, otherwise checking whether the AVX2 instruction set is supported, if so, calling the ultra-high-definition image mixing program of the AVX2 instruction, otherwise, continuously checking whether the SSE2 instruction set is supported, and if so, calling the ultra-high-definition image mixing program of the SSE2 instruction. And acquiring a source image and a target image by using an ultra-high-definition image mixing program of the determined target instruction set, and mixing pixel points of the source image and the target image.
In the embodiment of the invention, after the SIMD instruction set supported by the terminal equipment is detected, the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set supported by the terminal equipment are determined, and the priority of the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set is set, so that the instruction set with high processing capability can be called preferentially, the pixel points of the mixed image are operated in parallel, the processing efficiency is improved, and the optimal performance of the machine is fully utilized.
Referring to fig. 2, a flowchart illustrating steps of another ultra-high definition image processing method provided in an embodiment of the present invention is shown, and is applied to a terminal device, where the method specifically includes the following steps:
step 201, determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order.
Step 202, determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment.
Step 203, calling the target instruction set to obtain a source image and a target image.
In a specific implementation, the instruction set is determined, the target instruction set is determined according to the priority of the instruction set, and then the process of obtaining the source image and the target image by calling the target instruction set is invoked, which is similar to steps 101 to 103 in the foregoing embodiment and may refer to each other, which is not described again in this embodiment.
And 204, performing shift operation on the source image and the target image data, and adjusting the bit number of the source image and the target image data to a preset bit number N, wherein N is a natural number.
Illustratively, the ultra high definition image blending program based on the AVX512 instruction set reads 512-bit 8-pixel data at a time, the ultra high definition image blending program based on the AVX2 instruction set reads 256-bit 4-pixel data at a time, and the ultra high definition image blending program based on the SSE2 instruction set reads 128-bit 2-pixel data at a time.
In order to facilitate parallel calculation of the selected pixel points and improve the image processing efficiency, the source image and the target image data are subjected to shift operation, and the bit number of the source image and the bit number of the target image data are uniformly adjusted to be the preset bit number. For example, in the process of processing based on a 10-bit/12-bit/14-bit high-definition image, the source image and the target image data may be shifted according to double bytes, each channel of 10-bit image pixels is shifted to the left by 6 bits, each channel of 12-bit image pixels is shifted to the left by 4 bits, each channel of 14-bit image pixels is shifted to the left by 2 bits, and the source image and the target image data are unified into 16 bits.
In a specific application, the number of the preset bits is not less than 14 bits, but the number of the instruction operand is 8 bits as a basic operation unit: 8 bits of single byte, 16 bits of double byte, 32 bits of double word and 64 bits of four word, and 16 bits are adopted to utilize the capacity of the processor to the maximum extent.
It should be understood by those skilled in the art that the above-mentioned predetermined number of bits is only an example of the present invention, and those skilled in the art may preset other number of bits, which is not less than 14 bits, and the present invention is not limited herein.
Step 205, judging whether there is a special pixel point in the selected pixel points of the source image and the target image;
step 206, marking bit recording is carried out on the special pixel points; the special pixel point has an Alpha value of 0 or 2N-1 pixel point;
step 207, modifying the Alpha value of the special pixel point to 1 to 2N-any value of 2.
Judging whether special pixel points exist in the pixel points of the selected source image and the target image, namely the Alpha value is 0 or 2N-1 pixel point, recording the flag bit of the special pixel point, and then modifying the Alpha value of the special pixel point to 1 to 2N-any value of 2.
Specifically, in an ultra high definition image, the Alpha channel may be a 16-bit gray channel, which records transparency information in the image with 65536 gray levels, defines transparent, opaque and translucent areas, and when the Alpha value is 0, the pixel is considered to be completely transparent, and when the Alpha value is 65535, the pixel is completely opaque. Different from the common pixel points with Alpha values of 1-65534, the special pixel points are mixed without complex operation, and the value of the special pixel points is the source pixel value or the target pixel value.
In a specific implementation, during parallel operation, each channel performs mixed operation according to 16 bits of double bytes. Whether the parallel pixels have the special pixel points with Alpha being 0 or Alpha being 65535 full transparent or opaque is judged firstly, the marking bit recording is carried out on the special pixels, the Alpha value of the special pixel points is modified into any value from 1 to 65534, so that the special pixel point result with the Alpha value changed is corrected, and the error condition of removing 0 is avoided.
And 208, selecting pixel points of the source image and the target image to perform mixing processing.
Specifically, the source image and the target image are unified into 16 bits, the Alpha value of a special pixel point is modified into any value of 1-65534, the modified Alpha value and other pixels participate in parallel operation, and the pixel points of the source image and the target image are mixed.
In the 10 bit/12 bit/14 bit image processing process, 16 bits and 2 bytes are used for representing one channel, so that one pixel RGBA is represented by 64 bits and 8 bytes. Based on the mixing process of AVX512, 8 pixels are operated in parallel at a time; 4 pixels are operated in parallel at a time based on the blending process of AVX 2; based on the blending process of SSE2, 2 pixels are operated on in parallel at a time.
And 209, after the mixing processing is finished, shifting the mixed image by using the target instruction set, and recovering the original bit number.
And after the mixing processing is finished, performing shift operation on the mixed image according to 16 bits of the double bytes by using the determined target instruction set, and recovering the original bit number. Each channel of the image pixel is shifted right by 6 bits and restored to 10 bits; the image pixels are right shifted by 4 bits to 12 bits per channel and restored to 14 bits per channel.
And step 210, restoring the pixel point values corresponding to the mark bit records in the mixed image into the pixel point values of the source image or the target image.
Specifically, after the mixed images are subjected to shift operation, and the original bit positions of the channels are restored, the marking bits are recorded into corresponding pixel points, and the corresponding pixel points are restored to pixel points of the source images or the target images.
The special pixel points are different from the ordinary pixel points with Alpha values of 1-65534, the special pixel points are mixed without complex operation, and the value of the special pixel points is the source pixel value or the target pixel value. In a specific implementation, when a special pixel point with an Alpha value of 0 or 65535 recorded by a marker bit is corrected to be any value of 1-65534 and participates in parallel operation with other pixels, the operation result is shifted according to 16 bits of double bytes to restore the original bit number, and then a corresponding pixel point is found according to the recorded marker bit and restored to a source pixel value or a target pixel value. For example, the obtained source pixel point is red with a fully transparent Alpha of 0, the target pixel point is yellow with a non-special pixel, before mixing, the source pixel point is marked as a special pixel point, the Alpha value is modified to be non-fully transparent red, the source pixel point is mixed with the target yellow pixel to obtain a certain orange color between red and yellow, the source pixel point recorded according to the marking is transparent, and the source pixel point is directly filled with the yellow of the target pixel point and is recovered as the target pixel point.
Step 211, if the terminal device does not support the AVX512 instruction set, AVX2 instruction set, and SSE2 instruction set, acquiring a source image and a target image; and carrying out image mixing on the pixel points of the source image and the target image in a pixel-by-pixel serial manner.
In a specific implementation, if the terminal device does not support the AVX512 instruction set, the AVX2 instruction set, and the SSE2 instruction set, the instruction set is not applied to parallel processing, but one pixel point of the source image and one pixel point of the target image are respectively selected each time to perform image mixing processing.
In the embodiment of the invention, after the SIMD instruction set supported by the terminal equipment is detected and the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set supported by the terminal equipment are determined, the instruction set with high processing capability can be preferentially called by setting the priorities of the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, so that the parallel operation is carried out on the pixel points of the mixed ultra-high-definition images, the processing efficiency is improved, and the optimal performance of the machine is fully utilized. And moreover, the bit number of the source image data and the target image data is shifted and uniformly adjusted to be the preset bit number, so that the selected pixel points can be conveniently subjected to parallel calculation, and the image processing efficiency is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a super high definition image hybrid processing apparatus according to an embodiment of the present invention is shown, and specifically includes the following modules:
a first determining module 301, configured to determine an instruction set supported by a terminal device; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order;
a second determining module 302, configured to determine a target instruction set according to a priority order of instruction sets supported by the terminal device;
and the calling module 303 is configured to call the target instruction set, acquire a source image and a target image, and select pixel points of the source image and the target image to perform mixing processing.
In one embodiment of the invention, the apparatus further comprises:
and the first shifting module is used for performing shifting operation on the source image and the target image data before selecting pixel points of the source image and the target image for mixing processing, and adjusting the bit number of the source image and the target image data to be a preset bit number N, wherein N is a natural number.
In one embodiment of the invention, the apparatus further comprises:
the judging module is used for judging whether special pixel points exist in the selected pixel points of the source image and the target image or not before the pixel points of the source image and the target image are selected for mixing processing;
the recording module is used for recording the marking position of the special pixel point; the special pixel point has an Alpha value of 0 or 2N-1 pixel point;
a modification module for modifying Alpha value of the special pixel point to 1 to 2N-any value of 2.
In one embodiment of the invention, the apparatus further comprises:
and the second shifting module is used for shifting the mixed image by using the target instruction set after the mixing processing is finished, and recovering the original bit number.
In one embodiment of the invention, the apparatus further comprises:
and the recovery module is used for recovering the pixel point value corresponding to the mark bit record in the mixed image into the pixel point value of the source image or the target image.
In one embodiment of the invention, the apparatus further comprises:
an obtaining module, configured to obtain a source image and a target image if the terminal device does not support the AVX512 instruction set, the AVX2 instruction set, and the SSE2 instruction set;
and the mixing module is used for carrying out image mixing on the pixel points of the source image and the target image in a pixel-by-pixel serial mode.
In the embodiment of the invention, after a user detects the SIMD instruction set supported by the terminal equipment and determines that the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set are supported by the terminal equipment, the instruction set with high processing capability can be preferentially called by setting the priorities of the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, so that the parallel operation is carried out on the pixel points of the ultra-high-definition mixed image, the processing efficiency is improved, and the optimal performance of the machine is fully utilized.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
the ultra-high-definition image hybrid processing method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the ultra-high-definition image hybrid processing method embodiment is realized, the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the above ultra-high-definition image hybrid processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The ultra-high-definition image hybrid processing method and the ultra-high-definition image hybrid processing device provided by the invention are described in detail, and a specific example is applied in the description to explain the principle and the implementation mode of the invention, and the description of the above embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An ultra-high-definition image mixing processing method is applied to a terminal device, and comprises the following steps:
determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order;
determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment;
and calling the target instruction set, acquiring a source image and a target image, and selecting pixel points of the source image and the target image for mixing processing.
2. The method of claim 1, wherein before selecting the pixel points of the source image and the target image for blending, the method further comprises:
and shifting the source image data and the target image data, and adjusting the bit number of the source image data and the target image data to a preset bit number N, wherein N is a natural number.
3. The method of claim 2, wherein before selecting the pixel points of the source image and the target image for blending, the method further comprises:
judging whether special pixel points exist in the selected pixel points of the source image and the target image;
marking bit recording is carried out on the special pixel points; the special pixel point has an Alpha value of 0 or 2N-1 pixel point;
modifying Alpha value of the special pixel point to be 1 to 2N-any value of 2.
4. The method of claim 3, wherein after selecting the pixel points of the source image and the target image for blending, the method further comprises:
and after the mixing processing is finished, shifting the mixed image by using the target instruction set, and recovering the original bit number.
5. The method of claim 4, wherein after the shifting operation is performed on the blended image using the target instruction set to recover the original number of bits, the method further comprises:
and restoring the pixel point value corresponding to the mark bit record in the mixed image into the pixel point value of the source image or the target image.
6. The method of claim 1, further comprising:
if the terminal equipment does not support the AVX512 instruction set, the AVX2 instruction set and the SSE2 instruction set, acquiring a source image and a target image;
and carrying out image mixing on the pixel points of the source image and the target image in a pixel-by-pixel serial manner.
7. An ultra-high-definition image mixing processing apparatus, applied to a terminal device, the apparatus comprising:
the first determining module is used for determining an instruction set supported by the terminal equipment; the instruction set comprises at least one of an AVX512 instruction set, an AVX2 instruction set, and an SSE2 instruction set; the AVX512 instruction set, AVX2 instruction set, SSE2 instruction set have a priority order;
the second determining module is used for determining a target instruction set according to the priority order of the instruction sets supported by the terminal equipment;
and the calling module is used for calling the target instruction set, acquiring a source image and a target image, and selecting pixel points of the source image and the target image for mixing processing.
8. The apparatus of claim 7, further comprising:
and the first shifting module is used for performing shifting operation on the source image and the target image data before selecting pixel points of the source image and the target image for mixing processing, and adjusting the bit number of the source image and the target image data to be a preset bit number N, wherein N is a natural number.
9. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the ultra high definition image blending processing method according to any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the ultra high definition image blending processing method according to any one of claims 1 to 6.
CN202111448298.9A 2021-11-30 2021-11-30 Ultrahigh-definition image hybrid processing method and device Pending CN114255153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111448298.9A CN114255153A (en) 2021-11-30 2021-11-30 Ultrahigh-definition image hybrid processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111448298.9A CN114255153A (en) 2021-11-30 2021-11-30 Ultrahigh-definition image hybrid processing method and device

Publications (1)

Publication Number Publication Date
CN114255153A true CN114255153A (en) 2022-03-29

Family

ID=80793685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111448298.9A Pending CN114255153A (en) 2021-11-30 2021-11-30 Ultrahigh-definition image hybrid processing method and device

Country Status (1)

Country Link
CN (1) CN114255153A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383803A (en) * 2023-03-14 2023-07-04 成都海泰方圆科技有限公司 Data processing method, device, computer equipment and storage medium
CN116452471A (en) * 2023-06-20 2023-07-18 深圳市景创科技电子股份有限公司 Processing method and device for ultra-high definition image, terminal equipment and computer medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383803A (en) * 2023-03-14 2023-07-04 成都海泰方圆科技有限公司 Data processing method, device, computer equipment and storage medium
CN116452471A (en) * 2023-06-20 2023-07-18 深圳市景创科技电子股份有限公司 Processing method and device for ultra-high definition image, terminal equipment and computer medium
CN116452471B (en) * 2023-06-20 2023-10-13 深圳市景创科技电子股份有限公司 Processing method and device for ultra-high definition image, terminal equipment and computer medium

Similar Documents

Publication Publication Date Title
CN114255153A (en) Ultrahigh-definition image hybrid processing method and device
RU2714103C1 (en) Methods for encoding, decoding and displaying high-dynamic range images
US7652595B2 (en) Generating a data stream and identifying positions within a data stream
CN101192400B (en) Image processing device, method and program
CN110768785B (en) Encoding and decoding methods, related devices and computer equipment
US5872965A (en) System and method for performing multiway branches using a visual instruction set
CN110996171B (en) Training data generation method and device for video tasks and server
Chang et al. A new distortion-free data embedding scheme for high-dynamic range images
WO2016056974A1 (en) Evaluation measure for hdr video frames
US9813762B2 (en) Creating hash values indicative of differences in images
CN110430335B (en) Information disguising and recovering method, equipment and storage medium
CN109389546B (en) Multi-block reversible watermark embedding method and device and watermark extracting method and device
CN111669477B (en) Image processing method, system, device, equipment and computer storage medium
CN114926491A (en) Matting method and device, electronic equipment and storage medium
US7869516B2 (en) Motion estimation using bit-wise block comparisons for video compresssion
JP3808798B2 (en) Color signal expansion apparatus and color signal expansion method
US20040193847A1 (en) Intra-register subword-add instructions
CN110930292B (en) Image processing method, device, computer storage medium and terminal
CN111857651B (en) Method for parallel addition of multiple small bits by multi-bit adder and application thereof
US20110016168A1 (en) Method and apparatus for modulo n calculation
US20040249474A1 (en) Compare-plus-tally instructions
CN116634156A (en) Picture compression processing method and device
CN112528234B (en) Reversible information hiding method based on prediction error expansion
CN110264412B (en) Image processing method, image processing device, terminal device and storage medium
EP1761845B1 (en) Bit-plane extraction operation

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220614

Address after: Room 164, No. 31, Qifu Road, Yuncheng street, Baiyun District, Guangzhou, Guangdong 510410

Applicant after: Totem vision (Guangzhou) Digital Technology Co.,Ltd.

Address before: 100195 No. 627, floor 6, building 1, courtyard 131, West Fourth Ring North Road, Haidian District, Beijing

Applicant before: Beijing Xinaote totem Technology Co.,Ltd.