WO2023004995A1 - 一种视频矩阵中视频无缝切换方法及*** - Google Patents
一种视频矩阵中视频无缝切换方法及*** Download PDFInfo
- Publication number
- WO2023004995A1 WO2023004995A1 PCT/CN2021/122615 CN2021122615W WO2023004995A1 WO 2023004995 A1 WO2023004995 A1 WO 2023004995A1 CN 2021122615 W CN2021122615 W CN 2021122615W WO 2023004995 A1 WO2023004995 A1 WO 2023004995A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- control module
- image
- video
- read
- frame
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 239000011159 matrix material Substances 0.000 title claims abstract description 23
- 230000001360 synchronised effect Effects 0.000 claims description 7
- 230000009191 jumping Effects 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 7
- 238000004590 computer program Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008014 freezing Effects 0.000 description 2
- 238000007710 freezing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001364 causal effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/268—Signal distribution or switching
Definitions
- the invention relates to the technical field of video switching, in particular to a video seamless switching method and system in a video matrix.
- a video matrix is required.
- There are multiple inputs in the video matrix and each channel has a different video source.
- the output in the video matrix is also an output, and each output can output a different video source.
- the video of any input channel can be selected to be output on any output channel. In this process, video switching is involved, and the video source of the current input channel is switched to the input source of another input channel for output. .
- the current output video source of output channel a is video source c1 of input channel b1, now it is necessary to switch the output video source of output channel a to video source c2 of input channel b2, that is, switch the video source c1 of input channel b1 to Input video source c2 of channel b2 to complete video switching.
- one of the purposes of the present invention provides a video seamless switching method in a video matrix, which can solve the problem of image tearing during video switching;
- the second object of the present invention is to provide a video seamless switching system in a video matrix, which can solve the problem of image tearing during video switching;
- One of the technical solutions to realize the purpose of the present invention is: a method for seamlessly switching videos in a video matrix, comprising the following steps:
- Step 1 dividing the memory addresses on the memory for storing video data into several storage spaces, each of which includes several memory addresses;
- Step 2 If the controller does not receive the video switching instruction, then execute step 3, otherwise, execute step 4, wherein the video switching instruction includes target channel information, and the target channel information includes target input channel and target output channel;
- Step 3 The write control module in the controller receives the video data of the current input channel and writes it into the memory according to the image frame.
- One frame of image corresponds to a storage space in the memory
- the read control module in the controller reads the video data in the memory.
- the image frame is output on the current output channel. Whenever the write control module finishes writing a complete frame of image, it writes the next complete frame of image to the next storage space. Whenever the read control module reads the current A complete frame of image in the storage space, read a complete frame of image in the next storage space,
- the read-write sequence between the write control module writing video data to the memory and the read control module reading video data from the memory is read and write according to preset rule 1:
- Preset rule 1 After the read control module and the write control module start reading and writing, according to the memory address sequence, the write control module writes at least one complete frame of image before the read control module starts to read video data, and each time the write control module After the module writes a complete frame of image, the read control module starts to read the next frame of image; whenever the read control module reads a complete frame of image, the write control module starts to write the next frame of image, so that the write control The module and the read control module maintain orderly and synchronous reading and writing;
- Step 4 While the video switching instruction remains valid, the write control module jumps back to the first address of the currently written storage space, writes a frame of image in the video data of the switched target input channel to the current storage space, and the read control module jumps back to The first address of the currently read storage space, read a frame of image to the current storage space, and output the image frame to the target output channel, until the video switching command fails, the write control module and the read control module turn to the respective next memory space, And continue to read and write the next image frame.
- the memory is RAM memory or ROM memory.
- the memory addresses of any two adjacent storage spaces are separated by at least one memory address, so that the memory addresses of any two adjacent storage spaces are not continuous.
- the video switching instruction is sent by a channel switching device.
- the effective time of the video switching instruction is the duration occupied by several frames of images.
- the effective time of the video switching instruction is the duration occupied by two frames of images.
- the video switching instruction remains valid for 0.033 seconds.
- the video switching command is a level signal, and the video switching command remains valid means that the video switching command is at a high level.
- the second technical solution to achieve the purpose of the present invention is: a video seamless switching system in a video matrix, including a controller, a memory and a channel switching device, the memory and the channel switching device are all connected to the controller electrical appliance,
- the memory is used to receive the image frames output by the controller through the output channel.
- One frame of image is stored in one storage space, and different frames of images are stored in different storage spaces.
- the channel switching device is used to send a video switching instruction to the controller, the video switching instruction includes a target channel, and the target channel includes a target input channel and a target output channel,
- a controller the controller includes a read control module and a write control module, the controller is used to receive the video data input by the input channel, and perform corresponding steps according to whether the receiving video switching instruction is received, if yes, then perform step 3, if not, Then execute step 4,
- Step 3 The write control module in the controller receives the video data of the current input channel and writes it into the memory according to the image frame.
- One frame of image corresponds to a storage space in the memory
- the read control module in the controller reads the video data in the memory.
- the image frame is output on the current output channel. Whenever the write control module finishes writing a complete frame of image, it writes the next complete frame of image to the next storage space. Whenever the read control module reads the current A complete frame of image in the storage space, read a complete frame of image in the next storage space,
- the read-write sequence between the write control module writing video data to the memory and the read control module reading video data from the memory is read and write according to preset rule 1:
- Preset rule 1 After the read control module and the write control module start reading and writing, according to the memory address sequence, the write control module writes at least one complete frame of image before the read control module starts to read video data, and each time the write control module After the module writes a complete frame of image, the read control module starts to read the next frame of image; whenever the read control module reads a complete frame of image, the write control module starts to write the next frame of image, so that the write control The module and the read control module maintain orderly and synchronous reading and writing;
- Step 4 During the effective period of the video switching instruction, the write control module jumps back to the first address of the currently written storage space, writes a frame of image in the switched target channel video data to the current storage space, and the read control module jumps back to the current Read the first address of the storage space, read a frame of image to the current storage space, until the video switching command fails, the write control module and the read control module turn to the respective next memory space, and continue to read and write the next image frame.
- the present invention enables the output image to always be a complete frame image during the video switching process, rather than a half-frame image or multi-frame image mixed with multiple input channels, thereby avoiding the In the event of problems such as black screen and image tearing, ensure smooth and seamless video switching, and the video switching command remains effective for an extreme time (usually 0.033 seconds), the human eye cannot detect the effect of image freezing, and the human feeling is instantaneous switching, Switching is very smooth, realizing seamless switching of high-quality video.
- Fig. 1 is a schematic frame diagram of the present invention.
- a kind of video seamless switching method in the video matrix comprises the following steps:
- Step 1 Divide the memory address on the memory for storing video data into several storage spaces, N storage spaces are divided in FIG. 1 .
- Each storage space stores a frame of image in the video data, and each storage space includes several memory addresses, the first memory address in the storage space is the head address, and the last memory address is the tail address.
- the memory address of the first frame storage space used to store the first frame image in the video data is 1-10000, which includes 10000 memory addresses, wherein memory address 1 (i.e. the frontmost memory address) is the first address , the memory address 10000 (that is, the last memory address) is the tail address.
- the memory is usually a cache device, and may be a RAM memory or a ROM memory.
- the memory addresses of any two adjacent storage spaces are separated by at least one memory address, so that the memory addresses of any two adjacent storage spaces are not continuous.
- the first frame storage space and the second frame storage space are two adjacent storage spaces
- the memory address of the first frame storage space is 1-10000
- the memory address of the second storage space is 20000-30000
- the first storage space The last address of the space is 10000
- the first address of the second storage space is 20000, so there are multiple memory addresses between the last address of the first storage space and the first address of the second storage space, so the two are not continuous.
- the storage space occupied by one frame of image is not all integers.
- Step 2 If the controller does not receive the video switching instruction, go to step 3; otherwise, go to step 4.
- the video switching instruction includes the target channel information
- the target channel information includes the target input channel and the target output channel, so that the current input channel is switched to the target input channel to receive video data, and the current output channel is switched to the target output channel to output from the target input channel. received video data.
- a plurality of input channels and a plurality of output channels constitute the video matrix.
- the controller can receive a video switching instruction from the channel switching device for controlling video switching.
- the channel switching device can be MCU or ARM or other chips, and can be made into a separate module.
- Step 3 The write control module in the controller receives the video data of the current input channel and writes it into the memory according to the image frame, and one frame of image corresponds to a storage space in the memory.
- the read control module in the controller reads the video data currently stored in the memory and reads them by image frame, and outputs the read image frame on the current output channel. Whenever the write control module finishes writing a complete frame of image, it writes the next complete frame of image to the next storage space, and so on, continuously writes new image frames until all image frames or memory are written The capacity is full. Similarly, whenever the read control module reads a complete frame of image in the current storage space, it reads a complete frame of image in the next storage space, and continuously reads new image frames until all image frames are read or a stop signal is received. Read instructions.
- the read-write sequence between the write control module writing video data to the memory and the read control module reading video data from the memory is read and write according to preset rule 1:
- Preset rule 1 After the read control module and the write control module start reading and writing, according to the memory address sequence, the write control module writes at least one complete frame of image before the read control module starts to read video data, and each time the write control module After the module writes a complete frame of image, the read control module begins to read the next frame of image; whenever the read control module reads a complete frame of image, the write control module begins to write the next frame of image, so that The write control module and the read control module maintain orderly and synchronous read and write. By maintaining the orderly and synchronous reading and writing of the writing control module and the reading control module, it can be ensured that the reading control module can always read a complete frame of image, preventing half-frame images from appearing in the output image.
- the write control module starts to write the next frame of image after the read control module reads a complete frame of image, which is not a causal or conditional restriction relationship, but indicates that the read control module Cooperate with the write control module in the read and write time, that is, whenever the read control module reads a complete frame of image, just when the write control module starts to write the next frame of image, or conversely, whenever the write control module starts When the next frame of image is written, the read control module just finishes reading one frame of image, and the two read and write control modules cooperate with each other in the read and write time.
- the write control module and the read control module when the read control module and the write control module are powered on and start to read and write, the write control module and the read control module usually start to read and write from the first memory address according to the sequence of memory addresses from low to high or from high to low. , of course, it is also possible to start reading and writing from a certain memory address in the middle.
- starting from the first memory address is taken as an example.
- the read control module After the write control module writes the first frame image to the first memory address, the read control module starts from the first memory address.
- a memory address reads the first frame image and outputs it, then, after the write control module continues to write the second frame image to the next memory address (i.e. the second memory address), the read control module reads from the second memory address
- the second frame of image is output, and so on.
- the read control module always lags behind a memory address to maintain orderly and synchronous read and write.
- Step 4 While the video switching instruction remains valid, the write control module jumps back to the first address of the currently written storage space, writes a frame of image in the video data of the switched target input channel to the current storage space, and the read control module jumps back to The first address of the currently read storage space reads a frame of image in the current channel video data before switching to the current storage space, until the video switching command fails, the write control module and the read control module stop writing to the respective current storage space Read and write image frames, but turn to the next memory space to continue reading and writing the next image frame, and output the image frame to the target output channel.
- the effective time of the video switching instruction is the duration occupied by two frames of images, or the duration occupied by several other frames of images, but the effective duration of the video switching instruction cannot be too long.
- the video switching command remains valid for 0.033 seconds, which is equivalent to the time taken by two frames of images. In such an extreme time, the human eye cannot feel the video switching, so as to realize the seamless switching of the video.
- the failure of the video switching command means that the controller does not receive the video switching command or after the received video switching command disappears, that is, neither the read-write control module receives the video switching command.
- the video switching command is usually a level signal. When the video switching command maintains a high level, the video switching command is valid, and both the read and write control modules receive the video switching command; when the video switching command maintains a low level (usually zero level) , the video switching command is invalid, and neither the read-write control module receives the video switching command.
- the write control module is writing the second frame image of the current channel to the second storage space
- the read control module is reading the first frame of image from the first storage space (the first frame of image comes from the video data of the current channel).
- the write control module jumps back to the first address of the second storage space from the tail address of the second storage space after the second storage space of the item completes writing the second frame image, Write a frame of image of the target input channel to the second storage space, after the read control module finishes reading the first frame of image in the first storage space, jump back from the end address of the first storage space to the first address of the first storage space , continue to read the first frame of image from the first storage space until the video switching command becomes invalid (that is, after switching), the write control module writes the third frame of image to the third storage space, and the read control module reads the second frame of image to the second storage space image frames in the second storage space (the image frames at this time are video data from the target input channel), and proceed sequentially.
- the output image is always a complete one-frame image, rather than a half-frame image or multi-frame image mixed with multiple input channels, thereby avoiding black screens and images during the switching process.
- the video switching command remains effective for an extreme time (usually 0.033 seconds).
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
- the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Controls And Circuits For Display Device (AREA)
- Studio Circuits (AREA)
Abstract
本发明公开一种视频矩阵中视频无缝切换方法及***,方法包括:将用于存储视频数据的存储器上的存储器地址划分为若干存储空间;若控未接收到视频切换指令,则执行正常读写视频数据步骤,若接收到视频切换指令,则执行步骤:视频切换指令维持有效期间,写控制模块跳回当前写入的存储空间的首地址,向当前存储空间写入切换后的目标通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取一帧图像,直至视频切换指令失效,写控制模块和读控制模块转向各自的下一个存储器空间,并继续读写下一个图像帧。本发明实现视频无缝切换且避免切换过程中出现黑屏、图像撕裂等问题,保证流畅地无缝切换视频。
Description
本发明涉及视频切换技术领域,具体涉及一种视频矩阵中视频无缝切换方法及***。
在很多需要应用到的视频场景中,经常有视频源多路输入、多路输出的需求,也即需要用到视频矩阵。视频矩阵中的输入有多路,每一路有不同的视频源,视频矩阵中的输出同样也是输出,每一路输出可以输出不同的视频源。通过视频矩阵可以选择任意一路输入通道的视频在任意一路的输出通道进行输出,在这一过程中,涉及到视频切换,以及将当前输入通道的视频源切换为另一输入通道的输入源进行输出。例如,输出通道a当前输出的视频源为输入通道b1的视频源c1,现在需要在输出通道a输出的视频源切换为输入通道b2的视频源c2,也即将输入通道b1的视频源c1切换为输入通道b2的视频源c2,以完成视频切换。
现有的视频切换技术在切换过程中往往存在包括短暂黑屏、图像撕裂、图像短暂冻结等在内的其中一种或多种缺陷,从而降低视频切换效果,影响用户体验。特别是图像撕裂在视频切换中出现的概率较大,很影响用户体验,图像撕裂是指在切换时,视频矩阵输出的图像本身完整的一帧图像,而是两帧以上的图像帧混合后输出或者只有半帧图像帧输出。因此,需要一种能够避免视频切换时图像撕裂的处理方法,以避免这种情况发生。
发明内容
针对现有技术的不足,本发明的目的之一提供一种视频矩阵中视频无缝切换方法,其能够解决视频切换时图像撕裂的问题;
本发明的目的之二提供一种视频矩阵中视频无缝切换***,其能够解决视频切换时图像撕裂的问题;
实现本发明的目的之一的技术方案为:一种视频矩阵中视频无缝切换方法,包括以下步骤:
步骤1:将用于存储视频数据的存储器上的存储器地址划分为若干存储空间,每一个存储空间均包括若干存储器地址;
步骤2:若控制器未接收到视频切换指令,则执行步骤3,否则,执行步骤4,其中,视频切换指令包括目标通道信息,目标通道信息包括目标输入通道和目标输出通道;
步骤3:控制器内的写控制模块接收当前输入通道的视频数据并按图像帧写入存储器内,一帧图像对应存入存储器内的一个存储空间,控制器内的读控制模块读取存储器内的图像帧并在当前输出通道向外输出,写控制模块每当完成写入完整的一帧图像后,向下一个存储空间写入下一个完整的一帧图像,读控制模块每当读取当前存储空间的完整一帧图像,向下一个存储空间读取完整的一帧图像,
其中,写控制模块向存储器写入视频数据与读控制模块从存储器读取视频数据之间的读写顺序按预设规则一进行读写:
预设规则一:读控制模块和写控制模块开始读写后,按存储器地址顺序,写控制模块至少先写入完整一帧图像后,读控制模块才开始 读取视频数据,且每当写控制模块写入完整的一帧图像后,读控制模块开始读取下一帧图像;读控制模块每当读取完整的一帧图像后,写控制模块开始写入下一帧图像,以使得写控制模块和读控制模块维持有序同步读写;
步骤4:视频切换指令维持有效期间,写控制模块跳回当前写入的存储空间的首地址,向当前存储空间写入切换后的目标输入通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取一帧图像,并向目标输出通道输出图像帧,直至视频切换指令失效,写控制模块和读控制模块转向各自的下一个存储器空间,并继续读写下一个图像帧。
进一步地,所述存储器为RAM存储器或ROM存储器。
进一步地,任意两个相邻存储空间的存储器地址均至少间隔一个存储器地址,使得任意两个相邻存储空间的存储器地址为非连续。
进一步地,所述视频切换指令由通道切换设备发出。
进一步地,视频切换指令维持有效时间为若干帧图像所占用的时长。
进一步地,视频切换指令维持有效时间为2帧图像所占用的时长。
进一步地,视频切换指令维持有效时间0.033秒。
进一步地,视频切换指令为电平信号,视频切换指令维持有效是指视频切换指令处于高电平。
实现本发明的目的之二的技术方案为:一种视频矩阵中视频无缝切换***,包括控制器、存储器和通道切换设备,存储器和通道切换 设备均与控制器电器连接,
存储器,用于接收控制器通过输出通道输出的图像帧,通一帧图像存储在一个存储空间,不同帧图像存储在不同的存储空间,
通道切换设备,用于向控制器发送视频切换指令,视频切换指令包括目标通道,目标通道包括目标输入通道和目标输出通道,
控制器,控制器内包括读控制模块和写控制模块,控制器用于接收输入通道输入的视频数据,以及根据是否接收到用接收视频切换指令执行相应步骤,若是,则执行步骤3,若否,则执行步骤4,
步骤3:控制器内的写控制模块接收当前输入通道的视频数据并按图像帧写入存储器内,一帧图像对应存入存储器内的一个存储空间,控制器内的读控制模块读取存储器内的图像帧并在当前输出通道向外输出,写控制模块每当完成写入完整的一帧图像后,向下一个存储空间写入下一个完整的一帧图像,读控制模块每当读取当前存储空间的完整一帧图像,向下一个存储空间读取完整的一帧图像,
其中,写控制模块向存储器写入视频数据与读控制模块从存储器读取视频数据之间的读写顺序按预设规则一进行读写:
预设规则一:读控制模块和写控制模块开始读写后,按存储器地址顺序,写控制模块至少先写入完整一帧图像后,读控制模块才开始读取视频数据,且每当写控制模块写入完整的一帧图像后,读控制模块开始读取下一帧图像;读控制模块每当读取完整的一帧图像后,写控制模块开始写入下一帧图像,以使得写控制模块和读控制模块维持有序同步读写;
步骤4:视频切换指令维持有效期间,写控制模块跳回当前写入的存储空间的首地址,向当前存储空间写入切换后的目标通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取一帧图像,直至视频切换指令失效,写控制模块和读控制模块转向各自的下一个存储器空间,并继续读写下一个图像帧。
本发明的有益效果为:本发明使得在视频切换过程中,输出的图像是始终是完整的一帧图像,而不是混合了多个输入通道的半帧图像或多帧图像,从而避免切换过程中出现黑屏、图像撕裂等问题,保证流畅地无缝切换视频,且视频切换指令维持有效的时间极端(通常为0.033秒),人眼察觉不出图像冻结的效果,人的感受是瞬间切换,切换非常流畅,实现了高质量的视频无缝切换。
图1为本发明的原理框架图。
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图对本申请具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重 新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
参考图1,一种视频矩阵中视频无缝切换方法,包括以下步骤:
步骤1:将用于存储视频数据的存储器上的存储器地址划分为若干存储空间,图1中划分了N个存储空间。每一个存储空间存储视频数据中的一帧图像,每一个存储空间均包括若干存储器地址,存储空间内最前面的存储器地址为首地址,最后一个存储器地址为尾地址。例如,用于存储视频数据中的第一帧图像的第一帧存储空间的存储器地址为1-10000,其包括了10000个存储器地址,其中,存储器地址1(即最前面的存储器地址)为首地址,存储器地址10000(即最后一个存储器地址)为尾地址。
存储器通常为缓存设备,可以为RAM存储器也可以是ROM存储器。
在一个可选的实施方式中,任意两个相邻存储空间的存储器地址均至少间隔一个存储器地址,使得任意两个相邻存储空间的存储器地址为非连续。例如,第一帧存储空间和第二帧存储空间是相邻的两个存储空间,第一帧存储空间的存储器地址为1-10000,第二存储空间的存储器地址为20000-30000,第一存储空间的尾地址是10000,第二存储空间的首地址是20000,故第一存储空间的尾地址与第二存储空间的首地址之间间隔了多个存储器地址,故两者非连续的。通过将相邻存储空间划分为非连续的,可以使得实现后续从存储空间读写图像帧的代码可读性更强,可维护性更强。原因在于,一帧图像所占用 的存储空间并非都是整数,以1080P格式的一帧图像为例,需要占用的字节数为1920*1080*3(RGB三通道)=6220800Byte,其占用的存储空间并不是整数倍的存储器地址。故而将存储空间划分为非连续,其代码的可读性更强,也更易于维护。
步骤2:若控制器未接收到视频切换指令,则执行步骤3,否则,执行步骤4。其中,视频切换指令包括目标通道信息,目标通道信息包括目标输入通道和目标输出通道,以使得当前输入通道切换为目标输入通道接收视频数据,当前输出通道切换为目标输出通道输出来自目标输入通道接收到的视频数据。多个输入通道和多个输出通道即构成所述视频矩阵。
本步骤中,控制器能够接收到用于控制视频切换的通道切换设备发出的视频切换指令,通道切换设备可以是MCU或ARM或其他芯片,可以做成一个单独的模块。
步骤3:控制器内的写控制模块接收当前输入通道的视频数据并按图像帧写入存储器内,一帧图像对应存入存储器内的一个存储空间。控制器内的读控制模块读取存储器当前存储的视频数据并按图像帧读取,将读取到的图像帧在当前输出通道向外输出。写控制模块每当完成写入完整的一帧图像后,向下一个存储空间写入下一个完整的一帧图像,依次类推,不断写入新的图像帧,直至将写入所有图像帧或存储器容量已写满。同样的,读控制模块每当读取当前存储空间的完整一帧图像,向下一个存储空间读取完整的一帧图像,不断读取新的图像帧,直至读取所有图像帧或接收到停止读取指令。
其中,写控制模块向存储器写入视频数据与读控制模块从存储器读取视频数据之间的读写顺序按预设规则一进行读写:
预设规则一:读控制模块和写控制模块开始读写后,按存储器地址顺序,写控制模块至少先写入完整一帧图像后,读控制模块才开始读取视频数据,且每当写控制模块写入完整的一帧图像后,读控制模块才开始读取下一帧图像;读控制模块每当读取完整的一帧图像后,写控制模块才开始写入下一帧图像,以使得写控制模块和读控制模块维持有序同步读写。通过维持写控制模块和读控制模块的有序同步读写,能够保证读控制模块始终能够读取到完整的一帧图像,防止输出的图像出现半帧图像。
需要说明的是,所述读控制模块每当读取完整的一帧图像后,写控制模块才开始写入下一帧图像,其并不是因果或条件上的限制关系,而是表明读控制模块与写控制模块在读写时间上的配合,也即每当读控制模块读取完整的一帧图像时,正好写控制模块开始写下一帧图像,或者反过来说,每当写控制模块开始写下一帧图像时,正好读控制模块读取完一帧图像,两个读写控制模块在读写时间上相互配合。
例如,当读控制模块和写控制模块开始上电进入开始读写后,按存储器地址由低到高或由高到低顺序,写控制模块和读控制模块通常从第一个存储器地址开始读写,当然也可以从中间的某一个存储器地址开始读写,这里以从第一个存储器地址开始为例,写控制模块向第一个存储器地址写入第一帧图像后,读控制模块从第一个存储器地址读取第一帧图像并输出,然后,写控制模块继续向下一个存储器地址 (即第二个存储器地址)写入第二帧图像后,读控制模块从第二个存储器地址读取第二帧图像并输出,依次类推,读控制模块始终滞后于一个存储器地址,维持有序同步读写。
步骤4:视频切换指令维持有效期间,写控制模块跳回当前写入的存储空间的首地址,向当前存储空间写入切换后的目标输入通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取切换前的当前通道视频数据中的一帧图像,直至视频切换指令失效,写控制模块和读控制模块才停止向各自的当前存储空间读写图像帧,而是转向各自的下一个存储器空间继续读写下一个图像帧,并向目标输出通道输出图像帧。
在一个可选的实施方式中,视频切换指令维持有效时间为两帧图像所占用的时长,也可以为其他若干帧图像所占用的时长,但,视频切换指令维持有效时间不能太长。对于刷新率为60Hz的视频数据来说,即1秒中刷新显示60张图像帧的视频数据,视频切换指令维持有效时间为0.033秒,相当于是两帧图像所占用的时长。在这样一个极端时间内说,人眼是感觉不到视频有切换的,从而实现视频无缝切换。
其中,视频切换指令失效是指控制器未接收到视频切换指令或者是接收视频切换指令消失后,也即是读写控制模块均未接收到视频切换指令。视频切换指令通常为电平信号,当视频切换指令维持高电平时,视频切换指令有效,读写控制模块均接收到视频切换指令;当视频切换指令维持低电平(通常为零电平)时,视频切换指令失效,读 写控制模块均未接收到视频切换指令。
例如,在接收到视频切换指令的前一刻(即切换前),也即是按所述步骤3正常读写视频数据时,写控制模块正在向第二存储空间写入当前通道的第二帧图像,读控制模块正在向第一存储空间读取第一帧图像(第一帧图像来自当前通道的视频数据)。当接收到视频切换指令时(即切换过程中),写控制模块在项第二存储空间完成写入第二帧图像后,由第二存储空间的尾地址跳回第二存储空间的首地址,向第二存储空间写入目标输入通道的一帧图像,读控制模块在完成读取第一存储空间的第一帧图像后,由第一存储空间的尾地址跳回第一存储空间的首地址,继续从第一存储空间读取第一帧图像,直至视频切换指令失效(即切换后),写控制模块向第三存储空间写入第三帧图像,读控制模块向第二存储空间读取第二存储空间的图像帧(此时的图像帧是来自目标输入通道的视频数据),并依次进行下去。
通过本步骤处理,使得在视频切换过程中,输出的图像是始终是完整的一帧图像,而不是混合了多个输入通道的半帧图像或多帧图像,从而避免切换过程中出现黑屏、图像撕裂等问题,保证流畅地无缝切换视频,且视频切换指令维持有效的时间极端(通常为0.033秒),人眼察觉不出图像冻结的效果,人的感受是瞬间切换,切换非常流畅。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理 设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包括这些改动和变型在内。
Claims (9)
- 一种视频矩阵中视频无缝切换方法,其特征在于,包括以下步骤:步骤1:将用于存储视频数据的存储器上的存储器地址划分为若干存储空间,每一个存储空间均包括若干存储器地址;步骤2:若控制器未接收到视频切换指令,则执行步骤3,否则,执行步骤4,其中,视频切换指令包括目标通道信息,目标通道信息包括目标输入通道和目标输出通道;步骤3:控制器内的写控制模块接收当前输入通道的视频数据并按图像帧写入存储器内,一帧图像对应存入存储器内的一个存储空间,控制器内的读控制模块读取存储器内的图像帧并在当前输出通道向外输出,写控制模块每当完成写入完整的一帧图像后,向下一个存储空间写入下一个完整的一帧图像,读控制模块每当读取当前存储空间的完整一帧图像,向下一个存储空间读取完整的一帧图像,其中,写控制模块向存储器写入视频数据与读控制模块从存储器读取视频数据之间的读写顺序按预设规则一进行读写:预设规则一:读控制模块和写控制模块开始读写后,按存储器地址顺序,写控制模块至少先写入完整一帧图像后,读控制模块才开始读取视频数据,且每当写控制模块写入完整的一帧图像后,读控制模块开始读取下一帧图像;读控制模块每当读取完整的一帧图像后,写控制模块开始写入下一帧图像,以使得写控制模块和读控制模块维持有序同步读写;步骤4:视频切换指令维持有效期间,写控制模块跳回当前写入 的存储空间的首地址,向当前存储空间写入切换后的目标输入通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取一帧图像,并向目标输出通道输出图像帧,直至视频切换指令失效,写控制模块和读控制模块转向各自的下一个存储器空间,并继续读写下一个图像帧。
- 根据权利要求1所述的视频矩阵中视频无缝切换方法,其特征在于,所述存储器为RAM存储器或ROM存储器。
- 根据权利要求1所述的视频矩阵中视频无缝切换方法,其特征在于,任意两个相邻存储空间的存储器地址均至少间隔一个存储器地址,使得任意两个相邻存储空间的存储器地址为非连续。
- 根据权利要求1所述的视频矩阵中视频无缝切换方法,其特征在于,所述视频切换指令由通道切换设备发出。
- 根据权利要求1所述的视频矩阵中视频无缝切换方法,其特征在于,视频切换指令维持有效时间为若干帧图像所占用的时长。
- 根据权利要求5所述的视频矩阵中视频无缝切换方法,其特征在于,视频切换指令维持有效时间为2帧图像所占用的时长。
- 根据权利要求6所述的视频矩阵中视频无缝切换方法,其特征在于,视频切换指令维持有效时间0.033秒。
- 根据权利要求1至7任一项所述的视频矩阵中视频无缝切换方法,其特征在于,视频切换指令为电平信号,视频切换指令维持有效是指视频切换指令处于高电平。
- 一种视频矩阵中视频无缝切换***,其特征在于,包括控制器、 存储器和通道切换设备,存储器和通道切换设备均与控制器电器连接,存储器,用于接收控制器通过输出通道输出的图像帧,通一帧图像存储在一个存储空间,不同帧图像存储在不同的存储空间,通道切换设备,用于向控制器发送视频切换指令,视频切换指令包括目标通道,目标通道包括目标输入通道和目标输出通道,控制器,控制器内包括读控制模块和写控制模块,控制器用于接收输入通道输入的视频数据,以及根据是否接收到用接收视频切换指令执行相应步骤,若是,则执行步骤3,若否,则执行步骤4,步骤3:控制器内的写控制模块接收当前输入通道的视频数据并按图像帧写入存储器内,一帧图像对应存入存储器内的一个存储空间,控制器内的读控制模块读取存储器内的图像帧并在当前输出通道向外输出,写控制模块每当完成写入完整的一帧图像后,向下一个存储空间写入下一个完整的一帧图像,读控制模块每当读取当前存储空间的完整一帧图像,向下一个存储空间读取完整的一帧图像,其中,写控制模块向存储器写入视频数据与读控制模块从存储器读取视频数据之间的读写顺序按预设规则一进行读写:预设规则一:读控制模块和写控制模块开始读写后,按存储器地址顺序,写控制模块至少先写入完整一帧图像后,读控制模块才开始读取视频数据,且每当写控制模块写入完整的一帧图像后,读控制模块开始读取下一帧图像;读控制模块每当读取完整的一帧图像后,写控制模块开始写入下一帧图像,以使得写控制模块和读控制模块维持有序同步读写;步骤4:视频切换指令维持有效期间,写控制模块跳回当前写入的存储空间的首地址,向当前存储空间写入切换后的目标通道视频数据中的一帧图像,读控制模块跳回当前读取的存储空间的首地址,向当前存储空间读取一帧图像,直至视频切换指令失效,写控制模块和读控制模块转向各自的下一个存储器空间,并继续读写下一个图像帧。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/417,802 US20240205360A1 (en) | 2021-07-29 | 2024-01-19 | Seamless video switching method and system in video matrix |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110869298.X | 2021-07-29 | ||
CN202110869298.XA CN113612937B (zh) | 2021-07-29 | 2021-07-29 | 一种视频矩阵中视频无缝切换方法及*** |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/417,802 Continuation US20240205360A1 (en) | 2021-07-29 | 2024-01-19 | Seamless video switching method and system in video matrix |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023004995A1 true WO2023004995A1 (zh) | 2023-02-02 |
Family
ID=78338614
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/122615 WO2023004995A1 (zh) | 2021-07-29 | 2021-10-08 | 一种视频矩阵中视频无缝切换方法及*** |
Country Status (3)
Country | Link |
---|---|
US (1) | US20240205360A1 (zh) |
CN (1) | CN113612937B (zh) |
WO (1) | WO2023004995A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116074461A (zh) * | 2023-03-01 | 2023-05-05 | 南京芯驰半导体科技有限公司 | 一种图像帧送显方法、装置、部件及交通设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114302087B (zh) * | 2021-11-30 | 2023-07-18 | 苏州浪潮智能科技有限公司 | 一种mipi数据传输模式转换方法、装置及电子设备 |
CN114584784B (zh) * | 2022-03-03 | 2024-07-16 | 杭州中天微***有限公司 | 视频编码***、硬件加速装置及硬件加速方法 |
CN115314644A (zh) * | 2022-09-16 | 2022-11-08 | 广州市保伦电子有限公司 | 一种基于fpga的视频数据处理*** |
CN117119128B (zh) * | 2023-08-18 | 2024-05-03 | 广东保伦电子股份有限公司 | 一种视频矩阵无缝切换的控制方法和视频矩阵*** |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100007673A1 (en) * | 2008-07-08 | 2010-01-14 | Jerzy Wieslaw Swic | Double-Buffering Of Video Data |
CN102752543A (zh) * | 2012-07-27 | 2012-10-24 | 北京威泰嘉业科技有限公司 | 高清混合矩阵无缝切换方法及*** |
CN104702860A (zh) * | 2015-03-19 | 2015-06-10 | 深圳市载德光电技术开发有限公司 | 基于fpga的视频图像切换*** |
CN107390893A (zh) * | 2017-07-17 | 2017-11-24 | 核动力运行研究所 | 基于fpga实现kvm切换器无闪烁切换的***及方法 |
CN207067943U (zh) * | 2017-07-17 | 2018-03-02 | 核动力运行研究所 | 一种基于fpga实现kvm切换器无闪烁切换的装置 |
CN110855909A (zh) * | 2019-11-14 | 2020-02-28 | 广州魅视电子科技有限公司 | 视频信号无缝低延时切换方法及*** |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6271866B1 (en) * | 1998-12-23 | 2001-08-07 | Honeywell International Inc. | Dual port memory system for buffering asynchronous input to a raster scanned display |
CN110460784B (zh) * | 2019-08-19 | 2022-02-25 | 京东方科技集团股份有限公司 | 显示通道的切换方法及模块、显示驱动装置、显示设备 |
CN112714279A (zh) * | 2019-10-25 | 2021-04-27 | 北京嗨动视觉科技有限公司 | 图像显示方法、装置和***以及视频源监视器 |
-
2021
- 2021-07-29 CN CN202110869298.XA patent/CN113612937B/zh active Active
- 2021-10-08 WO PCT/CN2021/122615 patent/WO2023004995A1/zh unknown
-
2024
- 2024-01-19 US US18/417,802 patent/US20240205360A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100007673A1 (en) * | 2008-07-08 | 2010-01-14 | Jerzy Wieslaw Swic | Double-Buffering Of Video Data |
CN102752543A (zh) * | 2012-07-27 | 2012-10-24 | 北京威泰嘉业科技有限公司 | 高清混合矩阵无缝切换方法及*** |
CN104702860A (zh) * | 2015-03-19 | 2015-06-10 | 深圳市载德光电技术开发有限公司 | 基于fpga的视频图像切换*** |
CN107390893A (zh) * | 2017-07-17 | 2017-11-24 | 核动力运行研究所 | 基于fpga实现kvm切换器无闪烁切换的***及方法 |
CN207067943U (zh) * | 2017-07-17 | 2018-03-02 | 核动力运行研究所 | 一种基于fpga实现kvm切换器无闪烁切换的装置 |
CN110855909A (zh) * | 2019-11-14 | 2020-02-28 | 广州魅视电子科技有限公司 | 视频信号无缝低延时切换方法及*** |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116074461A (zh) * | 2023-03-01 | 2023-05-05 | 南京芯驰半导体科技有限公司 | 一种图像帧送显方法、装置、部件及交通设备 |
Also Published As
Publication number | Publication date |
---|---|
US20240205360A1 (en) | 2024-06-20 |
CN113612937B (zh) | 2022-04-26 |
CN113612937A (zh) | 2021-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023004995A1 (zh) | 一种视频矩阵中视频无缝切换方法及*** | |
JP2008306444A (ja) | 画像処理装置 | |
US20180121213A1 (en) | Method apparatus for dynamically reducing application render-to-on screen time in a desktop environment | |
JP2010081530A (ja) | 動画像復元装置、動画像復元方法及びプログラム | |
CN111526404B (zh) | 单帧播放方法、视频播放装置、监控设备以及存储介质 | |
CN112804410A (zh) | 多显示屏同步显示方法及装置、视频处理设备和存储介质 | |
CN107608588B (zh) | 显示层、显示方法、显示***和操作*** | |
CN114189732B (zh) | 图像数据读写控制的方法及相关装置 | |
CN113205779A (zh) | 适用于电子墨水屏的多屏同步控制方法、装置及*** | |
JP2001016593A (ja) | 画像復号表示装置 | |
US20060170691A1 (en) | Apparatus and method for frame buffer control | |
CN113068070A (zh) | 时间码显示***、方法、显示设备、存储介质和电子设备 | |
US20190087200A1 (en) | Method for displaying an animation during the starting phase of an electronic device and associated electronic device | |
JP2019139060A (ja) | 画像処理装置および画像処理方法 | |
JP2001136412A (ja) | 複数映像表示装置のガンマ補正回路 | |
CN113126938A (zh) | 图像显示控制方法及装置、显示箱体和显示*** | |
CN106027925B (zh) | 一种osd菜单的显示控制方法及装置 | |
US9864565B2 (en) | Output system, output apparatus, and power control method | |
CN115380325B (zh) | Lcc(低成本无控制器)图形处理 | |
JP3308523B2 (ja) | 圧縮画像の多画面再生装置 | |
JP4236359B2 (ja) | 画面表示装置を備えたマイクロコンピュータ | |
JP3171178B2 (ja) | Mpeg動画像復号化装置 | |
TWI847280B (zh) | 視訊切換方法與視訊處理系統 | |
CN116027930B (zh) | 动态帧率控制方法及装置 | |
JP3098485B2 (ja) | 画像復号装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21951567 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |