CN103942017A - Image quality regulating method and system - Google Patents

Image quality regulating method and system Download PDF

Info

Publication number
CN103942017A
CN103942017A CN201310027039.8A CN201310027039A CN103942017A CN 103942017 A CN103942017 A CN 103942017A CN 201310027039 A CN201310027039 A CN 201310027039A CN 103942017 A CN103942017 A CN 103942017A
Authority
CN
China
Prior art keywords
opencl
image quality
video memory
renderer
support
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.)
Pending
Application number
CN201310027039.8A
Other languages
Chinese (zh)
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.)
SHENZHEN QVOD TECHNOLOGY Co.,Ltd.
Original Assignee
Shenzhen QVOD Technology 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 Shenzhen QVOD Technology Co Ltd filed Critical Shenzhen QVOD Technology Co Ltd
Priority to CN201310027039.8A priority Critical patent/CN103942017A/en
Publication of CN103942017A publication Critical patent/CN103942017A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses an image quality regulating method and system. The image quality regulating method comprises the steps of A, detecting whether the current video card supports an OpenCL; if the current video card supports the OpenCL, detecting whether the version of the current OpenCL supports mutual copy of memory data of a renderer and memory data of the OpenCL; C, if the version of the current OpenCL supports mutual copy, copying the memory data of the renderer to a memory object of the OpenCL when a video processed by a DXVA interface is transmitted to a memory of the render, invoking parameters of a kernel object in the OpenCL, and performing image quality regulating processing on the memory data according to a command array and a program object which are established in the OpenCL; D, copying the processed data into the memory of the render again and displaying the data. The invention further discloses an image quality regulating system. By means of the technical scheme, complex image quality regulation can be completed when hardware acceleration is performed to achieve decoding.

Description

