WO2023245495A1 - 将渲染数据转换为视频流的方法及装置、电子设备 - Google Patents

将渲染数据转换为视频流的方法及装置、电子设备 Download PDF

Info

Publication number
WO2023245495A1
WO2023245495A1 PCT/CN2022/100446 CN2022100446W WO2023245495A1 WO 2023245495 A1 WO2023245495 A1 WO 2023245495A1 CN 2022100446 W CN2022100446 W CN 2022100446W WO 2023245495 A1 WO2023245495 A1 WO 2023245495A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
texture
rendering
converting
video stream
Prior art date
Application number
PCT/CN2022/100446
Other languages
English (en)
French (fr)
Inventor
张峰
陈帅雷
刘宁
Original Assignee
云智联网络科技(北京)有限公司
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 云智联网络科技(北京)有限公司 filed Critical 云智联网络科技(北京)有限公司
Priority to PCT/CN2022/100446 priority Critical patent/WO2023245495A1/zh
Publication of WO2023245495A1 publication Critical patent/WO2023245495A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs

Definitions

  • the present application relates to the field of virtual live broadcast, and specifically, to a method and device, electronic equipment and computer program for converting rendering data into a video stream.
  • users with terminals with lower configurations can use the method of playing video streams. to achieve better viewing effects.
  • Figure 5 is a schematic diagram of an original rendered image
  • Figure 6 is a schematic diagram of a problem image that has not been converted into image formats in the prior art.
  • a method of converting rendering data into a video stream includes: obtaining texture data of the rendering data; converting the texture data into corresponding image data; and using the image data to generate pixel buffer data.
  • the method further includes: sending the pixel buffer data to a streamer.
  • the flow booster includes a TRTC, instantaneous structure, and acoustic net.
  • the method is applied to iOS or OSX operating system platforms.
  • obtaining the texture ID from the rendering data of the rendering engine includes: using Metal of iOS or OSX to obtain the texture ID from the rendering data of the rendering engine.
  • the texture ID is a pointer to the texture container.
  • the pixel buffer data is of CVPixelBufferRef type.
  • a device for converting rendering data into a video stream includes: a texture data acquisition unit for acquiring texture data of the rendering data; a texture image data acquisition unit for converting the texture data into texture image data; and a pixel buffer data generation unit for utilizing the Texture image data generates pixel buffer data.
  • a computer program includes a computer program or an instruction, which is characterized in that when the computer program or instruction is executed by a processor, the method as described in any of the preceding embodiments is implemented.
  • the problem of converting the rendering engine into a video stream is solved.
  • the problem occurs that the image is rotated 180 degrees, red turns into blue and blue turns into red.
  • Figure 1 shows a flow chart of a method for converting rendering data into a video stream according to an example embodiment of the present application.
  • Figure 2 shows a flow chart of a method for obtaining texture data of rendering data according to an example embodiment of the present application.
  • FIG. 4 shows a block diagram of another device for converting rendering data into a video stream according to an example embodiment of the present application.
  • FIG. 8 shows an electronic device according to an example embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments. To those skilled in the art.
  • the same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
  • Virtual live broadcast uses the host's terminal camera to collect data, transmits the collected data to the rendering engine, and the rendering engine renders the collected data, and then pushes the rendered data to the viewing terminal.
  • the rendering engine when rendering using a rendering engine, a large amount of memory and GPU operations are often required.
  • the heating problem is particularly serious, and freezes or crashes often occur during the live broadcast process. Such phenomena have seriously affected the product experience of end users with lower configurations.
  • texture data is first converted into image data, and then the image data is converted into pixel buffer data of the video stream.
  • This solution solves the problem of the image being rotated 180 degrees and changing color (red to blue and blue to red) during the process of converting data rendered by the rendering engine into a video stream.
  • Figure 1 shows a flow chart of a method for converting rendering data into a video stream according to an example embodiment of the present application.
  • a method of converting rendering data into a video stream shown in Figure 1 can be applied to the iOS or OSX operating system platform and implemented using the programming interface provided by Metal in iOS or OSX.
  • step S101 texture data of rendering data is obtained.
  • the host's terminal camera collects data and uses the third-party SenseTime SDK or the ARKIT library of the iOS system to identify the expression-based data.
  • the recognized data is sent to the rendering engine, and the rendering engine renders based on the received data. Then, obtain the texture ID from the rendering data rendered by the rendering engine, and use the texture ID to obtain the texture container corresponding to the texture ID.
  • the texture ID is a pointer to a texture container, and the texture container stores texture data corresponding to the texture ID. Obtain the texture container pointed to by the texture ID and obtain the stored texture data from the texture container.
  • step S101 The specific implementation manner of obtaining texture data in step S101 is shown in Figure 2.
  • the expression base data is obtained from the frame data collected by the terminal camera on the anchor side, and after being rendered by the rendering engine, the texture data is copied from the rendering data.
  • the host's terminal camera is used to collect data, and the expression base data in the collected data is transmitted to the rendering engine, and the rendering engine copies the texture data from the rendered data.
  • the color space of the rendering data is a linear color space
  • the image appears black.
  • the color control of the texture data is converted from the linear color space to the sRGB color space, which solves the problem of the picture appearing black.
  • step S1015 the texture ID of the gamma-corrected texture data is obtained.
  • the texture ID is a pointer to the texture container, and the texture container stores the rendered texture data corresponding to the texture ID.
  • step S1017 the texture data stored in the texture container can be obtained using the texture ID.
  • step S103 the texture data obtained in step S101 is converted into corresponding image data.
  • the image data is in CIImage format
  • the texture data is converted from MTLTexture format to CIImage format by calling the class function of the system.
  • the pixel buffer data CVPixelBufferRef type is implemented by calling the system CIContext instance method.
  • toCVPixelBuffer (CVPixelBufferRef)buffer, where image is the image data obtained in step S103.
  • the pixel buffer is a container. According to embodiments of the present application, the pixel buffer is used to store pixel buffer data.
  • the pixel buffer data is image data that needs to be sent to the streamer.
  • step S105 the pixel buffer data in the pixel buffer is sent to the streamer, and the streamer encodes the pixel buffer data into a video and sends it to the live broadcast viewing end.
  • the stream pusher includes Tencent's TRTC, Zego, and Agora.
  • the streamer is used to encode image data into video and send it to the viewing end.
  • Figure 3 shows a block diagram of a device for converting rendering data into a video stream according to an example embodiment of the present application.
  • the device shown in Figure 3 can be applied to iOS or OSX operating system platforms.
  • the device may include a module texture data acquisition unit 301, a texture image data acquisition unit 303, and a pixel buffer data generation unit 305.
  • FIG. 4 shows a block diagram of another device for converting rendering data into a video stream according to an example embodiment of the present application.
  • the device shown in Figure 4 may include: a texture ID acquisition unit 407, a texture data acquisition unit 301, a texture image data acquisition unit 303, and a pixel buffer data generation unit 305.
  • the texture ID is a pointer to the texture container, and the texture container stores texture data corresponding to the texture ID.
  • the texture ID acquisition unit 407 transmits the expression base data in the data collected by the terminal camera of the anchor to the rendering engine, copies the texture data from the rendered data through the rendering engine, performs gamma correction on the copied texture data, and obtains the gamma The texture ID of the corrected texture data.
  • the texture data acquisition unit 301 uses the texture ID to acquire the texture container pointed to by the texture ID, and acquires the stored texture data from the texture container.
  • FIG. 8 shows an electronic device according to an exemplary embodiment of the present application.
  • the electronic device 200 according to this embodiment of the present application is described below with reference to FIG. 8 .
  • the electronic device 200 shown in FIG. 8 is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
  • Bus 230 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
  • the computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.
  • modules can be distributed in devices according to the description of the embodiments, or can be modified accordingly in one or more devices that are only different from this embodiment.
  • the modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

