diff mbox

[FFmpeg-devel] avfilter/vf_framerate: fix cpy_line_width calculation on >8 bits format

Message ID 20180120080458.31167-1-mfcc64@gmail.com
State New
Headers show

Commit Message

Muhammad Faiz Jan. 20, 2018, 8:04 a.m. UTC
Fix tsan warnings on fate-filter-framerate-12bit-down and
fate-filter-framerate-12bit-up.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
---
 libavfilter/vf_framerate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Muhammad Faiz Jan. 25, 2018, 9:40 a.m. UTC | #1
On Sat, Jan 20, 2018 at 3:04 PM, Muhammad Faiz <mfcc64@gmail.com> wrote:
> Fix tsan warnings on fate-filter-framerate-12bit-down and
> fate-filter-framerate-12bit-up.
>
> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
> ---
>  libavfilter/vf_framerate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
> index a5ae6ddb71..578acaae52 100644
> --- a/libavfilter/vf_framerate.c
> +++ b/libavfilter/vf_framerate.c
> @@ -240,7 +240,7 @@ static int filter_slice16(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
>      int plane, line, pixel;
>
>      for (plane = 0; plane < 4 && td->copy_src1->data[plane] && td->copy_src2->data[plane]; plane++) {
> -        int cpy_line_width = s->line_size[plane];
> +        int cpy_line_width = s->line_size[plane] / 2;
>          const uint16_t *cpy_src1_data = (const uint16_t *)td->copy_src1->data[plane];
>          int cpy_src1_line_size = td->copy_src1->linesize[plane] / 2;
>          const uint16_t *cpy_src2_data = (const uint16_t *)td->copy_src2->data[plane];
> --
> 2.13.2
>

Ping.
Michael Niedermayer Jan. 27, 2018, 2:56 a.m. UTC | #2
On Sat, Jan 20, 2018 at 03:04:58PM +0700, Muhammad Faiz wrote:
> Fix tsan warnings on fate-filter-framerate-12bit-down and
> fate-filter-framerate-12bit-up.
> 
> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
> ---
>  libavfilter/vf_framerate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

should be ok if you checked the output

thx

[...]
Marton Balint Jan. 27, 2018, 3 a.m. UTC | #3
On Sat, 27 Jan 2018, Michael Niedermayer wrote:

> On Sat, Jan 20, 2018 at 03:04:58PM +0700, Muhammad Faiz wrote:
>> Fix tsan warnings on fate-filter-framerate-12bit-down and
>> fate-filter-framerate-12bit-up.
>>
>> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
>> ---
>>  libavfilter/vf_framerate.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> should be ok if you checked the output
>

My pending framerate patches will fix this anyway.

Regards,
Marton
diff mbox

Patch

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index a5ae6ddb71..578acaae52 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -240,7 +240,7 @@  static int filter_slice16(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
     int plane, line, pixel;
 
     for (plane = 0; plane < 4 && td->copy_src1->data[plane] && td->copy_src2->data[plane]; plane++) {
-        int cpy_line_width = s->line_size[plane];
+        int cpy_line_width = s->line_size[plane] / 2;
         const uint16_t *cpy_src1_data = (const uint16_t *)td->copy_src1->data[plane];
         int cpy_src1_line_size = td->copy_src1->linesize[plane] / 2;
         const uint16_t *cpy_src2_data = (const uint16_t *)td->copy_src2->data[plane];