A kind of image quality control method and system
Technical field
The present invention relates to Streaming Media process field, especially relate to a kind of method and system of carrying out image quality adjusting in the time using DXVA interface hardware speech coding.
Background technology
Based on Directshow(Directshow be Microsoft provide one be enclosed within the kit that carries out Streaming Media processing on windows platform) in player under frame system, use DXVA(DirectX Video Acceleration, vision hardware accelerates) interface carries out hardware-accelerated decoding to video, can greatly reduce the utilization rate of CPU, but DXVA interface, must connect renderer (Renderer) thereafter, any data processing can not be carried out in centre, otherwise just cannot use DXVA interface to carry out hardware-accelerated decoding to video.
In using DXVA interface, to carry out image quality adjusting to decoding image out, generally have two kinds of modes: 1. data copy internal memory to from video memory, utilize CPU to process view data, being disposed to copy to get back in video memory shows again, which shortcoming is that copies data is quite consuming time; 2. in video memory, utilize the painted engine of Pixel Shader(pixel) process on the spot, this Pixel Shader carries out graphics process taking pixel as unit, and shortcoming is the restriction that Pixel Shader has instruction number, can only carry out simple image quality adjusting.The image quality that these two kinds of methods all cannot complete more complicated regulates.
Summary of the invention
The technical problem to be solved in the present invention is, the defect regulating for the above-mentioned image quality that cannot complete more complicated of prior art, provides a kind of image quality control method and system, and the image quality that can complete more complicated in the time of hardware-accelerated decoding regulates.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of image quality control method, for the image quality of video being regulated in the time using DXVA interface, described image quality control method comprises:
A. detect current video card and whether support OpenCL;
If B. support OpenCL, detect current OpenCL version and whether support the video memory data of renderer and OpenCL to copy mutually;
If C. support copy mutually, when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the parameter of the kernel objects in OpenCL, according to the command queue creating in OpenCL, program object, video memory data are carried out the processing of image quality adjusting;
D. data after treatment are copied in the video memory of renderer again, and show.
In image quality control method of the present invention, in described steps A, the platform ID function carrying by OpenCL and the rreturn value of device id function detect current video card and whether support OpenCL.
In image quality control method of the present invention, in described step B, whether the rreturn value of the equipment support rank function carrying by OpenCL detects current video card and supports the video memory data of renderer and OpenCL to copy mutually.
In image quality control method of the present invention, before step C, receive in advance and store the parameter of the kernel objects of user's setting.
In image quality control method of the present invention, described kernel objects comprises at least one in following: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving.
The present invention also constructs a kind of image quality regulating system, and for the image quality of video being regulated in the time using DXVA interface, described image quality regulating system comprises:
Whether first detection module, support OpenCL for detection of current video card;
Whether the second detection module, in the time support OpenCL being detected, detect current OpenCL version and support the video memory data of renderer and OpenCL to copy mutually;
Processing module, for in the time detecting that support copies mutually, when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the parameter of the kernel objects in OpenCL, according to the command queue creating in OpenCL, program object, video memory data are carried out the processing of image quality adjusting;
Display module, for data after treatment being copied again to the video memory of renderer, and shows.
In image quality regulating system of the present invention, the platform ID function that described first detection module carries by OpenCL and the rreturn value of device id function detect current video card and whether support OpenCL.
In image quality regulating system of the present invention, whether the rreturn value of the equipment support rank function that described the second detection module carries by OpenCL detects current video card and supports the video memory data of renderer and OpenCL to copy mutually.
In image quality regulating system of the present invention, described image quality regulating system also comprises:
Module is set, the parameter of kernel objects arranging for receiving in advance and store user.
In image quality regulating system of the present invention, described kernel objects comprises at least one in following: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving.
Implement technical scheme of the present invention, first, owing to being mutual copies data between two video memorys (video memory of renderer and the video memory of OpenCL), therefore compare existing between video memory and internal memory copies data mutually, saved the time; Secondly, because be completes the processing that image quality regulates in OpenCL, therefore compare and existingly directly in the video memory of renderer, utilize the painted engine of pixel to process on the spot, overcome the limited defect of instruction number.To sum up, this image quality control method can complete the image quality adjusting of more complicated.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the process flow diagram of image quality control method embodiment mono-of the present invention;
Fig. 2 is the logical diagram of image quality regulating system embodiment mono-of the present invention.
Embodiment
The present invention is directed in prior art and when the image quality of video adjusting in the time using DXVA interface, cannot complete the defect that the image quality of more complicated regulates, provide a kind of based on OpenCL(Open Computing Language, open computing language) image quality control method, first explanation is, OpenCL is a framework that is heterogeneous platform coding, and this heterogeneous platform can be made up of the processor of CPU, GPU or other types.
Fig. 1 is the process flow diagram of image quality control method embodiment mono-of the present invention, and this image quality control method comprises:
A. detect current video card and whether support OpenCL, also, judge whether current video card is provided with OpenCL display driving software, if so, perform step B; If not, perform step E.The platform ID function (clGetPlatformIDs) that preferably, can carry by OpenCL and the rreturn value of device id function (clGetDeviceIDs) detect current video card and whether support OpenCL;
B. detect current OpenCL version and whether support the video memory data of renderer and OpenCL to copy mutually, if so, perform step C; If not, perform step E.Whether the rreturn value of the equipment support rank function (clGetDeviceInfo) that preferably, can carry by OpenCL detects current video card and supports the video memory data of renderer and OpenCL to copy mutually;
C. when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the kernel objects parameter in OpenCL, according to the command queue creating in OpenCL, program object carries out the processing of image quality adjusting to video memory data, in this step, it should be noted that, should be pre-created OpenCL video memory object, create command queue, creation procedure object, create Kernel(kernel) object etc., and set the parameter of kernel objects, wherein, to create OpenCL video memory and to copy the video memory data of coming to liking in order depositing from renderer, create command queue and be for a frame of video is divided into multiple while processing to indicate multiple how to process, creation procedure regulates algorithm to liking in order to carry out concrete image quality, create kernel objects in order to indicate concrete controlled plant, for example comprise: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving etc., and kernel objects parameter is for example: brightness is 20, contrast is 50, gray scale is 4, tone is 18, saturation degree is 50, acutance is 3, white balance for automatically, remove to be dithered as 50Hz etc.,
D. data after treatment are copied in the video memory of renderer again, and show, like this, shown video image is the video image after image quality regulates;
E. in the video memory of renderer, utilize the painted engine of pixel to carry out the processing of image quality adjusting, and show.Certainly, this step also can first copy the video memory data of renderer to internal memory, utilizes CPU to process view data, and being disposed to copy in the video memory of getting back to renderer shows again.
Implement this technical scheme, support OpenCL and current OpenCL version to support under the prerequisite of the mutual copy of video memory data of renderer and OpenCL at current video card, when DXVA interface video after treatment is fed to after the video memory of renderer, again the video memory data in renderer are copied in the video memory of OpenCL, and call the parameter of the kernel objects setting, video memory data in OpenCL are carried out to image quality and regulate processing, finally, the video memory data of handling well in the video memory of OpenCL are copied in the video memory of renderer again, and show.Implement this image quality control method, first, owing to being mutual copies data between two video memorys (video memory of renderer and the video memory of OpenCL), therefore compare existing between video memory and internal memory copies data mutually, saved the time; Secondly, because be completes the processing that image quality regulates in OpenCL, therefore compare and existingly directly in the video memory of renderer, utilize the painted engine of pixel to process on the spot, overcome the limited defect of instruction number.To sum up, this image quality control method can complete the image quality adjusting of more complicated.
In a preferred embodiment of image quality control method of the present invention, before step C, receive in advance and store the parameter of the kernel objects of user's setting, can carry out corresponding image quality adjusting according to user's request like this.
Fig. 2 is the logical diagram of image quality regulating system embodiment mono-of the present invention, this image quality regulating system comprises first detection module 10, the second detection module 20, processing module 30 and display module 40, wherein, whether first detection module 10 supports OpenCL for detection of current video card, the platform ID function that preferably, can carry by OpenCL and the rreturn value of device id function detect current video card and whether support OpenCL.The second detection module 20 is in the time support OpenCL being detected, whether detect current OpenCL version supports the video memory data of renderer and OpenCL to copy mutually, whether the rreturn value of the equipment support rank function that preferably, can carry by OpenCL detects current video card and supports the video memory data of renderer and OpenCL to copy mutually.Processing module 30 is in the time detecting that support copies mutually, when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the parameter of the kernel objects in OpenCL, according to the command queue creating in OpenCL, program object, video memory data are carried out the processing of image quality adjusting.Display module 40 is for data after treatment being copied again to the video memory of renderer, and shows.
In a preferred embodiment of image quality regulating system of the present invention, this image quality regulating system also comprises module is set, this arranges the parameter of kernel objects that module arranges for receiving in advance and store user, and kernel objects for example comprises: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various changes, combination and variation.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in claim scope of the present invention.