本申请提出一种将渲染数据转换为视频流的方法及装置、电子设备和计算机程序,包括:从渲染引擎中获取所述渲染数据的纹理数据;将所述纹理数据转换为相应的图像数据;利用所述图像数据生成像素缓冲数据。根据本申请的示例实施例,在将渲染引擎的数据转换为视频流的过程中,通过将纹理数据转换为图像数据,再将图像数据转换为视频流的像素缓冲数据,解决了在将渲染引擎的数据转换为视频流的过程中,出现的图像被180度旋转,红色变蓝色及蓝色变红色的问题。

Description

将渲染数据转换为视频流的方法及装置、电子设备 技术领域
本申请涉及虚拟直播领域,具体而言,涉及一种将渲染数据转换为视频流的方法及装置、电子设备和计算机程序。
背景技术
在虚拟直播过程中,在利用渲染引擎进行渲染时,往往需要消耗大量的内存和GPU运算。这种对内存的消耗和GPU运算会导致配置较低的终端(例如,配置低于苹果A10处理器的终端)发热严重,甚至出现直播卡顿或崩溃。
通过把渲染引擎的数据转换为视频流,也即在主播端推送一路视频流,使得持有配置较低的终端(例如,配置低于A10处理器的终端)的用户可使用播放视频流的方式来达到较好的观看效果。
本发明人发现,在将渲染引擎的纹理数据直接转化为推流数据的过程中,观看端的终端显示的图像数据出现180度旋转以及变色(红色变蓝色及蓝色变红色)问题。如图5和图6所示,图5为原始渲染图像示意图,图6为现有技术中未经过图片格式转换的问题图像示意图。通过对比图5和图6可见,观看端的终端显示的图像数据出现了180度旋转以及变色的问题。
发明内容
本申请提供了一种将渲染数据转换为视频流的方法及装置、电子设备和计算机程序。
根据本申请的一方面,提出一种将渲染数据转换为视频流的方法。该方法包括:获取所述渲染数据的纹理数据;将所述纹理数据转换为相应的图像数据;利用所述图像数据生成像素缓冲数据。
根据一些实施例,获取所述渲染数据的纹理数据的步骤包括:从所述渲染引擎的渲染数据中获取纹理ID;利用所述纹理ID获取与所 述纹理ID对应的纹理容器,所述纹理容器存储有与所述纹理ID对应的纹理数据;获取所述纹理数据。
根据一些实施例,所述方法在所述利用所述图像数据生成像素缓冲数据之后,还包括:将所述像素缓冲数据发送给推流器。
根据一些实施例,所述推流器包括TRTC、即构、声网。
根据一些实施例,所述方法应用于iOS或OSX操作系统平台。根据一些实施例,所述从所述渲染引擎的渲染数据中获取纹理ID,包括:利用iOS或OSX的Metal,从所述渲染引擎的渲染数据中获取纹理ID。
根据一些实施例,所述纹理ID为所述纹理容器的指针。
根据一些实施例,所述像素缓冲数据为CVPixelBufferRef类型。
根据本申请的一方面,提出一种将渲染数据转换为视频流的装置。该装置包括:纹理数据获取单元,用于获取所述渲染数据的纹理数据;纹理图像数据获取单元,用于将所述纹理数据转换为纹理图像数据;像素缓冲数据生成单元,用于利用所述纹理图像数据生成像素缓冲数据。
根据本申请的一方面,提出一种电子设备。该电子设备包括:一个或多个处理单元;存储单元,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理单元执行,使得一个或多个处理单元实现如前任一所述的方法。
根据本申请的一方面,提出一种计算机程序。该计算机程序包括计算机程序或指令,其特征在于,该计算机程序或指令被处理器执行时实现权如前任一所述的方法。
根据本申请的示例实施例,在将渲染引擎的数据转换为视频流的过程中,通过将纹理数据转换为图像数据,再将图像数据转换为视频流的像素缓冲数据,解决了在将渲染引擎的数据转换为视频流的过程中,出现的图像被180度旋转,红色变蓝色及蓝色变红色的问题。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实 施例描述中所需要使用的附图作简单地介绍。
图1示出根据本申请示例实施例的一种将渲染数据转换为视频流的方法流程图。
图2示出根据本申请示例实施例一种获取渲染数据的纹理数据的方法流程图
图3示出根据本申请示例实施例的一种将渲染数据转换为视频流的装置框图。
图4示出根据本申请示例实施例的另一种将渲染数据转换为视频流的装置框图。
图5示出原始渲染图像示意图。
图6示出现有技术中未经过图片格式转换的问题图像示意图。
图7示出根据本申请示例实施例进行图片格式处理后的图像示意图。
图8示出根据本申请示例实施例的一种电子设备。
具体实施方式
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本申请将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有这些特定细节中的一个或更多,或者可以采用其它的方式、组元、材料、装置或操作等。在这些情况下,将不详细示出或描述公知结构、方法、装置、实现、材料或者操作。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的 操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
渲染引擎是一种游戏开发引擎,可用于创建能够创建实时、可视化的2D和3D动画、游戏等内容,被广泛应用于游戏开发、虚拟仿真、动漫、教育、建筑、电影等多个行业。
虚拟直播是利用主播端的终端摄像头采集数据,将所采集的数据传送给渲染引擎,由渲染引擎对所采集的数据进行渲染,然后,将渲染后的数据推送给观看端的终端。现有技术中,在利用渲染引擎渲染时,往往需要消息大量的内存和GPU运算,对于低于苹果A10处理器的终端来说,发热问题尤其严重,而且在直播过程中经常出现卡顿或崩溃等现象,严重影响了持有配置较低的终端用户的产品体验。
为了解决虚拟直播过程中出现的卡顿或崩溃等问题,现有技术通常是利用渲染引擎,把渲染引擎渲染后的数据转换为视频流。也就是说,将主播端的采集数据经过渲染引擎渲染后转化为视频流发送给观看端的终端,以达到较好的观看效果。但在将渲染引擎的纹理数据直接转化为视频推流数据的过程中,会出现观看端的终端显示的图像数据出现如图6所示的180度旋转以及变色(红色变蓝色及蓝色变红色)问题。
如图5和图6所示,图5为原始渲染图像示意图,图6示出现有技术中未经过图片格式转换的问题图像示意图。通过对比图5和图6可见,图5中是头上脚下,而图6中是脚上头下,出现了图像被180度旋转。而且,图6中显示的人体的面部、四肢、衣服和鞋子的颜色和图5相比,出现了明显的颜色变化。也即,图片中的出现红色的区 域变成了蓝色,图片中出现蓝色的区域变成了红色。
可见,现有技术中采用直接将纹理数据转化为视频数据的方式,存在图像被180度旋转以及颜色变换问题,也即红色变蓝色以及蓝色变红色的问题。
根据本申请的实施例,在将渲染引擎渲染后的数据转换为视频流的过程中,通过将纹理数据首先转换为图像数据,再将图像数据转换为视频流的像素缓冲数据。通过该方案,解决了在将渲染引擎渲染后的数据转换为视频流的过程中,出现的图像被180度旋转以及变色(红色变蓝色及蓝色变红色)问题。
下面将参照附图,对根据本申请的具体实施例进行详细说明。
首先需要说明的是,本申请的中所述的低端终端指的是处理器配置低于苹果A10处理器的终端。本申请的方案利用面向底层的图形编程接口Metal实现,Metal是一种低层次的渲染应用程序编程接口,可以直接操作GPU,支持iOS和OSX操作系统。
图1示出根据本申请示例实施例的一种将渲染数据转换为视频流的方法流程图。
根据本申请的一些示例实施例,图1所示的一种将渲染数据转换为视频流的方法可以应用于iOS或OSX操作系统平台,利用iOS或OSX中的Metal提供的编程接口实现。
如图1所示,在步骤S101,获取渲染数据的纹理数据。
例如,在虚拟直播过程中,主播端的终端摄像头采集数据,利用第三方商汤SDK或iOS系统的ARKIT库,识别出表情基数据。将所识别出来的数据传送给渲染引擎,由渲染引擎依据所收到的数据进行渲染。然后,从渲染引擎渲染后的渲染数据中获取纹理ID,并利用纹理ID获取与纹理ID对应的纹理容器。
可选地,纹理ID为纹理容器的指针,纹理容器存储有与纹理ID对应的纹理数据。获取到纹理ID指向的纹理容器,从纹理容器中获取存储的纹理数据。
步骤S101获取纹理数据的具体的实现方式如图2所示。如图2所示,在步骤S1011,从主播端的终端摄像机中采集的帧数据中获取表情基数据,并经渲染引擎渲染后,从渲染数据中复制纹理数据。
在虚拟直播过程中,利用主播端的终端摄像头采集数据,将所采集的数据中的表情基数据传送给渲染引擎,由渲染引擎从渲染的数据中复制纹理数据。
在步骤S1013,对复制的纹理数据进行伽马校正。
由于渲染数据的色彩空间为线性色彩空间,图片显示为黑色。通过对复制的纹理数据进行伽马校正,将纹理数据的色彩控制由线性色彩空间转化为sRGB色彩空间,解决了图片显示为黑色的问题。
在步骤S1015,获取伽马校正后的纹理数据的纹理ID。纹理ID为纹理容器的指针,纹理容器存储有与纹理ID对应渲染后的纹理数据。
在步骤S1017,可以利用纹理ID可以获取纹理容器中存储的纹理数据。
在步骤S103,将步骤S101得到纹理数据转换为相应的图像数据。
根据本申请的实施例,图像数据为CIImage格式,通过调用系统的类函数将纹理数据由MTLTexture格式转化为CIImage格式。
例如:
+(nullable CIImage*)imageWithMTLTexture:(id<MTLTexture>)texture
options:(nullable NSDictionary<CIImageOption,id>*)options。
在步骤S105,利用步骤S103中得到图像数据生成像素缓冲数据。
根据本申请的实施例,像素缓冲数据CVPixelBufferRef类型,通过调用系统CIContext实例方法实现。
例如,(void)render:(CIImage*)image
toCVPixelBuffer:(CVPixelBufferRef)buffer,其中image为步骤 S103中得到的图像数据。
像素缓冲区是一个容器,根据本申请的实施例,利用像素缓冲区储存像素缓冲数据,像素缓冲数据为需要发送给推流器的图像数据。
在步骤S105之后,将像素缓冲区中的像素缓冲数据发送给推流器,由推流器将像素缓冲数据编码为视频发送给直播观看端。
根据一些实施例,推流器包括腾讯的TRTC、即构Zego、声网Agora。推流器用于将图像数据编码为视频发送给观看端。
图7示出根据本申请示例实施例处理后的图像示意图。如图7所示,与图5和图6相比,经过本申请所述的方法处理后,解决了在将渲染引擎的数据转换为视频流的过程中,出现的图像被180度旋转,红色变蓝色及蓝色变红色的问题。
根据图1所示的实施例,在将渲染引擎的数据转换为视频流的过程中,通过将纹理数据首先转换为图像数据,再将图像数据转换为视频流的像素缓冲数据,解决了在将渲染引擎的数据转换为视频流的过程中,出现的图像被180度旋转,红色变蓝色及蓝色变红色的问题。同时,也提高了持有低端终端的用户的观看体验。
图3示出根据本申请示例实施例的一种将渲染数据转换为视频流的装置框图。如图3所示的装置可以应用于iOS或OSX操作系统平台。该装置可以包括模块纹理数据获取单元301、纹理图像数据获取单元303和像素缓冲数据生成单元305。
纹理数据获取单元301用于获取渲染数据的纹理数据。纹理图像数据获取单元303用于将纹理数据转换为纹理图像数据。像素缓冲数据生成单元305用于利用纹理图像数据生成像素缓冲数据。
图4示出根据本申请示例实施例的另一种将渲染数据转换为视频流的装置框图。如图4所示的装置可以包括:纹理ID获取单元407,纹理数据获取单元301、纹理图像数据获取单元303和像素缓冲数据 生成单元305。
纹理ID获取单元407从渲染引擎的渲染数据中获取纹理ID。纹理数据获取单元301用于利用纹理ID获取与纹理ID对应的纹理容器,纹理容器存储有与纹理ID对应的纹理数据。纹理图像数据获取单元303用于将纹理数据转换为纹理图像数据。像素缓冲数据生成单元305用于利用纹理图像数据生成像素缓冲数据。
纹理ID为纹理容器的指针,纹理容器存储有与纹理ID对应的纹理数据。纹理ID获取单元407将主播端的终端摄像头采集的数据中的表情基数据传送给渲染引擎,通过渲染引擎从渲染的数据中复制纹理数据,并对复制的纹理数据进行伽马校正,并获取伽马校正后的纹理数据的纹理ID。
纹理数据获取单元301利用纹理ID获取到纹理ID指向的纹理容器,从纹理容器中获取存储的纹理数据。
纹理图像数据获取单元303通过调用CIImage的类函数,利用将纹理容器中获取的纹理数据转换为相应的图像数据。
像素缓冲数据生成单元305利用将渲染数据转化后的图像数据生成像素缓冲数据,并将像素缓冲区中的像素缓冲数据发送给推流器,由推流器将像素缓冲数据编码为视频发送给直播观看端。
图8示出根据本申请示例性实施例的一种电子设备。下面参照图8来描述根据本申请的这种实施方式的电子设备200。图8显示的电子设备200仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图8所示,电子设备200以通用计算设备的形式表现。电子设备200的组件可以包括但不限于:至少一个处理单元210、至少一个存储单元220、连接不同系统组件(包括存储单元220和处理单元210)的总线230、显示单元240等。
其中,存储单元存储有程序代码,程序代码可以被处理单元210执行,使得处理单元210执行本说明书描述的根据本申请各种示例性实施方式的方法。例如,处理单元210可以执行如图1中所示的方法。
存储单元220可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)2201和/或高速缓存存储单元2202,还可以进一步包括只读存储单元(ROM)2203。
存储单元220还可以包括具有一组(至少一个)程序模块2205的程序/实用工具2204,这样的程序模块2205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线230可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备200也可以与一个或多个外部设备300(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口250进行。并且,电子设备200还可以通过网络适配器260与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器260可以通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、或者网络设备等)执行根据本申请实施方式的上述方法。
软件产品可以采用一个或多个可读介质的任意组合。可读介质可 以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该计算机可读介质实现前述功能。
本领域技术人员可以理解上述各模块可以按照实施例的描述分布于装置中,也可以进行相应变化唯一不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分 成多个子模块。
根据本申请的实施例,在将渲染引擎的数据转换为视频流的过程中,通过将纹理数据首先转换为图像数据,再将图像数据转换为视频流的像素缓冲数据,解决了在将渲染引擎的数据转换为视频流的过程中,出现的图像被180度旋转,红色变蓝色及蓝色变红色的问题。
根据本申请的实施例,提出一种计算机程序,包括计算机程序或指令,该计算机程序或指令被处理器执行时,可以执行以上描述的方法。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明仅用于帮助理解本申请的方法及其核心思想。同时,本领域技术人员依据本申请的思想,基于本申请的具体实施方式及应用范围上做出的改变或变形之处,都属于本申请保护的范围。综上所述,本说明书内容不应理解为对本申请的限制。

