CN117857835A - Image overturning method and device, electronic equipment and storage medium - Google Patents

Image overturning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117857835A
CN117857835A CN202311641652.9A CN202311641652A CN117857835A CN 117857835 A CN117857835 A CN 117857835A CN 202311641652 A CN202311641652 A CN 202311641652A CN 117857835 A CN117857835 A CN 117857835A
Authority
CN
China
Prior art keywords
image data
image
target
data
overturned
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
CN202311641652.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.)
Beijing Feixun Digital Technology Co ltd
Original Assignee
Beijing Feixun Digital 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 Feixun Digital Technology Co ltd filed Critical Beijing Feixun Digital Technology Co ltd
Priority to CN202311641652.9A priority Critical patent/CN117857835A/en
Publication of CN117857835A publication Critical patent/CN117857835A/en
Pending legal-status Critical Current

Links

Abstract

The application provides an image overturning method and device, electronic equipment and storage medium, wherein the method comprises the following steps: obtaining a target virtual address from an image processing channel, wherein the image processing channel is a channel for image processing in a target media processing software platform, and converting the target virtual address into a target physical address; acquiring target image data in a target physical address; the target image data is overturned according to a preset overturned mode, and overturned image data are obtained; and writing the turned image data into a data reading module, and rendering and playing the turned image data through the data reading module, wherein the data reading module is a module for reading the image data and rendering and playing in a target media processing software platform. By the method and the device, the technical problem that any overturn cannot be realized in a media processing software platform in the related technology is solved.

Description

