Video data transmission method, electronic equipment and storage medium

By building a data distribution channel on an image processing software platform that does not support RGB format, and using RDI transparent transmission technology to transmit RGB format video data to image acquisition applications, the problem of not supporting RGB format such as Qualcomm platform is solved, and the preview and photo recording functions of RGB format data are realized.

CN120302108APending Publication Date: 2025-07-11GUILIN YIYUAN COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510411491.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, some platforms such as Qualcomm platform do not support RGB format video data processing, resulting in the RGB format data output by the camera being unable to be rendered directly in the display, affecting the normal progress of video recording and photography functions.

Method used

Build a data distribution channel on an image processing software platform that does not support RGB format, use RDI transparent transmission technology to directly send RGB format video data to the image acquisition application, and build a data distribution channel through Camx and mm-camera software architectures to realize the transmission and processing of RGB format data.

Benefits of technology

It realizes the preview function of RGB format video data on platforms that do not support RGB format, and supports functions such as taking photos and recording through C2D transcoding, ensuring the real-time and consistency of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120302108A_ABST
    Figure CN120302108A_ABST
Patent Text Reader

Abstract

The invention discloses a video data transmission method, electronic equipment and a computer readable storage medium. The method is applied to target video data in an RGB format, and comprises the following steps: under the condition that an image acquisition device acquires the target video data, sending the target video data to an image acquisition application program through a preset data distribution path so as to realize a preview function on the target video data in the image acquisition application program, wherein the preset data distribution path is built on a preset image processing software platform, and the preset image processing software platform does not support processing of data in an RGB format by default. According to the invention, the data distribution path is established on the image processing software platform which does not support the RGB format to adapt to the target video data of the RGB format, and the obtained target video data is sent to the image acquisition application program by using the data distribution path, so that the preview function of the target video data is realized by using the image acquisition application program. And realizing transmission of RGB format data on an image processing software platform which does not support processing of the RGB format by default.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data transmission, and particularly to a method for video data transmission, an electronic device, and a computer-readable storage medium. Background Art

[0002] For some video acquisition devices such as cameras in the current related technologies, in order to ensure that the input data and the displayed data are consistent, the data will be output to the platform in the RGB output format. In this way, there is no need for transcoding and it can be directly rendered to the display, which can ensure that the colors do not deviate. At the same time, the functions of video recording and taking pictures also need to be ensured to be normal. However, currently, some platforms represented by the Qualcomm platform do not support the processing of RGB data format by default. Summary of the Invention

[0003] This application provides a method for video data transmission, an electronic device, and a computer-readable storage medium.

[0004] The method for video data transmission involved in the embodiments of this application is applied to target video data in RGB format. The method includes:

[0005] When the image acquisition device acquires the target video data, the target video data is sent to the image acquisition application program through a preset data distribution path, so as to implement the preview function of the target video data in the image acquisition application program. The preset data distribution path is built on a preset image processing software platform that does not support processing RGB format data by default.

[0006] In this way, this application builds a data distribution path on a preset image processing software platform that does not support the RGB format to adapt to the target video data in RGB format, and then uses the above data distribution path to send the acquired target video data in RGB format to the image acquisition application program installed in the operating system, so as to use it to implement the preview function of the target video data, thereby realizing the transmission of RGB format data on a preset image processing software platform that does not support processing RGB format data by default.

[0007] In some embodiments, when the image acquisition device acquires the target video data, sending the target video data to the image acquisition application program through the preset data distribution path includes:

[0008] When the image acquisition device acquires the target video data, the target video data is distributed to the target image processing unit through the image filtering unit of the preset data distribution path, and no modification is performed on the target video data.

[0009] Control the target image processing unit to send the target video data to the image acquisition application.

[0010] In some embodiments, the method further includes:

[0011] Determine response image data according to the target image processing unit and the target video data, where the response image data is picture data or video data, and the response image data is used to implement the photographing function or the video recording function.

