A gaming application providing scene change hints for encoding on cloud gaming servers
By using scene change hints to predict and encode video frames as I-frames, the latency and instability issues in cloud gaming are addressed, leading to smoother video display on clients.
Patent Information
- Application Number
- JP2022520321
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-29
- Filing Date
- 2020-09-30
- Publication Date
- 2024-11-13
- Estimated Expiration
- 2040-09-30
AI Technical Summary
Cloud gaming systems face challenges in reducing latency and latency instability due to variable communication paths, clock differences between servers and clients, and the need for complex frame encoding during scene changes, which affect the smoothness of video display.
Providing scene change hints to the encoder to predict and encode video frames as I-frames, reducing the need for scene change detection and re-encoding, thereby aligning VSYNC signals and optimizing encoding processes.
This approach reduces one-way latency and stabilizes frame rates, resulting in smoother and more uniform video display on clients by minimizing jitter and latency variations.
Smart Images

Figure 0007583035000001 
Figure 0007583035000002 
Figure 0007583035000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a streaming system configured to stream content over a network, and more particularly to providing scene change hints to an encoder for video frames generated during execution of a video game to provide uniform latency between a cloud gaming server and a client for the purpose of reducing latency between the cloud gaming server and a client, and to improve smoothness of a client's display of the video. [Background technology]
[0002] In recent years, there has been a continuous push for online services that enable streaming-style online or cloud gaming between cloud gaming servers and clients connected through a network. The streaming style has become increasingly popular due to the availability of game titles on demand, the ability to network among players for multiplayer gaming, sharing of assets among players, sharing of instant experiences among players and / or spectators, enabling friends to watch friends play a video game, and allowing friends to join in on-going gameplay of friends. Unfortunately, demand is also pushing up against the limitations of network connection capabilities and the processing performed on the client and servers that are responsive enough to render high quality images when delivered to the client. For example, the results of all gaming activity performed on the server need to be compressed and sent back to the client with low millisecond latency for the best user experience. Round-trip latency may be defined as the overall time from a user's controller input to the display of a video frame at a client, which may include the processing and transmission of control information from the controller to the client, the processing and transmission of control information from the client to the server, the use of the input at the server to generate a video frame in response to the input, the processing and forwarding of the video frame to an encoding unit (e.g., scan-out), the encoding of the video frame, the transmission of the encoded video frame back to the client, receiving and decoding the video frame, and any processing or staging of the video frame before its display. One-way latency (one-way latency) may be defined as the portion of round-trip latency consisting of the time from the start of the transfer (e.g., scan-out) of a video frame to an encoding unit at the server to the start of displaying the video frame at the client. Part of the round-trip and one-way latency is associated with the time it takes for the data stream to be sent from the client to the server and back to the client over the communication network. Another part is associated with processing at the client and server. By improving these operations, such as the advanced procedures associated with decoding and displaying frames, the round-trip and one-way latency between the server and the client can be significantly reduced, providing a high-quality experience to users of the cloud gaming service.
[0003] The embodiments of the present disclosure have been made against the above background. Summary of the Invention
[0004] Embodiments of the present disclosure relate to a streaming system configured to stream content (e.g., gaming) over a network, and more particularly to providing scene change hints to an encoder for video frames generated during execution of a video game for the purpose of reducing latency and providing more uniform latency between cloud gaming servers and clients, and for improving smoothness of the client's display of the video.
[0005] An embodiment of the present disclosure discloses a method for encoding. The method includes executing game logic built on a game engine of a video game on a cloud gaming server to generate a plurality of video frames. The method also includes executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic. The method also includes identifying a range of video frames within the plurality of video frames that is predicted to include a scene change. The method also includes generating a scene change hint using the scene change logic, the scene change hint identifying a range of video frames, the range of video frames including the first video frame. The method also includes delivering the first video frame to an encoder. The method also includes sending the scene change hint from the scene change logic to the encoder. The method also includes encoding the first video frame as an I-frame based on the scene change hint.
[0006] In another embodiment, a non-transitory computer readable medium storing a computer program for encoding is disclosed. The computer readable medium includes program instructions for executing a game logic built on a game engine of a video game at a cloud gaming server to generate a plurality of video frames. Also included are program instructions for executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic. Also included are program instructions for identifying a range of video frames within the plurality of video frames predicted to include a scene change. Also included are program instructions for generating a scene change hint using the scene change logic, the scene change hint identifying a range of video frames, the range of video frames including the first video frame. Also included are program instructions for delivering the first video frame to an encoder. Also included are program instructions for sending the scene change hint from the scene change logic to the encoder. Also included are program instructions for encoding the first video frame as an I-frame based on the scene change hint.
[0007] In yet another embodiment, a computer system includes a processor and a memory coupled to the processor and having instructions stored therein, the instructions, when executed by the computer system, causing the computer system to perform an encoding method. The method includes executing game logic built on a game engine of a video game at a cloud gaming server to generate a plurality of video frames. The method includes executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic. The method includes identifying a range of video frames within the plurality of video frames that is predicted to include a scene change. The method includes generating a scene change hint using the scene change logic, the scene change hint identifying a range of video frames, the range of video frames including the first video frame. The method also includes delivering the first video frame to an encoder. The method also includes sending the scene change hint from the scene change logic to the encoder. The method also includes encoding the first video frame as an I-frame based on the scene change hint.
[0008] Other aspects of the present disclosure will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, which illustrate, by way of example, the principles of the disclosure.
[0009] The present disclosure may be best understood by reference to the following detailed description taken in conjunction with the accompanying drawing figures. [Brief description of the drawings]
[0010] [Figure 1A] FIG. 2 is a diagram of a VSYNC signal at the start of a frame period according to one embodiment of the present disclosure. [Figure 1B] FIG. 2 is a diagram of a frequency of a VSYNC signal according to one embodiment of the present disclosure. [Figure 2A]FIG. 1 illustrates a system for providing gaming over a network between one or more cloud gaming servers and one or more client devices in various configurations in which VSYNC signals can be synchronized and offset to reduce one-way latency in accordance with one embodiment of the disclosure. [Figure 2B] FIG. 1 is a diagram for providing gaming between two or more peer devices where the VSYNC signals can be synchronized and offset to achieve optimal timing of receipt of controllers and other information between the devices, according to one embodiment of the present disclosure. [Figure 2C] 1 illustrates various network configurations that benefit from proper synchronization and offset handling of VSYNC signals between source and target devices, according to one embodiment of the present disclosure. [Figure 2D] 1 illustrates a multi-tenancy configuration between a cloud gaming server and multiple clients that benefits from proper synchronization and offset handling of VSYNC signals between source and target devices, according to one embodiment of the present disclosure. [Diagram 3] 1 illustrates the variation in one-way latency between a cloud gaming server and a client due to clock drift when streaming video frames generated from a video game running on the server, according to one embodiment of the present disclosure. [Figure 4] 1 illustrates a network configuration including a cloud gaming server and clients when streaming video frames generated from a video game running on the server, where the VSYNC signals between the server and clients are synchronized and offset to enable overlapping of operations on the server and clients and reduce one-way latency between the server and clients. [Figure 5A] 1 illustrates a cloud gaming server system configured to use scene change hints when encoding video frames when streaming content from a video game running on the cloud gaming server to a client over a network, according to one embodiment of the present disclosure. [Figure 5B] 1 illustrates a scan-out operation being performed to generate and deliver modified video frames to an encoder when streaming content from a video game running on a cloud gaming server to a client over a network, where the encoder is configured to use scene change hints when encoding corresponding video frames, according to one embodiment of the present disclosure. [Figure 6A] FIG. 1 is a flow diagram illustrating a method for encoding video frames when performing cloud gaming, in which one or more scene change hints are used by an encoder to process a corresponding video frame, according to one embodiment of the present disclosure. [Figure 6B] FIG. 1 is a flow diagram illustrating a method for encoding video frames when performing cloud gaming, including generating one or more scene change hints when performing a video game or game application that can be used for efficient encoding of corresponding video frames, according to one embodiment of the present disclosure. [Figure 7] 1 illustrates components of an exemplary device that can be used to implement aspects of various embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Although the following detailed description contains many specific details for purposes of illustration, those skilled in the art will appreciate that many variations and modifications to the following details are within the scope of the disclosure. Accordingly, the aspects of the disclosure described below are presented without loss of generality to, and without imposing limitations on, the claims that follow this description.
[0012] Generally, various embodiments of the present disclosure describe methods and systems configured to reduce latency and / or latency instability between a source device and a target device when streaming media content (e.g., streaming audio and video from a video game). Latency instability may occur in one-way latency between a server and a client due to the additional time required to generate a complex frame (e.g., a scene change) at the server, the increased time to code / compress (encode / ) the complex frame at the server, the variability of communication paths through the network, and the increased time to decode the complex frame at the client. Latency instability may also occur due to clock differences at the server and the client, which results in drift between the server VSYNC signal and the client VSYNC signal. In embodiments of the present disclosure, one-way latency between a server and a client can be reduced in cloud gaming applications by providing scene change hints to an encoder for video frames generated during the execution of a video game. The encoder may perform different encoding on video frames that are scene changes (e.g., switching to I-frames instead of encoding with P-frames in the MPEG compressed format used to stream content between cloud gaming servers and clients). In particular, when the game application informs the encoder (e.g., via an API such as a GPU API) that a scene change has occurred, this scene change hint can be used in the encoding process. In this way, the encoder does not need to detect the scene change because the scene change hint is provided to the encoder. Detecting a scene change may result in jitter and increased latency due to the scene change detection and more complex re-encoding of the video frames.That is, the encoder can immediately encode a video frame that is identified as a scene change using the scene change hint using the appropriate complexity (e.g., an I-frame) without requiring one or more additional frame periods for scene change detection and re-encoding of the more complex video frame, resulting in reduced one-way latency, smoother frame rates, and more reliable and / or uniform one-way latency between the cloud gaming server and the client.
[0013] With the above general understanding of the various embodiments, illustrative details of the embodiments are described below with reference to various figures.
[0014] Throughout this specification, references to a "game" or a "video game" or a "gaming application" are meant to represent any type of interactive application that is directed through the execution of input commands. For purposes of example only, interactive applications include applications for gaming, word processing, video processing, video game processing, and the like. Additionally, the terms introduced above are interchangeable.
[0015] Cloud gaming involves running a video game on a server to generate game-rendered video frames that are then sent to a client for display. The timing of operations on both the server and the client may be tied to their respective vertical synchronization (VSYNC) parameters. When the VSYNC signals are properly synchronized and / or offset between the server and / or client, operations performed on the server (e.g., generating and sending video frames over one or more frame periods) are synchronized with operations performed on the client (e.g., displaying video frames on a display at a display frame or refresh rate corresponding to the frame period). In particular, a server VSYNC signal generated on the server and a client VSYNC signal generated on the client may be used to synchronize operations on the server and the client. That is, when the server VSYNC signal and the client VSYNC signal are synchronized and / or offset, the server generates and sends video frames in sync with the way the client displays those video frames.
[0016] In order to generate and display video frames when streaming media content between the server and the client, a VSYNC signal interval and a vertical blanking interval (VBI) are incorporated. For example, the server attempts to generate game-rendered video frames in one or more frame periods as defined by the corresponding server VSYNC signal (e.g., if the frame period is 16.7 ms, generating a video frame every frame period results in 60 Hz operation, and generating one video frame every two frame periods results in 30 Hz operation), and then encodes and sends the video frames to the client. At the client, the received encoded video frames are decoded and displayed. Here, the client displays each video frame rendered on the display starting with the corresponding client VSYNC.
[0017] For illustration, FIG. 1A shows how a VSYNC signal 111 may indicate the start of a frame period, during which various operations may be performed at the server and / or client. When streaming media content, the server may use the server VSYNC signal to generate and encode video frames, and the client may use the client VSYNC signal to display the video frames. The VSYNC signal 111 is generated at a defined frequency corresponding to a defined frame period 110, as shown in FIG. 1B. In addition, the VBI 105 defines the time period from when the last raster line was drawn on the display in the previous frame period until the first raster line (e.g., the top) is drawn on the display. As shown, after the VBI 105, the video frame rendered for display is displayed via raster scan line 106 (e.g., raster line by raster line, from left to right).
[0018] Additionally, various embodiments of the present disclosure are disclosed for reducing one-way latency and / or latency volatility between a source device and a target device, such as when streaming media content (e.g., video game content). For purposes of illustration only, various embodiments for reducing one-way latency and / or latency volatility are described within a server and client network configuration. However, it is understood that various techniques disclosed for reducing one-way latency and / or latency volatility may be implemented within other network configurations and / or via peer-to-peer networks, such as those illustrated in FIGS. 2A-2D. For example, various embodiments disclosed for reducing one-way latency and / or latency volatility may be implemented between one or more of a server and client devices in various configurations (e.g., a server and a client, a server and a server, a server and multiple clients, a server and multiple servers, a client and a client, a client and multiple clients, etc.).
[0019] 2A is a diagram of a system 200A for providing gaming between one or more cloud gaming networks 290 and / or server 260 and one or more client devices 210 over a network 250 in various configurations in which server VSYNC signals and client VSYNC signals can be synchronized and offset to reduce one-way latency between server 260 and client 210, and / or dynamic buffering can be performed on the client, and / or encoding and transmitting operations on the server can be overlapped, and / or receiving and decoding operations at the client can be overlapped, and / or decoding and displaying operations on the client can be overlapped, in accordance with one embodiment of the present disclosure. In particular, according to one embodiment of the present disclosure, the system 200A provides gaming over the cloud gaming network 290, where the games are being executed remotely from the client devices 210 (e.g., thin clients) of corresponding users who are playing the games. The system 200A can provide gaming control to one or more users playing one or more games through the cloud gaming network 290 over the network 250 in either single player or multiplayer mode. In some embodiments, the cloud gaming network 290 may include multiple virtual machines (VMs) running on a host machine's hypervisor, where one or more virtual machines are configured to execute a game processor module that utilizes hardware resources available to the host's hypervisor. The network 250 may include one or more communication technologies. In some embodiments, the network 250 may include fifth generation (5G) network technologies having advanced wireless communication systems.
[0020] In some embodiments, communication may be facilitated using wireless technologies. Such technologies may include, for example, 5G wireless communication technologies. 5G is the fifth generation of cellular network technology, and a 5G network is a digital cellular network. In this network, the service area covered by a provider is divided into small geographic areas called cells. Analog signals representing sound and images are digitized in the phone, converted by an analog-to-digital converter, and transmitted as a stream of bits. All 5G wireless devices in a cell communicate by radio waves with a local antenna array and a low-power automatic transceiver (transmitter and receiver) in the cell via a frequency channel assigned by the transceiver from a pool of frequencies reused in other cells. The local antennas are connected to the telephone network and the Internet by high-bandwidth optical fiber or wireless backhaul connections. As with other cellular networks, mobile devices crossing from one cell to another are automatically transferred to the new cell. It should be understood that a 5G network is merely an example type of communication network, and embodiments of the present disclosure may utilize previous generations of wireless or wired communications, and later generations of wired or wireless technologies following 5G and beyond.
[0021] As shown, the cloud gaming system 290 includes a game server 260 that provides access to multiple video games. The game server 260 may be any type of server computing device available in the cloud and may be configured as one or more virtual machines running on one or more hosts. For example, the game server 260 may manage virtual machines supporting game processors that instantiate instances of games for users. Thus, the game processors of the game server 260 associated with the multiple virtual machines are configured to run multiple instances of one or more games associated with the gameplay of the multiple users. In this manner, the back-end server support provides streaming of gameplay media (e.g., video, audio, etc.) of multiple game applications to a corresponding number of users. That is, the game server 260 is configured to stream data (e.g., rendered images and / or frames of the corresponding gameplay) back to the corresponding client devices 210 over the network 250. In this manner, computationally complex gaming applications may be running on the back-end servers in response to controller inputs received and communicated by the client devices 210. Each server is capable of rendering images and / or frames. These images and / or frames are then encoded (eg, compressed) and streamed to a corresponding client device for display.
[0022] For example, multiple users may access the cloud gaming network 290 over the communications network 250 using corresponding client devices 210 configured to receive streaming media. In one embodiment, the client devices 210 may be configured as thin clients that interface with a back-end server (e.g., game server 260 of the cloud gaming network 290) configured to provide computing functionality (e.g., including a game title processing engine 211). In another embodiment, the client devices 210 may be configured with a game title processing engine and game logic for at least some local processing of video games, and may be further utilized to receive streaming content, such as generated by video games running in the back-end, or other content provided by the back-end server support. In the case of local processing, the game title processing engine includes basic processor-based functionality for running video games and services associated with the video games. The game logic is stored on the local client devices 210 and is used to run the video games.
[0023] In particular, a client device 210 of a corresponding user (not shown) is configured to request access to a game via a communications network 250, such as the Internet, and to render and display images generated by a video game executed by a game server 260, and the encoded images are delivered to the client device 210 for display in association with the corresponding user. For example, a user may interact with an instance of a video game running on a game processor of the game server 260 through the client device 210. More specifically, the instance of the video game is executed by a game title processing engine 211. Corresponding game logic (e.g., executable code) 215 implementing the video game is stored and accessible through a data store (not shown) and is used to execute the video game. The game title processing engine 211 may support multiple video games using multiple game logics, each of which is selectable by a user.
[0024] For example, the client device 210 is configured to interact with a game title processing engine 211 associated with the corresponding user's game play, such as via input commands used to facilitate game play. In particular, the client device 210 may receive input from various types of input devices, such as a game controller, a tablet computer, a keyboard, gestures captured by a video camera, a mouse, a touchpad, etc. The client device 210 may be any type of computing device having at least a memory and a processor module that is capable of connecting to the game server 260 via the network 250. The back-end game title processing engine 211 is configured to generate rendered images. The images are delivered over the network 250 for display on a corresponding display associated with the client device 210. For example, through a cloud-based service, the game rendered images may be delivered by an instance of a corresponding game running on a game execution engine 211 of the game server 260. That is, the client device 210 is configured to receive the encoded images (e.g., encoded from a game rendered image generated through execution of a video game) and display the rendered images for the display 11. In one embodiment, the display 11 includes an HMD (e.g., displaying VR content). In some embodiments, the rendered images may be streamed wirelessly or wired to a smartphone or tablet directly from the cloud-based service or via the client device 210 (e.g., PlayStation® Remote Play)
[0025] In one embodiment, the game server 260 and / or the game title processing engine 211 include basic processor-based functionality for running games and services associated with gaming applications. For example, the processor-based functionality may include 2D or 3D rendering, physics, physics simulation, scripting, audio, animation, graphics processing, lighting, shading, rasterization, ray tracing, shadowing, culling, transformations, artificial intelligence, etc. Additionally, services for gaming applications may include memory management, multi-thread management, quality of service (QoS), bandwidth testing, social networking, managing social friends, communicating with social network friends, communication channels, texting, instant messaging, chat support, etc.
[0026] In one embodiment, the cloud gaming network 290 is a distributed game server system and / or architecture. In particular, a distributed game engine that executes game logic is configured as a corresponding instance of a corresponding game. In general, a distributed game engine takes each of the game engine's functions and distributes them for execution by multiple processing entities. Individual functions may be further distributed across one or more processing entities. The processing entities may be configured in a variety of configurations, including physical hardware, and / or as virtual components or virtual machines, and / or as virtual containers. In this case, a container is distinct from a virtual machine because it is a virtualization of an instance of a gaming application running on a virtualized operating system. A processing entity may utilize and / or rely on its underlying hardware on one or more servers (computing nodes) of cloud gaming network 290, which may be located on one or more racks. The coordination, allocation and management of the execution of those functions across the various processing entities is performed by a distributed synchronization layer. In this manner, the execution of those functions is controlled by the distributed synchronization layer to enable the generation of media (e.g., video frames, audio, etc.) for the gaming application in response to controller inputs by the player. The distributed synchronization layer enables the efficient execution of those functions (e.g., through load balancing) across distributed processing entities such that critical game engine components / functions are distributed and reassembled for more efficient processing.
[0027] The game title processing engine 211 includes a group of central processing units (CPUs) and graphics processing units (GPUs) that can be configured to perform multi-tenancy GPU functions. In another embodiment, multiple GPU devices are combined to perform graphics processing for a single application running on a corresponding CPU.
[0028] 2B is a diagram for providing gaming between two or more peer devices where the VSYNC signals can be synchronized and offset to provide optimal timing of receipt of controllers and other information between the devices, according to one embodiment of the disclosure. For example, head-to-head gaming may be performed using two or more peer devices connected through a network 250 or directly connected through peer-to-peer communications (e.g., Bluetooth, local area networking, etc.).
[0029] As illustrated, a game is running locally on each of the client devices 210 (e.g., game consoles) of corresponding users playing the video game, and the client devices 210 communicate through peer-to-peer networking. For example, an instance of the video game is executed by a game title processing engine 211 of the corresponding client device 210. Game logic 215 (e.g., executable code) implementing the video game is stored on the corresponding client device 210 and used to run the game. By way of example, the game logic 215 may be distributed to the corresponding client device 210 (e.g., downloaded from a gaming provider over the Internet) through portable media (e.g., optical media, etc.) or through a network.
[0030] In one embodiment, the game title processing engine 211 of the corresponding client device 210 includes basic processor-based functionality for running games and services associated with a gaming application. For example, the processor-based functionality may include 2D or 3D rendering, physics, physics simulation, scripting, audio, animation, graphics processing, lighting, shading, rasterization, ray tracing, shadowing, culling, transformation, artificial intelligence, etc. Additionally, services for gaming applications may include memory management, multi-thread management, quality of service (QoS), bandwidth testing, social networking, management of social friends, communication with social network friends, communication channels, texting, instant messaging, chat support, etc.
[0031] The client device 210 may receive input from various types of input devices, such as a game controller, a tablet computer, a keyboard, gestures captured by a video camera, a mouse, a touchpad, etc. The client device 210 may be any type of computing device having at least a memory and a processor module, and is configured to generate rendered images executed by the game title processing engine 211 and display the rendered images on a display (e.g., display 11, or display 11 including a head mounted display - HMD, etc.). For example, the rendered image may be associated with an instance of a game running locally on the client device 210 to effectuate gameplay of a corresponding user, such as via input commands used to prompt the gameplay. Some examples of client devices 210 include personal computers (PCs), game consoles, home theater devices, general purpose computers, mobile computing devices, tablets, phones, or any other type of computing device capable of running an instance of a game.
[0032] FIG. 2C illustrates various network configurations that benefit from proper synchronization and offsetting of VSYNC signals between source and target devices, including the configurations illustrated in FIGS. 2A-2B, in accordance with embodiments of the present disclosure. In particular, various network configurations benefit from proper alignment of the frequency of the server VSYNC signal and the client VSYNC signal and timing offset of the server VSYNC signal and the client VSYNC signal in order to reduce one-way latency and / or latency variability between the server and the client. For example, one network device configuration includes a cloud gaming server (e.g., source) vs. client (target) configuration. In one embodiment, the client may include a WebRTC client configured to provide audio and video communication within a web browser. Another network configuration includes a client (e.g., source) versus server (target) configuration. Yet another network configuration includes a server (e.g., source) versus server (e.g., target) configuration. Another network device configuration includes a client (e.g., source) versus client (target) configuration, where each client may be, for example, a gaming console for providing head-to-head gaming.
[0033] In particular, for purposes of reducing one-way latency and / or latency variability, alignment of the VSYNC signals may include synchronizing the frequencies of the server and client VSYNC signals and may also include adjusting a timing offset between the client and server VSYNC signals in order to eliminate drift and / or maintain an ideal relationship between the server and client VSYNC signals. To achieve proper alignment, in one embodiment, the server VSYNC signal may be adjusted to enforce proper alignment between the server 260 and client 210 pair. In another embodiment, the client VSYNC signal may be adjusted to effect proper alignment between the server 260 and client 210 pair. Once the client and server VSYNC signals are aligned, the server and client VSYNC signals occur at substantially the same frequency and are offset from one another by a timing offset, which may be adjusted at any time. In another embodiment, alignment of the VSYNC signals may include synchronizing the frequency of the VSYNC for two clients and may also include adjusting the timing offset between the VSYNC signals in order to eliminate drift and / or achieve optimal timing of receipt of controller and other information, and either VSYNC signal may be adjusted to achieve this alignment. In yet another embodiment, alignment may include synchronizing the frequency of VSYNC for multiple servers, e.g., in the case of head-to-head cloud gaming, synchronizing the frequency of the server and client VSYNC signals and also adjusting the timing offset between the client and server VSYNC signals. In server-to-client and client-to-client configurations, alignment may include both synchronizing the frequency between the server and client VSYNC signals and providing an appropriate timing offset between the server and client VSYNC signals. In server-to-server configurations, alignment may include synchronizing the frequency between the server and client VSYNC signals without setting a timing offset.
[0034] 2D illustrates a multi-tenancy configuration between a cloud gaming server 260 and one or more clients 210 that benefits from proper synchronization and offset of VSYNC signals between source and target devices, according to one embodiment of the disclosure. In a server-to-client configuration, alignment may include both synchronizing the frequency between the server VSYNC signal and the client VSYNC signal, and providing a proper timing offset between the server VSYNC signal and the client VSYNC signal. In a multi-tenancy configuration, in one embodiment, the client VSYNC signal is adjusted at each client 210 to implement proper alignment between the server 260 and client 210 pair.
[0035] For example, in one embodiment, the graphics subsystem may be configured to perform multi-tenancy GPU functions, where one graphics subsystem may implement the graphics and / or rendering pipeline for multiple games. That is, the graphics subsystem is shared between multiple games being executed. In particular, in one embodiment, the game title processing engine may include a CPU and GPU group configured to perform multi-tenancy GPU functions, where one CPU and GPU group may implement the graphics and / or rendering pipeline for multiple games. That is, the CPU and GPU group is shared between multiple games being executed. The CPU and GPU group may be configured as one or more processing devices. In another embodiment, multiple GPU devices are combined to perform graphics processing for a single application running on a corresponding CPU.
[0036] 3 illustrates a general process of running a video game on a server to generate game-rendered video frames and send those video frames to a client for display. Traditionally, some operations on the game server 260 and client 210 are performed within a frame period as defined by their respective VSYNC signals. For example, the server 260 attempts to generate 301 game-rendered video frames in one or more frame periods as defined by a corresponding server VSYNC signal 311. The video frames are generated by the game in response to either control information (e.g., a user's input commands) delivered from an input device in operation 350 or game logic that is not driven by control information. Transmission jitter 351 may be present when sending control information to server 260, where jitter 351 measures the variation in network latency from client to server (e.g., when sending an input command). As shown, the thick arrow indicates the current delay in sending control information to server 260, but due to jitter there may be a range of times (e.g., the range enclosed by the dotted arrow) where the control information arrives at server 260. At flip time 309, the GPU reaches a flip command indicating that the corresponding video frame has been fully generated and placed in the frame buffer of server 260. The server 260 then performs a scan-out / scan-in (operation 302, where the scan-out may be aligned to the VSYNC signal 311) on that video frame over the subsequent frame period as defined by the server VSYNC signal 311 (VBI omitted for clarity). The video frame is then encoded (operation 303) (e.g., encoding may begin after the occurrence of the VSYNC signal 311, and the end of encoding may not be aligned to the VSYNC signal) and transmitted to the client 210 (operation 304, where the transmission may not be aligned to the VSYNC signal 311). At the client 210, the encoded video frames are received (act 305, where reception may not be aligned to the client VSYNC signal 312), decoded (act 306, where decoding may not be aligned to the client VSYNC signal 312), buffered, and displayed (act 307, where start of display may be aligned to the client's VSYNC signal 312). In particular, the client 210 displays each video frame rendered for display beginning with the corresponding occurrence of the client VSYNC signal 312.
[0037] One-way latency 315 may be defined as the latency from the start of the transfer of a video frame to an encoding unit at the server (e.g., scanout 302) to the start of display of the video frame at the client 307. That is, one-way latency is the time from server scanout to client display, taking into account client buffering. Each frame has a latency from the start of scanout 302 to the completion of decoding 306. This latency may vary from frame to frame due to the high degree of variability in server operations such as encoding 303 and transmission 304, network transmission between the server 260 and client 210 with attendant jitter 352, and client reception 305. Transmission jitter 352 measures the variation in one-way latency from server 260 to client 210, with lower jitter values indicating a more stable connection. The variation in latency may be due to operations at the server that exceed a frame period, as well as network issues that introduce latency when transmitting video frames to client 210. As shown, the solid arrow indicates the current latency when sending the corresponding video frame to client 210, but due to jitter 352, there may be a range of times (e.g., the range surrounded by the dotted arrow) when the video frame arrives at client 210. Since one-way latency needs to be relatively stable (e.g., fairly uniform) to achieve a good playing experience, buffering 320 is conventionally performed, which results in the display of individual frames with low latency (e.g., from the start of scanout 302 to the completion of decoding 306) being delayed for several frame periods. That is, when there is network instability or unpredictable encoding / decoding times, additional buffering is required to keep the one-way latency uniform.
[0038] According to one embodiment of the present disclosure, one-way latency between the cloud gaming server and the client may vary, in part, due to clock drift when streaming video frames generated from a video game running on the server. That is, differences in frequency between the server VSYNC signal 311 and the client VSYNC signal 312 may cause drift 390 in the client VSYNC signal relative to frames arriving from the server 260. Drift 390 between the relative timing of the server VSYNC signal 311 and the client VSYNC signal 312 may be due to slight differences in the crystal oscillators used in each of the clocks at the server and the client. Variations in latency may extend through the receiving and decoding operations at the client 210, and one or more buffers 320 may be implemented to accommodate variations in one-way latency. Additionally, one-way latency may be reduced by performing one or more synchronization and offsets of the VSYNC signal for alignment between the server and the client, by providing dynamic buffering on the client, by overlapping the encoding and transmission of video frames at the server, by overlapping the receiving and decoding of video frames at the client, and by overlapping the decoding and display of video frames at the client.
[0039] Additionally, during the encoding of a video frame (ACT 303), in previous techniques, the encoder determines how much change exists between the current video frame being encoded and one or more previously encoded frames to determine whether a scene change (e.g., a complex image of the corresponding generated video frame) exists. That is, a hint of a scene change may be inferred from the difference between the current frame to be encoded and the previous frames already encoded. When streaming content from a server to a client over a network, the encoder of the server may decide to encode a complex video frame that is detected as a scene change. Otherwise, the encoder encodes a less complex video frame that is not detected as a scene change. However, scene change detection at the encoder may take up to one frame period (e.g., adding jitter) because the video frame is initially encoded with less complexity (in a first frame period) and then re-encoded with more complexity (in a second frame period) once it is determined that a scene change exists. Also, scene change detection may be unnecessarily triggered (such as through a small burst in the image) when the difference between the currently encoded video frame and the previously encoded video frame may exceed a threshold difference value, even if no scene change exists. Therefore, when a scene change is detected at the encoder, additional latency due to jitter is introduced at the encoder to accommodate performing scene change detection and re-encoding the more complex video frame.
[0040] FIG. 4 illustrates the flow of data through a network configuration including a highly optimized cloud gaming server 260 and a highly optimized client 210 when streaming video frames generated from a video game running on a server, where one-way latency is reduced by overlapping server and client operations, and where VSYNC signals between the server and client are synchronized and offset to not only reduce one-way latency, but also reduce variability in one-way latency between the server and client, in accordance with an embodiment of the present disclosure. In particular, Figure 4 illustrates a desired alignment between the server VSYNC signal and the client VSYNC signal. In one embodiment, an adjustment of the server VSYNC signal 311 is performed to obtain proper alignment between the server VSYNC signal and the client VSYNC signal, for example, in a server and client network configuration. In another embodiment, an adjustment of the client VSYNC signal 312 is performed to obtain proper alignment between the server VSYNC signal and the client VSYNC signal, for example, in a multi-tenant server to multiple client network configuration. For purposes of illustration, adjustment of the server VSYNC signal 311 is illustrated in FIG. 4 for the purpose of synchronizing the frequency of the server VSYNC signal and the client VSYNC signal and / or correcting a timing offset between corresponding client and server VSYNC signals, although it will be understood that the client VSYNC signal 312 may also be used for adjustment. In the context of this patent, "synchronize" should be interpreted as adjusting the signals so that their frequencies match, but their phases may differ. "Offset" should be interpreted as the time delay between the signals, e.g., the time from when one signal reaches its maximum to when the other signal reaches its maximum.
[0041] As shown, FIG. 4 illustrates an improved process for running a video game on a server to generate rendered video frames and send those video frames to a client for display in an embodiment of the present disclosure. The process is illustrated with respect to the generation and display of a single video frame on the server and the client. In particular, the server generates a game rendered video frame at 401. For example, the server 260 includes a CPU (e.g., game title processing engine 211) configured to run the game. The CPU generates one or more draw calls for the video frame, which include commands placed in a command buffer for execution in a graphics pipeline by a corresponding GPU of the server 260. The graphics pipeline may include one or more shader programs for vertices of objects in the scene to generate texture values when rendered for the video frame for display, and these operations are executed in parallel across the GPU for efficiency. At flip time 409, the GPU reaches a flip command in the command buffer indicating that the corresponding video frame has been fully generated and / or rendered and placed in the frame buffer of the server 260.
[0042] At 402, the server performs scanout of the game rendered video frames to the encoder. In particular, scanout is performed scanline by scanline or groups of consecutive scanlines, where a scanline refers to, for example, a single horizontal line of the display from edge of the screen to edge of the screen. These scanlines or groups of consecutive scanlines may also be referred to as slices, and are referred to herein as screen slices. In particular, scanout 402 may include several processes of modifying the game rendered frames, including overlaying the game rendered frames with another frame buffer, or shrinking the game rendered frames to surround the game rendered frames using information from another frame buffer. During scanout 402, the modified video frames are then scanned into the encoder for compression. In one embodiment, scanout 402 is performed upon occurrence 311a of the VSYNC signal 311. In other embodiments, scanout 402 may be performed before the occurrence of the VSYNC signal 311, such as at flip time 409.
[0043] At 403, the game rendered video frames (which may have been modified) are encoded by an encoder slice to generate one or more encoded slices, where the encoded slices are independent of scanline or screen slices, such that the encoder generates one or more encoded (e.g., compressed) slices. In one embodiment, the encoding process begins before the scanout 402 process is fully completed for the corresponding video frame. Additionally, the start and / or end of encoding 403 may or may not be aligned to the server VSYNC signal 311. The boundaries of the encoded slices are not limited to a single scanline, but may consist of a single scanline or multiple scanlines. In addition, the end of an encoded slice and / or the start of the next encoder slice may not necessarily occur at the edge of the display screen (e.g., may occur around the center of the screen or the center of a scanline), such that the encoded slice need not traverse completely from one end of the display screen to the other. As shown, one or more encoded slices may be compressed and / or encoded, including a compressed "encoded slice A" with hash marks.
[0044] At 404, the encoded video frame is transmitted from the server to the client, where the transmission may occur on a per-encoded slice basis, with each encoded slice being a compressed encoder slice. In one embodiment, the transmission process 404 begins before the encoding process 403 is fully completed for the corresponding video frame. Furthermore, the start and / or end of the transmission 404 may or may not be aligned to the server VSYNC signal 311. As shown, the compressed encoded slice A is transmitted to the client separately from the other compressed encoder slices for the rendered video frame. The encoder slices may be transmitted one at a time or in parallel.
[0045] At 405, the client receives the compressed video frame for each encoded slice anew. Furthermore, the start and / or end of the reception 405 may or may not be aligned with the client VSYNC signal 312. As shown, the compressed encoded slice A is received by the client. There may be transmission jitter 452 between the server 260 and the client 210. Here, jitter 452 measures the variation in network latency from server 260 to client 210. A lower jitter value indicates a more stable connection. As shown, the thick straight arrow indicates the current latency in sending the corresponding video frame to client 210, but due to jitter there may be a range of times (e.g., the range enclosed by the dotted arrow) where a video frame arrives at client 210. The variation in latency may also be due to one or more operations at the server, such as encoding 403 and transmitting 404, and network issues that introduce latency when transmitting the video frame to client 210.
[0046] At 406, the client decodes the compressed video frame afresh for each encoded slice to produce a decoded slice A (shown without hash marks). This slice is now ready for display. In one embodiment, the decoding process 406 starts before the receiving process 405 is fully completed for the corresponding video frame. Furthermore, the start and / or end of the decoding 406 may or may not be aligned to the client VSYNC signal 312. At 407, the client displays the decoded rendered video frame on the client's display. That is, the decoded video frame is placed in a display buffer. This buffer is streamed out to the display device, for example, scanline by scanline. In one embodiment, the display process 407 (i.e., streaming out to the display device) starts after the decode process 406 is fully completed for the corresponding video frame, i.e., after the decoded video frame is fully resident in the display buffer. In another embodiment, the display process 407 starts before the decode process 406 is fully completed for the corresponding video frame. That is, streaming out to the display device starts from an address in the display buffer at a point where only a portion of the decoded frame buffer resides in the display buffer. The display buffer is then updated or filled with the remaining portion of the corresponding video frame in time for display. The display buffer updates are thereby performed before those portions are streamed out to the display. Additionally, the start and / or end of display 407 is aligned to the client VSYNC signal 312.
[0047] In one embodiment, the one-way latency 416 between the server 260 and the client 210 may be defined as the elapsed time from when the scanout 402 begins to when the display 407 begins. The embodiments of the present disclosure may align (e.g., synchronize frequency and adjust offset) the VSYNC signals between the server and the client to reduce the one-way latency between the server and the client and to reduce the variability of the one-way latency between the server and the client. For example, the embodiments of the present disclosure may calculate an optimal adjustment to the offset 430 between the server VSYNC signal 311 and the client VSYNC signal 312. This ensures that even when the server processes such as encoding 403 and transmitting 404 require approximately worst-case times, when the network latency between the server 260 and the client 210 is approximately worst-case, and when the client processes such as receiving 405 and decoding 406 are approximately worst-case, the decoded rendered video frames are available in time for the display process 407. That is, there is no need to determine an absolute offset between the server VSYNC and the client VSYNC. It is sufficient to adjust the offset so that the decoded and rendered video frame is available in time for the display process.
[0048] In particular, the frequencies of the server VSYNC signal 311 and the client VSYNC signal 312 may be aligned through synchronization. The synchronization is achieved through adjustment of the server VSYNC signal 311 or the client VSYNC signal 312. For illustrative purposes, the adjustment is described with respect to the server VSYNC signal 311, but it is understood that the adjustment can be performed on the client VSYNC signal 312 instead. For example, as shown in Figure 4, the server's frame period 410 (e.g., the time between two occurrences 311c and 311d of the server VSYNC signal 311) is substantially equal to the client's frame period 415 (e.g., the time between two occurrences 312a and 312b of the client VSYNC signal 312). This indicates that the frequencies of the server VSYNC signal 311 and the client VSYNC signal 312 are also substantially equal.
[0049] To maintain frequency synchronization between the server VSYNC signal and the client VSYNC signal, the timing of the server VSYNC signal 311 may be manipulated. For example, the vertical blanking interval (VBI) in the server VSYNC signal 311 may be increased or decreased over a period of time, for example, to account for drift between the server VSYNC signal 311 and the client VSYNC signal 312. Manipulation of the vertical blanking (VBLANK) lines in the VBI provides for adjusting the number of scan lines used for VBLANK for one or more frame periods of the server VSYNC signal 311. Reducing the number of VBLANK scan lines reduces the corresponding frame period (e.g., time interval) between two occurrences of the server VSYNC signal 311. Conversely, increasing the number of VBLANK scan lines increases the corresponding frame period (e.g., time interval) between two occurrences of the VSYNC signal 311. In this manner, the frequency of the server VSYNC signal 311 is adjusted to align the frequencies between the client VSYNC signal 311 and the server VSYNC signal 312 to be substantially the same frequency. Also, the offset between the server VSYNC signal and the client VSYNC signal can be adjusted by briefly increasing or decreasing the VBI before returning it to its original value. In one embodiment, the server's VBI is adjusted. In another embodiment, the client's VBI is adjusted. In yet another embodiment, instead of two devices (server and client), there may be multiple connected devices, each of which has a corresponding VBI that is adjusted. In one embodiment, each of the multiple connected devices may be an independent peer device (e.g., without a server device). In another embodiment, the multiple devices may include one or more server devices and / or one or more client devices arranged in one or more server / client architectures, a multi-tenant server / client(s) architecture, or some combination thereof.
[0050] Alternatively, in one embodiment, the frequency synchronization between the server VSYNC signal 311 and the client VSYNC signal 312 may be brought back into alignment by manipulating the server's pixel clock (e.g., located in the southbridge of the server's northbridge / southbridge core logic chipset) to perform coarse and / or fine adjustments to the frequency of the server VSYNC signal 311 over a period of time. Specifically, the pixel clock in the server's south bridge may be overclocked or underclocked to adjust the overall frequency of the server's VSYNC signal 311. In this manner, the frequency of the server VSYNC signal 311 is adjusted to align the frequencies between the client VSYNC signal 311 and the server VSYNC signal 312 to be substantially the same frequency. The offset between the server and client VSYNC can be adjusted by briefly increasing or decreasing the client server pixel clock before restoring the pixel clock back to its original value. In one embodiment, the pixel clocks of the servers are adjusted. In another embodiment, the pixel clocks of the clients are adjusted. In yet another embodiment, instead of two devices (a server and a client), there may be multiple connected devices, each of which has a corresponding pixel clock that is adjusted. In one embodiment, each of the multiple connected devices may be an independent peer device (e.g., without a server device). In another embodiment, the multiple connected devices may include one or more server devices and one or more client devices arranged in one or more server / client architectures, a multi-tenant server / client(s) architecture, or some combination thereof.
[0051] FIG. 5A illustrates a transition between two scenes of a video game running on a cloud gaming server, according to one embodiment of the present disclosure. In particular, the scene may be part of a virtualized environment for a video game, which may have many scenes. For example, the scene may be described as a cave environment, in which a character being played by a user is participating in a boss fight. A particular scene may be rendered from different perspectives. For example, as a character moves around a scene of a cave environment, different images are generated from different points within the cave. In general, movement within a scene is not considered a change of scene, since the variance between viewpoints of the scene may not change much.
[0052] As shown, there are two scenes 511 and 512 in the virtualized environment for the corresponding video game being played by the user. For illustrative purposes, scene 511 may be the cave environment of the example provided above. The cave environment may be characterized using a dark and drab color scheme. Scene 512 may be outside of the cave environment, such as a brightly lit beach scene with a blue sky, blue ocean, and white sand. A character being played by the user may be traversing along a path 514 in the virtualized environment, where path 514 traverses both scenes 511 and 512. For example, a character moves in scene 511 from point A to point B, then from point B to point C, then from point C to point D. Because the character's viewpoint along path 514 in scene 511 does not change much, the corresponding video frames being generated may be encoded with less complexity, such as producing a low percentage of I-frames and a high percentage of P-frames, such as those used in MPEG or H.264 compression formats.
[0053] The character's path 514 moves from point D in scene 511 to point E in scene 512. That is, the path between points D and E includes a scene change 513 as the character moves from scene 511 in a cave environment to scene 512 in a beach environment. Scene change 513 indicates a transition in the displayed scene, which generally indicates that a new scene with new assets must be rendered at the request of the video game. For example, scene change 513 may be a scene cut in a game, where the game transitions from one scene to another between two video frames (e.g., a scene change in a cinematic shot, or the start of interactive gameplay after a series of menus). That is, due to a scene change, the corresponding video frame or frames representing the transition between scene 511 and scene 512 may be generated in a very complex manner (e.g., as a reference frame), such as generated as an I-frame, such as the frames used in MPEG or H.264 compression formats.
[0054] After scene change 513, the character continues along path 514, moving from point E to point F in scene 512. Again, because the character's viewpoint along path 514 in scene 512 does not change significantly, the corresponding video frames being generated (e.g., between points E and F) may be coded with less complexity, such as by generating a lower percentage of I-frames and a higher percentage of P-frames.
[0055] 5B illustrates a cloud gaming system including a cloud gaming server 260 and a client 210. The cloud gaming server 260 is configured to generate and use scene change hints when encoding video frames when streaming content from a video game running on the cloud gaming server 260 over a network 250 to the client 210, according to one embodiment of the disclosure.
[0056] In particular, the video game logic 215 is built on a game engine 211 that, when executed by the cloud gaming servers 260, generates game-rendered video frames for streaming back to the clients 210. In particular, the game engine 211 contains the core functionality that may be used by the game logic to build the gaming environment of a video game. For example, some features of the game engine 211 may include a physics engine for simulating physical forces and collisions acting on objects in a video game, a rendering engine for 2D or 3D graphics, collision detection, sound, animation, artificial intelligence, networking, streaming, etc. In this manner, the game logic 215 does not need to build from scratch the core features provided by the game engine 211. Additionally, the core features of the game engine 211 may be ported to and used by other game logic for other video games.
[0057] The game logic 215 in combination with the game engine 211 is executed by the CPU 501 and the GPU 502 (e.g., configured to implement a graphics pipeline), which may be configured as a rendering pipeline for generating game-rendered video frames. The rendering pipeline includes the CPU 501 and the GPU 502, as well as memory that may be accessible to both (e.g., system memory, shared memory, vertex buffers, index buffers, depth or Z-buffers, frame buffers for storing the rendered video frames, etc.). The rendering pipeline outputs the game-rendered images as image frames suitable for display, including corresponding color information for each of the pixels in the virtualized display.
[0058] CPU 501 is configured to execute a video game (e.g., game logic built on game engine 211) to generate multiple video frames. For example, CPU 501 generates draw calls for a frame of the video frames, which include commands stored in a corresponding command buffer that are executed by a GPU in the GPU pipeline. For a particular video frame, there may be multiple draw calls generated by CPU 501 and executed by GPU 502 through the graphics pipeline. Subsequent video frames are generated and / or rendered for display using similarly configured command buffers, and the video frames are output from the GPU pipeline.
[0059] In particular, commands in one or more command buffers may be executed by GPU 502 to generate a corresponding video frame. For example, a graphics pipeline may be implemented by GPU 502 to execute shader programs on vertices of objects in a scene to generate texture values for pixels of a display, where these operations are executed in parallel across GPU 502 for efficiency. In general, a graphics pipeline receives input geometry (e.g., vertices of objects in a gaming world). Vertex shaders construct the polygons or primitives that make up the objects in the scene. Vertex shaders or other shader programs may perform lighting, shading, shadowing, and other operations on the polygons. Depth or Z-buffering may be performed to determine which objects appear in the rendered scene from a corresponding viewpoint. Rasterization is performed to project objects from the three-dimensional world onto a two-dimensional plane defined by the viewpoint. Pixel-sized fragments are generated for the objects, and one or more fragments may contribute to the color of a corresponding pixel when displaying the image. The fragments may be merged and / or blended to determine the composite color of each of the pixels in the corresponding video frame, and stored in a frame buffer.
[0060] In one embodiment, each of the game-rendered video frames may be composited and blended (e.g., as an overlay) with additional user interface (UX) features. Example UX features may include user interface, system user interface, texting, messaging, menus, communications, additional gaming perspectives, e-sports information, etc. For example, a scanout process may be implemented to composite and blend each of the game-rendered video frames with a corresponding feature overlay to generate a modified video frame. Additional operations may be performed when generating the modified video frame, such as decompression of DCC compressed surfaces, resolution scaling for the target display, color space conversion, de-gamma, HDR expansion, gamut remapping, LUT shaping, tone mapping, gamma blending, blending, etc. Thus, the layer or layers of the input frame buffer, composited and blended and modified using other operations, are then optionally placed into a display buffer and then scanned into (e.g., scanned out of) the encoder.
[0061] A number of game-rendered and / or modified video frames for the video game are generated. The modified video frames are then scanned into the encoder 570 for compression before streaming the modified video frames to a client over a network. For example, the corresponding modified video frames may be compressed into one or more encoded slices (compressed encoder slices), which may be further packetized for network streaming. In one embodiment, the corresponding modified video frames are encoded on an encoder slice by slice to generate one or more encoded slices for the corresponding modified video frames. The modified video frames, compressed and / or packetized into encoded slices, are then optionally stored in a buffer (e.g., a first-in-first-out or FIFO buffer). The streamer 575 is configured to transmit the encoded slices from the optional buffer over the network 250 to the client 210. The streamer 575 may be configured to operate at the application layer of the Transmission Control Protocol / Internet Protocol (TCP / IP) computer networking model.
[0062] The game logic 215, according to one embodiment of the present disclosure, enables the CPU to recognize scene changes while the CPU is executing a video game. In particular, the scene change logic 520 may be integrated within the game logic 215 and / or provided as an add-on to the game logic 215. The scene change logic 520 is configured to determine, predict, and / or forecast when a video frame being generated includes a scene change (e.g., a transition from one scene to another). For example, the game logic 215 and / or the scene change logic 520 may include code that indicates that a particular video frame is a scene change. In another embodiment, the scene change logic 520 is configured to track gameplay while the video game is being executed to predict when a scene change is imminent.
[0063] In particular, the scene change logic 520 analyzes game state data collected during the execution of a video game to determine and / or anticipate and / or predict when a scene change will occur in the next X number of frames or for an identified video frame. For example, the game state data defines the state of the game at that time and may include game characters, game objects, game object attributes, game attributes, game object states, graphic overlays, the position of the character within the gaming world of the player's gameplay, the scene or gaming environment of the gameplay, the level of the gaming application, character assets (e.g., weapons, tools, bombs, etc.), loadouts, character skill sets, game levels, character attributes, character positions, number of lives remaining, total possible number of lives available, armor, trophies, time counter values, and other asset information, etc. In this manner, the game state data enables the generation of the gaming environment that existed at a corresponding point in the video game. Thus, when executed, the scene change logic 520 is configured to predict when a scene change is about to occur, and is further configured to identify which video frames (e.g., by frame number) contain a scene change or over what range of video frames the scene change is likely to occur.
[0064] In particular, recognition of a scene change by the scene change logic 520 and / or the game logic 215, in one embodiment, provides notification of the scene change to an encoder used to stream content from a video game running on the cloud gaming server over a network to client devices. For example, the notification may be provided as a scene change hint 509 from the scene change logic 520 to other components (e.g., encoders) via an API, which may be used to communicate between components or between applications running on components of the cloud gaming server 260. In one embodiment, the API may be a GPU API. For example, the API may be running on or called by the scene change logic 520 and / or the game logic 215 to communicate with other components, such as the GPU 502, system memory, command buffers, encoder 570, etc. In one embodiment, the scene change hint 509 may be provided as a data control packet that is initialized so that all components receiving the data control packet know what type of information is included in the data control packet and know the appropriate reference to the corresponding rendered video frame. In one implementation, the communication protocol used for the API, initialization for the data control packets or messages may be defined in a software development kit (SDK) for the corresponding video game.
[0065] With respect to the detailed description of the various client devices 210 and / or cloud gaming network 290 (e.g., within gaming server 260) of FIGS. 2A-2D, flow diagram 600A of FIG. 6A illustrates a method of encoding video frames when performing cloud gaming, in which one or more scene change hints are used by the encoder to process the corresponding video frames, according to one embodiment of the present disclosure. The encoder may choose to encode the video frames differently depending on whether a scene change hint is received. In this manner, one-way latency between the cloud gaming server and the client is reduced since the encoder does not need to determine whether a video frame to be encoded is a scene change. Also, one-way latency is more uniform since a frame period is no longer used to determine a scene change and re-encode a video frame determined to be a scene change. This is because the encoding of most video frames is performed over a single frame period. Furthermore, because frame periods are no longer used for determining scene changes and re-encoding video frames determined to be scene changes, jitter is reduced, thereby improving smoothness of the client's display of the video. Although flow diagram 600A is described as providing scene change hints to an encoder configured to compress video frames, it will be understood that the scene change hints may also be used by an encoder configured to compress encoded slices of the corresponding video frames.
[0066] In particular, at 601, video frames generated by a video game running on a CPU and GPU are received at an encoder when streaming content from a cloud gaming server to a client. As previously described, the video frames generated by the game may be composited and blended with additional user interface features into modified video frames that are scanned into the encoder.
[0067] The encoder is configured to compress the modified video frames based on a desired format. For example, the Motion Picture Experts Group (MPEG) or H.264 standard may be used to stream media content from the cloud gaming server to the client. The encoder may perform compression by video frames (e.g., MPEG-2) or by encoding slices of video frames. In this case, each video frame may be compressed as one or more encoded slices. In general, video frames may be compressed as I-frames (intermediate frames) or P-frames (predictive frames), and each of these frames may be divided into encoded slices.
[0068] In particular, an I-frame contains an entire image and can be encoded without any reference to any other video frame. That is, an I-frame can stand alone as a key image and can be used as a reference to encode and / or decode other video frames. I-frames can also be decoded without reference to any other frames. Video frames determined to be scene changes are typically encoded as I-frames. However, I-frames typically require more bits to encode than other frame types, such as P-frames.
[0069] P frames are encoded and / or decoded with reference to one or more previous video frames. In general, a video frame encoded as a P frame contains only the differences between the currently encoded frame and one or more previous video frames provided. That is, redundant information between video frames is not encoded in a P frame. When decoding, the redundant information may be restored because the decoded P frame references previously decoded video frames that contain the redundant information.
[0070] When streaming, in one embodiment, video frames are encoded as P frames until there is a scene change or when the currently encoded frame cannot reference a key frame (e.g., a previous I frame), whereby the next video frame is then encoded as another I frame. In particular, in an embodiment, group of pictures (GOP) mode may be disabled, which requires one I frame per period of video frames (e.g., 16 video frames). In addition, in an embodiment, scene change detection may also be disabled in the encoder. By disabling GOP mode and scene change detection, most video frames are encoded as P frames until it is not feasible to generate a P frame (e.g., until the previous I frame cannot be referenced). In this embodiment, video frames are compressed as I frames when a corresponding scene change hint is received in the encoder.
[0071] At decision step 603, the encoder determines whether a scene change hint has been received for the corresponding video frame. As previously mentioned, the scene change hint may be provided by a video game running on the cloud gaming server (e.g., generated by the scene change logic 520 and delivered via an API). The encoder behaves differently depending on whether a scene change hint has been received in relation to the current video frame to be encoded. In particular, when a scene change hint is not received, the encoder assumes that the video frame is not a scene change and encodes the video frame normally. In one embodiment, GOP mode is disabled and scene change detection is also disabled such that the encoder relies on scene change hints to determine when a video frame is a scene change and needs to be encoded as an I-frame. Typically, the encoder will compress the corresponding video frame as a P-frame unless it is not able to do so.
[0072] On the other hand, when a scene change hint is received, the corresponding video frame is eventually compressed as an I-frame. In particular, at 607, the method determines whether the next video frame is to be encoded as a P-frame (i.e., can still reference back to the previous I-frame). If the video frame is to be encoded as a P-frame, then at 609, after the scene change hint is received, the corresponding video frame received by the encoder is compressed as an I-frame. On the other hand, if the video frame should be encoded as an I-frame, the video frame is still encoded as an I-frame. Since the encoder relies on the scene change hint, no GOP mode or scene change detection is required in the encoder. In particular, the scene change hint is provided by the CPU when executing the video game to generate the video frames. That is, the video game knows when a video frame is considered to be a scene change. For example, code in the video game may be used to identify the scene change, so that the corresponding video frame may also be identified as a scene change when generated.
[0073] 2A-2D , flow diagram 600B in FIG. 6B illustrates a method for encoding video frames when performing cloud gaming, including generating one or more scene change hints when performing a video game or game application that can be used for efficient encoding of corresponding video frames, according to one embodiment of the present disclosure. In general, a video game being executed by a cloud gaming server can be configured to provide hints regarding an upcoming scene change in a next video frame to be encoded, and the scene change hints can be communicated by an application (e.g., game logic) to an encoder when the application is executed through an API. The encoder may choose to perform different encoding (e.g., switching from P-frames to I-frames upon a scene change). This process provides smoother frame rates and more reliable latency. This reduces and makes the one-way latency between the cloud gaming server and the client more uniform, thereby improving the smoothness of the client's display of the video. Although flow diagram 600B is described as providing scene change hints to an encoder configured to compress video frames, it is understood that the scene change hints may also be used by an encoder configured to compress an encoded slice of the corresponding video frame.
[0074] At 610, the method includes executing game logic built on a game engine of the video game on the cloud gaming server to generate a plurality of video frames. The game logic executes on a CPU and a GPU implementing a graphics pipeline. For example, the cloud gaming server may be running the video game in a streaming mode, whereby the game logic built on the game engine executes in response to input commands from a user to generate game-rendered video frames using a graphics pipeline enabled for streaming. In particular, the CPU executing the game logic built on the game engine is configured to cooperate with the GPU graphics pipeline to generate a plurality of video frames. In cloud gaming, the video frames generated by the game are typically rendered for display on a virtual display.
[0075] At 620, the method includes executing scene change logic to predict a scene change in the plurality of video frames, the prediction being based on game state collected during execution of the game logic. In one embodiment, the scene change logic may be integrated within the game logic. In another embodiment, the scene change logic may be provided as an add-on to the game logic. In particular, when the game logic is executed, the scene change logic may identify a particular video frame or scenario in the game as represented by a corresponding video frame as a scene change. The scene change logic is configured to predict the scene change based on tracking of the game state collected when generating the plurality of video frames. For example, the scene change logic can predict when a scene change is about to occur, such as when a character moves from one scene to another within a virtualized gaming environment, or when a character is finishing one level and transitioning to another within a video game. A scene change can be represented by a video frame that includes a large and complex scene of a virtualized gaming world or environment. For example, a scene change can occur when a video game, when executed, transitions from one scene to another between two video frames (e.g., a scene change or scene cut in a cinematic scene, or the start of interactive gameplay after a series of menus). Thus, the video game (e.g., game logic) can determine or predict when a scene change is about to occur and when the video frames are being generated.
[0076] At 630, the method includes identifying a range of video frames within the plurality of video frames that are predicted to include a scene change. That is, the scene change logic is executed to predict the likelihood of a scene change over a range of future video frames or within an identifiable video frame. In one embodiment, the scene change logic may predict a scene change for an identifiable video frame, such as a first video frame. In that case, the range of video frames is limited to the first video frame.
[0077] At 640, the method includes generating a scene change hint using scene change logic. In particular, the scene change hint identifies a range of video frames, the range of video frames including the first video frame. A scene change prediction by the scene change logic can notify other components of the cloud gaming server that are performing operations on one or more corresponding video frames of the scene change.
[0078] At 650, the method includes delivering a first video frame to an encoder, the first video frame being within a range of video frames identified as having a scene change, the first video frame being scanned into the encoder for compression in preparation for streaming the first video frame to a client, such as when streaming content from a video game running on a cloud gaming server to a client over a network.
[0079] At 660, the method includes sending a scene change hint (e.g., notification) from the CPU to the encoder. Scene change recognition by the scene change logic and / or game logic provides downstream notification that one or more of the identified video frames or ranges of video frames contain a scene change. The downstream components then act accordingly to reduce processing time when the one or more identified video frames are processed through the cloud gaming server. For example, the scene change hint may be delivered from the scene change logic to the encoder via an API, where the API may be used to communicate between components or between applications running on components of the cloud gaming server.
[0080] At 670, the method includes encoding a corresponding video frame (e.g., a first video frame) received by an encoder based on a scene change hint as an I-frame, the encoder being configured to compress the video frame for streaming content from a video game running on a cloud gaming server to a client device over a network. As mentioned above, the encoder behaves differently depending on whether the video frame is identified as a scene change through receipt of the scene change hint. That is, the encoder is configured to determine whether a scene change hint has been received at the encoder for the video frame. In particular, when a scene change hint is received, the encoder compresses the corresponding video frame as an I-frame (e.g., a key frame).
[0081] Typically, when streaming content from a cloud gaming server, according to one embodiment of the present disclosure, video frames are compressed as P-frames until they cannot be compressed as P-frames (e.g., no previous I-frame or keyframe can be referenced) and unless otherwise indicated through a scene change hint. According to one embodiment of the present disclosure, GOP mode is disabled and scene detection is also disabled, so the encoder relies heavily on scene change hints to identify video frames as scene changes. That is, when no scene change hint is received, the encoder assumes that the video frame is not a scene change and encodes the video frame normally (e.g., as a P-frame). On the other hand, when a scene change hint is received, the corresponding video frame is encoded as an I-frame, regardless of whether the video frame should be encoded normally as a P-frame or an I-frame. Thus, when a scene change hint is received for a corresponding video frame, the encoder then compresses that video frame as an I-frame.
[0082] In an embodiment, the scene change hints complement the encoder's compression decision. In particular, the game may provide scene change hints and the encoder may be configured with a predefined or dynamically determined threshold (e.g., a high threshold). These thresholds are used together to determine whether a video frame should be encoded as an I-frame or a P-frame. In one scenario, the game may not provide a scene change hint for a video frame that shows an explosion (e.g., during a camera cut) and may not recommend encoding the video frame as an I-frame, but it may be more efficient to encode the frame as an I-frame as determined by the encoder. Specifically, the encoder also determines whether the explosion is large enough to merit compression as an I-frame. That is, the encoder determines that there is a scene change (e.g., an explosion) within a corresponding range of the video frame that meets or exceeds the threshold, regardless of the scene change detection by the scene change logic. For example, the encoder may determine that the difference between frames was large enough that a scene change was warranted, and the corresponding video frame is then encoded as an I-frame based on either a scene change hint or a determination by the encoder that a scene change meets or exceeds a threshold. In another scenario, the game may not provide a scene change hint for a video frame (e.g., showing an explosion during a camera cut) and therefore may not recommend encoding that video frame as an I-frame, but it may be more efficient to encode that frame as a P-frame as determined by the encoder. Specifically, the encoder also determines whether the burst is large enough to merit compression as an I-frame. That is, the encoder determines that the scene change identified by the scene change logic within the corresponding video frame does not meet or exceed a threshold. For example, the encoder determines that the difference between the frames falls below a threshold, thereby indicating that compression as a P-frame would be more efficient. As such, the encoder may terminate encoding of the corresponding video frame as an I-frame and encoding of the corresponding video frame as a P-frame.
[0083] 7 illustrates components of an example device 700 that can be used to implement aspects of various embodiments of the present disclosure. For example, FIG. 7 illustrates an exemplary hardware system suitable for streaming media content and / or receiving streamed media content, including providing scene change hints to an encoder for video frames generated during execution of a video game in order to reduce latency and provide more uniform latency between cloud gaming servers and clients, and to improve smoothness of a client's display of the video, in accordance with embodiments of the present disclosure. The block diagram illustrates a device 700 that may incorporate or be a personal computer, a server computer, a gaming console, a mobile device, or other digital device, each of which is suitable for implementing embodiments of the present invention. The device 700 includes a central processing unit (CPU) 702 for executing software applications and optionally an operating system. The CPU 702 may be comprised of one or more homogeneous or heterogeneous processing cores.
[0084] According to various embodiments, CPU 702 is one or more general-purpose microprocessors having one or more processing cores. Further embodiments may be implemented using one or more CPUs having a microprocessor architecture specifically adapted for highly parallel and computationally intensive applications, such as media and interactive entertainment applications, applications configured to perform graphics processing during game execution.
[0085] Memory 704 stores applications and data for use by CPU 702 and GPU 716. Storage 706 provides non-volatile storage and other computer-readable media for applications and data, and may include fixed disk drives, removable disk drives, flash memory devices, and CD-ROM, DVD-ROM, Blu-ray, HD-DVD, or other optical storage devices, as well as signal transmission and storage media. User input devices 708 communicate user input from one or more users to device 700, and examples may include a keyboard, mouse, joystick, touchpad, touchscreen, still or video recorder / camera, and / or microphone. The network interface 709 enables the device 700 to communicate with other computer systems over electronic communications networks, which may include wired or wireless communications over local area networks and wide area networks such as the Internet. The audio processor 712 is adapted to generate analog or digital audio output from instructions and / or data provided by the CPU 702, memory 704, and / or storage 706. The components of the device 700, including the CPU 702, the graphics subsystem including the GPU 716, the memory 704, the data storage 706, the user input devices 708, the network interface 709, and the audio processor 712, are connected via one or more data buses 722.
[0086] The graphics subsystem 714 is further connected to the data bus 722 and to the components of the device 700. The graphics subsystem 714 includes a graphics processing unit (GPU) 716 and a graphics memory 718. The graphics memory 718 includes a display memory (e.g., a frame buffer) used to store pixel data for each pixel of an output image. The graphics memory 718 may be integrated within the same device as the GPU 716, may be connected to the GPU 716 as a separate device, and / or may be implemented within the memory 704. The pixel data may be provided directly from the CPU 702 to the graphics memory 718. Alternatively, the CPU 702 provides data and / or instructions defining a desired output image to the GPU 716, which generates therefrom pixel data for one or more output images. The data and / or instructions defining the desired output image may be stored in the memory 704 and / or the graphics memory 718. In an embodiment, the GPU 716 includes 3D rendering capabilities to generate pixel data for output images from instructions and data defining geometry, lighting, shading, texturing, motion and / or camera parameters for a scene. The GPU 716 may further include one or more programmable execution units capable of executing shader programs.
[0087] Graphics subsystem 714 periodically outputs pixel data for images from graphics memory 718 to be displayed on display device 710 or projected by a projection system (not shown). Display device 710 can be any device capable of displaying visual information in response to signals from device 700, including CRT, LCD, plasma, and OLED displays. Device 700 can provide analog or digital signals to display device 710, for example.
[0088] Other embodiments for optimizing the graphics subsystem 714 can include multi-tenancy GPU operations where a GPU instance is shared among multiple applications, and distributed GPUs supporting a single game. The graphics subsystem 714 can be configured as one or more processing devices.
[0089] For example, graphics subsystem 714, according to one embodiment, may be configured to perform multi-tenancy GPU functionality, where one graphics subsystem may implement the graphics and / or rendering pipeline for multiple games, i.e., graphics subsystem 714 is shared between multiple running games.
[0090] In other embodiments, the graphics subsystem 714 includes multiple GPU devices that are combined to perform graphics processing for a single application running on a corresponding CPU. For example, multiple GPUs can perform alternative forms of frame rendering. In this case, GPU1 renders a first frame, GPU2 renders a second frame in successive frame cycles, and so on until the last GPU is reached, after which the first GPU renders the next frame (e.g., if there are only two GPUs, GPU1 renders the third frame). That is, the GPUs cycle when rendering frames. Rendering operations can be overlapped, and GPU2 may begin rendering the second frame before GPU1 finishes rendering the first frame. In another embodiment, multiple GPU devices can be assigned different shader operations in the rendering and / or graphics pipeline. A master GPU performs the main rendering and compositing. For example, in a group containing three GPUs, master GPU1 can perform the main rendering (e.g., first shader operations) and perform compositing of the output from slave GPU2 and slave GPU3. In this case, slave GPU2 can perform a second shader (e.g., fluid effects such as rivers) operation, slave GPU3 can perform a third shader (e.g., particle smoke) operation, and master GPU1 composites the results from each of GPU1, GPU2, and GPU3. In this way, different GPUs can be assigned to perform various shader operations (e.g., flag waving, wind, smoke generation, fire, etc.) to render a video frame. In yet another embodiment, each of the three GPUs can be assigned to a different object and / or portion of the scene corresponding to the video frame. In the above embodiments and implementations, these operations can be performed in the same frame period (concurrently in parallel) or in different frame periods (sequentially in parallel).
[0091] Accordingly, the present disclosure describes methods and systems configured to stream media content and / or receive streamed media content that include providing scene change hints to an encoder for video frames generated during execution of a video game for the purpose of reducing latency and providing more uniform latency between a cloud gaming server and a client, and to improve smoothness of a client's display of the video.
[0092] It should be understood that the various embodiments defined herein can be combined or incorporated into specific embodiments using various features disclosed herein. Thus, the examples provided are not limited to the various embodiments that can define more embodiments by combining various elements, but are merely some possible examples. In some examples, some embodiments may include fewer elements without departing from the spirit of the disclosed or equivalent embodiments.
[0093] Embodiments of the present disclosure may be practiced with a variety of computer system configurations, including handheld devices, microprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. Embodiments of the present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a wire-based or wireless network.
[0094] With the above embodiments in mind, it should be understood that the disclosed embodiments can employ various computer-implemented operations involving data stored in computer systems. These operations are operations requiring physical manipulation of physical quantities. Any of the operations described herein that form part of the disclosed embodiments are useful machine operations. The disclosed embodiments also relate to devices or apparatus for performing these operations. The apparatus can be specially constructed for the required purposes, or the apparatus can be a general-purpose computer selectively activated or configured by a computer program stored in the computer. In particular, various general-purpose machines can be used with computer programs written in accordance with the teachings herein, or it may be more convenient to construct a more specialized apparatus to perform the required operations.
[0095] The present disclosure can also be embodied as computer readable code on a computer readable medium. A computer readable medium is any data storage device capable of storing data that can be subsequently read by a computer system. Examples of computer readable media include hard drives, network attached storage (NAS), read only memory, random access memory, CD-ROM, CD-R, CD-RW, magnetic tape, and other optical and non-optical data storage devices. A computer readable medium can include computer readable tangible media distributed across networked computer systems such that the computer readable code is stored and executed in a distributed fashion.
[0096] Although the operations of the method have been described in a particular order, it should be understood that other housekeeping operations may be performed between operations, or operations may be arranged to occur at slightly different times, or operations may be distributed within the system to allow processing operations to occur at various intervals related to processing, so long as the processing of the overlay operations is performed in the desired manner.
[0097] Although the foregoing disclosure has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications can be practiced within the scope of the appended claims. Thus, the present embodiments are to be considered as illustrative and not restrictive, and the embodiments of the present disclosure are not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims.
Claims
1. 1. A method of encoding, comprising: A game logic built on a game engine of a video game is executed on a cloud gaming server to generate a plurality of video frames; executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic; identifying a range of video frames within the plurality of video frames that is predicted to include the scene change; generating a scene change hint using the scene change logic, the scene change hint identifying a range of the video frames, the range of video frames including the first video frame; delivering the first video frame to an encoder; sending the scene change hint from the scene change logic to the encoder; encoding the first video frame as an I-frame based on the scene change hint.
2. further comprising receiving the first video frame at the encoder; determining whether a scene change hint has been received at the encoder for the first video frame; encoding the first video frame normally when no scene change hint is received; The method of claim 1 , further comprising encoding the first video frame as an I-frame after determining that the scene change hint has been received.
3. further determining at the encoder that the predicted scene change within the video frame meets or exceeds a threshold, independent of detection by the scene change logic; The method of claim 1 , further comprising: encoding the first video frame as an I-frame based on the scene change hint or the encoder's determination that the scene change meets or exceeds the threshold.
4. further determining at the encoder that the scene change within the video frames identified by the scene change logic does not meet or exceed a threshold; terminating the encoding of the first video frame as an I-frame; The method of claim 1 , further comprising: encoding the first video frame normally.
5. 2. The method of claim 1 , wherein the scene change logic is integrated within or provided as an add-on to the game logic, and the scene change logic is configured to predict a scene change based on tracking of a game state collected when generating the plurality of video frames.
6. further comprising disabling group of pictures (GOP) mode in said encoder; The method of claim 1 , further comprising disabling scene change detection in the encoder.
7. further comprising predicting a scene change within the first video frame; the scene change hint identifies the first video frame; The method of claim 1 , wherein the range of the video frames is limited to the first video frame.
8. The method of claim 1 , wherein the scene change is predicted before the first video frame is generated.
9. A non-transitory computer readable medium storing a computer program for encoding, comprising: A program instruction for executing a game logic built on a game engine of a video game on a cloud gaming server to generate a plurality of video frames; and program instructions for executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic; and program instructions for identifying a range of video frames within the plurality of video frames that is predicted to include the scene change; generating a scene change hint using the scene change logic, the scene change hint identifying a range of the video frames, the range of video frames including a first video frame; program instructions for delivering the first video frame to an encoder; program instructions for sending the scene change hint from the scene change logic to the encoder; and A non-transitory computer-readable medium having program instructions for encoding the first video frame as an I-frame based on the scene change hint.
10. further comprising program instructions for receiving the first video frame at the encoder; program instructions for determining whether a scene change hint has been received at the encoder for the first video frame; program instructions for encoding the first video frame normally when no scene change hint is received; 10. The non-transitory computer readable medium of claim 9 having program instructions for encoding the first video frame as an I-frame after determining that the scene change hint has been received.
11. further comprising program instructions for determining at the encoder that the predicted scene change within the video frame meets or exceeds a threshold, independent of detection by the scene change logic; 10. The non-transitory computer-readable medium of claim 9 having program instructions for encoding the first video frame as an I-frame based on the scene change hint or the encoder's determination that the scene change meets or exceeds the threshold.
12. further comprising program instructions for determining at the encoder that the scene change within the video frames identified by the scene change logic does not meet or exceed a threshold. program instructions for completing the encoding of the first video frame as an I-frame; 10. The non-transitory computer readable medium of claim 9 having program instructions for encoding the first video frame normally.
13. 10. The non-transitory computer-readable medium of claim 9, wherein the scene change logic is integrated within or provided as an add-on to the game logic, and the scene change logic is configured to predict a scene change based on tracking of a game state collected when generating the plurality of video frames.
14. program instructions for disabling group of pictures (GOP) mode in the encoder; The non-transitory computer readable medium of claim 9 , further comprising program instructions for disabling scene change detection in the encoder.
15. further comprising program instructions for predicting a scene change within the first video frame; the scene change hint identifies the first video frame; The non-transitory computer-readable medium of claim 9 , wherein the range of video frames is limited to the first video frame.
16. The non-transitory computer-readable medium of claim 9 , wherein the scene change is predicted before the first video frame is generated.
17. 1. A computer system comprising: A processor; a memory coupled to the processor and having instructions stored therein, the instructions, when executed by the computer system, causing the computer system to: A game logic built on a game engine of a video game is executed on a cloud gaming server to generate a plurality of video frames; executing scene change logic to predict a scene change within the plurality of video frames, the prediction being based on a game state collected during execution of the game logic; identifying a range of video frames within the plurality of video frames that is predicted to include the scene change; generating a scene change hint using the scene change logic, the scene change hint identifying a range of the video frames, the range of video frames including the first video frame; delivering the first video frame to an encoder; sending the scene change hint from the scene change logic to the encoder; A computer system adapted to perform an encoding method including encoding the first video frame as an I-frame based on the scene change hint.
18. The method further comprises: receiving the first video frame at the encoder; determining whether a scene change hint has been received at the encoder for the first video frame; encoding the first video frame normally when no scene change hint is received; 20. The computer system of claim 17, further comprising: encoding the first video frame as an I-frame after determining that the scene change hint has been received.
19. The method further comprises: determining at the encoder that the predicted scene change within the video frame meets or exceeds a threshold, independent of detection by the scene change logic; 20. The computer system of claim 17, further comprising: encoding the first video frame as an I-frame based on the scene change hint or the encoder's determination that the scene change meets or exceeds the threshold.
20. The method further comprises: determining at the encoder that the scene change within the video frames identified by the scene change logic does not meet or exceed a threshold; terminating the encoding of the first video frame as an I-frame; 20. The computer system of claim 17, further comprising: encoding the first video frame normally.
21. 20. The computer system of claim 17, wherein in the method, the scene change logic is integrated within or provided as an add-on to the game logic, and the scene change logic is configured to predict a scene change based on tracking of a game state collected when generating the plurality of video frames.
22. The method further comprises: Disabling group of pictures (GOP) mode in the encoder; The computer system of claim 17 , further comprising disabling scene change detection in the encoder.
23. The method further comprises: predicting a scene change in the first video frame; the scene change hint identifies the first video frame; 20. The computer system of claim 17, wherein the range of video frames is limited to the first video frame.
Citation Information
Patent Citations
Utilization of Encoder Hardware for Preprocessing Video Content
JP2016504829A
Frame encoding with hints
JP2017517921A
Placement of an Adaptive Search Window for Video Encoding
JP2017526268A
Encoding control device and encoding control method
WO2014054325A1