Claims (10)

  1. 一种将渲染数据转换为视频流的方法,其特征在于,包括:
    从渲染引擎中获取所述渲染数据的纹理数据;
    将所述纹理数据转换为相应的图像数据;
    利用所述图像数据生成像素缓冲数据。
  2. 根据权利要求1所述的方法,其特征在于,所述从渲染引擎中获取所述渲染数据的纹理数据,包括:
    从所述渲染引擎的渲染数据中获取纹理ID;
    利用所述纹理ID获取与所述纹理ID对应的纹理容器,其中所述纹理容器存储有与所述纹理ID对应的纹理数据;
    获取所述纹理数据。
  3. 根据权利要求1所述的方法,其特征在于,所述方法在所述利用所述图像数据生成像素缓冲数据之后,还包括:
    将所述像素缓冲数据发送给推流器。
  4. 根据权利要求3所述的方法,其特征在于:
    所述推流器包括TRTC、即构、声网。
  5. 根据权利要求2所述的方法,其特征在于:
    所述方法应用于iOS或OSX操作系统平台。
  6. 根据权利要求5所述的方法,其特征在于,所述从所述渲染引擎的渲染数据中获取纹理ID,包括:
    利用iOS或OSX的Metal,从所述渲染引擎的渲染数据中获取纹理ID。
  7. 根据权利要求2所述的方法,其特征在于:
    所述纹理ID为所述纹理容器的指针。
  8. 一种将渲染数据转换为视频流的装置,其特征在于,包括:
    纹理数据获取单元,用于从渲染引擎中获取所述渲染数据的纹理数据;
    纹理图像数据获取单元,用于将所述纹理数据转换为纹理图像数据;
    像素缓冲数据生成单元,用于利用所述纹理图像数据生成像素缓冲数据。
  9. 一种电子设备,其特征在于,包括:
    一个或多个处理单元;
    存储单元,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理单元执行,使得一个或多个处理单元实现如权利要求1-7中任一所述的方法。
  10. 一种计算机程序,包括计算机程序或指令,其特征在于,该计算机程序或指令被处理器执行时实现权如利要求1-7任一所述的方法。