[0012] In some embodiments, the control of the target image processing unit to send the target video data to the image acquisition application includes:

[0013] In response to a preview operation of the user on the image acquisition application interface, control the target image processing unit to send the target video data to the human-computer interaction program;

[0014] Control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without performing any modification to the target video data.

[0015] In some embodiments, the determining the response image data according to the target image processing unit and the target video data includes:

[0016] Perform transcoding processing on the target video data according to the display data transcoding module to determine the response image data, where the display data transcoding module is included in the target image processing unit, and the format of the response image data is the NV12 format.

[0017] In this way, the present application can build a data distribution path based on the Camx software architecture to implement the transmission of the target video data in RGB format to the image acquisition application installed in the operating system to utilize its preview function for the target video data, and can also convert the target video data into a picture data stream or a video data stream through C2D transcoding, thereby providing support for the electronic device for photographing, video recording, and other functions.

[0018] In some embodiments, in the case where the image acquisition device acquires the target video data, sending the target video data to the image acquisition application through a preset data distribution path includes:

[0019] In the case where the image acquisition device acquires the target video data, send the target video data to the image post-processing unit via the image signal processing unit of the preset data distribution path without performing any modification to the target video data;

[0020] Control the image post - processing unit to send the target video data to the image acquisition application.

[0021] In some embodiments, the method further includes:

[0022] Determine response image data according to the image post - processing unit and the target video data, where the response image data is picture data or video data, and the response image data is used to implement the photographing function or the video recording function.

[0023] In some embodiments, the control of the image post - processing unit to send the target video data to the image acquisition application includes:

[0024] In response to a preview operation by the user on the image acquisition application interface, control the image post - processing unit to send the target video data to the human - machine interaction program;

[0025] Control the human - machine interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without performing any modification to the target video data.

[0026] In some embodiments, the determination of the response image data according to the image post - processing unit and the target video data includes:

[0027] Perform transcoding processing on the target video data according to the display data transcoding module to determine the response image data, where the display data transcoding module is included in the image post - processing unit.

[0028] In some embodiments, the determination of the response image data according to the image post - processing unit and the target video data includes:

[0029] Perform image processing on each independent channel of the target video data according to the image component processing module to determine the first response image data, where the image component processing module is included in the image post - processing unit;

[0030] Perform transcoding processing on the first response image data according to the display data transcoding module to determine the response image data.

[0031] In some embodiments, the method further includes:

[0032] In the case where the response image data is picture data, control the image post - processing unit to send the response image data to the gallery unit to implement the photographing function.

[0033] In this way, the present application can build a data distribution path based on the mm-camera software architecture to transmit the target video data in RGB format to the image acquisition application installed in the operating system, so as to use it to implement the preview function of the target video data. The present application can also convert the target video data into a picture data stream or a video data stream through C2D transcoding, thereby providing support for the electronic device for functions such as taking pictures, recording videos, and other functions.

[0034] The electronic device in the embodiment of the present application includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the above method is implemented.

[0035] The computer-readable storage medium in the embodiment of the present application stores a computer program, and when the computer program is executed by one or more processors, the above method is implemented.

[0036] Additional aspects and advantages of the embodiments of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0038] Figure 1 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0039] Figure 2 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0040] Figure 3 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0041] Figure 4 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0042] Figure 5 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0043] Figure 6 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0044] Figure 7 is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0045] Figure 8It is a schematic flowchart of the video data transmission method in the embodiment of the present application;

[0046] Figure 9 It is a schematic flowchart of the video data transmission method in the embodiment of the present application. Specific embodiments

[0047] The following details the embodiments of the present application. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals always represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and should not be construed as a limitation to the embodiments of the present application.

[0048] Please refer to Figure 1 , the video data transmission method in the embodiment of the present application is applied to the target video data in RGB format. The video data transmission method includes:

[0049] 01: When the image acquisition device acquires the target video data, send the target video data to the image acquisition application program through a preset data distribution path, so as to implement the preview function of the target video data in the image acquisition application program,

