Re: [FFmpeg-devel] [PATCH 087/114] avcodec/vc1: Avoid code duplication when initializing VLCs

2020-11-18 Thread Jerome Borsboom
I don't think it is a good idea to change the format of the table to something different than the tables in the SMPTE VC-1 documentation. People fluent in this documentation have a hard time correlating the new tables to the 'official' ones. --- Regards, Jerome This has been achieved by

Re: [FFmpeg-devel] [PATCH] avcodec/vc1: fix B predictor validity for 4-MV MBs

2019-01-14 Thread Jerome Borsboom
> 2019-01-14 9:05 GMT+01:00, Jerome Borsboom : >> The B predictor for 4-MV MBs in interlace field pictures is not used >> for blocks 0 and 2 when the picture is 1 MB wide. >> >> Signed-off-by: Jerome Borsboom >> --- >> My 'shuffle calculation of MV

[FFmpeg-devel] [PATCH] avcodec/vc1: fix B predictor validity for 4-MV MBs

2019-01-14 Thread Jerome Borsboom
The B predictor for 4-MV MBs in interlace field pictures is not used for blocks 0 and 2 when the picture is 1 MB wide. Signed-off-by: Jerome Borsboom --- My 'shuffle calculation of MV predictor candidates' patch overlooked the corner case of 1 MB wide field interlace pictures. According to VC-1

Re: [FFmpeg-devel] [PATCH 2/2 v3] avcodec/vc1: fix decoding of old WMV3 format

2019-01-12 Thread Jerome Borsboom
The position of the second MV predicitor candidate is slightly different for the old WMV3 format indicated by RES_RTM_FLAG. This patch fixes decoding of niceday.wmv on the samples server. Fixes: #6641 Signed-off-by: Jerome Borsboom --- This revision removes a spurious whitespace that was left

Re: [FFmpeg-devel] [PATCH 2/2 v2] avcodec/vc1: fix decoding of old WMV3 format

2019-01-11 Thread Jerome Borsboom
The position of the second MV predicitor candidate is slightly different for the old WMV3 format indicated by RES_RTM_FLAG. This patch fixes decoding of niceday.wmv on the samples server. Fixes: #6641 Signed-off-by: Jerome Borsboom --- libavcodec/vc1.c | 5 - libavcodec/vc1_pred.c | 5

[FFmpeg-devel] [PATCH 2/2] avcodec/vc1: fix decoding of old WMV3 format

2019-01-11 Thread Jerome Borsboom
The position of the B MV predicitor candidate is slightly different for the old WMV3 format that is indicated by RES_RTM_FLAG. This patch fixes the decoding artifacts in the niceday.wmv sample. Signed-off-by: Jerome Borsboom --- libavcodec/vc1.c | 5 - libavcodec/vc1_pred.c | 7

[FFmpeg-devel] [PATCH 1/2] avcodec/vc1: shuffle calculation of MV predictor candidates

2019-01-11 Thread Jerome Borsboom
The B predictor for 4-MV macroblocks is only out of bounds when the A predictor is also out of bounds. Signed-off-by: Jerome Borsboom --- This patch set fixes the decoding artifacts in the niceday.wmv file on the samples server. libavcodec/vc1_pred.c | 13 +++-- 1 file changed, 7

[FFmpeg-devel] [PATCH v2] avcodec/vc1: correct aspect ratio calculation

2018-11-16 Thread Jerome Borsboom
to display size, and the aspect ratio of the display size elements. Signed-off-by: Jerome Borsboom --- libavcodec/vc1.c | 42 +- libavcodec/vc1.h | 2 ++ tests/ref/fate/vc1-ism | 2 +- 3 files changed, 28 insertions(+), 18 deletions(-) diff

Re: [FFmpeg-devel] [PATCH] avcodec/vc1: correct aspect ratio calculation

2018-11-16 Thread Jerome Borsboom
> Hi > [...] > > iam not sure this is valid C and not undefined > > but either way this patch breaks fate > > TESTvc1-ism > --- ./tests/ref/fate/vc1-ism 2018-11-13 19:52:23.489023763 +0100 > +++ tests/data/fate/vc1-ism 2018-11-14 21:50:11.522992878 +0100 > @@ -2,7 +2,7 @@ > #media_type