PCT/CN2022/100446 2022-06-22 2022-06-22 将渲染数据转换为视频流的方法及装置、电子设备 WO2023245495A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/100446 WO2023245495A1 (zh) 2022-06-22 2022-06-22 将渲染数据转换为视频流的方法及装置、电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/100446 WO2023245495A1 (zh) 2022-06-22 2022-06-22 将渲染数据转换为视频流的方法及装置、电子设备

Publications (1)

Publication Number Publication Date
WO2023245495A1 true WO2023245495A1 (zh) 2023-12-28

Family

ID=89378816

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100446 WO2023245495A1 (zh) 2022-06-22 2022-06-22 将渲染数据转换为视频流的方法及装置、电子设备

Country Status (1)

Country Link
WO (1) WO2023245495A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510990A (zh) * 2018-10-25 2019-03-22 深圳市腾讯信息技术有限公司 图像处理方法及装置、计算机可读存储介质、电子设备
CN109600666A (zh) * 2018-12-12 2019-04-09 网易(杭州)网络有限公司 游戏场景中的视频播放方法、装置、介质以及电子设备
CN110769241A (zh) * 2019-11-05 2020-02-07 广州虎牙科技有限公司 视频帧处理方法、装置、用户端及存储介质
US20210236929A1 (en) * 2018-10-22 2021-08-05 Korea Electronics Technology Institute Apparatus and method for acquiring in-game 360 vr image by using plurality of virtual cameras
CN113840170A (zh) * 2020-06-23 2021-12-24 武汉斗鱼网络科技有限公司 连麦直播的方法及装置
CN114222185A (zh) * 2021-12-10 2022-03-22 洪恩完美(北京)教育科技发展有限公司 视频播放方法、终端设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210236929A1 (en) * 2018-10-22 2021-08-05 Korea Electronics Technology Institute Apparatus and method for acquiring in-game 360 vr image by using plurality of virtual cameras
CN109510990A (zh) * 2018-10-25 2019-03-22 深圳市腾讯信息技术有限公司 图像处理方法及装置、计算机可读存储介质、电子设备
CN109600666A (zh) * 2018-12-12 2019-04-09 网易(杭州)网络有限公司 游戏场景中的视频播放方法、装置、介质以及电子设备
CN110769241A (zh) * 2019-11-05 2020-02-07 广州虎牙科技有限公司 视频帧处理方法、装置、用户端及存储介质
CN113840170A (zh) * 2020-06-23 2021-12-24 武汉斗鱼网络科技有限公司 连麦直播的方法及装置
CN114222185A (zh) * 2021-12-10 2022-03-22 洪恩完美(北京)教育科技发展有限公司 视频播放方法、终端设备及存储介质