[0050] where the preset data distribution path is built on a preset image processing software platform, and the preset image processing software platform does not support processing RGB format data by default.

[0051] The electronic device in the embodiment of the present application can implement the above video data transmission method. Specifically, the electronic device includes a memory and a processor, where the memory stores a computer program, and the processor is used to send the target video data to the image acquisition application program through a preset data distribution path when the image acquisition device acquires the target video data, so as to implement the preview function of the target video data in the image acquisition application program.

[0052] Specifically, the output formats of cameras in the current related technologies are generally Raw and Yuv formats, and these two formats are generally supported by general MCU chips. For example, chips represented by platforms such as Qualcomm and Spreadtrum can process them. When processing Yuv data, due to multiple transcoding processes, there will always be some slight differences when comparing with the original input picture during preview. Based on this defect, in order to ensure that the input data and the displayed data are consistent, some cameras will output RGB format data to the platform, so that there is no need for transcoding and it can be directly rendered to the display, which can ensure that the color does not deviate. Of course, at the same time, it is also necessary to ensure the normal functions of video recording and taking pictures;

[0053] However, currently, platforms represented by Qualcomm do not support the processing of RGB data formats by default. Based on this requirement, the transmission and processing of RGB data are implemented on the mm-camera architecture and the Camx architecture.

[0054] Therefore, this application proposes a video data transmission method, which is mainly used for chip platforms that do not support the RGB format, represented by the Qualcomm platform. The purpose is to transmit the RGB-format video data obtained by the camera on an electronic device equipped with the above-mentioned chip to an image acquisition application installed in the operating system to achieve the preview function of the video data.

[0055] Among them, the chip installed on the above-mentioned electronic device is a chip platform that does not support the RGB format, represented by the Qualcomm platform, and the above-mentioned platform includes a preset image processing software platform that does not support the transmission and processing of RGB-format data. The way to achieve the above technical purpose is to establish a data distribution path on the preset image processing software platform, and use this data distribution path to process and distribute the RGB data that the above-mentioned preset image processing software platform originally does not support. The above-mentioned data distribution path is built on the above-mentioned preset image processing software platform. In some examples, further, in addition to the part built on the preset image processing software platform, the above-mentioned data distribution path also uses part of the system software architecture of the operating system of the above-mentioned electronic device to achieve the purpose of sending the target video data to an image acquisition application installed in the operating system. The specific composition of the data distribution path will be further described in the subsequent embodiments.

[0056] In this way, this application adapts to the target video data in the RGB format by building a data distribution path on a preset image processing software platform that does not support the RGB format, and then uses the above data distribution path to send the obtained target video data in the RGB format to an image acquisition application installed in the operating system, so as to use it to achieve the preview function of the target video data, thereby realizing the transmission of RGB-format data on a preset image processing software platform that does not support the processing of RGB-format data by default.

[0057] Please refer to Figure 2 , in some embodiments, step 01 includes:

[0058] 011: When the image acquisition device obtains the target video data, distribute the target video data to the target image processing unit through the image filtering unit of the preset data distribution path, and do not perform any modification to the target video data;

[0059] 012: Control the target image processing unit to send the target video data to the image acquisition application.

[0060] In some embodiments, the processor is further configured to, when the image acquisition device acquires the target video data, distribute the target video data to the target image processing unit via the image filtering unit of the preset data distribution path without performing any modification on the target video data, and to control the target image processing unit to send the target video data to the image acquisition application.

[0061] Specifically, next, taking the Camx software architecture platform (corresponding to the preset image processing software platform) as an example, the method for transmitting the target video data in RGB format will be described. Exemplarily, the chip carried by the electronic device adopting the above Camx software architecture platform includes an image signal processing module (Image Signal Processor, hereinafter referred to as ISP) such as the Spectra 480 model or other different models.

[0062] First, when the image acquisition device such as a camera acquires the target video data, the raw image sensor unit included in the above ISP receives the target video data and further forwards the target video data to the image filtering unit (Image Filter Engine, hereinafter referred to as IFE) in the ISP. The above IFE is mainly responsible for performing basic preprocessing on the target video data output by the above raw image sensor unit and distributing the data to the subsequent units on the data distribution path.

[0063] Next, exemplarily, after receiving the target video data forwarded by the raw image sensor unit, the IFE passes the target video data to each target image processing unit (Image Processing Engine, hereinafter referred to as IPE) in a pass-through manner through RDI (Render Drawing Interface) without performing any modification on the target video data. Among them, RDI pass-through refers to a data transmission method that directly transmits the raw image data to the display device or the next processing stage without any modification or optimization. It has the characteristics of omitting additional processing steps and improving real-time performance. In the above embodiments, the preset data distribution path is built by using its characteristic of supporting the transmission of RGB format data. The above raw image sensor unit, IFE, and IPE all belong to the above preset data distribution path.

[0064] Finally, the IPE redistributes the target video data received through RDI pass-through and sends the target video data to the image acquisition application installed in the operating system by using the underlying software architecture of the operating system installed on the electronic device, so as to implement the preview function of the target video data in the image acquisition application.

[0065] Please refer to Figure 3, in some embodiments, step 012 includes:

[0066] 0121: In response to a user's preview operation on the image acquisition application interface, control the target image processing unit to send target video data to the human-computer interaction program;

[0067] 0122: Control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without making any modifications to the target video data.

[0068] In some embodiments, the processor is further configured to, in response to a user's preview operation on the image acquisition application interface, control the target image processing unit to send target video data to the human-computer interaction program, and to control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without making any modifications to the target video data.

[0069] Specifically, based on the above embodiments, regarding the manner in which the IPE sends the target video data to the image acquisition application, for example, when the IPE receives the target video data, the user can trigger the retrieval of the target video data by performing a preview operation on the user interface for the target image processing unit. In response to the above operation, the IPE also sends the target video data to the computer human interaction program (hereinafter referred to as the CHI program) adapted to the above ISP in the form of a preview data stream (Preview) through RDI passthrough. The CHI program is configured in the hardware driver of the ISP.

[0070] Next, the CHI program further transfers the target video data to the image acquisition application in the data path composed of the hardware abstraction layer and the operating system service framework in the electronic device operating system by using the RDI passthrough method.

[0071] For example, in the Android system, the CHI program first sends the target video data to the hardware abstraction layer (hereinafter referred to as HAL) of the Android system based on the RDI passthrough method. HAL is a software layer located between the operating system kernel and the hardware driver. Its core function is to abstract and encapsulate the underlying hardware and provide a unified and simple interface to the upper layer, so that upper-layer applications or the operating system do not need to care about the implementation details of specific hardware. The above CHI program transfers the target video data to HAL through the standard hardware interface provided by HAL.

[0072] Then, HAL sends the target video data to the underlying framework of the Android system through the HAL data interface set in the operating system. Finally, the underlying framework calls the program framework of the camera and the data access permission of the image acquisition application, and uses the RDI passthrough method to transfer the target video data to the image acquisition application, so that the image acquisition application can render and display the target video data subsequently, and finally realize the preview function of the target video data.

[0073] In summary, it can be seen that the preset data distribution path in the above embodiments includes the original image sensor unit, IFE, IPE, CHI program, HAL, and the underlying framework of the operating system. Finally, the data is sent to the image acquisition application through the above path.

[0074] Please refer to Figure 4 , in some embodiments, the video data transmission method further includes:

[0075] 013: Determine the response image data according to the target image processing unit and the target video data,

[0076] where the response image data is picture data or video data, and the response image data is used to implement the photographing function or the video recording function.

[0077] Further, in some embodiments, step 013 includes:

[0078] Perform transcoding processing on the target video data according to the display data transcoding module to determine the response image data, where the display data transcoding module is included in the target image processing unit, and the format of the response image data is NV12 format.

[0079] In some embodiments, the processor is further configured to determine the response image data according to the target image processing unit and the target video data, where the response image data is picture data or video data, and the response image data is used to implement the photographing function or the video recording function.

[0080] Specifically, in addition to directly using RDI passthrough to transfer the target video data unchanged to the image acquisition application for preview, exemplarily, the above IPE can also perform image processing on the target video data to facilitate functions such as photographing or video recording.

[0081] For example, based on the above-described embodiments, when the IPE receives the target video data, the IPE performs image processing on the target video data. Generally, the IPE is responsible for performing complex processing and format conversion on the image data to adapt to different scenario requirements. After the above-described image processing, the target video data is transformed into response image data. Depending on different requirements, the format of the response image data can be picture data or video data, corresponding to the photo-taking and video-recording functions of the electronic device respectively. Generally speaking, the above-described response image data appears in the form of a data stream. For example, when the format of the response image data is picture data, the response image data appears in the form of a picture data stream (Snapshot), and when the format of the response image data is video data, the response image data appears in the form of a video data stream (Video). The above-described picture data stream and video data stream can be directly utilized by the camera application installed on the operating system, thereby implementing the photo-taking function or the video-recording function. Additionally, by way of example, the response image data can also be further called by units such as the Digital Signal Processor (DSP) or the Embedded Graphics Processing Unit (GPU) in the chip of the electronic device, thereby implementing other functions.

[0082] Furthermore, based on the above-described embodiments, when the IPE receives the target video data, before performing image processing on it, the C2D (Compute to Display) unit included in the IPE is first used to perform C2D transcoding on the target video data to facilitate the generation of response image data. The C2D unit is one of the extended units of the ISP. It can implement custom transcoding rules by means of a custom Node.js file, thereby enabling C2D transcoding of video data according to requirements. Further, the transcoding library used for the above-described C2D transcoding function can be the C2D2 transcoding library corresponding to the ISP. The response image data generated by performing C2D transcoding according to the above transcoding library is NV12.

[0083] It should be noted that in order to clearly distinguish the functions of the path for directly transmitting the target video data and the path for generating response image data based on the target video data and avoid data errors, at least two groups of IPEs are included in the above-described embodiments. One group is used to pass through the target video data to the image acquisition application, and the other group is used to process the target video data into response image data.

[0084] Thus, the present application can build a data distribution path based on the Camx software architecture to transmit the target video data in RGB format to the image acquisition application installed in the operating system, so as to utilize it to implement the preview function of the target video data. It can also convert the target video data into a picture data stream or a video data stream through C2D transcoding, thereby providing support for the electronic device for functions such as taking pictures, recording videos, and other functions.

[0085] Please refer to Figure 5 , in some embodiments, step 01 further includes:

[0086] 014: When the image acquisition device acquires the target video data, send the target video data to the image post-processing unit via the image signal processing unit of the preset data distribution path and do not perform any modification to the target video data;

[0087] 015: Control the image post-processing unit to send the target video data to the image acquisition application.

[0088] In some embodiments, the processor is further configured to, when the image acquisition device acquires the target video data, send the target video data to the image post-processing unit via the image signal processing unit of the preset data distribution path and do not perform any modification to the target video data, and to control the image post-processing unit to send the target video data to the image acquisition application.

[0089] Specifically, next, taking the mm-camera software architecture platform (corresponding to the preset image processing software platform) as an example to illustrate the method for transmitting the target video data in RGB format. Exemplarily, the chip carried by the electronic device adopting the above mm-camera software architecture platform, and the above chip includes an image signal processing module (Image Signal Processor, hereinafter referred to as ISP).

