US 12,334,114 B2
Video editing method and electronic device
Menghan Wu, Shenzhen (CN); and Jiandong Zhou, Shenzhen (CN)
Assigned to Honor Device Co., Ltd., Shenzhen (CN)
Appl. No. 18/250,169
Filed by Honor Device Co., Ltd., Shenzhen (CN)
PCT Filed Aug. 25, 2022, PCT No. PCT/CN2022/114891
§ 371(c)(1), (2) Date Apr. 21, 2023,
PCT Pub. No. WO2023/071482, PCT Pub. Date May 4, 2023.
Claims priority of application No. 202111276128.7 (CN), filed on Oct. 29, 2021.
Prior Publication US 2025/0078871 A1, Mar. 6, 2025
Int. Cl. G11B 27/031 (2006.01)
CPC G11B 27/031 (2013.01) 20 Claims
OG exemplary drawing
 
1. A video editing method, applied to an electronic device, wherein the method comprises:
detecting a first operation performed on a first video, wherein a color value of a color channel of a pixel in a first video frame of the first video is a first color value, a bit depth of the first color value is a first bit depth, and the first video frame is any video frame of the first video;
creating an encoder, wherein the encoder is configured to encode a video frame in the first bit depth;
sending, by the encoder, the first video frame to an open graphics library (OpenGL);
generating, by the OpenGL, a second color value based on the first color value;
invoking, by the OpenGL, a graphics processing unit (GPU) to process the first video frame;
generating, by the GPU, N third color values based on the second color value, wherein a bit depth of the N third color values is a second bit depth, the second bit depth is less than the first bit depth, and N is a positive integer greater than 1;
writing, by the GPU, the N third color values into the first memory, to obtain N fifth color values, and a bit depth of a video frame carried in the first memory is the first bit depth;
obtaining, by the encoder, a fourth color value based on the N fifth color values;
generating, by the encoder, a second video frame based on the fourth color value; and
generating, by the encoder, a second video based on the second video frame.