CN112565652A - Image data storage method, storage device and computer readable storage medium - Google Patents

Image data storage method, storage device and computer readable storage medium Download PDF

Info

Publication number
CN112565652A
CN112565652A CN202011338925.9A CN202011338925A CN112565652A CN 112565652 A CN112565652 A CN 112565652A CN 202011338925 A CN202011338925 A CN 202011338925A CN 112565652 A CN112565652 A CN 112565652A
Authority
CN
China
Prior art keywords
storage
pixel
sub
block
pixel points
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
CN202011338925.9A
Other languages
Chinese (zh)
Other versions
CN112565652B (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.)
Unisoc Chongqing Technology Co Ltd
Original Assignee
Unisoc Chongqing 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 Unisoc Chongqing Technology Co Ltd filed Critical Unisoc Chongqing Technology Co Ltd
Priority to CN202011338925.9A priority Critical patent/CN112565652B/en
Publication of CN112565652A publication Critical patent/CN112565652A/en
Application granted granted Critical
Publication of CN112565652B publication Critical patent/CN112565652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • H04N5/145Movement estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes
    • H04N7/014Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes involving the use of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes
    • H04N7/0142Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes the interpolation being edge adaptive

Landscapes

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

Abstract

The embodiment of the application discloses an image data storage method, a storage device and a computer readable storage medium, wherein the method comprises the following steps: acquiring image data to be stored, including pixel values of pixels of multiple lines, and storing the pixel values of the pixels of each line in the multiple lines into X sub-storage units in a corresponding storage unit according to a storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored. By adopting the image data storage method and the storage structure in the embodiment of the application, the reading of the image data is facilitated, and the efficiency of image interpolation calculation is further improved.

Description

Image data storage method, storage device and computer readable storage medium
Technical Field
The present invention relates to the field of data storage, and in particular, to an image data storage method, a storage device, and a computer-readable storage medium.
Background
The image frame interpolation technology is a technology for interpolating a frame in a current frame and a previous frame of the current frame as a reference, thereby effectively improving the video fluency and improving the watching experience of a user. The most common frame interpolation algorithm at present is an OBMC (Overlapped Block Motion Compensation) algorithm, which uses Motion information of neighboring blocks to generate prediction information, and requires data of surrounding blocks for each calculation, while the data storage structure for storing the data at present is slow in data reading, which may result in low efficiency of image frame interpolation calculation. Therefore, how to provide a novel image data storage method and structure is a hot spot of current research.
Disclosure of Invention
The embodiment of the application provides an image data storage method and device, terminal equipment and a storage medium.
In order to solve the above technical problem, in a first aspect, an embodiment of the present application provides an image data storage method, where the method involves a storage device for storing image data, the storage device includes a plurality of storage modules, each storage module includes one or more storage units, each storage unit includes M sub-storage units, the M sub-storage units are arranged in N rows, each row includes X sub-storage units, M, N and X are positive integers, and M is equal to a product of N and X, and the method includes:
acquiring image data to be stored, wherein the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored;
respectively storing the pixel value of each row of pixel points in the plurality of rows of pixel points into a row of X sub-storage units in the corresponding storage unit according to a storage sequence;
the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
In a second aspect, an embodiment of the present application further provides a storage device, where the storage device includes: a storage device for storing image data, the storage device comprising a plurality of storage modules, each storage module comprising one or more storage cells, each storage cell comprising M sub-storage cells, the M sub-storage cells arranged in N rows, each row comprising X sub-storage cells, the M, N and X being positive integers and the M being equal to the product of the N and X;
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring image data to be stored, and the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored;
the processing unit is used for respectively storing the pixel value of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in the corresponding storage units according to the storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
In a third aspect, an embodiment of the present application further provides a storage device, including a processor and a memory, where the memory is used for storing a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, including: the computer readable storage medium has stored thereon one or more instructions adapted to be loaded by a processor and to perform the method according to the first aspect.
The embodiment of the application has the following beneficial effects: acquiring image data to be stored, including pixel values of pixels of multiple lines, and storing the pixel values of the pixels of each line in the multiple lines into X sub-storage units in a corresponding storage unit according to a storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored. Therefore, the image data storage method and the image data storage structure in the embodiment of the application are beneficial to reading the image data, and further improve the efficiency of image interpolation calculation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a first image data storage device provided in an exemplary embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a first image data storage method according to an exemplary embodiment of the present application;
FIG. 3 is a diagram illustrating a sub-storage unit for alternately storing pixel values of a row of pixels in sequence according to an exemplary embodiment of the present application;
FIG. 4 is a diagram illustrating motion estimation provided by an exemplary embodiment of the present application;
fig. 5a is a schematic diagram of a second image block, a first sub image block adjacent to the second image block in a first direction, and a second sub image block adjacent to the second image block in a second direction according to an exemplary embodiment of the present application;
fig. 5b is a schematic diagram of 2 × 2 pixels at the upper left corner of a first image block according to an exemplary embodiment of the present application;
FIG. 5c is a schematic diagram of pixel values for selecting 32 pixels per row according to a predetermined algorithm rule according to an exemplary embodiment of the present application;
FIG. 5d is a schematic diagram illustrating pixel values for 16 pixels per row according to a predetermined algorithm rule according to an exemplary embodiment of the present application;
fig. 5e is a schematic diagram illustrating pixel values of corresponding pixel points of 2 × 2 sub blocks of a second image block, an adjacent image block in a first direction, and an adjacent image block in a second direction according to an 8-order filtering algorithm according to an exemplary embodiment of the present application;
FIG. 5f is a timing diagram illustrating a frame interpolation calculation for reading data in a memory device according to an exemplary embodiment of the present application;
fig. 6 is a schematic diagram illustrating a matching of a macroblock 1 to be inserted into a frame image and an image block 1 in an image to be stored according to an exemplary embodiment of the present application;
FIG. 7 is a second image data storage device provided in an exemplary embodiment of the present application;
FIG. 8 is a schematic flow chart diagram illustrating an image data storage method according to an exemplary embodiment of the present application;
FIG. 9 is a third image data storage device provided in an exemplary embodiment of the present application;
FIG. 10 is a schematic flow chart diagram illustrating a third method for storing image data according to an exemplary embodiment of the present application;
FIG. 11 is a schematic diagram of a memory device according to an exemplary embodiment of the present application;
fig. 12 is a schematic structural diagram of another storage device according to an exemplary embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The embodiments of the present application relate to an overlapped block motion compensation technique, which is an advanced block motion compensation technique for reducing discontinuity of block boundaries, which is widely used for image interpolation frame calculation, and by which the accuracy of motion estimation and motion compensation can be improved and distortion (blocking effect, etc.) caused by blocking can be reduced. Specifically, the overlapped block motion compensation algorithm considers that the motion vector of a certain block also affects the neighboring blocks, that is, the prediction of a block is not only dependent on the motion vector of the block but also affected by a series of motion vectors of the neighboring blocks, and thus, the overlapped block motion compensation algorithm reduces the prediction error of the block boundary pixels with the constraint of flattening the block boundary as much as possible.
In order to improve the efficiency of image interpolation frame calculation, a novel image data storage device is exemplarily provided in an embodiment of the present application, for example, as shown in fig. 1, fig. 1 is a first image data storage device provided in an exemplary embodiment of the present application, the image data storage device includes a plurality of memory modules (memory module 10, memory module 11, memory module N, etc.), each memory module includes one or more memory units (memory unit 101, memory unit 102, etc.), each memory unit includes M sub-memory units (sub-memory unit 1011), the M sub-memory units are arranged in N rows, each row includes X sub-memory units, M, N and X are positive integers, and M is equal to the product of N and X. It is understood that, in the embodiment of the present application, each row includes 2 sub-memory units, and there is no limitation that each row can only arrange 2 sub-memory units, which can be specifically determined according to actual situations.
Based on the image data storage apparatus in fig. 1, fig. 2 is a schematic flowchart of a first image data storage method provided in an exemplary embodiment of the present application, where the method is executed by a terminal device, and the method includes:
s201, image data to be stored is obtained, and the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored.
In this embodiment, the image data to be stored includes image data of a previous frame and/or a next frame of the frame image to be interpolated, which may be specifically each frame image in a segment of video. It can be understood that, when storing image data, the pixel values of the pixel points of each line or a part of the lines in the image data to be stored are stored in the image data storage device, specifically, the image data to be stored in the image data to be stored are grouped, each group may include several lines arranged in sequence, and the several lines of image data arranged in sequence are stored in the corresponding storage module. For example, the image data to be stored is the image data of the previous frame to be inserted into the image frame, the size of the image data is 128 × 128, the image data needs to be stored in the image data storage device, at this time, 128 lines of the image data can be divided into 16 groups, one group includes 8 lines of image data, that is, 16 storage modules are needed, each storage module stores 8 lines of image data, each storage module includes one storage unit, each storage unit includes 16 sub-storage units, the 16 sub-storage units are arranged into 8 lines, each line includes 2 sub-storage units, each two storage sub-units store the pixel values of one line of pixel points of the image data, and thus, the pixel values of the 128 lines of pixel points of the image to be stored are all sequentially stored into the storage units of the corresponding storage modules.
S202, pixel values of each row of pixel points in the plurality of rows of pixel points are stored in X rows of sub-storage units in the corresponding storage units respectively according to a storage sequence.
In the embodiment of the application, the storage unit in each storage module stores pixel values of K rows of continuous pixel points of an image to be stored, and the pixel values of one row of pixel points are alternately stored in X rows of sub-storage units in the storage unit according to the arrangement order and the storage number, wherein the storage number may be 2, 3, 8, and the like. For example, if the size of the image data to be stored is 256 × 256, and 256 rows of pixel points need to be stored in the image data storage device, each storage module may be selected to store 4 rows of pixel points and 64 storage modules, where each storage module includes 1 storage unit, and each storage unit includes 8 storage subunits, and is divided into four rows and two columns, that is, two storage subunits in each row are alternately stored according to the storage sequence and the storage number, as shown in fig. 3 (a subunit 1 in the storage unit of the first storage module stores pixel values of 0 to 15 pixel points of a first row of pixel points of the image to be stored, and a subunit 2 in the same row stores pixel values of 16 to 31 pixel points of the first row of pixel points of the image to be stored, and thus alternately stores the pixel values of 256 pixel points in the first row until all the pixel values of the first row are stored in the two storage subunits in the first row), and storing the pixel values of a plurality of rows of pixel points of the image to be stored into a row of X sub-storage units in the corresponding storage unit.
Optionally, in the process of respectively storing the pixel value of each line of pixel points in the plurality of lines of pixel points into X rows of sub-storage units in the corresponding storage unit according to the storage sequence, position information of a macro block to be inserted into an image frame and a reference motion vector of the macro block relative to the image to be stored are obtained;
determining the position information of a first image block and a second image block matched with the macro block from the image to be stored according to the reference motion vector and the position information of the macro block; determining the position information of an adjacent image block adjacent to the second image block from the image to be stored according to the position information of the second image block; reading the pixel values of corresponding pixel points from the storage device according to the position information of the first image block, the position information of the second image block and the position information of the adjacent image block and a preset reading rule; and determining the pixel value of each pixel point in the macro block according to the read pixel value.
In the embodiment of the present application, when performing the correlation calculation of the image interpolation frame by using the overlapped block motion compensation algorithm, the data is read by using the novel image data storage device provided in the present application, so that the data can be read more conveniently and quickly, as shown in fig. 4, in the process of respectively storing the pixel values of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in the corresponding storage units according to the storage sequence, the position information of a macro block in the frame to be interpolated and the reference motion vector of the macro block relative to the image to be stored are determined, in the image data storage device corresponding to the image to be stored (the previous frame and/or the next frame of the image to be interpolated), the position information of the first image block and the second image block matched with the macro block is determined according to the reference motion vector and the position information of the macro block, and determining the position information of an adjacent image block adjacent to the second image block from the image to be stored according to the position information of the second image block, reading the pixel values of corresponding pixel points from the storage device according to the position information of the first image block, the position information of the second image block and the position information of the adjacent image block adjacent to the second image block according to a preset reading rule, and further determining the pixel values of all the pixel points in the macro block according to the read pixel values.
Optionally, the adjacent image blocks include a first sub image block adjacent to the second image block in the first direction and a second sub image block adjacent to the second image block in the second direction, and the reading, according to the position information of the first image block, the position information of the second image block and the position information of the adjacent image block, the pixel values of corresponding pixel points from the storage device according to a preset reading rule may include reading, from the storage device, pixel values of pixel points matched with the position information of the first image block; reading pixel values of a plurality of rows of pixel points matched with the second image block from the storage device, and selecting the pixel values of a first number of pixel points according to a preset algorithm rule;
reading pixel values of a plurality of rows of pixel points matched with the first sub-image block from the storage device, and selecting pixel values of a second number of pixel points according to a preset algorithm rule; and reading pixel values of a plurality of rows of pixel points matched with the second sub-image block from the storage device, and selecting the pixel values of a third number of pixel points according to a preset algorithm rule.
In the embodiment of the present application, the first direction and the second direction are perpendicular to each other, and as shown in fig. 5a, the adjacent image block includes two first sub image blocks adjacent to the second image block in the horizontal direction and two second sub image blocks adjacent to the second image block in the vertical direction. When the pixel values of the corresponding pixel points are read from the storage device according to the preset reading rule, the pixel values of the corresponding pixel points in the storage unit corresponding to the position of the first image block are read, optionally, the pixel values of a plurality of rows of pixel points matched with the first image block are read from the storage device, and the pixel values of the corresponding pixel points in the corresponding storage unit are determined according to the position information of the first image block. When the pixel values of the corresponding pixel points are read from the storage device according to the preset reading rule, the pixel values of the rows of pixel points matched with the second image block are read from the storage device, the pixel values of the first number of pixel points are selected according to the preset algorithm rule, the pixel values of the rows of pixel points matched with the first sub-image block are read from the storage device, the pixel values of the second number of pixel points are selected according to the preset algorithm rule, the pixel values of the rows of pixel points matched with the second sub-image block are read from the storage device, and the pixel values of the third number of pixel points are selected according to the preset algorithm rule. It is to be understood that the preset algorithm rule may be a motion vector matching algorithm, an SAD (Sum of absolute differences) algorithm, etc., and the first number, the second number, and the third number may be specifically determined according to actual situations.
Optionally, the macroblock includes a plurality of subblocks, and the determining the pixel value of each pixel point in the macroblock according to the read pixel value may include:
aiming at any sub-block in the sub-blocks, carrying out filtering processing on the pixel values of the first number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in any sub-block;
carrying out filtering processing on the pixel values of the second number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in a first target sub-block adjacent to any sub-block in the first direction, wherein the first target sub-block is a sub-block in a first image block adjacent to the second image block in the first direction;
carrying out filtering processing on the pixel values of the third number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in a second target sub-block adjacent to any sub-block in the second direction, wherein the second target sub-block is a sub-block in an image block adjacent to the second image block in the second direction;
and determining the pixel value of each pixel point in the macro block according to the initial pixel value of each pixel point in any sub block, the initial pixel value of each pixel point in the first target sub block and the initial pixel value of each pixel point in the second target sub block.
Optionally, the determining the pixel value of each pixel point in the macroblock according to the initial pixel value of each pixel point in any sub-block, the initial pixel value of each pixel point in the first target sub-block, and the initial pixel value of each pixel point in the second target sub-block may include: determining a target pixel value of each pixel point in the macro block according to the pixel value of each pixel point in any sub block in the macro block; and performing fusion processing according to the pixel values of the pixel points matched with the position information of the first image block and the target pixel value of each pixel point in the macro block to obtain the pixel value of each pixel point in the macro block.
In the embodiment of the present application, the first target sub-block is a sub-block in a first sub-image block adjacent to the second image block in the first direction, and the first target sub-block is adjacent to any sub-block (as shown in fig. 5 e). Taking the pixel values of the corresponding pixels of the 2 × 2 blocks at the upper left corner of the macroblock as an example, as shown in fig. 5b, reading the pixel values of the pixels (such as Clk0 in fig. 5 f) matching the position information of the first image block from the storage device, and determining the pixel values of the 2 × 2 pixels matching the upper left corner in the position information of the first image block; as shown in fig. 5c, the pixel values of 4 rows of pixel points in the storage device matching the second image block are selected according to the preset algorithm rule to obtain 32 pixel values (e.g., Clk1 in fig. 5 f), the pixel values of 4 rows of pixel points matching the first sub image block 1 are read from the storage device, the pixel values of 32 pixel points are selected according to the preset algorithm rule (e.g., Clk2 in fig. 5 f), the pixel values of 4 rows of pixel points matching the second sub image block 2 are read from the storage device, and the pixel values of 32 pixel points are selected according to the preset algorithm rule (e.g., Clk3 in fig. 5 f); as shown in fig. 5d, by algorithm selection, the pixel values of 16 pixels are selected from the read pixel values of 32 pixels in each row; as shown in fig. 5e, after 8-order horizontal filtering and 8-order vertical filtering, pixel values of 2 × 2 pixels at the upper left corner of the macroblock, pixel values of 2 × 2 pixels in the first target subblock, and pixel values of 2 × 2 pixels in the second target subblock are obtained; then, calculating through an OBMC algorithm to obtain target pixel values of 2 x 2 pixel points at the upper left corner of a macro block of the frame image to be inserted; and finally, carrying out fusion processing according to the pixel values of 2 x 2 pixel points at the upper left corner of the first image block and the target pixel values of 2 x 2 pixel points at the upper left corner of the macro block to obtain the pixel values of 2 x 2 pixel points at the upper left corner of the macro block. It is understood that the pixel value of the corresponding pixel point of any sub-block in the macro block can be obtained through similar steps.
It can be understood that the target pixel value of each pixel point in any sub-block in the macro block can be determined, then the pixel value of each pixel point matched with the sub-block is obtained from the read pixel values of the pixel points matched with the first image block to perform fusion processing, the pixel value of each pixel point in any sub-block is obtained, and finally the pixel values of each pixel point in the macro block are obtained through fusion; the target pixel value of each pixel point in the macro block can be determined according to the target pixel value of each pixel point in any sub block in the macro block, and then fusion processing is carried out according to the pixel value of the pixel point matched with the position information of the first image block and the target pixel value of each pixel point in the macro block, so that the pixel value of each pixel point in the macro block is obtained.
Optionally, if the distance between the macro block and the edge of the image frame to be inserted is less than or equal to a preset distance, in the process of respectively storing the pixel value of each line of pixel points in the plurality of lines of pixel points into X lines of sub-storage units in the corresponding storage unit according to the storage sequence, the position information of the macro block in the image frame to be inserted is obtained, where the image frame to be inserted is a previous frame or a next frame of the image to be stored; determining the position information of a second image block matched with the macro block from the image to be stored according to the position information of the macro block; reading the pixel values of corresponding pixel points from the storage device according to the position information of the second image block and a preset reading rule; and determining the pixel value of each pixel point in the macro block according to the read pixel value.
In the embodiment of the application, if the distance between the macro block and the edge of the image frame to be inserted is less than or equal to the preset distance, directly reading the position information of a second image block matched with the macro block in the image to be stored from the storage device according to the position information of the second image block and a preset reading rule, and determining the pixel value of each pixel point in the macro block according to the read pixel value; that is, the pixel values of the corresponding pixel points of the image block matched with the macro block in the image to be stored are used as the pixel values of the pixel points of the macro block in the image frame to be inserted. As shown in fig. 6, the pixel value of each pixel in the image block 1 is used as the pixel value of each pixel in the macroblock 1.
Optionally, the image data storage device provided by the present application is a single-port storage device. It can be understood that, in the prior art, a value of one pixel point is written into a dual-port storage device every clock cycle, and a value of 8 pixel points is continuously read to complete calculation of a single pixel point during reading, but in the present application, data reading and writing are realized through the single-port storage device, and in such a novel image data storage device, 2 × 2 pixel point data is calculated every clock cycle (as shown in fig. 5f, OBMC calculation is performed starting from clk4, where clk4-clk 7 uses data read from clk 1-clk 3 to perform calculation, and 8-clk11 uses data read from clk4-clk6 to perform calculation, and so on), compared with the case of calculating only 1 pixel point data, the calculation efficiency of an image frame interpolation is greatly improved, and the requirement of good impression of a user is met.
In the embodiment of the application, image data to be stored, including pixel values of pixels in a plurality of rows, is acquired, and the pixel values of the pixels in each row of the pixels in the plurality of rows are respectively stored in X sub-storage units in one row of the corresponding storage units according to a storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored. Therefore, the image data storage method and the image data storage structure in the embodiment of the application are beneficial to reading the image data, and further improve the efficiency of image interpolation calculation.
Fig. 7 is a diagram of a second image data storage apparatus according to an exemplary embodiment of the present application, where the image data storage apparatus includes a plurality of storage blocks (storage block 70, storage block 71, storage block N, and so on), each storage block includes a plurality of storage units, the plurality of storage units includes a luminance value storage unit 701 and a chrominance value storage unit 702, each luminance value storage unit includes M sub-storage units, the M sub-storage units are arranged in N lines, each line includes X sub-storage units, each chrominance value storage unit includes M sub-storage units (sub-storage unit 7021), the M sub-storage units are arranged in N lines, each line includes X sub-storage units, M, N and X are positive integers, and M is equal to a product of N and X. It is understood that, in the embodiment of the present application, each row includes 2 sub-memory units, and there is no limitation that each row can only arrange 2 sub-memory units, which can be specifically determined according to actual situations.
Based on the image data storage apparatus in fig. 7, fig. 8 is a flowchart illustrating an image data storage method according to an exemplary embodiment of the present application, where the method is performed by a terminal device, and the method includes:
s801, obtaining image data to be stored, wherein the image data to be stored comprises pixel values of a plurality of lines of pixel points of an image to be stored, and the pixel values of the pixel points comprise brightness values and chromatic values.
In the embodiment of the application, the pixel values of the multiple lines of pixel points in the image data to be stored are classified and stored in a classified mode, and the pixel values are specifically divided into the brightness values and the chromatic values. It can be understood that, when storing image data, the pixel values of the pixel points of each line or a part of lines in the image data to be stored are stored in the image data storage device, specifically, the image data to be stored in the image data to be stored are grouped, each group may include several lines arranged in sequence, the several lines of image data arranged in sequence are stored in the corresponding storage module, the brightness value of the corresponding pixel point of each line of image data is stored in the brightness value storage unit according to the pixel values of the corresponding pixel points of the several lines of image data arranged in sequence, and the chromaticity value of the corresponding pixel point of each line of image data is stored in the chromaticity value storage unit. For example, the image data to be stored is the image data of the next frame to be inserted into the image frame, the size of the image data to be stored is 8 × 8, the image data needs to be stored in the image data storage device, at this time, 8 lines of the image data to be stored may be divided into 4 groups, one group includes 2 lines of image data, storing all image data into 4 storage modules, wherein each storage module stores 2 lines of image data, each storage module comprises two storage units, namely a brightness value storage unit and a chromatic value storage unit, each storage unit comprises 4 sub-storage units, the 4 sub-storage units are arranged into 2 lines, each line comprises 2 sub-storage units, each two storage sub-units store the brightness value or the chromatic value of one line of pixel points of the image data, and thus, all the pixel values of the 8 rows of pixel points of the image to be stored are sequentially stored in the storage units of the corresponding storage modules.
S802, the brightness values of all the rows of pixel points in the plurality of rows of pixel points are stored in X rows of sub-storage units in the corresponding brightness value storage units respectively according to the storage sequence.
In the embodiment of the application, the luminance values of the pixels in one row are alternately stored in X sub-storage units in one row in the luminance value storage unit according to the arrangement order and the storage quantity. For example, the size of the image data to be stored is 8 × 8, the image data to be stored is stored in 4 storage modules (storage module 1, storage module 2, storage module 3, storage module 4), each storage module stores pixel values of 2 rows of pixel points, each storage module comprises a chromatic value storage unit and a brightness value storage unit, each storage unit comprises 4 sub-storage units, the 4 sub-storage units are arranged into 2 rows (sub-storage unit 1 and sub-storage unit 2 are one row, sub-storage unit 3 and sub-storage unit 4 are one row), each row of sub-storage units stores pixel values of one row of pixel points, when the pixel values of the 6 th row of pixel points are stored, the brightness values of 0-1 pixel points in the 6 th row of pixel points are stored in the sub-storage unit 3 of the brightness value storage unit of the storage module 3, and the brightness values of 2-3 pixel points in the 6 th row of pixel points are stored in the brightness value storage unit of the storage module 3 In the sub-storage unit 4, the brightness values of 4-5 pixels in the 6 th row of pixels are stored in the sub-storage unit 3 of the brightness value storage unit of the storage module 3, and the brightness values of 6-7 pixels in the 6 th row of pixels are stored in the sub-storage unit 4 of the brightness value storage unit of the storage module 3.
And S803, respectively storing the chromatic value of each line of pixel points in the multiple lines of pixel points into X lines of sub-storage units in the corresponding chromatic value storage units according to the storage sequence.
In the embodiment of the application, the chrominance values of a line of pixel points are alternately stored in a line of X sub-storage units in the chrominance value storage unit according to the arrangement order and the storage quantity, wherein the storage positions of the luminance values and the chrominance values corresponding to the same pixel point are matched, and the storage position matching refers to that the storage module corresponding to the luminance values and the storage positions in the luminance value storage unit in the storage module are consistent with the storage positions in the storage module corresponding to the chrominance values and the chrominance value storage unit in the storage module.
It can be understood that steps S802 and S803 in this embodiment of the present application do not have an execution sequence, and any step may be executed first or simultaneously. When the pixel values of the pixel points are read for OBMC calculation, the luminance value can be read first for calculation, then the chromatic value can be read for calculation, the luminance value and the chromatic value can also be read simultaneously, and then the pixel values of the pixel points of the final macro block can be obtained through fusion processing.
In the embodiment of the application, to-be-stored image data including the brightness values and the chromatic values of the multiple lines of pixel points is obtained, the brightness values of the pixel points of each line of the multiple lines of pixel points are respectively stored in X sub-storage units of one line in the corresponding brightness value storage unit according to the storage sequence, and the chromatic values of the pixel points of each line of the multiple lines of pixel points are respectively stored in X sub-storage units of one line in the corresponding chromatic value storage unit according to the storage sequence, so that the rapidness and the high efficiency of data reading are facilitated, and the calculation efficiency of the image frame to be inserted is improved.
Fig. 9 is a diagram of a third image data storage apparatus provided in an exemplary embodiment of the present application, where the image data storage apparatus includes a plurality of storage modules (storage module 90, storage module 91, storage module N, etc.), each storage module includes a plurality of storage units, the plurality of storage units includes a luminance value storage unit 901, a first chrominance value storage unit 902, and a second chrominance value storage unit 903, each luminance value storage unit 901 includes M sub-storage units, the M sub-storage units are arranged in N rows, each row includes X sub-storage units, each first chrominance value storage unit 902 includes M sub-storage units, the M sub-storage units are arranged in N rows, each row includes X sub-storage units, each second chrominance value storage unit 903 includes M sub-storage units, the M sub-storage units are arranged in N rows, each row includes X sub-memory cells, the M, N and X being positive integers and the M being equal to the product of the N and X. It is understood that, in the embodiment of the present application, each row includes 2 sub-memory units, and there is no limitation that each row can only arrange 2 sub-memory units, which can be specifically determined according to actual situations.
Based on the image data storage apparatus in fig. 9, fig. 10 is a flowchart illustrating a third image data storage method according to an exemplary embodiment of the present application, where the method is performed by a terminal device, and the method includes:
s1001, image data to be stored are obtained, and the image data to be stored comprise the brightness values, the first chrominance values and the second chrominance values of a plurality of lines of pixel points of an image to be stored.
The image data to be stored includes image data of a previous frame and/or a next frame of the image to be interpolated, which may be specifically each frame image in a segment of video, and the luminance value (Y), the first chrominance value (Cr), and the second chrominance value (Cb) of each line or a part of lines of pixels in the image data to be stored are stored in the storage unit of the corresponding storage module.
S1002, storing the brightness values of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in the corresponding brightness value storage units respectively according to the storage sequence.
S1003, respectively storing the first chrominance values of the pixel points in each row of the plurality of rows of the pixel points into X rows of sub-storage units in the corresponding first chrominance value storage units according to the storage sequence.
S1004, respectively storing the second chrominance values of the pixel points in each row of the plurality of rows of the pixel points into X rows of sub-storage units in the corresponding second chrominance value storage units according to the storage sequence.
The brightness values of one line of pixel points are alternately stored in one line of X sub-storage units in the brightness value storage unit according to the arrangement sequence and the storage quantity, and the chromatic values of one line of pixel points are alternately stored in one line of X sub-storage units in the chromatic value storage unit according to the arrangement sequence and the storage quantity; the storage positions of the brightness value and the chromatic value corresponding to the same pixel point are matched, and the storage position matching refers to that the storage module corresponding to the brightness value and the storage position in the brightness value storage unit in the storage module are consistent with the storage position in the storage module corresponding to the chromatic value and the storage position in the chromatic value storage unit in the storage module.
The steps S1002, S1003, and S1004 in this embodiment do not have the execution sequence, and any one of the steps may be executed first or simultaneously. When the pixel values of the pixel points are read for OBMC calculation, the luminance value is read first for calculation, then the first chrominance value and the second chrominance value are read for calculation, the luminance value, the first chrominance value and the second chrominance value can also be read simultaneously, and finally the pixel values of the pixel points of the macro block are obtained through fusion processing.
In the embodiment of the application, to-be-stored image data including the brightness values, the first chrominance values and the second chrominance values of a plurality of lines of pixel points is obtained, the brightness values of each line of pixel points in the plurality of lines of pixel points are respectively stored in a line of X sub-storage units in a corresponding brightness value storage unit according to a storage sequence, the first chrominance values of each line of pixel points in the plurality of lines of pixel points are respectively stored in a line of X sub-storage units in a corresponding first chrominance value storage unit according to the storage sequence, and the second chrominance values of each line of pixel points in the plurality of lines of pixel points are respectively stored in a line of X sub-storage units in a corresponding second chrominance value storage unit according to the storage sequence. Therefore, the pixel values are stored in a subdivided manner, and when the pixel values of all the pixel points are read for calculation, more rigorous pixel value data can be obtained, so that the accuracy and the efficiency of calculation of the insertion frame image are improved.
Fig. 11 is a schematic structural diagram of a storage device according to an exemplary embodiment of the present application, where the storage device may be mounted on an intelligent terminal in the foregoing method embodiment, and the intelligent terminal may specifically be a server. Of course, in some embodiments, the method can also be carried on the terminal equipment. The memory device shown in fig. 11 may be used to perform some or all of the functions in the method embodiments described above with respect to fig. 2, 8, and 10. Wherein, the detailed description of each part is as follows:
a storage device 1101 for storing image data, the storage device comprising a plurality of storage modules, each storage module comprising one or more storage units, each storage unit comprising M sub-storage units, the M sub-storage units being arranged in N rows, each row comprising X sub-storage units, the M, N and X being positive integers and the M being equal to the product of the N and X;
an obtaining unit 1102, configured to obtain image data to be stored, where the image data to be stored includes pixel values of multiple rows of pixel points of an image to be stored;
the processing unit 1103 is configured to store the pixel values of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in corresponding storage units according to a storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
In an optional implementation manner, the pixel values of the pixel points include luminance values and chrominance values, and each storage module in the storage device 1101 includes a plurality of storage units, where the plurality of storage units includes a luminance value storage unit and a chrominance value storage unit; the processing unit 1103 is specifically configured to store the luminance values of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in the corresponding luminance value storage unit according to a storage sequence;
the processing unit 1103 is further specifically configured to store the chroma values of each line of pixel points in the multiple lines of pixel points into X sub-storage units in a line of corresponding chroma value storage units, respectively, according to a storage order; the brightness values of one line of pixel points are alternately stored in one line of X sub-storage units in the brightness value storage unit according to the arrangement sequence and the storage quantity, and the chromatic values of one line of pixel points are alternately stored in one line of X sub-storage units in the chromatic value storage unit according to the arrangement sequence and the storage quantity; the storage positions of the brightness value and the chromatic value corresponding to the same pixel point are matched, and the storage position matching refers to that the storage module corresponding to the brightness value and the storage position in the brightness value storage unit in the storage module are consistent with the storage position in the storage module corresponding to the chromatic value and the storage position in the chromatic value storage unit in the storage module.
In an optional implementation manner, the chrominance value storage unit in the storage device 1101 includes a first chrominance value storage unit and a second chrominance value storage unit, and the processing unit 1103 is further specifically configured to store the first chrominance values of each line of pixel points in the plurality of lines of pixel points into X sub-storage units in a line of the corresponding first chrominance value storage unit according to a storage order;
the processing unit 1103 is further specifically configured to store the second chrominance values of each row of the plurality of rows of the pixel points into X rows of sub-storage units in the corresponding second chrominance value storage units according to the storage order; the storage positions of the first chrominance values and the second chrominance values corresponding to the same pixel point are matched, and the storage position matching refers to the storage positions of the storage module corresponding to the first chrominance values and the first chrominance value storage unit in the storage module, and is consistent with the storage positions of the storage module corresponding to the second chrominance values and the second chrominance value storage unit in the storage module.
In an optional implementation manner, the obtaining unit 1102 is further specifically configured to obtain position information of a macro block to be inserted into an image frame and obtain a reference motion vector of the macro block relative to the image to be stored, in a process of respectively storing a pixel value of each line of pixel points in the plurality of lines of pixel points into X sub-storage units in a line of the corresponding storage unit according to a storage sequence;
the processing unit 1103 is further specifically configured to determine, from the image to be stored, location information of a first image block and a second image block that are matched with the macro block according to the reference motion vector and the location information of the macro block; the image storage device is also used for determining the position information of an adjacent image block adjacent to the second image block from the image to be stored according to the position information of the second image block;
the processing unit 1103 is further specifically configured to read, according to the position information of the first image block, the position information of the second image block, and the position information of the adjacent image block, a pixel value of a corresponding pixel point from the storage device according to a preset reading rule; and the macro block is also used for determining the pixel value of each pixel point in the macro block according to the read pixel value.
In an optional implementation manner, the adjacent image blocks include a first sub image block adjacent to the second image block in a first direction and a second sub image block adjacent to the second image block in a second direction, and the processing unit 1103 is further specifically configured to read pixel values of pixel points matching position information of the first image block from the storage device; the image processing device is also used for reading pixel values of a plurality of rows of pixel points matched with the second image block from the storage device and selecting the pixel values of a first number of pixel points according to a preset algorithm rule; the storage device is used for storing a plurality of rows of pixel values of the first sub-image block, and the pixel values of a second number of pixel points are selected according to a preset algorithm rule; and the storage device is also used for reading the pixel values of the multiple rows of pixel points matched with the second sub-image block from the storage device and selecting the pixel values of a third number of pixel points according to a preset algorithm rule.
In an optional implementation manner, the macroblock includes a plurality of sub-blocks, and the processing unit 1103 is specifically further configured to, for any sub-block in the plurality of sub-blocks, perform filtering processing on pixel values of the first number of pixel points according to a filtering algorithm, and determine an initial pixel value of each pixel point in the any sub-block; the image processing device is further configured to perform filtering processing on pixel values of the second number of pixel points according to a filtering algorithm, and determine an initial pixel value of each pixel point in a first target sub-block adjacent to any one sub-block in the first direction, where the first target sub-block is a sub-block in a first sub-image block adjacent to the second image block in the first direction; the image processing device is further configured to perform filtering processing on the pixel values of the third number of pixel points according to a filtering algorithm, and determine an initial pixel value of each pixel point in a second target sub-block adjacent to the any sub-block in the second direction, where the second target sub-block is a sub-block in a second sub-image block adjacent to the second image block in the second direction;
the processing unit 1103 is further specifically configured to determine, according to the initial pixel value of each pixel in any one of the sub-blocks, the initial pixel value of each pixel in the first target sub-block, and the initial pixel value of each pixel in the second target sub-block, a target pixel value of each pixel in any one of the sub-blocks in the macroblock; the macro block is also used for determining the target pixel value of each pixel point in the macro block according to the target pixel value of each pixel point in any sub block in the macro block; and the image fusion module is further used for carrying out fusion processing on the pixel values of the pixels matched with the position information of the first image block and the target pixel values of all the pixels in the macro block to obtain the pixel values of all the pixels in the macro block.
In an alternative embodiment, the storage device 1101 is a single port storage device.
The modules in the storage device shown in fig. 11 may be respectively or entirely combined into one or several other modules to form one or several other modules, or some module(s) may be further split into multiple units with smaller functions to form the same operation, which does not affect the implementation of the technical effect of the embodiments of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of modules, or the functions of a plurality of modules can be realized by one module. In other embodiments of the present application, the storage device may also include other modules, and in practical applications, these functions may also be implemented with the assistance of other modules, and may be implemented by cooperation of a plurality of modules.
Based on the same inventive concept, the principle and the advantageous effect of the storage device to solve the problem provided in the embodiment of the present application are similar to the principle and the advantageous effect of the image data storage method to solve the problem in the embodiment of the present application, and for brevity, the principle and the advantageous effect of the implementation of the method can be referred to, and are not described herein again.
Referring to fig. 12, fig. 12 is a schematic structural diagram of another storage device according to an exemplary embodiment of the present application. The device comprises a processor 1201 and a memory 1202, wherein the processor 1201 and the memory 1202 are connected through one or more communication buses, the memory 1202 comprises a storage device 12021, the storage device 12021 is used for storing image data, the storage device 12021 comprises a plurality of storage modules, each storage module comprises one or more storage units, each storage unit comprises M sub-storage units, the M sub-storage units are arranged into N rows, each row comprises X sub-storage units, M, N and X are positive integers, and M is equal to the product of N and X.
The processor 1201 is configured to enable the terminal device to perform corresponding functions in the methods of fig. 2, 8 and 10. The processor 1201 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof.
The memory 1202 is used for storing program codes and the like. Memory 1202 may include volatile memory (volatile), such as Random Access Memory (RAM); the memory 1202 may also include a non-volatile memory (non-volatile) such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD), or a solid-state drive (SSD); memory 1202 may also comprise a combination of the above types of memory.
In an embodiment of the present application, the processor 1201 may call the program code stored in the memory 1202 to perform the following operations:
acquiring image data to be stored, wherein the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored;
respectively storing the pixel value of each row of pixel points in the plurality of rows of pixel points into a row of X sub-storage units in the corresponding storage unit according to a storage sequence;
the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
In an optional implementation manner, the pixel values of the pixel points include luminance values and chrominance values, and each storage module in the storage device 12021 includes a plurality of storage units, where the plurality of storage units include luminance value storage units and chrominance value storage units; the processor 1201 stores the brightness value of each line of pixel points in the plurality of lines of pixel points into X rows of sub-storage units in the corresponding brightness value storage unit according to the storage sequence;
the processor 1201 stores the colorimetric values of each line of pixel points in the plurality of lines of pixel points into X lines of sub-storage units in the corresponding colorimetric value storage units respectively according to the storage sequence; the brightness values of one line of pixel points are alternately stored in one line of X sub-storage units in the brightness value storage unit according to the arrangement sequence and the storage quantity, and the chromatic values of one line of pixel points are alternately stored in one line of X sub-storage units in the chromatic value storage unit according to the arrangement sequence and the storage quantity; the storage positions of the brightness value and the chromatic value corresponding to the same pixel point are matched, and the storage position matching refers to that the storage module corresponding to the brightness value and the storage position in the brightness value storage unit in the storage module are consistent with the storage position in the storage module corresponding to the chromatic value and the storage position in the chromatic value storage unit in the storage module.
In an optional implementation manner, the chrominance value storage units in the storage device 12021 include a first chrominance value storage unit and a second chrominance value storage unit, and the processor 1201 stores the first chrominance value of each line of pixel points in the plurality of lines of pixel points into X sub-storage units in a line of the corresponding first chrominance value storage units respectively according to a storage order;
the processor 1201 stores the second chrominance values of each line of pixel points in the plurality of lines of pixel points into X rows of sub-storage units in the corresponding second chrominance value storage units respectively according to the storage sequence; the storage positions of the first chrominance values and the second chrominance values corresponding to the same pixel point are matched, and the storage position matching refers to the storage positions of the storage module corresponding to the first chrominance values and the first chrominance value storage unit in the storage module, and is consistent with the storage positions of the storage module corresponding to the second chrominance values and the second chrominance value storage unit in the storage module.
In an optional implementation manner, the processor 1201 acquires position information of a macroblock to be inserted into an image frame and acquires a reference motion vector of the macroblock relative to the image to be stored, in a process of respectively storing a pixel value of each line of pixel points in the plurality of lines of pixel points into X rows of sub-storage units in corresponding storage units according to a storage sequence;
the processor 1201 determines the position information of a first image block and a second image block matched with the macro block from the image to be stored according to the reference motion vector and the position information of the macro block; the image storage device is also used for determining the position information of an adjacent image block adjacent to the second image block from the image to be stored according to the position information of the second image block;
the processor 1201 reads the pixel values of the corresponding pixel points from the storage device according to the position information of the first image block, the position information of the second image block and the position information of the adjacent image block and a preset reading rule; and the macro block is also used for determining the pixel value of each pixel point in the macro block according to the read pixel value.
In an alternative embodiment, the adjacent image blocks include a first sub image block adjacent to the second image block in a first direction and a second sub image block adjacent to the second image block in a second direction, and the processor 1201 reads pixel values of pixel points matching the position information of the first image block from the storage device; the image processing device is also used for reading pixel values of a plurality of rows of pixel points matched with the second image block from the storage device and selecting the pixel values of a first number of pixel points according to a preset algorithm rule; the storage device is used for storing a plurality of rows of pixel values of the first sub-image block, and the pixel values of a second number of pixel points are selected according to a preset algorithm rule; and the storage device is also used for reading the pixel values of the multiple rows of pixel points matched with the second sub-image block from the storage device and selecting the pixel values of a third number of pixel points according to a preset algorithm rule.
In an optional embodiment, the macroblock includes a plurality of subblocks, and the processor 1201 performs, for any subblock in the plurality of subblocks, a filtering process on pixel values of the first number of pixel points according to a filtering algorithm, to determine an initial pixel value of each pixel point in the any subblock; the image processing device is further configured to perform filtering processing on pixel values of the second number of pixel points according to a filtering algorithm, and determine an initial pixel value of each pixel point in a first target sub-block adjacent to any one sub-block in the first direction, where the first target sub-block is a sub-block in a first sub-image block adjacent to the second image block in the first direction; the image processing device is further configured to perform filtering processing on the pixel values of the third number of pixel points according to a filtering algorithm, and determine an initial pixel value of each pixel point in a second target sub-block adjacent to the any sub-block in the second direction, where the second target sub-block is a sub-block in a second sub-image block adjacent to the second image block in the second direction;
the processor 1201 determines a target pixel value of each pixel point in any sub-block in the macroblock according to the initial pixel value of each pixel point in any sub-block, the initial pixel value of each pixel point in the first target sub-block, and the initial pixel value of each pixel point in the second target sub-block; the macro block is also used for determining the target pixel value of each pixel point in the macro block according to the target pixel value of each pixel point in any sub block in the macro block; and the image fusion module is further used for carrying out fusion processing on the pixel values of the pixels matched with the position information of the first image block and the target pixel values of all the pixels in the macro block to obtain the pixel values of all the pixels in the macro block.
In an alternative embodiment, the storage device 12021 is a single-port storage device.
Embodiments of the present application further provide a computer-readable storage medium, which may be used to store computer program instructions for implementing the image data storage method in the embodiments shown in fig. 2, fig. 8, and fig. 10, where the computer-readable storage medium includes, but is not limited to, a flash memory, a hard disk, and a solid state disk.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An image data storage method, wherein image data is stored in a storage device, wherein the storage device comprises a plurality of storage blocks, each storage block comprises one or more storage cells, each storage cell comprises M sub-storage cells, the M sub-storage cells are arranged in N rows, each row comprises X sub-storage cells, M, N and X are positive integers and M is equal to the product of N and X, the method comprises:
acquiring image data to be stored, wherein the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored;
respectively storing the pixel value of each row of pixel points in the plurality of rows of pixel points into a row of X sub-storage units in the corresponding storage unit according to a storage sequence;
the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
2. The method of claim 1, wherein the pixel values of the pixels comprise luminance values and chrominance values, each storage module comprises a plurality of storage units, and the plurality of storage units comprise luminance value storage units and chrominance value storage units;
the step of respectively storing the pixel values of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in corresponding storage units according to a storage sequence comprises:
respectively storing the brightness value of each line of pixel points in the plurality of lines of pixel points into a line of X sub-storage units in the corresponding brightness value storage unit according to a storage sequence;
respectively storing the chromatic value of each line of pixel points in the plurality of lines of pixel points into X lines of sub-storage units in the corresponding chromatic value storage units according to the storage sequence;
the brightness values of one line of pixel points are alternately stored in one line of X sub-storage units in the brightness value storage unit according to the arrangement sequence and the storage quantity, and the chromatic values of one line of pixel points are alternately stored in one line of X sub-storage units in the chromatic value storage unit according to the arrangement sequence and the storage quantity; the storage positions of the brightness value and the chromatic value corresponding to the same pixel point are matched, and the storage position matching refers to that the storage module corresponding to the brightness value and the storage position in the brightness value storage unit in the storage module are consistent with the storage position in the storage module corresponding to the chromatic value and the storage position in the chromatic value storage unit in the storage module.
3. The method of claim 2, wherein the chrominance value storage unit comprises a first chrominance value storage unit and a second chrominance value storage unit;
the storing the chromatic value of each line of pixel points in the plurality of lines of pixel points into a line of X sub-storage units in the corresponding chromatic value storage units respectively according to the storage sequence comprises:
respectively storing the first chrominance values of each row of pixel points in the plurality of rows of pixel points into a row of X sub-storage units in the corresponding first chrominance value storage unit according to a storage sequence;
respectively storing the second chrominance values of each line of pixel points in the plurality of lines of pixel points into a line of X sub-storage units in the corresponding second chrominance value storage units according to a storage sequence;
the storage positions of the first chrominance values and the second chrominance values corresponding to the same pixel point are matched, and the storage position matching refers to the storage positions of the storage module corresponding to the first chrominance values and the first chrominance value storage unit in the storage module, and is consistent with the storage positions of the storage module corresponding to the second chrominance values and the second chrominance value storage unit in the storage module.
4. The method according to any one of claims 1-3, further comprising:
in the process of respectively storing the pixel value of each line of pixel points in the plurality of lines of pixel points into X sub-storage units in a line in the corresponding storage unit according to the storage sequence, acquiring the position information of a macro block to be inserted into an image frame and acquiring a reference motion vector of the macro block relative to the image to be stored;
determining the position information of a first image block and a second image block matched with the macro block from the image to be stored according to the reference motion vector and the position information of the macro block;
determining the position information of an adjacent image block adjacent to the second image block from the image to be stored according to the position information of the second image block;
reading the pixel values of corresponding pixel points from the storage device according to the position information of the first image block, the position information of the second image block and the position information of the adjacent image block and a preset reading rule;
and determining the pixel value of each pixel point in the macro block according to the read pixel value.
5. The method according to claim 4, wherein the adjacent image blocks include a first sub image block adjacent to the second image block in a first direction and a second sub image block adjacent to the second image block in a second direction, and the reading, according to the position information of the first image block, the position information of the second image block, and the position information of the adjacent image block, the pixel values of the corresponding pixels from the storage device according to a preset reading rule comprises:
reading the pixel value of the pixel point matched with the position information of the first image block from the storage device;
reading pixel values of a plurality of rows of pixel points matched with the second image block from the storage device, and selecting the pixel values of a first number of pixel points according to a preset algorithm rule;
reading pixel values of a plurality of rows of pixel points matched with the first sub-image block from the storage device, and selecting pixel values of a second number of pixel points according to a preset algorithm rule;
and reading pixel values of a plurality of rows of pixel points matched with the second sub-image block from the storage device, and selecting the pixel values of a third number of pixel points according to a preset algorithm rule.
6. The method of claim 5, wherein the macro block comprises a plurality of sub-blocks, and the determining the pixel values of the respective pixels in the macro block according to the read pixel values comprises:
aiming at any sub-block in the sub-blocks, carrying out filtering processing on the pixel values of the first number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in any sub-block;
carrying out filtering processing on the pixel values of the second number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in a first target sub-block adjacent to any sub-block in the first direction, wherein the first target sub-block is a sub-block in a first sub-image block adjacent to the second image block in the first direction;
carrying out filtering processing on the pixel values of the third number of pixel points according to a filtering algorithm, and determining the initial pixel value of each pixel point in a second target sub-block adjacent to any sub-block in the second direction, wherein the second target sub-block is a sub-block in a second sub-image block adjacent to the second image block in the second direction;
and determining the pixel value of each pixel point in the macro block according to the initial pixel value of each pixel point in any sub block, the initial pixel value of each pixel point in the first target sub block and the initial pixel value of each pixel point in the second target sub block.
7. A method according to any of claims 1-3, wherein the storage device is a single port storage device.
8. A storage device, the device comprising: a storage device for storing image data, the storage device comprising a plurality of storage modules, each storage module comprising one or more storage cells, each storage cell comprising M sub-storage cells, the M sub-storage cells arranged in N rows, each row comprising X sub-storage cells, the M, N and X being positive integers and the M being equal to the product of the N and X;
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring image data to be stored, and the image data to be stored comprises pixel values of a plurality of rows of pixel points of an image to be stored;
the processing unit is used for respectively storing the pixel value of each row of pixel points in the plurality of rows of pixel points into X rows of sub-storage units in the corresponding storage units according to the storage sequence; the pixel values of a row of pixel points are alternately stored in a row of X sub-storage units in the storage unit according to the arrangement sequence and the storage quantity, and the storage unit in each storage module stores the pixel values of continuous K rows of pixel points of the image to be stored.
9. A storage device, comprising: a processor and a memory, wherein the memory is for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, comprising: the computer-readable storage medium stores one or more instructions adapted to be loaded by a processor and to perform the method of any of claims 1 to 7.
CN202011338925.9A 2020-11-25 2020-11-25 Image data storage method, storage device and computer readable storage medium Active CN112565652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011338925.9A CN112565652B (en) 2020-11-25 2020-11-25 Image data storage method, storage device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011338925.9A CN112565652B (en) 2020-11-25 2020-11-25 Image data storage method, storage device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112565652A true CN112565652A (en) 2021-03-26
CN112565652B CN112565652B (en) 2023-03-24

Family

ID=75043633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011338925.9A Active CN112565652B (en) 2020-11-25 2020-11-25 Image data storage method, storage device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112565652B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH087109A (en) * 1994-06-15 1996-01-12 Fujitsu Ltd Image division processing method
JP2005011520A (en) * 2004-09-13 2005-01-13 Hitachi Ltd Image data storage device
US20060256121A1 (en) * 2005-05-11 2006-11-16 Pai-Chu Hsieh Method and apparatus for storing image data
US20070183510A1 (en) * 2006-01-13 2007-08-09 Nak-Hee Seong Method and apparatus for decoding video that alternately store lines of picture in pixel units and method of storing reference picture
CN101340580A (en) * 2008-08-15 2009-01-07 上海龙晶微电子有限公司 Address mapping method of outer chip dynamic memory of hardware video decoder
CN104219533A (en) * 2014-09-24 2014-12-17 苏州科达科技股份有限公司 Bidirectional motion estimating method and video frame rate up-converting method and system
CN104969558A (en) * 2013-03-29 2015-10-07 联发科技股份有限公司 Method and apparatus for arranging pixels of picture in storage units each having storage size not divisible by pixel size
CN108961147A (en) * 2018-06-11 2018-12-07 北京集创北方科技股份有限公司 A kind of data processing method and device
CN110087088A (en) * 2019-05-09 2019-08-02 集美大学 A kind of date storage method based on estimation, terminal device and storage medium
CN111683249A (en) * 2020-06-24 2020-09-18 湖南国科微电子股份有限公司 Data reading method, device, decoder and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH087109A (en) * 1994-06-15 1996-01-12 Fujitsu Ltd Image division processing method
JP2005011520A (en) * 2004-09-13 2005-01-13 Hitachi Ltd Image data storage device
US20060256121A1 (en) * 2005-05-11 2006-11-16 Pai-Chu Hsieh Method and apparatus for storing image data
US20070183510A1 (en) * 2006-01-13 2007-08-09 Nak-Hee Seong Method and apparatus for decoding video that alternately store lines of picture in pixel units and method of storing reference picture
CN101340580A (en) * 2008-08-15 2009-01-07 上海龙晶微电子有限公司 Address mapping method of outer chip dynamic memory of hardware video decoder
CN104969558A (en) * 2013-03-29 2015-10-07 联发科技股份有限公司 Method and apparatus for arranging pixels of picture in storage units each having storage size not divisible by pixel size
CN104219533A (en) * 2014-09-24 2014-12-17 苏州科达科技股份有限公司 Bidirectional motion estimating method and video frame rate up-converting method and system
CN108961147A (en) * 2018-06-11 2018-12-07 北京集创北方科技股份有限公司 A kind of data processing method and device
CN110087088A (en) * 2019-05-09 2019-08-02 集美大学 A kind of date storage method based on estimation, terminal device and storage medium
CN111683249A (en) * 2020-06-24 2020-09-18 湖南国科微电子股份有限公司 Data reading method, device, decoder and storage medium

Also Published As

Publication number Publication date
CN112565652B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN111402139B (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN100394799C (en) Method and apparatus for sub-pixel motion estimation which reduces bit precision
US20090085846A1 (en) Image processing device and method performing motion compensation using motion estimation
JP2002328881A (en) Image processor, image processing method and portable video equipment
US8587705B2 (en) Hardware and software partitioned image processing pipeline
CN111353965B (en) Image restoration method, device, terminal and storage medium
CN111860363A (en) Video image processing method and device, electronic equipment and storage medium
CN112565652B (en) Image data storage method, storage device and computer readable storage medium
US20050047502A1 (en) Method and apparatus for the efficient representation of interpolated video frames for motion-compensated coding
CN101778280B (en) Circuit and method based on AVS motion compensation interpolation
CN113436057A (en) Data processing method and binocular stereo matching method
CN105100669A (en) Digital-image conversion method and device
CN100535939C (en) Electronic device and a method in an electronic device for processing image data
US20120093410A1 (en) Image processing apparatus and method for operating image processing apparatus
CN114936633B (en) Data processing unit for transposition operation and image transposition operation method
US6954207B2 (en) Method and apparatus for processing pixels based on segments
US20120050820A1 (en) Image processing apparatus, control method of the same, and program
CN112804526A (en) Image data storage method and equipment, storage medium, chip and module equipment
US20100074336A1 (en) Fractional motion estimation engine
US8200032B2 (en) Image processing method and related apparatus for performing image processing operation according to image blocks in horizontal direction
CN110087088B (en) Data storage method based on motion estimation, terminal equipment and storage medium
CN111080508B (en) GPU sub-image processing method based on DMA
CN109120943A (en) Video data restoration methods and device
KR100359091B1 (en) Motion estimation device
CN113709494A (en) Image decompression method and device for super-resolution reconstruction

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