Image overturning method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image overturning method and apparatus, an electronic device, and a storage medium.
Background
Currently, a media processing software platform (Media Process Platform, abbreviated as MPP) can support rapid development of application software. The platform shields the complex bottom layer processing related to the chip from the application software, and directly provides MPI (MPP Programe Interface) interfaces for the application software to complete corresponding functions. The platform supports the application software to rapidly develop the following functions: input video capturing, H.264/MJPEG/JPEG/MPEG4 encoding, H264/H.265/VC1/MPEG4/MPEG2/AVS decoding, video output display, video image preprocessing (including denoising, enhancement, sharpening, decryption), code stream superposition OSD, video detection analysis, intelligent analysis, audio capturing and output, audio encoding and decoding, and the like.
The MPP platform provides a video decoding module (VDEC module), an image processing module (VPSS module), a video rendering module (VOU module), etc.: the VDEC module provides an MPI interface for driving video decoding hardware to work so as to realize a video decoding function; the VPSS module (Video Process Sub-System) supports unified preprocessing of an input image, such as denoising, de-interlacing and the like, then performs scaling, sharpening and the like on each channel respectively, and finally outputs images with different resolutions; the VOU module (Video Output Unit) module actively reads video and graphic data from corresponding positions in the memory and outputs the video and graphic data through corresponding display devices.
In the actual use process, the MPP platform transmits media (i.e. video coding stream) to the VDEC module, and the MPP completes subsequent processing.
In the actual use process, many scenes require video images on demand to be overturned, but the VPSS module of the MPP can only overturn the images according to the fixed overturning angle realized by the VPSS, so that the MPP platform can only overturn the images at the fixed overturning angle. Moreover, the MPP platform in the related art cannot perform other flipping modes beyond those that can be realized by the VPSS in an embedded manner.
Therefore, the technical problem that the media processing software platform cannot be expanded in an embedded manner exists in the related art.
Disclosure of Invention
The application provides an image overturning method and device, electronic equipment and storage medium, and aims to at least solve the technical problem that any overturning cannot be realized in a media processing software platform in the related technology.
According to an aspect of an embodiment of the present application, there is provided an image flipping method, including:
obtaining a target virtual address from an image processing channel, and converting the target virtual address into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform;
acquiring target image data in the target physical address;
the target image data is overturned according to a preset overturned mode, and overturned image data are obtained;
writing the turned image data into a data reading module, and rendering and playing the turned image data through the data reading module, wherein the data reading module is a module used for reading the image data and rendering and playing in the target media processing software platform.
Optionally, in the foregoing method, before the step of flipping the target image data according to a preset flipping manner to obtain flipped image data, the method further includes:
initializing an image overturning library;
configuring the image overturning library according to the preset overturning mode to obtain a configured image overturning library;
the step of turning the target image data according to a preset turning mode to obtain turned image data comprises the following steps:
and overturning the target image data through the configured image overturning library to obtain the overturned image data obtained by overturning according to a preset overturning mode.
Optionally, in the foregoing method, the writing the flipped image data into a data reading module, and rendering and playing the flipped image data through the data reading module includes:
converting the appointed physical address of the flipped image data into an appointed virtual address;
and sending the appointed virtual address to a data reading module, so that the data reading module obtains the flipped image data according to the appointed virtual address, and rendering and playing the flipped image data.
Optionally, as in the previous method, before the obtaining the target virtual address from the image processing channel and converting the target virtual address to the target physical address, the method further includes:
establishing an association relationship between a data source and an image processing module, wherein the data source is used for sending decoded data to the image processing module, and the image processing module comprises at least one image processing channel;
and transmitting the image data to be processed to the image processing module through the data source.
Optionally, as in the previous method, before the transferring the image data to be processed to the image processing module by the data source, the method further comprises:
judging whether the image data to be processed needs to be overturned according to the preset overturned mode or not;
and under the condition that the image data to be processed needs to be overturned according to the preset overturned mode, after the image data to be processed is transmitted to the image processing module through the data source, executing a jump operation for jumping to the step of acquiring the target virtual address from the image processing channel and converting the target virtual address into the target physical address.
Optionally, in the foregoing method, after the determining whether the image data to be processed needs to be flipped according to the preset flipping manner, the method further includes:
under the condition that the image data to be processed does not need to be overturned according to the preset overturned mode, establishing an association relationship between the image processing module and the data reading module;
and after the image processing module processes the image data to be processed to obtain processed image data, outputting the processed image data through the data reading module.
Optionally, in the foregoing method, after the sending the specified virtual address to the data reading module, so that the data reading module obtains the flipped image data according to the specified virtual address, and renders and plays the flipped image data, the method further includes:
and releasing the target physical address and the appointed physical address.
According to another aspect of the embodiments of the present application, there is also provided an image flipping apparatus, including:
the conversion unit is used for acquiring a target virtual address from an image processing channel and converting the target virtual address into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform;
an acquisition unit configured to acquire target image data in the target physical address;
the overturning unit is used for overturning the target image data according to a preset overturning mode to obtain overturned image data;
the writing unit is used for writing the overturned image data into the data reading module and rendering and playing the overturned image data through the data reading module, wherein the data reading module is a module for reading the image data and rendering and playing in the target media processing software platform.
According to yet another aspect of the embodiments of the present application, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein the memory is used for storing a computer program; a processor for performing the method steps of any of the embodiments described above by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the method steps of any of the embodiments described above when run.
In the embodiment of the application, the target virtual address is acquired from the image processing channel, the target virtual address is converted into the target physical address, then the target image data in the target physical address is acquired, the target image data is overturned according to a preset overturned mode to obtain overturned image data, and finally rendering and playing are carried out through the data reading module, so that the aim of overturned target image data according to the preset overturned mode is realized between the image processing channel and the data reading module in an embedded manner; because the preset turning mode is a turning mode which can be arbitrarily set according to the requirement, other turning modes besides the turning mode which can be performed by the media processing software platform can be realized; and the technical problem that the media processing software platform cannot be expanded in an embedded manner in the related technology can be effectively solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of an alternative image flipping method according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative image flipping method according to an embodiment of the application;
FIG. 3 is a block diagram of an alternative image flipping device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a hardware environment of an alternative image flipping method according to an embodiment of the present application;
fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, an image flipping method is provided. Alternatively, in the present embodiment, the above-described image flipping method may be applied to a hardware environment constituted by the terminal 1402 and the server 1404 as shown in fig. 4. As shown in fig. 1, the server 1404 is connected to the terminal 1402 via a network, and may be used to provide services (such as game services, application services, etc.) to the terminal or clients installed on the terminal, and a database may be provided on the server or independent of the server, for providing data storage services to the server 1404.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, or the like.
The image flipping method in the embodiment of the present application may be executed by a server, may be executed by a terminal, or may be executed by both the server and the terminal. The terminal may also execute the image flipping method according to the embodiment of the present application by a client installed thereon.
Taking the image flipping method in the present embodiment performed by a server as an example, fig. 1 is a flowchart of an image flipping method provided in the present embodiment, including the following steps:
step S101, a target virtual address is obtained from an image processing channel, and the target virtual address is converted into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform.
The image flipping method in the present embodiment may be applied to a scene where a media processing software platform (e.g., MPP platform (Media Process Platform)) needs to output a flipped image, for example: the scene of outputting the horizontally flipped image, the scene of outputting the vertically flipped image, etc., may be a scene of other image flipping modes.
Specifically, the image processing channels may be channels in a VPSS (Video Process Sub-System, image processing module) for processing images, where the VPSS supports unified preprocessing, such as denoising, de-interlacing, etc., for an input image, and then performs scaling, sharpening, etc. on each channel, and finally outputs images with multiple different resolutions.
That is, different image processing channels may be used to output images of different resolutions and/or degrees of sharpening.
The target virtual address may have a uniquely corresponding target physical address. The interface of the channel acquisition data in the VPSS returns a mapping of the physical memory address of the image data, called virtual memory address, which can be converted to each other by the associated MPI in the media processing software platform.
In this embodiment, the target virtual address may be converted through a preset data conversion interface to be converted into an actually available target physical address, that is, the external world may acquire data through the target physical address.
Step S102, acquiring target image data in a target physical address.
Specifically, after the target physical address is acquired, since the target physical address is truly accessible, target image data can be acquired from the target physical address.
Step S103, the target image data is overturned according to a preset overturned mode, and overturned image data are obtained.
Specifically, after the target image data is acquired, the target image data can be turned over according to a preset turning-over mode.
In general, the preset turning mode is a turning mode which cannot be realized by the media processing software platform where the image processing channel is located, for example, when the media processing software platform can only realize a turning mode which is upside down and the required turning mode is left-right interchanged; the preset turning mode is left-right exchange, and when the turning mode is needed to be turned upside down, the media processing software platform is directly adopted for realizing the turning mode.
In this embodiment, the target image data is obtained in an embedded manner, and after being turned over, the turned-over image data is obtained.
For example, when the preset turning mode is left-right turning, the image data after turning is the image data after left-right exchange with the target image data.
Step S104, writing the turned image data into a data reading module, and rendering and playing the turned image data through the data reading module, wherein the data reading module is a module for reading the image data and rendering and playing in a target media processing software platform.
Specifically, after the flipped image data is acquired, the flipped image data needs to be output.
In this embodiment, the data reading module may actively read the flipped image data by writing the flipped image data into the data reading module, or may perform the action of writing the flipped image data into the data reading module by other modules.
The data reading module can render the overturned image data after acquiring the overturned data and play the overturned image data through corresponding display equipment.
In addition, in this embodiment, the data reading module and the image processing module where the image processing channel is located belong to the same media processing software platform.
Still taking the MPP platform as an example, the data reading module may be a VOU (Video Output Unit) module, and the VOU module may actively read the flipped image data from the corresponding position in the memory, and output the flipped image data through the corresponding display device.
The method in the embodiment comprises the steps of acquiring a target virtual address from an image processing channel, converting the target virtual address into a target physical address, further acquiring target image data in the target physical address, acquiring the target virtual address from the image processing channel, converting the target virtual address into the target physical address, further acquiring the target image data in the target physical address, then overturning the target image data according to a preset overturning mode to obtain overturned image data, and finally rendering and playing through a data reading module, so that the aim of overturning the target image data according to the preset overturning mode is realized between the image processing channel and the data reading module in an embedded mode; because the preset turning mode is a turning mode which can be arbitrarily set according to the requirement, other turning modes besides the turning mode which can be performed by the media processing software platform can be realized; and the technical problem that the media processing software platform cannot be expanded in an embedded manner in the related technology can be effectively solved.
As an optional embodiment, as in the foregoing method, before the step S103 of flipping the target image data according to the preset flipping manner to obtain flipped image data, the method further includes the following steps:
initializing an image overturning library; and configuring the image overturning library according to a preset overturning mode to obtain the configured image overturning library.
Specifically, a turnover module in the image turnover library is initialized, and then the turnover module is configured according to a preset turnover mode, so that the turnover module can be used for turning over the image according to the preset turnover mode.
For example, the image roll-over library may be FFMPEG (a powerful and widely used set of open source multimedia processing tools, providing rich functionality and tools for processing audio, video, and multimedia streams as a cross-platform tool), which may run on a variety of operating systems, including embedded software platforms. Further, the flip module may be an avfilter module in FFMPEG.
The target image data is overturned according to a preset overturned mode to obtain overturned image data, and the method comprises the following steps:
after the configured image overturning library is obtained, overturning the target image data through the configured image overturning library to obtain overturning image data obtained by overturning according to a preset overturning mode.
As an alternative embodiment, as the foregoing method, the step S104 writes the flipped image data into the data reading module, and renders and plays the flipped image data through the data reading module, which includes the following steps:
converting the appointed physical address of the flipped image data into an appointed virtual address; and sending the appointed virtual address to the data reading module so that the data reading module obtains the flipped image data according to the appointed virtual address, and rendering and playing the flipped image data.
After the flipped image data is obtained, that is, the flipped image data needs to be stored, the designated physical address of the flipped image data storage may be the target physical address (that is, the target image data is replaced by the flipped image data), or the designated physical address may be a different target physical address (that is, the flipped image data storage location is different from the target image data).
The data reading module can only read data according to the virtual address, so that the appointed physical address of the flipped image data is converted into the appointed virtual address; and sending the appointed virtual address to the data reading module so that the data reading module obtains the flipped image data according to the appointed virtual address, and rendering and playing the flipped image data.
As an alternative embodiment, as the foregoing method, before the step S101 of obtaining the target virtual address from the image processing channel and converting the target virtual address into the target physical address, the method further includes the following steps:
establishing an association relationship between a data source and an image processing module, wherein the data source is used for sending decoded data to the image processing module, and the image processing module comprises at least one image processing channel;
and transmitting the image data to be processed to the image processing module through the data source.
Specifically, in this embodiment, the data source may be a VDEC module in the MPP platform (an MPI interface for driving the video decoding hardware to work is provided, so as to implement the video decoding function).
The media processing software platform may be initialized in advance, then a data source (VDEC module), an image processing module (VPSS module) and a data reading module (VOU module) are created, and then an association relationship between the data source and the image processing module is established by binding the data source and the image processing module. After the association relation is established, the data generated by the data source is automatically sent to the image processing module.
As an alternative embodiment, as the aforementioned method, before the step of transmitting the image data to be processed to the image processing module via the data source, the method further comprises:
step 201, judging whether the image data to be processed needs to be overturned according to a preset overturned mode;
step 202, after determining that the image data to be processed needs to be flipped according to the preset flipping manner, transmitting the image data to be processed to the image processing module through the data source, performing a jumping operation for jumping to the step to obtain the target virtual address from the image processing channel, and converting the target virtual address into the target physical address.
Step 203, under the condition that the image data to be processed is determined not to need to be overturned according to a preset overturned mode, establishing an association relationship between the image processing module and the data reading module; and after the image processing module processes the image data to be processed to obtain processed image data, outputting the processed image data through the data reading module.
Specifically, after the data source (VDEC module), the image processing module (VPSS module) and the data reading module (VOU module) are created, it may be determined whether the image data to be processed needs to be turned according to a preset turning manner, that is, whether the image data to be processed needs to be processed in an image turning manner which cannot be achieved by the media processing software platform.
In the case that it is determined that the image data to be processed needs to be flipped according to the preset flipping manner, it is indicated that the processing capability of the media processing software platform cannot meet the requirement, so that after the image data to be processed is transmitted to the image processing module through the data source, a skipping operation for skipping to step S101 is performed.
Under the condition that the image data to be processed does not need to be overturned according to a preset overturned mode, the processing capability of the media processing software platform is indicated to meet the requirement, and the association relationship between the image processing module and the data reading module is directly established; and after the image processing module processes the image data to be processed to obtain processed image data, outputting the processed image data through the data reading module. Taking the MPP platform as an example: after the VDEC binds with the VPSS, the decoded image data of the VDEC is automatically sent to the VPSS module, and after image processing, the decoded image data is automatically sent to the VPSS-bound VOU.
As an optional embodiment, after sending the specified virtual address to the data reading module to enable the data reading module to obtain the flipped image data according to the specified virtual address, and render and play the flipped image data, a method as described above further includes:
and releasing the target physical address and the appointed physical address.
That is, after the rendering and playing of the flipped image data are completed, the target physical address and the designated physical address related to the flipped image data can be released, so that the memory can be released, and the occupation of resources can be reduced.
As shown in fig. 2, an application example of applying any of the foregoing embodiments in the MPP platform is as follows:
1. initializing an MPP platform;
2. creating VDEC, creating VPSS, and creating VOU; and binding the VDEC with the VPSS; binding is to establish an association relationship between a data source and a data receiver. After binding, the data generated by the data source will be automatically sent to the recipient. For example, after the VDEC binds to the VPSS, the decoded image data of the VDEC is automatically sent to the VPSS module, and after the image processing, the decoded image data is automatically sent to the VPSS-bound VOU.
3. Under the condition that the image needs to be overturned according to a preset overturned mode, the VPSS acquires image data from the VDEC, and then converts a virtual address for highlighting the data into a physical address; and the image data is overturned through FFMPEG, the overturned image data is obtained, the physical address of the overturned image data is converted into a virtual address, the VOU acquires the overturned image data according to the virtual address of the overturned image data, and finally the overturned image data is output by the VOU.
Further, in the case that the image needs to be turned over according to a preset turning mode, the steps of the main function call flow chart are as follows:
[1]: and initializing an avfilter module of FFMPEG for performing a flipping operation on the image.
[2]: one frame of data (i.e., a virtual address corresponding to one frame of image data) is acquired from the VPSS path.
[3] For initializing the flip mode of the avfilter module.
[4]: the virtual address is translated to a physical address.
[5]: and transmitting the image data to FFMPEG for processing and turning over to obtain turned-over image data.
[6]: and converting the physical address of the flipped image data into a virtual address, and sending the virtual address to the VOU for rendering and playing.
[7]: and sending the flipped image data to the VOU for rendering and playing.
[8]: releasing the physical memory address.
4. Under the condition that the image does not need to be overturned according to a preset overturning mode, the VPSS binds the VOU, and then the image data processed by the VPSS is directly output by the VOU.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM (Read-Only Memory)/RAM (Random Access Memory ), magnetic disk, optical disc), including instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an image flipping apparatus for implementing the above image flipping method. Fig. 3 is a block diagram of an alternative image flipping device according to an embodiment of the present application, as shown in fig. 3, the device may include:
the conversion unit 1 is used for acquiring a target virtual address from an image processing channel and converting the target virtual address into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform;
an acquisition unit 2 for acquiring target image data in a target physical address;
the overturning unit 3 is used for overturning the target image data according to a preset overturning mode to obtain overturned image data;
the writing unit 4 is configured to write the flipped image data into the data reading module, and render and play the flipped image data through the data reading module, where the data reading module is a module in the target media processing software platform for reading the image data and rendering and playing the image data.
It should be noted that the conversion unit 1 in this embodiment may be used to perform the above-described step S101, the acquisition unit 2 in this embodiment may be used to perform the above-described step S102, the flip unit 3 in this embodiment may be used to perform the above-described step S103, and the write unit 4 in this embodiment may be used to perform the above-described step S104.
The apparatus in this embodiment may further include, in addition to the above-described modules, modules that perform any of the methods in the embodiments of any of the image flipping methods described above.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 4, where the hardware environment includes a network environment.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device for implementing the above image flipping method, where the electronic device may be a server, a terminal, or a combination thereof.
According to another embodiment of the present application, there is also provided an electronic apparatus including: as shown in fig. 5, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the program stored in the memory 1503, performs the following steps:
step S101, a target virtual address is acquired from the image processing channel, and the target virtual address is converted into a target physical address.
Step S102, acquiring target image data in a target physical address.
Step S103, the target image data is overturned according to a preset overturned mode, and overturned image data are obtained.
Step S104, the flipped image data is written into the data reading module, and rendering and playing are carried out on the flipped image data through the data reading module.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus. The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 1503 may include, but is not limited to, the conversion unit 1, the acquisition unit 2, the inversion unit 3, and the writing unit 4 in the image inversion apparatus. In addition, other module units in the image flipping device may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processor ), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The embodiment of the application also provides a computer readable storage medium, wherein the storage medium comprises a stored program, and the program executes the method steps of the method embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. An image flipping method, comprising:
obtaining a target virtual address from an image processing channel, and converting the target virtual address into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform;
acquiring target image data in the target physical address;
the target image data is overturned according to a preset overturned mode, and overturned image data are obtained;
writing the turned image data into a data reading module, and rendering and playing the turned image data through the data reading module, wherein the data reading module is a module used for reading the image data and rendering and playing in the target media processing software platform.
2. The method of claim 1, wherein before the target image data is flipped in a preset flipping manner to obtain flipped image data, the method further comprises:
initializing an image overturning library;
configuring the image overturning library according to the preset overturning mode to obtain a configured image overturning library;
the step of turning the target image data according to a preset turning mode to obtain turned image data comprises the following steps:
and overturning the target image data through the configured image overturning library to obtain the overturned image data obtained by overturning according to a preset overturning mode.
3. The method of claim 1, wherein writing the flipped image data to a data reading module and rendering the flipped image data for playback by the data reading module comprises:
converting the appointed physical address of the flipped image data into an appointed virtual address;
and sending the appointed virtual address to a data reading module, so that the data reading module obtains the flipped image data according to the appointed virtual address, and rendering and playing the flipped image data.
4. The method of claim 1, wherein prior to the obtaining a target virtual address from an image processing channel and converting the target virtual address to a target physical address, the method further comprises:
establishing an association relationship between a data source and an image processing module, wherein the data source is used for sending decoded data to the image processing module, and the image processing module comprises at least one image processing channel;
and transmitting the image data to be processed to the image processing module through the data source.
5. The method of claim 4, wherein prior to said transmitting image data to be processed to said image processing module via said data source, said method further comprises:
judging whether the image data to be processed needs to be overturned according to the preset overturned mode or not;
and under the condition that the image data to be processed needs to be overturned according to the preset overturned mode, after the image data to be processed is transmitted to the image processing module through the data source, executing a jump operation for jumping to the step of acquiring the target virtual address from the image processing channel and converting the target virtual address into the target physical address.
6. The method according to claim 5, wherein after said determining whether the image data to be processed needs to be flipped in the preset flipping manner, the method further comprises:
under the condition that the image data to be processed does not need to be overturned according to the preset overturned mode, establishing an association relationship between the image processing module and the data reading module;
and after the image processing module processes the image data to be processed to obtain processed image data, outputting the processed image data through the data reading module.
7. The method of claim 3, wherein after said sending the specified virtual address to a data reading module to cause the data reading module to obtain the flipped image data according to the specified virtual address and render and play the flipped image data, the method further comprises:
and releasing the target physical address and the appointed physical address.
8. An image flipping device, comprising:
the conversion unit is used for acquiring a target virtual address from an image processing channel and converting the target virtual address into a target physical address, wherein the image processing channel is a channel for image processing in a target media processing software platform;
an acquisition unit configured to acquire target image data in the target physical address;
the overturning unit is used for overturning the target image data according to a preset overturning mode to obtain overturned image data;
the writing unit is used for writing the overturned image data into the data reading module and rendering and playing the overturned image data through the data reading module, wherein the data reading module is a module for reading the image data and rendering and playing in the target media processing software platform.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, characterized in that,
the memory is used for storing a computer program;
the processor is configured to perform the method steps of any of claims 1 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method steps of any of claims 1 to 7 when run.
CN202311641652.9A 2023-12-01 2023-12-01 Image overturning method and device, electronic equipment and storage medium Pending CN117857835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311641652.9A CN117857835A (en) 2023-12-01 2023-12-01 Image overturning method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311641652.9A CN117857835A (en) 2023-12-01 2023-12-01 Image overturning method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117857835A true CN117857835A (en) 2024-04-09

