Cleanup: spelling in comments
This commit is contained in:
@@ -522,9 +522,9 @@ static AVRational calc_time_base(uint den, double num, int codec_id)
|
|||||||
{
|
{
|
||||||
/* Convert the input 'num' to an integer. Simply shift the decimal places until we get an integer
|
/* Convert the input 'num' to an integer. Simply shift the decimal places until we get an integer
|
||||||
* (within a floating point error range).
|
* (within a floating point error range).
|
||||||
* For example if we have den = 3 and num = 0.1 then the fps is: den/num = 30 fps.
|
* For example if we have `den = 3` and `num = 0.1` then the fps is: `den/num = 30` fps.
|
||||||
* When converthing this to a ffmpeg time base, we want num to be an integer.
|
* When converting this to a FFMPEG time base, we want num to be an integer.
|
||||||
* So we simply move the decimal places of both numbers. IE den = 30, num = 1.*/
|
* So we simply move the decimal places of both numbers. i.e. `den = 30`, `num = 1`. */
|
||||||
float eps = FLT_EPSILON;
|
float eps = FLT_EPSILON;
|
||||||
const uint DENUM_MAX = (codec_id == AV_CODEC_ID_MPEG4) ? (1UL << 16) - 1 : (1UL << 31) - 1;
|
const uint DENUM_MAX = (codec_id == AV_CODEC_ID_MPEG4) ? (1UL << 16) - 1 : (1UL << 31) - 1;
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ static AVRational calc_time_base(uint den, double num, int codec_id)
|
|||||||
const uint num_integer_bits = log2_floor_u((unsigned int)num);
|
const uint num_integer_bits = log2_floor_u((unsigned int)num);
|
||||||
|
|
||||||
/* Formula for calculating the epsilon value: (power of two range) / (pow mantissa bits)
|
/* Formula for calculating the epsilon value: (power of two range) / (pow mantissa bits)
|
||||||
* For example, a float has 23 manitissa bits and the float value 3.5f as a pow2 range of
|
* For example, a float has 23 mantissa bits and the float value 3.5f as a pow2 range of
|
||||||
* (4-2=2):
|
* (4-2=2):
|
||||||
* (2) / pow2(23) = floating point precision for 3.5f
|
* (2) / pow2(23) = floating point precision for 3.5f
|
||||||
*/
|
*/
|
||||||
@@ -619,10 +619,10 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
|
|||||||
c->time_base = calc_time_base(rd->frs_sec, rd->frs_sec_base, codec_id);
|
c->time_base = calc_time_base(rd->frs_sec, rd->frs_sec_base, codec_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* As per the timebase documentation here:
|
/* As per the time-base documentation here:
|
||||||
* https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options
|
* https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options
|
||||||
* We want to set the time base to (1 / fps) for fixed frame rate video.
|
* We want to set the time base to (1 / fps) for fixed frame rate video.
|
||||||
* If it is not possible, we want to set the timebase numbers to something as
|
* If it is not possible, we want to set the time-base numbers to something as
|
||||||
* small as possible.
|
* small as possible.
|
||||||
*/
|
*/
|
||||||
if (c->time_base.num != 1) {
|
if (c->time_base.num != 1) {
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ extern char datatoc_common_hair_refine_comp_glsl[];
|
|||||||
extern char datatoc_gpu_shader_3D_smooth_color_frag_glsl[];
|
extern char datatoc_gpu_shader_3D_smooth_color_frag_glsl[];
|
||||||
|
|
||||||
/* TODO(jbakker): move shader creation to `draw_shaders` and add test cases. */
|
/* TODO(jbakker): move shader creation to `draw_shaders` and add test cases. */
|
||||||
/* TODO(jbakker): replace defines with `constexpr` to check compilation on all OSs. Currently the
|
/* TODO(jbakker): replace defines with `constexpr` to check compilation on all OS's.
|
||||||
* APPLE codepath does not compile on other platforms and vice versa. */
|
* Currently the `__APPLE__` code-path does not compile on other platforms and vice versa. */
|
||||||
#ifdef USE_COMPUTE_SHADERS
|
#ifdef USE_COMPUTE_SHADERS
|
||||||
static GPUShader *hair_refine_shader_compute_create(ParticleRefineShader UNUSED(refinement))
|
static GPUShader *hair_refine_shader_compute_create(ParticleRefineShader UNUSED(refinement))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user