A light field 3D video playing method

CN117528048BActive Publication Date: 2026-10-27BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311515243.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2026-10-27
Estimated Expiration
2043-11-15

AI Technical Summary

Technical Problem

但在当前8K甚至更高分辨率标准下,传统的播放方法面临帧率不稳定、视频帧压缩失真等问题

Benefits of technology

[0003]本发明的目的在于提出一种光场3D视频播放方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117528048B_ABST
    Figure CN117528048B_ABST
Patent Text Reader

Abstract

The application provides a light field 3D video playing method. The method comprises four steps: storing file paths of all light field 3D video frames into a container; reading the light field 3D video frames into a one-way queue through an asynchronous thread; synchronously drawing the light field 3D video frames in the one-way queue into a front buffer by a main thread; and exchanging the front buffer and the back buffer according to a specified frame rate, and continuously drawing the light field 3D video frames to a light field 3D display screen. The application can stably and losslessly play the light field 3D video with a resolution of greater than or equal to 8K on the light field 3D display screen in real time.
Need to check novelty before this filing date? Find Prior Art

Description

I. Technical Field

[0001] This invention relates to video playback technology, and in particular to a light field 3D video playback method. II. Background Technology

[0002] Light field 3D displays are glasses-free 3D displays capable of providing realistic and vivid stereoscopic images. Light field 3D video refers to stereoscopic images played on a light field 3D display that offer a lifelike visual experience. Light field 3D video frames must be transmitted at a stable frame rate with lossless speed to play high-quality stereoscopic images. However, under current 8K and even higher resolution standards, traditional playback methods face problems such as unstable frame rates and video frame compression distortion. Therefore, there is an urgent need for a light field 3D video playback method specifically designed for light field 3D displays. III. Summary of the Invention

[0003] The purpose of this invention is to propose a light field 3D video playback method.

[0004] The method includes the following four steps:

[0005] Store the file paths of all light field 3D video frames in a container;

[0006] Light field 3D video frames are read into a one-way queue via an asynchronous thread;

[0007] The main thread synchronously draws the light field 3D video frames in the one-way queue to the back buffer;

[0008] The front and back buffers are swapped according to the specified frame rate, and the light field 3D video frames are continuously drawn onto the light field 3D display screen.

[0009] Furthermore, in the step of storing the file paths of all light field 3D video frames to the container, the light field 3D video frame refers to the stereoscopic image transmitted from the graphics card to the light field 3D display screen, and the file path can be any image path.

[0010] Furthermore, the number of file paths stored in the container is N.

[0011] Furthermore, the format of the light field 3D video frame can be any one of ".jpeg", ".jpg", ".png" or ".bmp".

[0012] Furthermore, the step of reading the light field 3D video frames into a one-way queue via an asynchronous thread specifically includes the following steps:

[0013] Create M asynchronous child threads, each containing a timestamp and a temporary buffer for storing light field 3D video frames;

[0014] The M asynchronous sub-threads retrieve the file paths of the light field 3D video frames from the container and record the timestamp t of the thread retrieving the file path. m ;

[0015] The M asynchronous sub-threads simultaneously read the light field 3D video frames from their respective file paths and store them in their respective temporary caches;

[0016] The timestamps t of the M asynchronous child threads m Sort in ascending order to obtain the smallest timestamp t. min ;

[0017] Minimum timestamp t min The corresponding light field 3D video frames are added to a one-way queue.

[0018] Furthermore, the M asynchronous sub-threads run in parallel without priority.

[0019] Furthermore, the unidirectional queue has a capacity limit, and its size is adjusted according to memory resource limitations.

[0020] Furthermore, the step of synchronously drawing the light field 3D video frames in the unidirectional queue to the back buffer in the main thread specifically includes the following steps:

[0021] Create a rendering window with a width of W and a height of H.

[0022] A double buffer is created to ensure that the light field 3D video frames are continuously refreshed and displayed, avoiding problems such as flickering and tearing;

[0023] Take a light field 3D video frame from the head of the unidirectional queue and render it to the back buffer of the double buffer.

[0024] Furthermore, the step of continuously rendering light field 3D video frames onto the light field 3D display screen by swapping the front buffer and the back buffer according to a specified frame rate specifically includes the following steps:

[0025] Determine the specified frame rate f;

[0026] Record the time interval Δt between the completion of the front and back buffer swap in the previous frame and the rendering of the light field 3D video frame to the back buffer in the current frame;

[0027] Calculate the waiting time t and start timing the wait;

[0028] Swap the front and back buffers and draw the current light field 3D video frame onto the light field 3D display.

[0029] Preferably, the playback frame rate of the light field 3D video is less than or equal to the specified frame rate f. IV. Description of the attached drawings

[0030] The foregoing aspects of the present invention will become further apparent and readily understood from the following detailed description taken in conjunction with the accompanying drawings and embodiments, wherein:

[0031] Appendix Figure 1 A flowchart of a light field 3D video playback method according to an embodiment of this application.

[0032] It should be understood that the above figures are only schematic and are not drawn to scale. V. Detailed Implementation Methods

[0033] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Optional embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of this application.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention pertains. The terminology used herein in the specification of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0035] The following will describe in detail a light field 3D video playback method proposed in this application, with reference to the embodiments and accompanying drawings disclosed in this application.

[0036] Appendix Figure 1 A flowchart of a light field 3D video playback method according to an embodiment of this application is shown. The method can be divided into the following steps:

[0037] Step S1: Store the file paths of all light field 3D video frames to the container;

[0038] Step S2: Read the light field 3D video frames into a one-way queue via an asynchronous thread;

[0039] Step S3: The main thread synchronously draws the light field 3D video frames in the one-way queue to the back buffer.