[0090] First, when an image acquisition device such as a camera acquires target video data, the original image sensor unit included in the above ISP receives the target video data and further forwards the target video data to the Image Signal Processor Interface Module (hereinafter referred to as ISPIF) in the ISP. The above ISPIF is mainly responsible for distributing the target video data output by the above original image sensor unit to subsequent units on the data distribution path. Before receiving the target video data, ISPIF first adds RGB format data processing matters, and then receives the target video data from the original image sensor unit based on these matters. After receiving the target video data, ISPIF distributes the target video data to the Post-Processing Module (hereinafter referred to as PostProc) through a preset RDI pass-through channel. The main function of PostProc is to adjust the picture of the target video data and further forward the target video data. The above original image sensor unit, ISPIF, and PostProc all belong to the above preset data distribution path.

[0091] Finally, PostProc redistributes the target video data received through RDI pass-through, and uses the underlying software architecture of the operating system installed on the electronic device to send the target video data to the image acquisition application installed in the operating system, so as to implement the preview function of the target video data in the image acquisition application.

[0092] Please refer to Figure 6 , in some embodiments, step 015 further includes:

[0093] 0151: In response to a preview operation by the user on the interface of the image acquisition application, control the image post-processing unit to send the target video data to the human-computer interaction program;

[0094] 0152: Control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without making any modifications to the target video data.

[0095] In some embodiments, the processor is further configured to, in response to a preview operation by the user on the interface of the image acquisition application, control the image post-processing unit to send the target video data to the human-computer interaction program, and to control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without making any modifications to the target video data.

[0096] Specifically, on the basis of the above embodiments, regarding the manner in which PostProc sends the target video data to the image acquisition application, for example, when PostProc receives the target video data, the user can trigger the retrieval of the target video data by performing a preview operation on the user interface for the target image processing unit. In response to the above operation, PostProc also sends the target video data to the computer human interaction program (hereinafter referred to as the CHI program) adapted to the above ISP in the form of a preview data stream (Preview) through RDI passthrough. The CHI program is configured in the hardware driver of the ISP.

[0097] Next, the CHI program further transfers the target video data to the image acquisition application in the data path composed of the hardware abstraction layer and the operating system service framework in the electronic device operating system by using the RDI passthrough method.

[0098] For example, in the Android system, the CHI program first sends the target video data to the hardware abstraction layer (hereinafter referred to as HAL) of the Android system based on the RDI passthrough method. HAL is a software layer located between the operating system kernel and the hardware driver. Its core function is to abstract and encapsulate the underlying hardware and provide a unified and simple interface to the upper layer, so that the upper layer applications or the operating system do not need to care about the implementation details of the specific hardware. The above CHI program transfers the target video data to HAL through the standard hardware interface provided by HAL.

[0099] Then, HAL sends the target video data to the underlying framework of the Android system through the HAL data interface set in the operating system. Finally, the underlying framework calls the program framework of the camera and the data access permission of the image acquisition application, and transfers the target video data to the image acquisition application by using the RDI passthrough method, so that the image acquisition application can render and display the target video data subsequently, and finally realize the preview function of the target video data.

[0100] In summary, the preset data distribution path in the above embodiments includes the original image sensor unit, ISPIF, PostProc, CHI program, HAL, and the underlying framework of the operating system. Finally, the data is sent to the image acquisition application through the above path.

[0101] Please refer to Figure 7 , in some embodiments, the video data transmission method further includes:

[0102] 016: Determine response image data based on the image post - processing unit and the target video data,

[0103] where the response image data is picture data or video data, and the response image data is used to implement the photographing function or the video recording function.

[0104] In some embodiments, the processor is further configured to determine response image data based on the image post - processing unit and the target video data.

[0105] Specifically, in addition to directly using RDI pass - through to transfer the target video data unchanged to the image acquisition application for preview, exemplarily, the above - mentioned PostProc can also perform image processing on the target video data to facilitate functions such as photographing or video recording.