Re: [FFmpeg-devel] [PATCH] avcodec/vc1: correct aspect ratio calculation

2018-11-14 Thread Jerome Borsboom
>> +av_reduce(>sample_aspect_ratio.num, >> + >sample_aspect_ratio.den, >> + v->disp_horiz_size * v->aspect_ratio.num * h, >> + v->disp_vert_size * v->aspect_ratio.den * w, >> + 1 << 30); > >> +ff_set_sar(avctx,

[FFmpeg-devel] [PATCH] avcodec/vc1: correct aspect ratio calculation

2018-11-14 Thread Jerome Borsboom
to display size, and the aspect ratio of the display size elements. Signed-off-by: Jerome Borsboom --- VC-1 spec assumes that the output of the decoder, i.e. the pixel matrix with dimensions coded_width x coded_height, is scaled to display size, i.e. a pixel matrix of display_horiz_size x

Re: [FFmpeg-devel] [PATCH] avcodec/vc1: set ticks_per_frame irrespective of FRAMERATE_FLAG

2018-10-24 Thread Jerome Borsboom
> 2018-10-23 14:50 GMT+02:00, Jerome Borsboom : >> vc1_decode_frame assumes that ticks_per_frame is set to two when RFF >> or RPTFRM is set. When FRAMERATE_FLAG is zero, this may not be the case >> as the setting of ticks_per_frame is guarded by FRAMERATE_FLAG. > >

[FFmpeg-devel] [PATCH] avcodec/vc1: set ticks_per_frame irrespective of FRAMERATE_FLAG

2018-10-23 Thread Jerome Borsboom
vc1_decode_frame assumes that ticks_per_frame is set to two when RFF or RPTFRM is set. When FRAMERATE_FLAG is zero, this may not be the case as the setting of ticks_per_frame is guarded by FRAMERATE_FLAG. Signed-off-by: Jerome Borsboom --- libavcodec/vc1.c | 6 +++--- 1 file changed, 3

Re: [FFmpeg-devel] [PATCH V3 1/2] lavf/vc1test: fix vc1test can't probe some RCV file.

2018-10-15 Thread Jerome Borsboom
e 2 now, this fix will support the case 1. > (Both of test clips come from: SMPTE Recommended Practice - > VC-1 Decoder and Bitstream Conformance). And I think I got > a older VC-1 test clip in the case 1. > > Reviewed-by: Carl Eugen Hoyos > Reviewed-by: Jerome Borsboom >

Re: [FFmpeg-devel] [PATCH V2 1/2] lavf/vc1test: fix vc1test can't probe some RCV file.

2018-10-13 Thread Jerome Borsboom
> On Sat, Oct 13, 2018 at 12:55 AM mypopy at gmail.com > wrote: >> >> On Fri, Oct 12, 2018 at 10:35 PM Carl Eugen Hoyos > wrote: >> > >> > 2018-10-12 15:41 GMT+02:00, Jun Zhao : >> > > case 1: >> > > use the hexdump -C SMM0005.rcv get: >> > > size skip (size -

Re: [FFmpeg-devel] [PATCH] avcodec/mips: fix conflicting types error of ff_vc1_h_s_overlap_mmi.

2018-07-13 Thread Jerome Borsboom
6_t *right); > +void ff_vc1_h_s_overlap_mmi(int16_t *left, int16_t *right, int left_stride, > int right_stride, int flags); > > void ff_vc1_v_loop_filter4_mmi(uint8_t *src, int stride, int pq); > void ff_vc1_h_loop_filter4_mmi(uint8_t *src, int stride,

Re: [FFmpeg-devel] [PATCH] avcodec/vc1_block: Fix mqaunt check for negative values

2018-06-29 Thread Jerome Borsboom
> Fixes: out of array access > Fixes: ffmpeg_bof_4.avi > Fixes: ffmpeg_bof_5.avi > Fixes: ffmpeg_bof_6.avi > > Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan > Caciulescu with AFLSmart > Signed-off-by: Michael Niedermayer > --- > libavcodec/vc1_block.c | 2 +- > 1 file

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vc1: fix condition guarding overlap filter on I picture

2018-06-20 Thread Jerome Borsboom
> SA10178.vc1: 18 frames ok, last 7 frames are different this one decodes correctly when you force bitexact decoding: ffmpeg -bitexact -i SA10178.vc1 SA10178_s.yuv This is caused by the issue that my rejected patch 'avcodec/x86/hpeldsp: fix half pel interpolation' tried to resolve. The proposed

[FFmpeg-devel] [PATCH] avcodec/vc1: fix check for missing CBPTAB

2018-06-20 Thread Jerome Borsboom
CBPTAB must be present in (non skipped) P and B pictures. Signed-off-by: Jerome Borsboom --- This patch set should fix decoding of the SA10135.vc1 test file to make it bit-equal to the reference decoder. libavcodec/vc1dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 1/3] avcodec/vc1: fix condition guarding overlap filter on I picture

2018-06-20 Thread Jerome Borsboom
The overlap filter needs to run when PQUANT is 9 or higher, irrespective of CONDOVER. Signed-off-by: Jerome Borsboom --- This patch set should fix decoding of the SA10125.vc1 test file to make it bit-equal to the reference decoder. libavcodec/vc1_block.c | 2 +- 1 file changed, 1 insertion

[FFmpeg-devel] [PATCH 2/3] avcodec/vc1: change the internal ordering of blocks within a macroblock

2018-06-20 Thread Jerome Borsboom
the overlap filter. Signed-off-by: Jerome Borsboom --- libavcodec/vc1_block.c | 65 +- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index b58b71b3e0..a2321eddb9 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 3/3] avcodec/vc1: fix overlap filter for frame interlaced pictures

2018-06-20 Thread Jerome Borsboom
are filtering. Signed-off-by: Jerome Borsboom --- libavcodec/mips/vc1dsp_mmi.c | 15 libavcodec/vc1_loopfilter.c | 86 libavcodec/vc1dsp.c | 15 libavcodec/vc1dsp.h | 2 +- 4 files changed, 91 insertions(+), 27

Re: [FFmpeg-devel] [PATCH 3/4 v3] avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec

2018-06-18 Thread Jerome Borsboom
Niedermayer wrote: > On Tue, Jun 12, 2018 at 11:34:58AM +0200, Jerome Borsboom wrote: >> Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and >> ff_vc1_i_loop_filter. >> >> Signed-off-by: Jerome Borsboom >> --- >> The v3 patch should resolve the cra

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vaapi: slice_vertical_position starts from zero for the second field

2018-06-14 Thread Jerome Borsboom
Is your VAAPI library and VAAPI driver new enough? You need at least libva-2.1.0 (VA-API version 1.1.0) and intel-vaapi-driver-2.1.0 for interlaced VC-1 decoding. From the output, I think you are using an older version and the error is just the libva library bailing out for not supporting

Re: [FFmpeg-devel] [PATCH 3/4 v3] avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec

2018-06-12 Thread Jerome Borsboom
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and ff_vc1_i_loop_filter. Signed-off-by: Jerome Borsboom --- The v3 patch should resolve the crashing that was seen on corrupted source files. libavcodec/vc1_block.c | 79 +++--- 1 file

Re: [FFmpeg-devel] [PATCH 3/4 v2] avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec

2018-06-10 Thread Jerome Borsboom
Thank you for the rigorous testing of my patches. I try to be careful when changing things, but every now and then I unwittingly may break things that do not surface in setup. There is something strange with the backtraces. The 'Slice header damaged' error indicates that the source file is coded

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vaapi: slice_vertical_position starts from zero for the second field

2018-06-08 Thread Jerome Borsboom
If there are no more issues or remarks with these two patches, could someone please commit them? Thanks! Regards, Jerome ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH 3/4 v2] avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec

2018-06-08 Thread Jerome Borsboom
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and ff_vc1_i_loop_filter. Signed-off-by: Jerome Borsboom --- libavcodec/vc1_block.c | 77 +++--- 1 file changed, 29 insertions(+), 48 deletions(-) diff --git a/libavcodec/vc1_block.c b

Re: [FFmpeg-devel] [PATCH 1/4 v2] avcodec/vc1: fix overlap and loop filtering for Simple and Main profile

2018-06-08 Thread Jerome Borsboom
Overlap filtering I and BI frames for Simple and Main profile is only dependent on PQUANT. Restrict testing for CONDOVER and OVERFLAGS to advanced profile. Change from mb_width to end_mb_x in ff_vc1_i_loop_filter to avoid breaking the Microsoft Screen 2 decoder. Signed-off-by: Jerome Borsboom

Re: [FFmpeg-devel] [PATCH 2/4 v2] avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped

2018-06-08 Thread Jerome Borsboom
Simple and Main Profile also need unsigned put_pixels_clamped. Add an argument to choose between signed and unsigned put_pixels and change function name to vc1_put_blocks_clamped. Signed-off-by: Jerome Borsboom --- libavcodec/vc1_block.c | 58

[FFmpeg-devel] [PATCH 4/4] avcodec/vc1: remove unused ff_vc1_loop_filter_iblk

2018-06-06 Thread Jerome Borsboom
Signed-off-by: Jerome Borsboom --- libavcodec/vc1.h| 1 - libavcodec/vc1_loopfilter.c | 30 -- 2 files changed, 31 deletions(-) diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h index 1d283f8589..69f6ca9e4d 100644 --- a/libavcodec/vc1.h +++ b/libavcodec

[FFmpeg-devel] [PATCH 2/4] avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped

2018-06-06 Thread Jerome Borsboom
Simple and Main profile also need unsigned put_pixels_clamped. Add an argument to choose between signed and unsigned put_pixels and change function name to vc1_put_blocks_clamped. Signed-off-by: Jerome Borsboom --- libavcodec/vc1_block.c | 54

[FFmpeg-devel] [PATCH 3/4] avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec

2018-06-06 Thread Jerome Borsboom
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and ff_vc1_i_loop_filter. Signed-off-by: Jerome Borsboom --- libavcodec/vc1_block.c | 77 ++ 1 file changed, 28 insertions(+), 49 deletions(-) diff --git a/libavcodec/vc1_block.c b

[FFmpeg-devel] [PATCH 1/4] avcodec/vc1: fix overlap filtering for Simple and Main profile

2018-06-06 Thread Jerome Borsboom
Overlap filtering I and BI frames for Simple and Main profile is only dependent on PQUANT. Restrict testing for CONDOVER and OVERFLAGS to advanced profile. Signed-off-by: Jerome Borsboom --- This patch set should fix decoding of the SSL0015.rcv test file to make it bit-equal to the reference

Re: [FFmpeg-devel] [PATCH v2] avcodec/vc1: fix overlap smoothing filter for P frames

2018-06-04 Thread Jerome Borsboom
> The patch also fixes SSL0014.rcv, the only sample in this directory > that still doesn't decode bit-exact is SSL0015.rcv, I don't know if the > issue is also loopfilter-related. > > Thank you, Carl Eugen Could someone with access to the test files check the output of the Intel hardware decoder

Re: [FFmpeg-devel] [PATCH v2] avcodec/vc1: fix overlap smoothing filter for P frames

2018-05-30 Thread Jerome Borsboom
-by: Jerome Borsboom --- This is an improved patch that should also fix the remaining frames in SSL0013.rcv. libavcodec/vc1_loopfilter.c | 60 ++--- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/libavcodec/vc1_loopfilter.c b/libavcodec

[FFmpeg-devel] [PATCH] avcodec/vc1: fix overlap smoothing filter for P frames

2018-05-29 Thread Jerome Borsboom
The v_overlap_filter needs to run on the colocated block of the previous macroblock. For the luma plane, the colocated block is located two blocks on the left instead of one. Signed-off-by: Jerome Borsboom --- This should fix the issue with the SA10100.vc1 test file. libavcodec

Re: [FFmpeg-devel] [PATCH v3] avcodec/vc1: fix out-of-bounds reference pixel replication

2018-05-29 Thread Jerome Borsboom
Out-of-bounds reference pixel replication should take into account the frame coding mode of the reference frame(s), not the frame coding mode of the current frame. Signed-off-by: Jerome Borsboom --- Even more corrections. The starting line must also be adjusted by one for an opposite refence

Re: [FFmpeg-devel] [PATCH v2] avcodec/vc1: fix out-of-bounds reference pixel replication

2018-05-29 Thread Jerome Borsboom
Out-of-bounds reference pixel replication should take into account the frame coding mode of the reference frame(s), not the frame coding mode of the current frame. Signed-off-by: Jerome Borsboom --- Does this resolve the SIGSEGV? I think I made a mistake in the calculation of the starting line

Re: [FFmpeg-devel] [PATCH] avcodec/vc1: fix out-of-bounds reference pixel replication

2018-05-28 Thread Jerome Borsboom
>> Out-of-bounds reference pixel replication should take into account >> the frame coding mode of the reference frame(s), not the frame >> coding mode of the current frame. >> >> Signed-off-by: Jerome Borsboom >> --- >> This should fix the rema

[FFmpeg-devel] [PATCH] avcodec/vc1: fix out-of-bounds reference pixel replication

2018-05-27 Thread Jerome Borsboom
Out-of-bounds reference pixel replication should take into account the frame coding mode of the reference frame(s), not the frame coding mode of the current frame. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- This should fix the remaining issue with the SA10180.vc1 tes

Re: [FFmpeg-devel] [PATCH v2 1/5] avcodec/vc1: FIELDTX is only present in interlaced frame I/BI pictures

2018-05-20 Thread Jerome Borsboom
If v->fieldtx_is_raw is not reset to zero, it may spill over from a previous interlaced frame I/BI picture. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- This may address the concerns. Will make a mental note to clean up the parser at a later time. Thank you for t

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/vc1: store zero MVs for all blocks in a MB

2018-05-20 Thread Jerome Borsboom
>> Direct prediction for interlace frame B pictures references the mv in the >> second block in an MB in the backward reference frame for the twomv case. >> When the backward reference frame is an I frame, this value may be unset. >> >> Signed-off-by: Jerome B

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/vc1: fix mquant calculation for interlace field pictures

2018-05-20 Thread Jerome Borsboom
>> On Fri, May 18, 2018 at 05:06:23PM +0200, Jerome Borsboom wrote: >>> For interlace field pictures s->mb_height indicates the height of the >>> full >>> picture in MBs, i.e. the two fields combined. A single field is half this >>> size. When ca

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/vc1: FIELDTX is only coded raw in interlaced frame I pictures

2018-05-20 Thread Jerome Borsboom
>> libavcodec/vc1_block.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c >> index f59c440943..daf30fdbfe 100644 >> --- a/libavcodec/vc1_block.c >> +++ b/libavcodec/vc1_block.c >> @@ -2680,7 +2680,7 @@ static void

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/vc1: FIELDTX is only coded raw in interlaced frame I pictures

2018-05-18 Thread Jerome Borsboom
> 2018-05-18 17:06 GMT+02:00, Jerome Borsboom : > >> This patch set solves various issues that affected the SA10180.vc1 >> test file. With these patches applied, this file decodes bitequal to >> the Intel VAAPI decoder on Haswell. > > I still see artefac

[FFmpeg-devel] [PATCH 2/5] avcodec/vc1: fix mquant calculation for interlace field pictures

2018-05-18 Thread Jerome Borsboom
For interlace field pictures s->mb_height indicates the height of the full picture in MBs, i.e. the two fields combined. A single field is half this size. When calculating mquant for interlace field pictures, the bottom edge is the last MB row of the field. Signed-off-by: Jerome Borsb

[FFmpeg-devel] [PATCH 3/5] avcodec/vc1: DIRECTBIT is only present in inter MBs

