CN114339338B - Image custom rendering method based on vehicle-mounted video and storage medium - Google Patents

Image custom rendering method based on vehicle-mounted video and storage medium Download PDF

Info

Publication number
CN114339338B
CN114339338B CN202111652240.6A CN202111652240A CN114339338B CN 114339338 B CN114339338 B CN 114339338B CN 202111652240 A CN202111652240 A CN 202111652240A CN 114339338 B CN114339338 B CN 114339338B
Authority
CN
China
Prior art keywords
video
image
window
vehicle
rendering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111652240.6A
Other languages
Chinese (zh)
Other versions
CN114339338A (en
Inventor
林炜钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou Desay SV Automotive Co Ltd
Original Assignee
Huizhou Desay SV Automotive Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou Desay SV Automotive Co Ltd filed Critical Huizhou Desay SV Automotive Co Ltd
Priority to CN202111652240.6A priority Critical patent/CN114339338B/en
Publication of CN114339338A publication Critical patent/CN114339338A/en
Application granted granted Critical
Publication of CN114339338B publication Critical patent/CN114339338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Fittings On The Vehicle Exterior For Carrying Loads, And Devices For Holding Or Mounting Articles (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to the technical field of video display, and provides an image custom rendering method and a storage medium based on a vehicle-mounted video, wherein the method comprises the following steps: s1, sending a video image according to an acquired video display request; s2, decoding the obtained video image and then rendering a video window; s3, stopping image rendering when the video stopping request is detected, and maintaining the video window to display the video image of the last frame; and S4, rendering a preset image to the video window. When the video stopping request is detected, stopping image rendering, and maintaining the video window to display the video image of the last frame, wherein at the moment, a preset image is rendered to the video window, so that the window residual image can be rapidly removed; meanwhile, when the multiple windows are switched, the preset image can be set according to the colors of the windows to be rendered, and therefore the effect of smooth transition among the windows is achieved.

Description

Image custom rendering method based on vehicle-mounted video and storage medium
Technical Field
The invention relates to the technical field of video display, in particular to an image custom rendering method based on a vehicle-mounted video and a storage medium.
Background
In the internet era, along with popularization and popularization of devices such as intelligent terminals, users continuously pursue high-quality audio and video experience.
The method for playing video in the prior art comprises the following steps: after the terminal receives the video stream through the browser, the video stream is sequentially subjected to decapsulation and decoding processing based on an open source streaming media processing tool Ffmegs to obtain decoded audio data and video frames, the decoded video frames are rendered in a GPU (Graphics Processing Unit, a graphic processor) by using Canvas in a WebGL (Web Graphics Library, a Web graphic library), and then the decoded audio data and the rendered video frames are synchronously played, so that video playing is realized through software decoding.
On an Android system, vehicle-mounted video streaming media applications are more and more, and personalized requirements are higher and higher. When the on-board host stops video rendering, the video window will remain displaying the last frame image (for example, carPlay in the following diagram), which has the following problems:
(1) When the video window is maintained at the foreground, the residual image cannot be removed;
(2) The video window is automatically released by the Android system in a hidden state, and the window needs to be rebuilt when the video window is displayed again, so that the efficiency is affected;
(3) When the multi-window is switched, the problem of screen flash is easy to occur due to the residual image, and the effect of smooth transition between windows cannot be achieved.
Disclosure of Invention
The invention provides an image custom rendering method based on a vehicle-mounted video and a storage medium, which solve the technical problem that the existing vehicle-mounted video streaming media display scheme has limitations, and residual images cause screen flashing when a plurality of windows are switched because a video window is maintained in the last frame of image.
In order to solve the technical problems, the invention provides an image custom rendering method based on a vehicle-mounted video, which comprises the following steps:
s1, sending a video image according to an acquired video display request;
s2, decoding the obtained video image and then rendering a video window;
s3, stopping image rendering when the video stopping request is detected, and maintaining the video window to display the video image of the last frame;
and S4, rendering a preset image to the video window.
When the basic scheme detects that the video stopping request is detected, stopping image rendering, and enabling the video window to maintain displaying the video image of the last frame, at the moment, rendering a preset image to the video window, so that the window residual image can be rapidly removed; meanwhile, when the multiple windows are switched, the preset image can be set according to the colors of the windows to be rendered, and therefore the effect of smooth transition among the windows is achieved.
In a further embodiment, the step S4 includes the steps of:
s41, acquiring a reference of a window object of the video window;
s42, locking the video window and acquiring a next writable display buffer area;
s43, filling a preset image into the display buffer area;
s44, unlocking the video window, and performing window rendering according to the display buffer zone;
s45, releasing the reference of the window object of the video window and disconnecting the connection.
When the video playing of the current video window is finished, the reference of the window object is directly acquired, the video window is locked, the window is prevented from flickering, the next writable display buffer zone is acquired, the preset image is filled in, the video window is unlocked at the moment, window rendering is carried out on the display buffer zone, the current video window is subjected to custom rendering according to the preset image, and the effect of smooth transition among the windows can be achieved.
In a further embodiment, the invention further comprises the steps of:
s0, manufacturing a custom RGB image according to a video display window to serve as a preset image;
the video display window is a display window of a vehicle-mounted display screen.
According to the scheme, the customized RGB image is manufactured according to the video display window of the vehicle-mounted display screen, and the customized rendering of any RGB image to the video window can be realized under multiple scenes, so that personalized display is performed.
In a further embodiment, the step S4 further includes:
s40, setting the format and the size of a window buffer area according to the image parameters of the preset image;
the image parameters include RGB format and image resolution.
In a further embodiment, the step S1 specifically includes: and the streaming media server receives a video display request sent by the vehicle-mounted host, performs image decoding and rendering to obtain a video image, and sends the video image to the vehicle-mounted host.
In a further embodiment, the step S2 specifically includes: and the vehicle-mounted host decodes the acquired video image to obtain RGB data and renders the RGB data to a video window.
In further embodiments, the RGB format comprises RGB565, RGB555, RGB24, or RGB32.
The invention also provides a storage medium, on which a computer program is stored, the computer program being used for realizing the image custom rendering method based on the vehicle-mounted video. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
Drawings
Fig. 1 is a workflow diagram of an image custom rendering method based on a vehicle-mounted video according to an embodiment of the present invention;
fig. 2 is a video window switching diagram provided in an embodiment of the present invention.
Detailed Description
The following examples are given for the purpose of illustration only and are not to be construed as limiting the invention, including the drawings for reference and description only, and are not to be construed as limiting the scope of the invention as many variations thereof are possible without departing from the spirit and scope of the invention.
Example 1
The image custom rendering method based on the vehicle-mounted video provided by the embodiment of the invention, as shown in fig. 1, comprises the following steps S0-S4:
s0, manufacturing a custom RGB image according to a video display window to serve as a preset image;
the video display window is a display window of a vehicle-mounted display screen.
According to the embodiment, the customized RGB image is manufactured according to the video display window of the vehicle-mounted display screen, and the customized rendering of any RGB image to the video window can be realized under multiple scenes, so that personalized display is performed.
S1, sending video images according to an acquired video display request, wherein the video images specifically comprise: the streaming media server receives a video display request sent by the vehicle-mounted host, performs image decoding and rendering to obtain a video image, and sends the video image to the vehicle-mounted host.
S2, decoding the obtained video image and then rendering a video window, wherein the video window specifically comprises the following steps: and the vehicle-mounted host decodes the acquired video image to obtain RGB data and renders the RGB data to a video window.
S3, stopping image rendering when the video stopping request is detected, and maintaining the video window to display the video image of the last frame;
and S4, rendering a preset image to the video window.
In a further embodiment, the step S4 includes steps S40 to S44:
s40, acquiring an ANativeWindow handle from the video window, and setting the format and the size of a window buffer area according to the image parameters of the preset image;
in this embodiment, the image parameters include RGB format and image resolution.
In this embodiment, the RGB formats include, but are not limited to, RGB565, RGB555, RGB24, RGB32.
S41, acquiring a reference of a window object of the video window;
s42, locking the video window and acquiring a next writable display buffer area;
s43, filling a preset image into the display buffer area;
s44, unlocking the video window, and performing window rendering according to the display buffer zone;
s45, releasing the reference of the window object of the video window and disconnecting the connection.
When the video playing of the current video window is finished, the embodiment directly acquires the reference of the window object, locks the video window, prevents the window from flickering, acquires the next writable display buffer zone, fills the preset image, unlocks the video window at the moment, performs window rendering on the display buffer zone, performs custom rendering on the current video window according to the preset image, and can achieve the effect of smooth transition between the windows.
Referring to fig. 2, a specific custom rendering theory of operation is as follows:
wherein, the physical window a, one physical window a (i.e. the video display window) may include a plurality of virtual windows (e.g. virtual window B, virtual window C), and the physical window a may also have a background color;
taking the example that the virtual window B (i.e. the video window) represents the virtual window of the video streaming media, and the virtual window C represents the windows of other apps: when the video streaming media stops video transmission and the last frame image is remained (such as dark gray block in the middle of fig. 2), when the video streaming media is switched with the virtual window C, the virtual window B is rendered to the background color of the physical window a (such as white in fig. 2), so that the problem of screen flashing is avoided.
When the embodiment of the invention detects that the video stopping request is detected, stopping image rendering, and enabling the video window to maintain displaying the video image of the last frame, at the moment, rendering the preset image to the video window, so that the window residual image can be rapidly removed; meanwhile, when the multiple windows are switched, the preset image can be set according to the colors of the windows to be rendered, and therefore the effect of smooth transition among the windows is achieved.
Example 2
The invention also provides a storage medium, on which a computer program is stored, the computer program being used for realizing the image custom rendering method based on the vehicle-mounted video provided by the embodiment. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The above examples are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present invention should be made in the equivalent manner, and the embodiments are included in the protection scope of the present invention.

Claims (6)

1. The image custom rendering method based on the vehicle-mounted video is characterized by comprising the following steps of:
s1, sending a video image according to an acquired video display request;
s2, decoding the obtained video image and then rendering a video window;
s3, stopping image rendering when the video stopping request is detected, and maintaining the video window to display the video image of the last frame;
s4, rendering a preset image to the video window;
the step S4 includes the steps of:
s41, acquiring a reference of a window object of the video window;
s42, locking the video window and acquiring a next writable display buffer area;
s43, filling a preset image into the display buffer area;
s44, unlocking the video window, and performing window rendering according to the display buffer zone;
s45, releasing the reference of the window object of the video window and disconnecting the connection;
the method also comprises the steps of:
s0, manufacturing a custom RGB image according to a video display window to serve as a preset image;
the video display window is a physical display window of the vehicle-mounted display screen;
the video window is a virtual display window of the vehicle-mounted display screen.
2. The method for image custom rendering based on vehicle video according to claim 1, wherein the step S4 further comprises:
s40, setting the format and the size of a window buffer area according to the image parameters of the preset image;
the image parameters include RGB format and image resolution.
3. The method for image custom rendering based on vehicle-mounted video according to claim 1, wherein the step S1 is specifically: and the streaming media server receives a video display request sent by the vehicle-mounted host, performs image decoding and rendering to obtain a video image, and sends the video image to the vehicle-mounted host.
4. The method for image custom rendering based on vehicle-mounted video according to claim 3, wherein the step S2 is specifically: and the vehicle-mounted host decodes the acquired video image to obtain RGB data and renders the RGB data to a video window.
5. The image custom rendering method based on the vehicle-mounted video as claimed in claim 2, wherein: the RGB formats include RGB565, RGB555, RGB24, or RGB32.
6. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for implementing an image custom rendering method based on an on-vehicle video according to any one of claims 1 to 5.
CN202111652240.6A 2021-12-30 2021-12-30 Image custom rendering method based on vehicle-mounted video and storage medium Active CN114339338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111652240.6A CN114339338B (en) 2021-12-30 2021-12-30 Image custom rendering method based on vehicle-mounted video and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111652240.6A CN114339338B (en) 2021-12-30 2021-12-30 Image custom rendering method based on vehicle-mounted video and storage medium

Publications (2)

Publication Number Publication Date
CN114339338A CN114339338A (en) 2022-04-12
CN114339338B true CN114339338B (en) 2024-04-05

Family

ID=81019634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111652240.6A Active CN114339338B (en) 2021-12-30 2021-12-30 Image custom rendering method based on vehicle-mounted video and storage medium

Country Status (1)

Country Link
CN (1) CN114339338B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5220312A (en) * 1989-09-29 1993-06-15 International Business Machines Corporation Pixel protection mechanism for mixed graphics/video display adaptors
CN105578295A (en) * 2014-10-16 2016-05-11 腾讯科技(深圳)有限公司 Video playing control method and equipment thereof
CN105979339A (en) * 2016-05-25 2016-09-28 腾讯科技(深圳)有限公司 Window display method and client
CN110727825A (en) * 2019-09-20 2020-01-24 彩讯科技股份有限公司 Animation playing control method, device, server and storage medium
CN111710308A (en) * 2020-06-11 2020-09-25 Oppo(重庆)智能科技有限公司 Display method, display, terminal and storage medium
CN112997245A (en) * 2018-11-14 2021-06-18 韦斯特尔电子工业和贸易有限责任公司 Method, computer program and apparatus for generating an image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5220312A (en) * 1989-09-29 1993-06-15 International Business Machines Corporation Pixel protection mechanism for mixed graphics/video display adaptors
CN105578295A (en) * 2014-10-16 2016-05-11 腾讯科技(深圳)有限公司 Video playing control method and equipment thereof
CN105979339A (en) * 2016-05-25 2016-09-28 腾讯科技(深圳)有限公司 Window display method and client
CN112997245A (en) * 2018-11-14 2021-06-18 韦斯特尔电子工业和贸易有限责任公司 Method, computer program and apparatus for generating an image
CN110727825A (en) * 2019-09-20 2020-01-24 彩讯科技股份有限公司 Animation playing control method, device, server and storage medium
CN111710308A (en) * 2020-06-11 2020-09-25 Oppo(重庆)智能科技有限公司 Display method, display, terminal and storage medium

Also Published As

Publication number Publication date
CN114339338A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN109600666B (en) Video playing method, device, medium and electronic equipment in game scene
US10891032B2 (en) Image reproduction apparatus and method for simultaneously displaying multiple moving-image thumbnails
CN111899322B (en) Video processing method, animation rendering SDK, equipment and computer storage medium
ES2395718T3 (en) Technique to simulate the grain of a film in an encoded video
US6803968B1 (en) System and method for synthesizing images
CN109640167B (en) Video processing method and device, electronic equipment and storage medium
US10440360B2 (en) Video processing system
CN105959724B (en) Video data processing method and device
CN113457160B (en) Data processing method, device, electronic equipment and computer readable storage medium
US8237741B2 (en) Image processing apparatus, image processing method, and image processing program
CN113423012B (en) Video processing method, server, and computer-readable storage medium
WO2021237569A1 (en) Encoding method, decoding method, apparatus and system
US11967345B2 (en) System and method for rendering key and fill video streams for video processing
CN110187858B (en) Image display method and system
CN110049347B (en) Method, system, terminal and device for configuring images on live interface
CN114339338B (en) Image custom rendering method based on vehicle-mounted video and storage medium
CN117499755A (en) Method for embedding watermark or subtitle into hard decoding video based on GPU hard layer
CN113037947B (en) Method for coding spatial information in continuous dynamic image
CN110597577A (en) Head-mounted visual equipment and split-screen display method and device thereof
CN115866254A (en) Method and equipment for transmitting video frame and camera shooting parameter information
US8462168B2 (en) Decompression system and method for DCT-base compressed graphic data with transparent attribute
JP4402088B2 (en) Image processing method and apparatus, and electronic apparatus using them
CN113596453A (en) Video compression and decompression method, device, equipment and storage medium
CN113014834B (en) Picture subtitle display method and device and related device
CN118214872A (en) Ultra-high definition lossless image coding and decoding method and system

Legal Events

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