[0040] Step S4: Swap the front buffer and back buffer according to the specified frame rate, and continuously draw the light field 3D video frames onto the light field 3D display screen.

[0041] In one embodiment, step S1 involves using an integrated imaging 3D display screen as the display screen for playing light field 3D videos. The number of light field 3D video frames to be played is N = 2400. A container with a capacity of N = 2400 is created to store the file paths of the N = 2400 light field 3D video frames.

[0042] In one embodiment, step S2 includes the following steps:

[0043] Step S201: Create M=12 asynchronous sub-threads, each containing a timestamp and a temporary buffer for storing light field 3D video frames. Create a unidirectional queue with a capacity of C=25.

[0044] In step S202, M=12 asynchronous child threads retrieve the file paths of the light field 3D video frames from the container according to the order in which the file paths are saved in the container, and record the timestamp t of the thread retrieving the file path. m M=12 asynchronous sub-threads run concurrently, with no priority; that is, the system will automatically decide which thread retrieves the video frame path from the container first based on resource availability. In one embodiment, thread 2 retrieves path 1 from the container first and saves the earliest timestamp t2, while thread M=12 retrieves path 2 from the container first and saves the timestamp t. 12 And so on. M = 12 asynchronous child threads simultaneously read the light field 3D video frames from their respective file paths and store them in their respective temporary buffers.

[0045] Step S203, timestamp t of M = 12 asynchronous child threads m Sort in ascending order to obtain the smallest timestamp t. min =t2, if the one-way queue has not reached its capacity limit, then the minimum timestamp t will be used. min =t2 The light field 3D video frame corresponding to t2 is added to a one-way queue.

[0046] In one embodiment, step S3 requires creating a rendering window with a width of W = 7680 and a height of H = 4320; creating a double buffer to ensure continuous refresh and display of the light field 3D video frames, avoiding flickering and tearing; if there are light field 3D video frames in the unidirectional queue, the light field 3D video frames are retrieved from the head of the unidirectional queue and drawn onto the back buffer of the double buffer. During playback, the unidirectional queue is always in a dynamic enqueue and dequeue state.

[0047] In one embodiment, step S4 involves determining a specified frame rate f = 30 and recording the time interval Δt = 0.0201 seconds between the previous frame's completion of the front and rear buffer swap and the rendering of the light field 3D video frame to the rear buffer in the current frame. The waiting time t = 1 / f - Δt = 0.0132 seconds is calculated, and timing begins. After the timing wait t = 0.0132 seconds, the front and rear buffers are swapped, and the current light field 3D video frame is rendered onto the light field 3D display screen, allowing the current light field 3D animation frame to be seen on the light field 3D display screen.

[0048] This invention uses multiple asynchronous threads to read in parallel, while the main thread synchronously renders the light field 3D video frames to the light field 3D display screen, enabling lossless real-time playback of light field 3D videos with a resolution of ≥8K at a stable frame rate.

Claims

1. A method for playing 3D video using light field, characterized in that, The method includes the following steps: Store the file paths of all light field 3D video frames in a container; Light field 3D video frames are read into a one-way queue via an asynchronous thread; The main thread synchronously draws the light field 3D video frames in the one-way queue to the back buffer; The front and back buffers are swapped according to the specified frame rate, and the light field 3D video frames are continuously drawn onto the light field 3D display screen. The step of reading light field 3D video frames into a one-way queue via asynchronous threads specifically includes the following steps: creating M asynchronous child threads, each containing a timestamp and a temporary buffer for storing light field 3D video frames; the M asynchronous child threads pulling the file paths of the light field 3D video frames from the container and recording the timestamp t of the thread pulling the file path. m M asynchronous child threads simultaneously read light field 3D video frames from their respective fetched file paths and store them in their respective temporary buffers; the timestamps t of the M asynchronous child threads are... m Sort in ascending order to obtain the smallest timestamp t. min ; Set the minimum timestamp t min The corresponding light field 3D video frames are added to a one-way queue; among them, M asynchronous sub-threads run in parallel without priority, and the one-way queue has a capacity limit, the size of which is adjusted according to the memory resource limit. The step of synchronously drawing light field 3D video frames in the unidirectional queue to the back buffer in the main thread specifically includes the following steps: creating a rendering window with a width of W and a height of H; creating a double buffer to ensure that the light field 3D video frames are continuously refreshed and displayed, avoiding problems such as flickering and tearing; and retrieving the light field 3D video frame from the head of the unidirectional queue and drawing it to the back buffer of the double buffer.

2. The light field 3D video playback method according to claim 1, characterized in that, In the step of storing the file paths of all light field 3D video frames to the container, the light field 3D video frame refers to the stereoscopic image transmitted from the graphics card to the light field 3D display screen, and the file path can be any image path.

3. A light field 3D video playback method according to claim 1 or 2, characterized in that, The format of the light field 3D video frame can be any one of ".jpeg", ".jpg", ".png" or ".bmp".

4. The light field 3D video playback method according to claim 1, characterized in that, The step of continuously rendering light field 3D video frames onto the light field 3D display screen by swapping the front buffer and the back buffer according to a specified frame rate specifically includes the following steps: Determine the specified frame rate f; Record the time interval Δt between the completion of the front and back buffer swap in the previous frame and the rendering of the light field 3D video frame to the back buffer in the current frame; Calculate the waiting time t and start timing the wait; Swap the front and back buffers and draw the current light field 3D video frame onto the light field 3D display.

5. A light field 3D video playback method according to claim 1 or 4, characterized in that, The playback frame rate of the light field 3D video is less than or equal to the specified frame rate f.

Citation Information

Patent Citations

  • Cross-running environment display output sharing method based on heterogeneous cache access

    CN114741081A

  • Video sending and displaying method and device, electronic equipment and storage medium

    CN115361579A