Claims (10)

1. an image quality control method, in the time using DXVA interface hardware speech coding, the image quality of video being regulated, is characterized in that, described image quality control method comprises:
A. detect current video card and whether support OpenCL;
If B. support OpenCL, detect current OpenCL version and whether support the video memory data of renderer and OpenCL to copy mutually;
If C. support copy mutually, when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the parameter of the kernel objects in OpenCL, according to the command queue creating in OpenCL, program object, video memory data are carried out the processing of image quality adjusting;
D. data after treatment are copied in the video memory of renderer again, and show.
2. image quality control method according to claim 1, is characterized in that, in described steps A, the platform ID function carrying by OpenCL and the rreturn value of device id function detect current video card and whether support OpenCL.
3. image quality control method according to claim 1, is characterized in that, in described step B, whether the rreturn value of the equipment support rank function carrying by OpenCL detects current video card and support the video memory data of renderer and OpenCL to copy mutually.
4. image quality control method according to claim 1, is characterized in that, before step C, receives in advance and store the parameter of the kernel objects of user's setting.
5. image quality control method according to claim 1, is characterized in that, described kernel objects comprises at least one in following: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving.
6. an image quality regulating system, in the time using DXVA interface hardware speech coding, the image quality of video being regulated, is characterized in that, described image quality regulating system comprises:
Whether first detection module, support OpenCL for detection of current video card;
Whether the second detection module, in the time support OpenCL being detected, detect current OpenCL version and support the video memory data of renderer and OpenCL to copy mutually;
Processing module, for in the time detecting that support copies mutually, when DXVA interface video after treatment is fed to after the video memory of renderer, the video memory data of renderer are copied to the video memory object of OpenCL, and call the parameter of the kernel objects in OpenCL, according to the command queue creating in OpenCL, program object, video memory data are carried out the processing of image quality adjusting;
Display module, for data after treatment being copied again to the video memory of renderer, and shows.
7. image quality regulating system according to claim 6, is characterized in that, the platform ID function that described first detection module carries by OpenCL and the rreturn value of device id function detect current video card and whether support OpenCL.
8. image quality regulating system according to claim 6, is characterized in that, whether the rreturn value of the equipment support rank function that described the second detection module carries by OpenCL detects current video card and support the video memory data of renderer and OpenCL to copy mutually.
9. image quality regulating system according to claim 6, is characterized in that, described image quality regulating system also comprises:
Module is set, the parameter of kernel objects arranging for receiving in advance and store user.
10. image quality regulating system according to claim 6, is characterized in that, described kernel objects comprises at least one in following: brightness, contrast, gray scale, tone, saturation degree, acutance, white balance, debounce are moving.
CN201310027039.8A 2013-01-21 2013-01-21 Image quality regulating method and system Pending CN103942017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310027039.8A CN103942017A (en) 2013-01-21 2013-01-21 Image quality regulating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310027039.8A CN103942017A (en) 2013-01-21 2013-01-21 Image quality regulating method and system