2018-05-18 Thread Jerome Borsboom
DIRECTBIT was decoded before the intra/inter MB branching when decoding interlace frame B pictures. Resulting in mistakenly also decoding it for intra MBs where this syntax element is not present. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_block.

[FFmpeg-devel] [PATCH 4/5] avcodec/vc1: fix calculation of the last line of a slice

2018-05-18 Thread Jerome Borsboom
Only for the last slice of the first field is the last line of the slice equal to the height of the field. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1dec.c b/liba

[FFmpeg-devel] [PATCH 5/5] avcodec/vc1: store zero MVs for all blocks in a MB

2018-05-18 Thread Jerome Borsboom
Direct prediction for interlace frame B pictures references the mv in the second block in an MB in the backward reference frame for the twomv case. When the backward reference frame is an I frame, this value may be unset. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis

[FFmpeg-devel] [PATCH 1/5] avcodec/vc1: FIELDTX is only coded raw in interlaced frame I pictures

2018-05-18 Thread Jerome Borsboom
FIELDTX bitplane is only present in interlace frame I pictures. v->fieldtx_is_raw may spill over from a previous interlaced frame I picture while decoding a non-interlace frame I picture. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- This patch set solves vario

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vaapi: slice_vertical_position starts from zero for the second field

2018-05-09 Thread Jerome Borsboom
>> Contrary to VC-1 spec, VAAPI expects the row address of the first >> macroblock row in the first slice to start from zero for the second >> field in a field interlaced picture. >> >> Signed-off-by: Jerome Borsboom >> --- >> This patch set adds suppo

[FFmpeg-devel] [PATCH 2/2] avcodec/vc1: support multi-slice field interlaced pictures with hwaccel

2018-05-08 Thread Jerome Borsboom
field with the method given in VC-1 spec. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1dec.c | 67 +++-- 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c

[FFmpeg-devel] [PATCH 1/2] avcodec/vaapi: slice_vertical_position starts from zero for the second field

2018-05-08 Thread Jerome Borsboom
Contrary to VC-1 spec, VAAPI expects the row address of the first macroblock row in the first slice to start from zero for the second field in a field interlaced picture. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- This patch set adds support for hardware decoding multi

[FFmpeg-devel] [PATCH] avcodec/vc1: fix mquant calculation

2018-04-28 Thread Jerome Borsboom
of the picture. Slice edges are not selected by DQPROFILE. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_block.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 0caa5ebb85..f59c

Re: [FFmpeg-devel] [PATCH] avcodec/x86/hpeldsp: fix half pel interpolation

2018-04-28 Thread Jerome Borsboom
> This patch is not correct. > > this code is not used if AV_CODEC_FLAG_BITEXACT is set, because it is > not bit exact ... > > Also the case where the off by 1 error occurs is a rare corner case, > Compared to the errors introduced by the IDCT this is not significant > > If you want to optimize

[FFmpeg-devel] [PATCH] avcodec/x86/hpeldsp: fix half pel interpolation

2018-04-27 Thread Jerome Borsboom
The assembly optimized half pel interpolation in some cases rounds the interpolated value when no rounding is requested. The result is a off by one error when one of the pixel values is zero. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- In the put_no_rnd_pixels fun

[FFmpeg-devel] [PATCH] avcodec/vc1: fix out of bounds access of overlap filter

2018-04-26 Thread Jerome Borsboom
Overlap filtering of the first row and first column must be guarded for out of bounds access of v->over_flags_plane. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_loopfilter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/l

[FFmpeg-devel] [PATCH] avcodec/vc1: more corrections for AC inverse quantization scaling

2018-04-25 Thread Jerome Borsboom
HALFQP should only be added to the inverse quantizer when the block is coded with PQUANT. When PQUANT is equal to ALTPQUANT, the original test for the addition of HALFQP fails. A negative value for mquant indicates that the value was derived from VOPDQUANT. Fixes #4372 Signed-off-by: Jerome

[FFmpeg-devel] [PATCH 14/14] avcodec/vc1: correct forgotten v->blocks_off

