diff --git a/README.en.md b/README.en.md index 6d0cfb9..1cd6fc0 100644 --- a/README.en.md +++ b/README.en.md @@ -7,21 +7,35 @@
-### Need a powerful opengl and vulkan yuv rendering module! +### A powerful opengl and vulkan yuv rendering module is needed! -1. There are too many if else in the shader in Opengl, causing the GPU to run empty, affecting GPU decoding and av_hwframe_transfer_data speed, this phenomenon is especially obvious on 4K video images; -2. In WidgetRender, use QImage::Format_RGB32 and QImage::Format_ARGB32_Premultiplied image formats as much as possible. The following reasons: +1. There are too many if elses in the shader in Opengl, causing the GPU to run dry, affecting the speed of GPU decoding and av_hwframe_transfer_data. This phenomenon is particularly obvious on 4K video images; +2. In WidgetRender, use the QImage::Format_RGB32 and QImage::Format_ARGB32_Premultiplied image formats whenever possible. The following reasons: 1. Avoid most rendering directly to most of these formats using QPainter. Rendering is best optimized to the Format_RGB32 and Format_ARGB32_Premultiplied formats, and secondarily for rendering to the Format_RGB16, Format_RGBX8888, Format_RGBA8888_Premultiplied, Format_RGBX64 and Format_RGBA64_Premultiplied formats. -### Ffmpeg (5.0) is not the same as 4.4.3 in decoding subtitles +### How does OpenGL render images in the BT.2020 color space? -### Decoding subtitles (ffmpeg-n5.0): +Now adjust the contrast, saturation, brightness; the effect is not very good. + +```cpp +contrast = 1.6; +saturation = 1.0; +brightness = 0; +``` + +If you don't adjust it, it will have the same effect as the ffplay output image, and the overall color will be darker. For Netflix videos, the N at the beginning of the video is displayed in a darker yellow color. + +### How to achieve image quality enhancement when rendering images with OpenGL? + +### Ffmpeg (5.0) decodes subtitles differently from 4.4.3 + +#### Decode subtitles (ffmpeg-n5.0): 0,,en,,0000,0000,0000,,Peek-a-boo! -you must use`ass_process_chunk`And set pts and duration as in libavfilter/vf_subtitles.c. +you have to use`ass_process_chunk`and set pts and duration as in libavfilter/vf_subtitles.c. -ASS standard format should be (ffmpeg-n4.4.3): +#### The ASS standard format should be (ffmpeg-n4.4.3): Dialogue: 0,0:01:06.77,0:01:08.00,en,,0000,0000,0000,,Peek-a-boo!\r\n @@ -35,8 +49,8 @@ use`ass_process_data`; How to set encoding parameters to get smaller files and better video quality? -1. set a very high bitrate; -2. set encoder`global_quality`invalid. code show as below: +1. Set a very high bitrate; +2. Set up the encoder`global_quality`invalid. code show as below: ```C++ d_ptr->codecCtx->flags |= AV_CODEC_FLAG_QSCALE; @@ -48,7 +62,7 @@ How to set encoding parameters to get smaller files and better video quality? av_opt_set_int(d_ptr->codecCtx, "crf", crf, AV_OPT_SEARCH_CHILDREN); ``` -### How to calculate pts from frames acquired by AVAudioFifo? +### How to calculate pts from frames obtained by AVAudioFifo? ```C++ // fix me? @@ -57,9 +71,9 @@ frame->pts = transcodeCtx->audioPts / av_q2d(transcodeCtx->decContextInfoPtr->ti transcodeCtx->audioPts += frame->nb_samples; ``` -### [New BING's Video Transcoding Recommendations](./doc/bing_transcode.md) +### [New BING’s video transcoding recommendations](./doc/bing_transcode.md) -## SwsContext is great! Compared to QImage converted to and scaled. +## SwsContext is great! Compare to QImage conversion to and scaling. ## QT-BUG @@ -71,9 +85,9 @@ transcodeCtx->audioPts += frame->nb_samples;