[0106] For example, based on the above - mentioned embodiments, when PostProc receives the target video data, PostProc performs image processing on the target video data. The target video data is transformed into response image data after the above - mentioned image processing. Depending on different requirements, the format of the response image data can be picture data or video data, corresponding to the photographing and video recording functions of the electronic device respectively. Generally speaking, the above - mentioned response image data appears in the form of a data stream. For example, when the format of the response image data is picture data, the response image data appears in the form of a picture data stream (Snapshot), and when the format of the response image data is video data, the response image data appears in the form of a video data stream (Video). The above - mentioned picture data stream and video data stream can be directly utilized by the camera application installed in the operating system to implement the photographing function or the video recording function. In addition, exemplarily, the response image data can also be further called by units such as the Digital Signal Processor (DSP) or the Embedded Graphics Processing Unit (GPU) in the chip of the electronic device to implement other functions.

[0107] Please refer to Figure 8 , in some embodiments, step 016 further includes:

[0108] 0161: Perform transcoding processing on the target video data according to the display data transcoding module to determine response image data,

[0109] where the display data transcoding module is included in the image post - processing unit.

[0110] In some embodiments, the processor is further configured to perform transcoding processing on the target video data according to the display data transcoding module to determine response image data.

[0111] Specifically, on the basis of the above embodiments, when PostProc receives the target video data, before performing image processing on it, it first performs C2D transcoding on the target video data using the C2D (Compute to Display) unit included in PostProc to facilitate the generation of response image data. The C2D unit is one of the extended units of the ISP, and it can implement custom transcoding rules by customizing Node.js files, thereby implementing C2D transcoding of video data according to requirements. Further, the transcoding library used for the above C2D transcoding function can be the C2D2 transcoding library corresponding to the ISP.

[0112] Please refer to Figure 9 , in some embodiments, step 016 further includes:

[0113] 0162: According to the image component processing module, perform image processing on each independent channel of the target video data respectively to determine the first response image data,

[0114] where the image component processing module is included in the image post-processing unit;

[0115] 0163: According to the display data transcoding module, perform transcoding on the first response image data to determine the response image data.

[0116] In some embodiments, the processor is further configured to perform image processing on each independent channel of the target video data respectively according to the image component processing module to determine the first response image data, and to perform transcoding on the first response image data according to the display data transcoding module to determine the response image data.

[0117] Specifically, on the basis of the above embodiments, PostProc includes an image component processing module (ComponentProcessing, hereinafter referred to as CPP) and a display data transcoding module, which corresponds to the above C2D unit. The main function of CPP is to separately process the independent channels (such as RGB, Alpha) or data components (such as depth, normal) of the image. Then, exemplarily, before the C2D unit performs transcoding, for the purpose of adjusting the target video data, CPP first performs independent image processing on the R, G, and B channels in the target video data respectively to adjust the display quality of the picture corresponding to the target video data. After being adjusted by CPP, the target video data is converted into the first response image data, which is forwarded by CPP to the C2D unit, and finally the C2D unit performs transcoding on the first response image data and further forwards it.

[0118] In some embodiments, the video data transmission method further includes:

[0119] When the response image data is picture data, the image post-processing unit is controlled to send the response image data to the image gallery unit to implement the photographing function.

[0120] In some embodiments, the processor is further configured to, when the response image data is picture data, control the image post-processing unit to send the response image data to the image gallery unit to implement the photographing function.

[0121] Specifically, based on the above embodiments, when the response image data is picture data, the photographing function of the electronic device can be implemented based on the image gallery unit (Image Lib Module) configured in the mm-camera architecture. Exemplarily, in the case where the C2D unit performs transcoding processing to generate corresponding response image data, PostProc sends the response image data to the image gallery unit, and the image gallery unit performs rendering on the response image data and saves the response image data in the form of a picture file to the storage unit of the electronic device, thereby implementing the photographing function of the electronic device.

[0122] In this way, the present application can build a data distribution path based on the mm-camera software architecture to transmit the target video data in RGB format to the image acquisition application installed in the operating system, so as to use it to implement the preview function of the target video data. It can also convert the target video data into a picture data stream or a video data stream through C2D transcoding, and further provide support for the electronic device for functions such as photographing, video recording, and other functions.

[0123] The electronic device in the embodiments of the present application includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the above method is implemented.