Similar Documents

Publication Publication Date Title
JP2006313536A (ja) 高品質なユーザーインターフェイスによる効率的な遠隔表示を行なうシステム
CN108337246B (zh) 防止重放延迟的媒体重放设备和媒体服务设备
CN113946402A (zh) 基于渲染分离的云手机加速方法、系统、设备及存储介质
CN109327698B (zh) 动态预览图的生成方法、系统、介质和电子设备
TW201207723A (en) Display data management techniques
CN110807111A (zh) 三维图形的处理方法及装置、存储介质、电子设备
CN111464828A (zh) 虚拟特效显示方法、装置、终端及存储介质
CN112689197B (zh) 一种文件格式转换方法、装置、以及计算机存储介质
CN114040251A (zh) 音视频播放方法、系统、存储介质及计算机程序产品
WO2021257992A1 (en) Multi-plane image compression
CN114222185B (zh) 视频播放方法、终端设备及存储介质
EP4290868A1 (en) 3d object streaming method, device, and program
WO2023245495A1 (zh) 将渲染数据转换为视频流的方法及装置、电子设备
US20120265858A1 (en) Streaming portions of a quilted graphic 2d image representation for rendering into a digital asset
CN116055540B (zh) 虚拟内容的显示系统、方法、设备及计算机可读介质
CN117609646A (zh) 场景渲染方法、装置、电子设备及存储介质
CN111064981B (zh) 一种视频串流的系统及方法
Hou et al. A cloud gaming system based on NVIDIA GRID GPU
JP2023105812A (ja) ビデオ変換方法、装置、電子機器および記憶媒体
CN116880937A (zh) 互动课堂的桌面截屏数据处理方法、装置、设备及介质
CN115393490A (zh) 图像渲染方法、装置、存储介质及电子设备
Renambot et al. Real-time compression for high-resolution content
CN111356009B (zh) 音频数据的处理方法、装置、存储介质以及终端
WO2023245494A1 (zh) 从渲染引擎中获取纹理数据的方法及装置、电子设备
CN117176962B (zh) 一种视频编解码方法、装置及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22947274

Country of ref document: EP

Kind code of ref document: A1