Family

ID=90536930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311641652.9A Pending CN117857835A (en) 2023-12-01 2023-12-01 Image overturning method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117857835A (en)

Similar Documents

Publication Publication Date Title
CN104980788B (en) Video encoding/decoding method and device
CN102572606B (en) Streaming digital content with flexible remote playback
CN111031368B (en) Multimedia playing method, device, equipment and storage medium
US8681861B2 (en) Multistandard hardware video encoder
CN110166810B (en) Video rendering engine switching method, device and equipment and readable storage medium
KR101002886B1 (en) Encoding multi-media signals
CN107734353B (en) Method and device for recording barrage video, readable storage medium and equipment
CN113457160A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113542757A (en) Image transmission method and device for cloud application, server and storage medium
US11863846B2 (en) Multimedia data publishing method and apparatus, and device and medium
CN112399249A (en) Multimedia file generation method and device, electronic equipment and storage medium
CN110557417B (en) Image processing method and device and storage medium
CN113535063A (en) Live broadcast page switching method, video page switching method, electronic device and storage medium
CN111327921A (en) Video data processing method and device
US20160100011A1 (en) Content processing apparatus and content processing method thereof
CN111918098A (en) Video processing method and device, electronic equipment, server and storage medium
CN111355978B (en) Video file processing method and device, mobile terminal and storage medium
US11562772B2 (en) Video processing method, electronic device, and storage medium
JP2008299610A (en) Multiprocessor
EP3920537A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium and electronic device
CN110769241B (en) Video frame processing method and device, user side and storage medium
CN117857835A (en) Image overturning method and device, electronic equipment and storage medium
CN111355997A (en) Video file generation method and device, mobile terminal and storage medium
CN111355960A (en) Method and device for synthesizing video file, mobile terminal and storage medium
CN117065357A (en) Media data processing method, device, computer equipment and storage medium

Legal Events

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