Publications (1)

Publication Number Publication Date
CN103942017A true CN103942017A (en) 2014-07-23

Family

ID=51189698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310027039.8A Pending CN103942017A (en) 2013-01-21 2013-01-21 Image quality regulating method and system

Country Status (1)

Country Link
CN (1) CN103942017A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520900A (en) * 2009-03-30 2009-09-02 中国人民解放军第三军医大学第一附属医院 Method and special equipment for quickening CR/DR/CT graphic display and graphic processing by utilizing GPU
US20100328325A1 (en) * 2009-06-30 2010-12-30 Sevigny Benoit Fingerprinting of Fragment Shaders and Use of Same to Perform Shader Concatenation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520900A (en) * 2009-03-30 2009-09-02 中国人民解放军第三军医大学第一附属医院 Method and special equipment for quickening CR/DR/CT graphic display and graphic processing by utilizing GPU
US20100328325A1 (en) * 2009-06-30 2010-12-30 Sevigny Benoit Fingerprinting of Fragment Shaders and Use of Same to Perform Shader Concatenation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
INTEL: "Intel SDK for OpenCL*-Sample for OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing", 《HTTP://WWW.CHIPLIST.COM/OPENCL_AND_MICROSOFT_DIRECTX_VIDEO_ACCELERATION_SURFACE_SHARING/TREE3F-AGGREGATOR_NEWS_ITEM--107544-/》 *
INTEL: "Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing", 《HTTPS://SOFTWARE.INTEL.COM/SITES/PRODUCTS/VCSOURCE/FILES/44446/DXVA_SURFACE_SHARING.PDF》 *

Similar Documents

Publication Publication Date Title
US10909654B2 (en) Management of graphics processing units in a cloud platform
KR101563098B1 (en) Graphics processing unit with command processor
CN111158866A (en) Engine system and rendering method thereof
WO2017190438A1 (en) Display control method and apparatus
US20180365813A1 (en) Editing dynamically selected portions of target images in a mask-based editing interface
CN109615685B (en) UML-oriented GPU texture mapping-based texture execution device and method for hardware view model
CN108958881A (en) Data processing method, device and computer readable storage medium
US10831985B2 (en) Processing duplicate multimedia content
US9189228B2 (en) Systems and methods for developing and testing electronic content using multiple devices
CN109151966A (en) terminal control method, device, terminal device and storage medium
CN108984399A (en) Detect method, electronic equipment and the computer-readable medium of interface difference
CN113393367B (en) Image processing method, apparatus, device and medium
US20230388366A1 (en) Document-sharing conferencing system
US20160260246A1 (en) Providing asynchronous display shader functionality on a shared shader core
CN110457038A (en) Card display methods, device, equipment and the storage medium of attached application end
WO2023197762A1 (en) Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product
CN113515246A (en) Electronic ink screen display control method, device, equipment and storage medium
JP2023055615A (en) Event information extraction from game log using natural language process
CN1236401C (en) Data processing system and method, computer program, and recorded medium
US11443537B2 (en) Electronic apparatus and controlling method thereof
CN109951732A (en) The method that Android intelligent television prevents boot LOGO Yu application switching blank screen
CN111260756B (en) Method and device for transmitting information
CN103942017A (en) Image quality regulating method and system
US11756503B2 (en) Low-latency context switch systems and methods
WO2022133954A1 (en) Image rendering method, apparatus and system, and computer-readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: SHENZHEN TIANQU NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: SHENZHEN KUAIBO TECHNOLOGY CO., LTD.

Effective date: 20140728

C10 Entry into substantive examination
C41 Transfer of patent application or patent right or utility model
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20140728

Address after: 518057 Guangdong city of Shenzhen province Nanshan District south road six No. 6 Building 7 room 701 to Kelon

Applicant after: SHENZHEN TEEQEE NETWORK TECHNOLOGY CO., LTD.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road No. 009 China Technology Development Institute Technology Park building three, 22 floor

Applicant before: SHENZHEN QVOD TECHNOLOGY Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: SHENZHEN KUAIBO TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: SHENZHEN TIANQU NETWORK TECHNOLOGY CO., LTD.

Effective date: 20140902

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20140902

Address after: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road No. 009 China Technology Development Institute Technology Park building three, 22 floor

Applicant after: SHENZHEN QVOD TECHNOLOGY Co.,Ltd.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District south road six No. 6 Building 7 room 701 to Kelon

Applicant before: SHENZHEN TEEQEE NETWORK TECHNOLOGY CO., LTD.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140723