2018-04-23 Thread Jerome Borsboom
correct forgotten v->blocks_off Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_pred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1_pred.c b/libavcodec/vc1_pred.c index 3a52a22bc6..de736ec775 100644 --- a/libavcodec/v

[FFmpeg-devel] [PATCH 12/14] avcodec/vc1: correct mspel for field-interlace B frames

2018-04-23 Thread Jerome Borsboom
mspel indicates the use of bicubic interpolation. The check wrongly included MVMODE MV_PMODE_1MV_HPEL as using bilinear interpolation. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liba

[FFmpeg-devel] [PATCH 10/14] avcodec/vc1: add overlap smooting and loop filter for frame/field-interlace

2018-04-23 Thread Jerome Borsboom
Add previously omitted overlap smooting and loop filtering for frame/field-interlace pictures. For progressive pictures switch to the re-implemented versions of overlap smooting and loop filtering. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_b

[FFmpeg-devel] [PATCH 11/14] avcodec/vc1: remove unused overlap smooting and loop filter

2018-04-23 Thread Jerome Borsboom
remove unused overlap smooting and loop filter Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1.h| 3 - libavcodec/vc1_loopfilter.c | 297 2 files changed, 300 deletions(-) diff --git a/libavcodec/v

[FFmpeg-devel] [PATCH 13/14] avcodec/vc1: correct AC inverse quantization scaling

2018-04-23 Thread Jerome Borsboom
HALFQP should only be added to the inverse quantizer when the block is coded with PQUANT. See 8.1.3.8 in VC-1 spec. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1_blo

[FFmpeg-devel] [PATCH 09/14] avcodec/vc1: re-implement vc1_put_signed_blocks_clamped

2018-04-23 Thread Jerome Borsboom
The existing implementation only used vc1_put_signed_blocks_clamped for I and BI frames. This rewritten version is also applicable to P frame both progressive and frame/field-interlace. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_block.c

[FFmpeg-devel] [PATCH 08/14] avcodec/vc1: implement interlaced out-of-bounds reference pixel replication

2018-04-23 Thread Jerome Borsboom
The existing implementation did out-of-bounds reference pixel replication for progressive reference frames. In interlaced reference frames both the even and odd line on the horizontal edges need to be replicated. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- liba

[FFmpeg-devel] [PATCH 07/14] avcodec/vc1: correct ff_vc1_dqscale

2018-04-23 Thread Jerome Borsboom
According to VC-1 spec table 74, the last value in ff_vc1_dqscale should be 0x1041 instead of 0x1000. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1data.c b/liba

[FFmpeg-devel] [PATCH 06/14] avcodec/vc1: correct ff_vc1_mbmode_intfrp

2018-04-23 Thread Jerome Borsboom
According to VC-1 spec 10.7.3.4, FIELDTX shall be set to the same type as the motion vector for zero-coded blocks. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc1

[FFmpeg-devel] [PATCH 04/14] avcodec/vc1: store additional bitstream elements during MB decoding

2018-04-23 Thread Jerome Borsboom
The new loop filter needs additional MB properties to make its filtering decisions. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_block.c | 58 +- libavcodec/vc1dec.c| 16 +++--- 2 files chang

[FFmpeg-devel] [PATCH 05/14] avcodec/vc1: store color-difference reference field type

2018-04-23 Thread Jerome Borsboom
The loop filter for P interlace field pictures needs the reference field type. For luma, the reference field type was already available. Store the reference field type for color-difference as well. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1_mc

[FFmpeg-devel] [PATCH 03/14] avcodec/vc1: re-implement and expand VC-1 loop filtering

2018-04-23 Thread Jerome Borsboom
The existing implementation did loop filtering for progressive frames only. This rewritten version implements loop filtering for all applicable frame types for both progessive and frame/field-interlace. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec

Re: [FFmpeg-devel] [PATCH] avcodec/vaapi: do not parse MVMODE for VC-1 interlaced frame pictures