[0124] The computer-readable storage medium in the embodiments of the present application stores a computer program, and when the computer program is executed by one or more processors, the above method is implemented.

[0125] In the description of this specification, the descriptions referring to terms such as "some embodiments", "in an example", "exemplarily", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0126] Any process or method description, whether in a flowchart or otherwise described herein, can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present application includes additional implementations where functions may be executed not in the order shown or discussed, including substantially concurrently or in reverse order according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0127] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A video data transmission method, characterized in that, The method is applied to target video data in RGB format, and the method includes: When the image acquisition device acquires the target video data, sending the target video data to an image acquisition application program through a preset data distribution path to implement a preview function of the target video data in the image acquisition application program, where the preset data distribution path is built on a preset image processing software platform that does not support processing RGB format data by default.

2. The method according to claim 1, characterized in that, The step of, when the image acquisition device acquires the target video data, sending the target video data to an image acquisition application program through a preset data distribution path includes: When the image acquisition device acquires the target video data, distributing the target video data to a target image processing unit through an image filtering unit of the preset data distribution path without making any modification to the target video data; Controlling the target image processing unit to send the target video data to the image acquisition application program.

3. The method according to claim 2, characterized in that, The method further includes: Determining response image data according to the target image processing unit and the target video data, where the response image data is picture data or video data and is used to implement a photographing function or a video recording function.

4. The method according to claim 2, wherein The step of controlling the target image processing unit to send the target video data to the image acquisition application program includes: In response to a preview operation of a user on the interface of the image acquisition application program, controlling the target image processing unit to send the target video data to a human-computer interaction program; Controlling the human-computer interaction program to send the target video data to the image acquisition application program through a hardware abstraction layer and an operating system service framework without making any modification to the target video data.

5. The method according to claim 3, characterized in that, The step of determining response image data according to the target image processing unit and the target video data includes: Performing transcoding processing on the target video data according to a display data transcoding module to determine the response image data, where the display data transcoding module is included in the target image processing unit and the format of the response image data is NV12 format.

6. The method according to claim 1, characterized in that The step of, when the image acquisition device acquires the target video data, sending the target video data to an image acquisition application program through a preset data distribution path includes: When the image acquisition device acquires the target video data, sending the target video data to an image post-processing unit through an image signal processing unit of the preset data distribution path without making any modification to the target video data; Controlling the image post-processing unit to send the target video data to the image acquisition application program.

7. The method according to claim 6, characterized in that, The method further includes: Determining response image data according to the image post-processing unit and the target video data, where the response image data is picture data or video data and is used to implement a photographing function or a video recording function.

8. The method according to claim 6, characterized in that, The step of controlling the image post-processing unit to send the target video data to the image acquisition application program includes: In response to a preview operation of a user on the interface of the image acquisition application, control the image post-processing unit to send the target video data to the human-computer interaction program; Control the human-computer interaction program to send the target video data to the image acquisition application via the hardware abstraction layer and the operating system service framework without performing any modification to the target video data.

9. The method according to claim 7, wherein The determining the response image data according to the image post-processing unit and the target video data includes: Perform transcoding processing on the target video data according to the display data transcoding module to determine the response image data, where the display data transcoding module is included in the image post-processing unit.

10. The method according to claim 9, wherein The determining the response image data according to the image post-processing unit and the target video data includes: Perform image processing on each independent channel of the target video data according to the image component processing module to determine the first response image data, where the image component processing module is included in the image post-processing unit; Perform transcoding processing on the first response image data according to the display data transcoding module to determine the response image data.

11. The method according to claim 9 or 10, characterized in that, The method further includes: When the response image data is picture data, control the image post-processing unit to send the response image data to the gallery unit to implement the photographing function.

12. An electronic device, characterized in that, The electronic device includes a memory and a processor, and the memory stores a computer program. When the computer program is executed by the processor, the method according to any one of claims 1-11 is implemented.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. When the computer program is executed by one or more processors, the method according to any one of claims 1-11 is implemented.