2018-04-23 Thread Jerome Borsboom
On 29-3-2018 13:43, Jerome Borsboom wrote: > Interlaced frame pictures do not contain the MVMODE or MVMODE2 bitstream > element. Trying to parse this element and passing a nonzero value to the > hardware decoder results in small inaccuracies in the decoded picture. > > Signed

[FFmpeg-devel] [PATCH 02/14] avcodec/vc1: change to using v->block instead of s->block for P frames

2018-04-23 Thread Jerome Borsboom
The new overlap smooting filter smoothes image pixels stored in v->block. Switch to v->block instead of s->block for storing decoded image pixels for P frames. Additionally, we must take incrementing *_blk_idx out of the vc1_put_signed_blocks_clamped function. Signed-off-by: Jerome

[FFmpeg-devel] [PATCH 01/14] avcodec/vc1: re-implement and expand VC-1 overlap smooting

2018-04-23 Thread Jerome Borsboom
The existing implementation did overlap smoothing for progressive frames only. This rewritten version implements overlap smoothing for all applicable frame types for both progessive and frame/field-interlace. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- This patch-set im

Re: [FFmpeg-devel] [PATCH] avcodec/vc1_pred: properly clip interlaced motion vectors

2018-04-21 Thread Jerome Borsboom
; > } > > static av_always_inline int scaleforopp_x(VC1Context *v, int n /* MV */) > -- > 2.11.0 scaleforsame_y references ref_field_type. Therefore, it needs to be set before scaleforsame is called. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> ---

[FFmpeg-devel] [PATCH] avcodec/vaapi: do not parse MVMODE for VC-1 interlaced frame pictures

2018-03-29 Thread Jerome Borsboom
Interlaced frame pictures do not contain the MVMODE or MVMODE2 bitstream element. Trying to parse this element and passing a nonzero value to the hardware decoder results in small inaccuracies in the decoded picture. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- With this

[FFmpeg-devel] [PATCH 2/3 v1.2] avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding

2018-03-01 Thread Jerome Borsboom
ned-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vaapi_vc1.c | 163 - 1 file changed, 134 insertions(+), 29 deletions(-) diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index 525376790e..97b23917

Re: [FFmpeg-devel] [PATCH 2/3 v1.1] avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding

2018-02-28 Thread Jerome Borsboom
On 25/02/18 19:12, Jerome Borsboom wrote: avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding Pass necessary bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom --- libavcodec/vaapi_vc1.c | 167

[FFmpeg-devel] [PATCH 3/3 v1.1] avcodec/vaapi: mask unused bits in bitplane_present.value

2018-02-26 Thread Jerome Borsboom
pictures. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vaapi_vc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index a137979dd4..e93b7285e3 100644 --- a/libavcodec/vaapi_vc1.c +++ b/liba

[FFmpeg-devel] [PATCH 2/3 v1.1] avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding

2018-02-26 Thread Jerome Borsboom
avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding Pass necessary bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vaapi_vc1.c

[FFmpeg-devel] [PATCH 1/3 v1.1] avcodec/vc1: add bitstream elements for VAAPI VC-1 interlaced decoding

2018-02-26 Thread Jerome Borsboom
bitstream elements for VAAPI VC-1 interlaced decoding We need to pass more bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1.

[FFmpeg-devel] [PATCH 3/3] avcodec/vaapi: mask unused bits in bitplane_present.value

2018-02-25 Thread Jerome Borsboom
Due to the union construct, unused bits in bitplane_present.value might be uninitialized even when the used bits are all set to a value. Masking the unused bits prevents spurious true values when all used bits are unset, e.g. skipped pictures. Signed-off-by: Jerome Borsboom <jerome.bo

[FFmpeg-devel] [PATCH 2/3] avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding

2018-02-25 Thread Jerome Borsboom
avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding Pass necessary bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vaapi_vc1.c

[FFmpeg-devel] [PATCH 1/3] avcodec/vc1: add bitstream elements for VAAPI VC-1 interlaced decoding

2018-02-25 Thread Jerome Borsboom
doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsb...@carpalis.nl> --- libavcodec/vc1.c | 95 +--- libavcodec/vc1.h | 6 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/libavcodec/v