Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures
@ 2022-08-09 18:28 Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 2/9] avcodec/mpegutils: Combine multiple av_log statements Andreas Rheinhardt
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:28 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Up until now, ff_wmv2_decode_secondary_picture_header() only
set the mb_type array for non I-pictures, so that the decoding
process uses the earlier values of this array; this affects
the output of the wmv8-x8intra FATE-test (which this patch
therefore updates). These earlier values were set when decoding
earlier frames or when the buffer was initially zero-allocated.
A consequence of this is that the output of this test would be
random if ff_find_unused_picture() would select the unused picture
to return at random. Furthermore decoding from a keyframe onwards
depends upon the earlier state of the decoder.

This patch therefore zeroes said array when decoding an I picture.

(It is not claimed that zero is the right value to fill the array with.
I just don't know.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Would be nice if someone knowledgeable about wmv2 could take at
whether zero is the right init value.

 libavcodec/wmv2dec.c        |   4 +
 tests/ref/fate/wmv8-x8intra | 644 ++++++++++++++++++------------------
 2 files changed, 326 insertions(+), 322 deletions(-)

diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 6d9b72d123..22eb012f56 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -242,6 +242,10 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
     WMV2DecContext *const w = (WMV2DecContext *) s;
 
     if (s->pict_type == AV_PICTURE_TYPE_I) {
+        /* Is filling with zeroes really the right thing to do? */
+        memset(s->current_picture_ptr->mb_type, 0,
+               sizeof(*s->current_picture_ptr->mb_type) *
+               s->mb_height * s->mb_stride);
         if (w->j_type_bit)
             w->j_type = get_bits1(&s->gb);
         else
diff --git a/tests/ref/fate/wmv8-x8intra b/tests/ref/fate/wmv8-x8intra
index c9ed2733e7..8802d03834 100644
--- a/tests/ref/fate/wmv8-x8intra
+++ b/tests/ref/fate/wmv8-x8intra
@@ -7,21 +7,21 @@
 0,          3,          3,        1,   115200, 0x8911d86f
 0,          4,          4,        1,   115200, 0x7c5dd82e
 0,          5,          5,        1,   115200, 0x7c5ed82e
-0,         30,         30,        1,   115200, 0xd323d838
-0,         31,         31,        1,   115200, 0x6e7479ab
-0,         32,         32,        1,   115200, 0x14674bf6
-0,         33,         33,        1,   115200, 0x074c2e3d
-0,         34,         34,        1,   115200, 0x9b3025ef
-0,         35,         35,        1,   115200, 0x76882dae
-0,         36,         36,        1,   115200, 0xedf3421b
-0,         37,         37,        1,   115200, 0xb5378486
-0,         38,         38,        1,   115200, 0xc4a53420
-0,         39,         39,        1,   115200, 0x559cb60f
-0,         40,         40,        1,   115200, 0xcc034ddd
-0,         41,         41,        1,   115200, 0xb77b7779
-0,         42,         42,        1,   115200, 0x0ad9c3e6
-0,         43,         43,        1,   115200, 0x4e673027
-0,         44,         44,        1,   115200, 0x54717979
+0,         30,         30,        1,   115200, 0x03fbd838
+0,         31,         31,        1,   115200, 0x37c879b2
+0,         32,         32,        1,   115200, 0xd5994bfc
+0,         33,         33,        1,   115200, 0x4b662e3e
+0,         34,         34,        1,   115200, 0x2f1925ea
+0,         35,         35,        1,   115200, 0xc5912db0
+0,         36,         36,        1,   115200, 0x76c4421f
+0,         37,         37,        1,   115200, 0x5cc8848b
+0,         38,         38,        1,   115200, 0x75e63425
+0,         39,         39,        1,   115200, 0x1a29b620
+0,         40,         40,        1,   115200, 0x60c64de9
+0,         41,         41,        1,   115200, 0xc7ac7783
+0,         42,         42,        1,   115200, 0xb056c3ee
+0,         43,         43,        1,   115200, 0xa57d3030
+0,         44,         44,        1,   115200, 0x2864797c
 0,         45,         45,        1,   115200, 0xf9e557c9
 0,         46,         46,        1,   115200, 0xbdcf6358
 0,         47,         47,        1,   115200, 0xd55c7bb7
@@ -82,156 +82,156 @@
 0,        102,        102,        1,   115200, 0x78bb8f95
 0,        103,        103,        1,   115200, 0x9c71d03f
 0,        104,        104,        1,   115200, 0xbe5db887
-0,        105,        105,        1,   115200, 0xa88e00d0
-0,        106,        106,        1,   115200, 0xc7b50827
-0,        107,        107,        1,   115200, 0xf9155ed3
-0,        108,        108,        1,   115200, 0x8dd72d44
-0,        109,        109,        1,   115200, 0xee38183a
-0,        110,        110,        1,   115200, 0xea2b6329
-0,        111,        111,        1,   115200, 0xf556c2b3
-0,        112,        112,        1,   115200, 0x90edebf9
-0,        113,        113,        1,   115200, 0x4f440fdf
-0,        114,        114,        1,   115200, 0xfdec7a9d
-0,        115,        115,        1,   115200, 0xc7927952
-0,        116,        116,        1,   115200, 0xdd475704
-0,        117,        117,        1,   115200, 0x974a61a5
-0,        118,        118,        1,   115200, 0xbf2b785e
-0,        119,        119,        1,   115200, 0x5de451fa
-0,        120,        120,        1,   115200, 0x3fac503e
-0,        121,        121,        1,   115200, 0xc6785643
-0,        122,        122,        1,   115200, 0xe6666254
-0,        123,        123,        1,   115200, 0x1a05130c
-0,        124,        124,        1,   115200, 0x082cea5d
-0,        125,        125,        1,   115200, 0x473ef142
-0,        126,        126,        1,   115200, 0x9769a776
-0,        127,        127,        1,   115200, 0xe6e841af
-0,        128,        128,        1,   115200, 0xa44c8d1e
-0,        129,        129,        1,   115200, 0xd03d641b
-0,        130,        130,        1,   115200, 0x3aea3c9e
-0,        131,        131,        1,   115200, 0x09efcf21
-0,        132,        132,        1,   115200, 0xeeb6ff64
-0,        133,        133,        1,   115200, 0xa310af6f
-0,        134,        134,        1,   115200, 0x2488519e
-0,        135,        135,        1,   115200, 0x48e1febf
-0,        136,        136,        1,   115200, 0x76d00513
-0,        137,        137,        1,   115200, 0xa28eda81
-0,        138,        138,        1,   115200, 0xc2cbdcae
-0,        139,        139,        1,   115200, 0xd976c9b2
-0,        140,        140,        1,   115200, 0xb0abebab
-0,        141,        141,        1,   115200, 0x32be4765
-0,        142,        142,        1,   115200, 0xc0a36b11
-0,        143,        143,        1,   115200, 0xb6d1d47f
-0,        144,        144,        1,   115200, 0xab7954a6
-0,        145,        145,        1,   115200, 0xc485789c
-0,        146,        146,        1,   115200, 0xa07101b6
-0,        147,        147,        1,   115200, 0x6297780a
-0,        148,        148,        1,   115200, 0xf550ba94
-0,        149,        149,        1,   115200, 0x9b77f994
-0,        150,        150,        1,   115200, 0xb0e870ad
-0,        151,        151,        1,   115200, 0x2dd89b0b
-0,        152,        152,        1,   115200, 0x36dcfe2f
-0,        153,        153,        1,   115200, 0x3e5e1a8f
-0,        154,        154,        1,   115200, 0xb8394740
-0,        155,        155,        1,   115200, 0xbfc852fc
-0,        156,        156,        1,   115200, 0x5b3f8aa2
-0,        157,        157,        1,   115200, 0xc29d8e3a
-0,        158,        158,        1,   115200, 0x7300abd8
-0,        159,        159,        1,   115200, 0xd1dd7a3b
-0,        160,        160,        1,   115200, 0xe5978f39
-0,        161,        161,        1,   115200, 0x235c6b8d
-0,        162,        162,        1,   115200, 0xec1b5805
-0,        163,        163,        1,   115200, 0x16d23946
-0,        164,        164,        1,   115200, 0xa8de1cf4
-0,        165,        165,        1,   115200, 0x5e730512
-0,        166,        166,        1,   115200, 0x1250feed
-0,        167,        167,        1,   115200, 0x0928c190
-0,        168,        168,        1,   115200, 0xa25d9e5c
-0,        169,        169,        1,   115200, 0x921068ea
-0,        170,        170,        1,   115200, 0x2c974ddb
-0,        171,        171,        1,   115200, 0x35ae4d75
-0,        172,        172,        1,   115200, 0xec0c6469
-0,        173,        173,        1,   115200, 0x22704fad
-0,        174,        174,        1,   115200, 0x0a9a5aed
-0,        175,        175,        1,   115200, 0x45192f2f
-0,        176,        176,        1,   115200, 0xc07b39f4
-0,        177,        177,        1,   115200, 0x32c60215
-0,        178,        178,        1,   115200, 0xda65035e
-0,        179,        179,        1,   115200, 0x99d0cd81
-0,        180,        180,        1,   115200, 0xd08ca5e3
-0,        181,        181,        1,   115200, 0x82cdad17
-0,        182,        182,        1,   115200, 0x2587a420
-0,        183,        183,        1,   115200, 0x85cba73d
-0,        184,        184,        1,   115200, 0x4677bf89
-0,        185,        185,        1,   115200, 0x84c2e034
-0,        186,        186,        1,   115200, 0xd343066c
-0,        187,        187,        1,   115200, 0xdec716a1
-0,        188,        188,        1,   115200, 0x93c04f5d
-0,        189,        189,        1,   115200, 0xce126ac4
-0,        190,        190,        1,   115200, 0xa20098c5
-0,        191,        191,        1,   115200, 0x9a4ca711
-0,        192,        192,        1,   115200, 0xfae9c154
-0,        193,        193,        1,   115200, 0xb34cc431
-0,        194,        194,        1,   115200, 0x923cdec2
-0,        195,        195,        1,   115200, 0x60ffdfe8
-0,        196,        196,        1,   115200, 0xa3e6f9f2
-0,        197,        197,        1,   115200, 0x374f0a47
-0,        198,        198,        1,   115200, 0x8fb228f1
-0,        199,        199,        1,   115200, 0x4c1a24bf
-0,        200,        200,        1,   115200, 0x768a52d1
-0,        201,        201,        1,   115200, 0x5bf77025
-0,        202,        202,        1,   115200, 0x6ca67c2a
-0,        203,        203,        1,   115200, 0x107ca3e9
-0,        204,        204,        1,   115200, 0x4abeda93
-0,        205,        205,        1,   115200, 0x750be9ff
-0,        206,        206,        1,   115200, 0x28c5eee3
-0,        207,        207,        1,   115200, 0xa1b0e4b2
-0,        208,        208,        1,   115200, 0x2ae7f33d
-0,        209,        209,        1,   115200, 0xf29cdae0
-0,        210,        210,        1,   115200, 0xd470f9ed
-0,        211,        211,        1,   115200, 0x2d22f832
-0,        212,        212,        1,   115200, 0xc5b91780
-0,        213,        213,        1,   115200, 0x3d8e4151
-0,        214,        214,        1,   115200, 0x459f58e0
-0,        215,        215,        1,   115200, 0x8dc198fe
-0,        216,        216,        1,   115200, 0x2479f579
-0,        217,        217,        1,   115200, 0xc2040c21
-0,        218,        218,        1,   115200, 0x39ad60d5
-0,        219,        219,        1,   115200, 0x9329dd37
-0,        220,        220,        1,   115200, 0xa08807da
-0,        221,        221,        1,   115200, 0xbf514cd1
-0,        222,        222,        1,   115200, 0x8b66a779
-0,        223,        223,        1,   115200, 0x865ebff5
-0,        224,        224,        1,   115200, 0x5967074c
-0,        225,        225,        1,   115200, 0xd5521f60
-0,        226,        226,        1,   115200, 0x462c329c
-0,        227,        227,        1,   115200, 0xbefd36fb
-0,        228,        228,        1,   115200, 0x6f58403b
-0,        229,        229,        1,   115200, 0xe4af2fac
-0,        230,        230,        1,   115200, 0x46453662
-0,        231,        231,        1,   115200, 0x72cc59e8
-0,        232,        232,        1,   115200, 0xd6c67f8e
-0,        233,        233,        1,   115200, 0xd35674a7
-0,        234,        234,        1,   115200, 0x65785ddb
-0,        235,        235,        1,   115200, 0xfd7958aa
-0,        236,        236,        1,   115200, 0x93e45607
-0,        237,        237,        1,   115200, 0x196a4fa5
-0,        238,        238,        1,   115200, 0xe33a5dac
-0,        239,        239,        1,   115200, 0x4e66904a
-0,        240,        240,        1,   115200, 0xc1e3a50a
-0,        241,        241,        1,   115200, 0xa685b351
-0,        242,        242,        1,   115200, 0xee2fdeb7
-0,        243,        243,        1,   115200, 0x189cefdd
-0,        244,        244,        1,   115200, 0xbdf90506
-0,        245,        245,        1,   115200, 0xe72c23d2
-0,        246,        246,        1,   115200, 0xa3f65e7b
-0,        247,        247,        1,   115200, 0x8bc67eee
-0,        248,        248,        1,   115200, 0xd305d09b
-0,        249,        249,        1,   115200, 0xc521eba5
-0,        250,        250,        1,   115200, 0x16cf161f
-0,        251,        251,        1,   115200, 0x2ce322b5
-0,        252,        252,        1,   115200, 0x57ce82b4
-0,        253,        253,        1,   115200, 0x8da896b9
-0,        254,        254,        1,   115200, 0xc16ad590
+0,        105,        105,        1,   115200, 0x125900d0
+0,        106,        106,        1,   115200, 0x916408eb
+0,        107,        107,        1,   115200, 0xe45b5f5a
+0,        108,        108,        1,   115200, 0x94222dc4
+0,        109,        109,        1,   115200, 0xba6018b4
+0,        110,        110,        1,   115200, 0xe64b63f7
+0,        111,        111,        1,   115200, 0x2a6ac35c
+0,        112,        112,        1,   115200, 0xb899ed0d
+0,        113,        113,        1,   115200, 0xefcc1111
+0,        114,        114,        1,   115200, 0x67a57bbe
+0,        115,        115,        1,   115200, 0x48877a83
+0,        116,        116,        1,   115200, 0xf83d57ca
+0,        117,        117,        1,   115200, 0x80a6625f
+0,        118,        118,        1,   115200, 0x984f78e4
+0,        119,        119,        1,   115200, 0xd0c7524d
+0,        120,        120,        1,   115200, 0x60475044
+0,        121,        121,        1,   115200, 0xce495653
+0,        122,        122,        1,   115200, 0x05956238
+0,        123,        123,        1,   115200, 0x1ede12ce
+0,        124,        124,        1,   115200, 0x5ecfea25
+0,        125,        125,        1,   115200, 0x533ff0cc
+0,        126,        126,        1,   115200, 0x0900a711
+0,        127,        127,        1,   115200, 0x0ff44124
+0,        128,        128,        1,   115200, 0x96298cc0
+0,        129,        129,        1,   115200, 0xd2a063ab
+0,        130,        130,        1,   115200, 0xe9c63c2f
+0,        131,        131,        1,   115200, 0x0991ceda
+0,        132,        132,        1,   115200, 0x089aff4e
+0,        133,        133,        1,   115200, 0xabe4af7e
+0,        134,        134,        1,   115200, 0xd7ba5162
+0,        135,        135,        1,   115200, 0xb3adfe6d
+0,        136,        136,        1,   115200, 0xb04604c9
+0,        137,        137,        1,   115200, 0xdef1da1b
+0,        138,        138,        1,   115200, 0x25ffdc48
+0,        139,        139,        1,   115200, 0x8b7ac975
+0,        140,        140,        1,   115200, 0xaa21eb49
+0,        141,        141,        1,   115200, 0x5ffc46cc
+0,        142,        142,        1,   115200, 0x73616a99
+0,        143,        143,        1,   115200, 0xabfad3f5
+0,        144,        144,        1,   115200, 0x11d45466
+0,        145,        145,        1,   115200, 0xc123788b
+0,        146,        146,        1,   115200, 0xa58d01e0
+0,        147,        147,        1,   115200, 0x72137847
+0,        148,        148,        1,   115200, 0x25b9baa9
+0,        149,        149,        1,   115200, 0x1d5bf9d6
+0,        150,        150,        1,   115200, 0x6bab7161
+0,        151,        151,        1,   115200, 0x59789be2
+0,        152,        152,        1,   115200, 0x2784ff18
+0,        153,        153,        1,   115200, 0x05901bec
+0,        154,        154,        1,   115200, 0x5a8648be
+0,        155,        155,        1,   115200, 0x048854c1
+0,        156,        156,        1,   115200, 0x5d2b8c69
+0,        157,        157,        1,   115200, 0x951d8fe6
+0,        158,        158,        1,   115200, 0x5118ad8c
+0,        159,        159,        1,   115200, 0x6d417bdd
+0,        160,        160,        1,   115200, 0x59c590d3
+0,        161,        161,        1,   115200, 0x7c826d1a
+0,        162,        162,        1,   115200, 0xa87659cd
+0,        163,        163,        1,   115200, 0xe0893b19
+0,        164,        164,        1,   115200, 0x73531ead
+0,        165,        165,        1,   115200, 0x7bdf0697
+0,        166,        166,        1,   115200, 0xd3de0067
+0,        167,        167,        1,   115200, 0xcf29c29b
+0,        168,        168,        1,   115200, 0xda299edb
+0,        169,        169,        1,   115200, 0x0e766935
+0,        170,        170,        1,   115200, 0x29f34e91
+0,        171,        171,        1,   115200, 0x85524e53
+0,        172,        172,        1,   115200, 0x13796542
+0,        173,        173,        1,   115200, 0x78bc5073
+0,        174,        174,        1,   115200, 0xf4b05c51
+0,        175,        175,        1,   115200, 0x12ac3079
+0,        176,        176,        1,   115200, 0xf5bf3b45
+0,        177,        177,        1,   115200, 0x1a9103a7
+0,        178,        178,        1,   115200, 0x3b5904aa
+0,        179,        179,        1,   115200, 0x5d4fce7c
+0,        180,        180,        1,   115200, 0x3239a6fa
+0,        181,        181,        1,   115200, 0xd7ffae3a
+0,        182,        182,        1,   115200, 0xc687a51d
+0,        183,        183,        1,   115200, 0xc5a5a871
+0,        184,        184,        1,   115200, 0x40a4c09a
+0,        185,        185,        1,   115200, 0xd905e0c1
+0,        186,        186,        1,   115200, 0x0cea06c3
+0,        187,        187,        1,   115200, 0x87961734
+0,        188,        188,        1,   115200, 0x79bb502e
+0,        189,        189,        1,   115200, 0x3a606c03
+0,        190,        190,        1,   115200, 0x7eea99f7
+0,        191,        191,        1,   115200, 0x8a13a800
+0,        192,        192,        1,   115200, 0x4793c238
+0,        193,        193,        1,   115200, 0xa305c503
+0,        194,        194,        1,   115200, 0x5e4bdf82
+0,        195,        195,        1,   115200, 0x0165e148
+0,        196,        196,        1,   115200, 0x175afb1f
+0,        197,        197,        1,   115200, 0xfb710b4e
+0,        198,        198,        1,   115200, 0x8074299f
+0,        199,        199,        1,   115200, 0xb9bd2576
+0,        200,        200,        1,   115200, 0x0d135337
+0,        201,        201,        1,   115200, 0xe53e706a
+0,        202,        202,        1,   115200, 0x57627bd2
+0,        203,        203,        1,   115200, 0xfa13a336
+0,        204,        204,        1,   115200, 0x1c47d9c4
+0,        205,        205,        1,   115200, 0x9f44e929
+0,        206,        206,        1,   115200, 0xfd15ee4d
+0,        207,        207,        1,   115200, 0x0a43e426
+0,        208,        208,        1,   115200, 0x1413f2d1
+0,        209,        209,        1,   115200, 0x89eadaa0
+0,        210,        210,        1,   115200, 0x01b4f9c7
+0,        211,        211,        1,   115200, 0x0883f7f9
+0,        212,        212,        1,   115200, 0xd5f81739
+0,        213,        213,        1,   115200, 0x637d40c8
+0,        214,        214,        1,   115200, 0x211d5850
+0,        215,        215,        1,   115200, 0xb0319873
+0,        216,        216,        1,   115200, 0x90e9f518
+0,        217,        217,        1,   115200, 0x70f40bd3
+0,        218,        218,        1,   115200, 0x8f646061
+0,        219,        219,        1,   115200, 0x1f50dc9d
+0,        220,        220,        1,   115200, 0x3c810751
+0,        221,        221,        1,   115200, 0x79e44c66
+0,        222,        222,        1,   115200, 0x6c9fa6b6
+0,        223,        223,        1,   115200, 0x9211bf3f
+0,        224,        224,        1,   115200, 0xfbe70678
+0,        225,        225,        1,   115200, 0xab9d1e8f
+0,        226,        226,        1,   115200, 0xf54f31dc
+0,        227,        227,        1,   115200, 0xe6963636
+0,        228,        228,        1,   115200, 0x58ac3f43
+0,        229,        229,        1,   115200, 0x4d382f03
+0,        230,        230,        1,   115200, 0xaa663672
+0,        231,        231,        1,   115200, 0xbbf559c8
+0,        232,        232,        1,   115200, 0x6c567f1e
+0,        233,        233,        1,   115200, 0x59817491
+0,        234,        234,        1,   115200, 0xba715dc2
+0,        235,        235,        1,   115200, 0x299f5882
+0,        236,        236,        1,   115200, 0x139455d5
+0,        237,        237,        1,   115200, 0x37e74fb1
+0,        238,        238,        1,   115200, 0x4f005ddc
+0,        239,        239,        1,   115200, 0xc90e8fcb
+0,        240,        240,        1,   115200, 0x22e4a47a
+0,        241,        241,        1,   115200, 0xa974b2d2
+0,        242,        242,        1,   115200, 0xfab7de51
+0,        243,        243,        1,   115200, 0xa9a7ef13
+0,        244,        244,        1,   115200, 0x8ddd0464
+0,        245,        245,        1,   115200, 0xd314232a
+0,        246,        246,        1,   115200, 0x1fba5db0
+0,        247,        247,        1,   115200, 0x52387e64
+0,        248,        248,        1,   115200, 0xc58ed032
+0,        249,        249,        1,   115200, 0xefabeb35
+0,        250,        250,        1,   115200, 0x002315c1
+0,        251,        251,        1,   115200, 0x124721f7
+0,        252,        252,        1,   115200, 0xc24981e9
+0,        253,        253,        1,   115200, 0xa1f795f0
+0,        254,        254,        1,   115200, 0xc01fd535
 0,        255,        255,        1,   115200, 0x8cdbe729
 0,        256,        256,        1,   115200, 0x69eafd96
 0,        257,        257,        1,   115200, 0xd9e40a03
@@ -320,160 +320,160 @@
 0,        340,        340,        1,   115200, 0x82179a82
 0,        341,        341,        1,   115200, 0xf8865f3d
 0,        342,        342,        1,   115200, 0xa5fb7b80
-0,        343,        343,        1,   115200, 0x9aebc04d
-0,        344,        344,        1,   115200, 0x44c705fc
-0,        345,        345,        1,   115200, 0xd322add3
-0,        346,        346,        1,   115200, 0xf4230b76
-0,        347,        347,        1,   115200, 0xaa915069
-0,        348,        348,        1,   115200, 0x518d53d8
-0,        349,        349,        1,   115200, 0xefa7d909
-0,        350,        350,        1,   115200, 0x803c3c0e
-0,        351,        351,        1,   115200, 0x5650bc0a
-0,        352,        352,        1,   115200, 0x8b34ecab
-0,        353,        353,        1,   115200, 0x975c4976
-0,        354,        354,        1,   115200, 0x700e3cb4
-0,        355,        355,        1,   115200, 0xef27a4ec
-0,        356,        356,        1,   115200, 0x2b953936
-0,        357,        357,        1,   115200, 0xcf9b4956
-0,        358,        358,        1,   115200, 0xae4a8eba
-0,        359,        359,        1,   115200, 0xf8821144
-0,        360,        360,        1,   115200, 0x97c2402c
-0,        361,        361,        1,   115200, 0x209b7bb3
-0,        362,        362,        1,   115200, 0xd22fff2c
-0,        363,        363,        1,   115200, 0xe85b4f16
-0,        364,        364,        1,   115200, 0x0659f318
-0,        365,        365,        1,   115200, 0x6e2bff98
-0,        366,        366,        1,   115200, 0xc6626f2f
-0,        367,        367,        1,   115200, 0x123138e2
-0,        368,        368,        1,   115200, 0x69e680ab
-0,        369,        369,        1,   115200, 0xe4d7cd1d
-0,        370,        370,        1,   115200, 0x4ca10d47
-0,        371,        371,        1,   115200, 0x633a4c39
-0,        372,        372,        1,   115200, 0x64ded292
-0,        373,        373,        1,   115200, 0x88d2df42
-0,        374,        374,        1,   115200, 0x998f4c63
-0,        375,        375,        1,   115200, 0x753c76f9
-0,        376,        376,        1,   115200, 0x9d7ba0a6
-0,        377,        377,        1,   115200, 0x68798da5
-0,        378,        378,        1,   115200, 0xb5b18bc3
-0,        379,        379,        1,   115200, 0x20245e49
-0,        380,        380,        1,   115200, 0xf15d4b8f
-0,        381,        381,        1,   115200, 0x17f83b69
-0,        382,        382,        1,   115200, 0xcc545783
-0,        383,        383,        1,   115200, 0x3dad530e
-0,        384,        384,        1,   115200, 0x6b465c94
-0,        385,        385,        1,   115200, 0xbc5f3831
-0,        386,        386,        1,   115200, 0x1b2f042d
-0,        387,        387,        1,   115200, 0xaec391ac
-0,        388,        388,        1,   115200, 0x99fa8b2a
-0,        389,        389,        1,   115200, 0xf78d3524
-0,        390,        390,        1,   115200, 0xe6255a24
-0,        391,        391,        1,   115200, 0x253542c6
-0,        392,        392,        1,   115200, 0xfab05365
-0,        393,        393,        1,   115200, 0x406a3749
-0,        394,        394,        1,   115200, 0xaf0f3935
-0,        395,        395,        1,   115200, 0x0d9ff780
-0,        396,        396,        1,   115200, 0xfadcfc15
-0,        397,        397,        1,   115200, 0x8267d5ad
-0,        398,        398,        1,   115200, 0xd705d250
-0,        399,        399,        1,   115200, 0x18f9d1f2
-0,        400,        400,        1,   115200, 0xd92bc045
-0,        401,        401,        1,   115200, 0x439b9ca0
-0,        402,        402,        1,   115200, 0xcb80a14c
-0,        403,        403,        1,   115200, 0xee887f49
-0,        404,        404,        1,   115200, 0xfba297eb
-0,        405,        405,        1,   115200, 0x0e2f744b
-0,        406,        406,        1,   115200, 0xaa227aa7
-0,        407,        407,        1,   115200, 0xd7bc6fff
-0,        408,        408,        1,   115200, 0x295c91cf
-0,        409,        409,        1,   115200, 0xc5678733
-0,        410,        410,        1,   115200, 0xc8d49120
-0,        411,        411,        1,   115200, 0xb14e90b9
-0,        412,        412,        1,   115200, 0x6a09acab
-0,        413,        413,        1,   115200, 0xb9aec358
-0,        414,        414,        1,   115200, 0xeb3695b2
-0,        415,        415,        1,   115200, 0xc5bebd62
-0,        416,        416,        1,   115200, 0x2d6b1a3f
-0,        417,        417,        1,   115200, 0x92986f49
-0,        418,        418,        1,   115200, 0x00c37cf9
-0,        419,        419,        1,   115200, 0x5a4d87a6
-0,        420,        420,        1,   115200, 0xe87888a2
-0,        421,        421,        1,   115200, 0x4ab18d6d
-0,        422,        422,        1,   115200, 0xcb84880b
-0,        423,        423,        1,   115200, 0x82458848
-0,        424,        424,        1,   115200, 0x11b477dc
-0,        425,        425,        1,   115200, 0x56d876d3
-0,        426,        426,        1,   115200, 0xf5297ceb
-0,        427,        427,        1,   115200, 0x47357713
-0,        428,        428,        1,   115200, 0xede562df
-0,        429,        429,        1,   115200, 0xabf42d38
-0,        430,        430,        1,   115200, 0xea9225c8
-0,        431,        431,        1,   115200, 0x79ce1cb4
-0,        432,        432,        1,   115200, 0x0cd418b4
-0,        433,        433,        1,   115200, 0x6f7c118e
-0,        434,        434,        1,   115200, 0xbbbc0fa4
-0,        435,        435,        1,   115200, 0x890514e6
-0,        436,        436,        1,   115200, 0x9c4d0e7d
-0,        437,        437,        1,   115200, 0x56260e76
-0,        438,        438,        1,   115200, 0x7dc80258
-0,        439,        439,        1,   115200, 0xa990f5a3
-0,        440,        440,        1,   115200, 0x2174e913
-0,        441,        441,        1,   115200, 0x8296e674
-0,        442,        442,        1,   115200, 0x9e28e3b4
-0,        443,        443,        1,   115200, 0x404ce72b
-0,        444,        444,        1,   115200, 0xc7cbf4ec
-0,        445,        445,        1,   115200, 0x5ce0f5a1
-0,        446,        446,        1,   115200, 0x88dbf7c7
-0,        447,        447,        1,   115200, 0x26daf35a
-0,        448,        448,        1,   115200, 0x5cfdfe63
-0,        449,        449,        1,   115200, 0xdd40fb9b
-0,        450,        450,        1,   115200, 0x5b8df20f
-0,        451,        451,        1,   115200, 0x4f2ce5ac
-0,        452,        452,        1,   115200, 0xc9d0e0c2
-0,        453,        453,        1,   115200, 0x51c7e2a6
-0,        454,        454,        1,   115200, 0xb3bae109
-0,        455,        455,        1,   115200, 0xbd85e5b2
-0,        456,        456,        1,   115200, 0x1fbbdfd1
-0,        457,        457,        1,   115200, 0x3665dfd0
-0,        458,        458,        1,   115200, 0xcd29d50c
-0,        459,        459,        1,   115200, 0xedd1c6bc
-0,        460,        460,        1,   115200, 0xebc2d072
-0,        461,        461,        1,   115200, 0xe2e5fbbd
-0,        462,        462,        1,   115200, 0x616a13dc
-0,        463,        463,        1,   115200, 0xf64f1efc
-0,        464,        464,        1,   115200, 0x5356235f
-0,        465,        465,        1,   115200, 0xafc032d5
-0,        466,        466,        1,   115200, 0xaa034420
-0,        467,        467,        1,   115200, 0x007e0afa
-0,        468,        468,        1,   115200, 0x077ad5c8
-0,        469,        469,        1,   115200, 0x8fc815b8
-0,        470,        470,        1,   115200, 0x95b85990
-0,        471,        471,        1,   115200, 0x46f5899f
-0,        472,        472,        1,   115200, 0x1e37cd82
-0,        473,        473,        1,   115200, 0x3ce90bfd
-0,        474,        474,        1,   115200, 0xbb95bd1d
-0,        475,        475,        1,   115200, 0xd4aa9ba8
-0,        476,        476,        1,   115200, 0x0e761649
-0,        477,        477,        1,   115200, 0x49ad7886
-0,        478,        478,        1,   115200, 0x2f4184df
-0,        479,        479,        1,   115200, 0x80b906ee
-0,        480,        480,        1,   115200, 0x62405100
-0,        481,        481,        1,   115200, 0x3ece13b5
-0,        482,        482,        1,   115200, 0x3abd4cfc
-0,        483,        483,        1,   115200, 0x91b418e3
-0,        484,        484,        1,   115200, 0xde1ce68e
-0,        485,        485,        1,   115200, 0xfc47f912
-0,        486,        486,        1,   115200, 0x5b380a6f
-0,        487,        487,        1,   115200, 0x8f35c3c0
-0,        488,        488,        1,   115200, 0xb26dc220
-0,        489,        489,        1,   115200, 0x3d5bbfce
-0,        490,        490,        1,   115200, 0xa1f9bee6
-0,        491,        491,        1,   115200, 0xa87dcd24
-0,        492,        492,        1,   115200, 0x9374cb71
-0,        493,        493,        1,   115200, 0x0c7ccbd0
-0,        494,        494,        1,   115200, 0x9a16cc49
-0,        495,        495,        1,   115200, 0x4df0c28b
-0,        496,        496,        1,   115200, 0xb5b8b866
-0,        497,        497,        1,   115200, 0xafcc1019
-0,        510,        510,        1,   115200, 0x623b0ff3
-0,        512,        512,        1,   115200, 0x1d6f10b5
+0,        343,        343,        1,   115200, 0xf2a9c04d
+0,        344,        344,        1,   115200, 0x2b4005ea
+0,        345,        345,        1,   115200, 0xcec6ad14
+0,        346,        346,        1,   115200, 0x1c040afc
+0,        347,        347,        1,   115200, 0x164c4fd5
+0,        348,        348,        1,   115200, 0x5bcc5385
+0,        349,        349,        1,   115200, 0x7f7ed8d3
+0,        350,        350,        1,   115200, 0x48ab3c54
+0,        351,        351,        1,   115200, 0xd5debbfb
+0,        352,        352,        1,   115200, 0x720ded36
+0,        353,        353,        1,   115200, 0x3ae44a00
+0,        354,        354,        1,   115200, 0xfa893d68
+0,        355,        355,        1,   115200, 0xc833a619
+0,        356,        356,        1,   115200, 0xa3583b05
+0,        357,        357,        1,   115200, 0xffed4aed
+0,        358,        358,        1,   115200, 0x3757904a
+0,        359,        359,        1,   115200, 0x2f09122d
+0,        360,        360,        1,   115200, 0xcc9f40d6
+0,        361,        361,        1,   115200, 0xb8287bfb
+0,        362,        362,        1,   115200, 0x5f62ff06
+0,        363,        363,        1,   115200, 0x76b04f67
+0,        364,        364,        1,   115200, 0xa9e6f352
+0,        365,        365,        1,   115200, 0xc0e6001f
+0,        366,        366,        1,   115200, 0x19bc6f22
+0,        367,        367,        1,   115200, 0x0dbe3871
+0,        368,        368,        1,   115200, 0x413c8035
+0,        369,        369,        1,   115200, 0x8c28cc8d
+0,        370,        370,        1,   115200, 0xdd7f0cda
+0,        371,        371,        1,   115200, 0xf6f14c0c
+0,        372,        372,        1,   115200, 0x23bbd27b
+0,        373,        373,        1,   115200, 0xa8b8df03
+0,        374,        374,        1,   115200, 0xadb14c5a
+0,        375,        375,        1,   115200, 0xb5ca76f0
+0,        376,        376,        1,   115200, 0xea38a095
+0,        377,        377,        1,   115200, 0x60218deb
+0,        378,        378,        1,   115200, 0x947e8c0f
+0,        379,        379,        1,   115200, 0x6afe5ed1
+0,        380,        380,        1,   115200, 0x139f4c22
+0,        381,        381,        1,   115200, 0x5e4c3c2d
+0,        382,        382,        1,   115200, 0x86df5833
+0,        383,        383,        1,   115200, 0x824e538a
+0,        384,        384,        1,   115200, 0xebf25d19
+0,        385,        385,        1,   115200, 0x229438ae
+0,        386,        386,        1,   115200, 0xde5e0494
+0,        387,        387,        1,   115200, 0x63399194
+0,        388,        388,        1,   115200, 0x1f048b80
+0,        389,        389,        1,   115200, 0x0774357a
+0,        390,        390,        1,   115200, 0xddd75a69
+0,        391,        391,        1,   115200, 0x6d054339
+0,        392,        392,        1,   115200, 0xd0995428
+0,        393,        393,        1,   115200, 0x607a37eb
+0,        394,        394,        1,   115200, 0xa704399c
+0,        395,        395,        1,   115200, 0x0d7ff8b8
+0,        396,        396,        1,   115200, 0x5b20fd4e
+0,        397,        397,        1,   115200, 0x7cbad667
+0,        398,        398,        1,   115200, 0xe217d35f
+0,        399,        399,        1,   115200, 0x3ff6d303
+0,        400,        400,        1,   115200, 0x5aa4c0e4
+0,        401,        401,        1,   115200, 0x2d779d91
+0,        402,        402,        1,   115200, 0x7097a25d
+0,        403,        403,        1,   115200, 0x57c5809d
+0,        404,        404,        1,   115200, 0x0fe0997e
+0,        405,        405,        1,   115200, 0xd81d75a9
+0,        406,        406,        1,   115200, 0x30a87cc0
+0,        407,        407,        1,   115200, 0x22a971b6
+0,        408,        408,        1,   115200, 0x9f849351
+0,        409,        409,        1,   115200, 0xa1218894
+0,        410,        410,        1,   115200, 0xefdd92a8
+0,        411,        411,        1,   115200, 0xe0559201
+0,        412,        412,        1,   115200, 0x07ebade6
+0,        413,        413,        1,   115200, 0xe0c2c425
+0,        414,        414,        1,   115200, 0x92159752
+0,        415,        415,        1,   115200, 0x048fbe24
+0,        416,        416,        1,   115200, 0x8a051ae9
+0,        417,        417,        1,   115200, 0xed466ff3
+0,        418,        418,        1,   115200, 0x11157da7
+0,        419,        419,        1,   115200, 0x1f958850
+0,        420,        420,        1,   115200, 0x1e488948
+0,        421,        421,        1,   115200, 0x8c538e13
+0,        422,        422,        1,   115200, 0x26d188b1
+0,        423,        423,        1,   115200, 0x903b88e8
+0,        424,        424,        1,   115200, 0x04ed7882
+0,        425,        425,        1,   115200, 0x58d17772
+0,        426,        426,        1,   115200, 0x37c67d8c
+0,        427,        427,        1,   115200, 0x6c2677b4
+0,        428,        428,        1,   115200, 0xc0a763ba
+0,        429,        429,        1,   115200, 0xce242e3c
+0,        430,        430,        1,   115200, 0xcd0c26d9
+0,        431,        431,        1,   115200, 0x4cf81d8a
+0,        432,        432,        1,   115200, 0xb5a61995
+0,        433,        433,        1,   115200, 0xb4bb1276
+0,        434,        434,        1,   115200, 0x085210a6
+0,        435,        435,        1,   115200, 0x4cf215b4
+0,        436,        436,        1,   115200, 0xe78d0f4b
+0,        437,        437,        1,   115200, 0x52bc0f3c
+0,        438,        438,        1,   115200, 0x8c50033d
+0,        439,        439,        1,   115200, 0x0147f6b5
+0,        440,        440,        1,   115200, 0x5da1e9f2
+0,        441,        441,        1,   115200, 0xf5fce75b
+0,        442,        442,        1,   115200, 0x90aee4e5
+0,        443,        443,        1,   115200, 0xd73ae879
+0,        444,        444,        1,   115200, 0xb578f62a
+0,        445,        445,        1,   115200, 0x9ebcf6dd
+0,        446,        446,        1,   115200, 0x7a3cf909
+0,        447,        447,        1,   115200, 0x7240f4b6
+0,        448,        448,        1,   115200, 0x55a9ffcd
+0,        449,        449,        1,   115200, 0x95c7fd1b
+0,        450,        450,        1,   115200, 0x40e3f3c4
+0,        451,        451,        1,   115200, 0x2059e762
+0,        452,        452,        1,   115200, 0xa0bee25d
+0,        453,        453,        1,   115200, 0xedf9e470
+0,        454,        454,        1,   115200, 0x83a9e2b0
+0,        455,        455,        1,   115200, 0xf420e78e
+0,        456,        456,        1,   115200, 0x5512e1ad
+0,        457,        457,        1,   115200, 0xca18e192
+0,        458,        458,        1,   115200, 0x46d5d6cb
+0,        459,        459,        1,   115200, 0x40c7c6bc
+0,        460,        460,        1,   115200, 0x45e4d06b
+0,        461,        461,        1,   115200, 0xeefffb82
+0,        462,        462,        1,   115200, 0x6f9a1394
+0,        463,        463,        1,   115200, 0xec521ebc
+0,        464,        464,        1,   115200, 0x8b632329
+0,        465,        465,        1,   115200, 0x858732ba
+0,        466,        466,        1,   115200, 0x1f364406
+0,        467,        467,        1,   115200, 0xf6870af0
+0,        468,        468,        1,   115200, 0x8738d586
+0,        469,        469,        1,   115200, 0x52761588
+0,        470,        470,        1,   115200, 0xc1c8593d
+0,        471,        471,        1,   115200, 0x88a88938
+0,        472,        472,        1,   115200, 0x4a01ccf5
+0,        473,        473,        1,   115200, 0x2d990bde
+0,        474,        474,        1,   115200, 0x2dc9bd2b
+0,        475,        475,        1,   115200, 0xc1599b9b
+0,        476,        476,        1,   115200, 0xce621632
+0,        477,        477,        1,   115200, 0xbe027871
+0,        478,        478,        1,   115200, 0xf48f84a8
+0,        479,        479,        1,   115200, 0x6a240689
+0,        480,        480,        1,   115200, 0xfb90504d
+0,        481,        481,        1,   115200, 0x1a5512ec
+0,        482,        482,        1,   115200, 0x5f124c22
+0,        483,        483,        1,   115200, 0x2ea3180e
+0,        484,        484,        1,   115200, 0x2519e60e
+0,        485,        485,        1,   115200, 0xe240f88d
+0,        486,        486,        1,   115200, 0xac9209d8
+0,        487,        487,        1,   115200, 0x926fc3b8
+0,        488,        488,        1,   115200, 0xa5cdc217
+0,        489,        489,        1,   115200, 0x4d52bfcc
+0,        490,        490,        1,   115200, 0x2ce6bedf
+0,        491,        491,        1,   115200, 0x19e4cd0d
+0,        492,        492,        1,   115200, 0x1cc7cb5c
+0,        493,        493,        1,   115200, 0x74facbbc
+0,        494,        494,        1,   115200, 0xb771cc31
+0,        495,        495,        1,   115200, 0x6aabc273
+0,        496,        496,        1,   115200, 0x0308b854
+0,        497,        497,        1,   115200, 0xa70a1019
+0,        510,        510,        1,   115200, 0x59790ff3
+0,        512,        512,        1,   115200, 0x0e7110b5
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 2/9] avcodec/mpegutils: Combine multiple av_log statements
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 3/9] avcodec/mpegutils: Constify ff_print_debug_info2, ff_draw_horiz_band Andreas Rheinhardt
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegutils.c | 101 +++++++++++++++++++++++------------------
 1 file changed, 57 insertions(+), 44 deletions(-)

diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index 4cbc474543..395bd38ff5 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -100,6 +100,59 @@ void ff_draw_horiz_band(AVCodecContext *avctx,
     }
 }
 
+static char get_type_mv_char(int mb_type)
+{
+    // Type & MV direction
+    if (IS_PCM(mb_type))
+        return 'P';
+    else if (IS_INTRA(mb_type) && IS_ACPRED(mb_type))
+        return 'A';
+    else if (IS_INTRA4x4(mb_type))
+        return 'i';
+    else if (IS_INTRA16x16(mb_type))
+        return 'I';
+    else if (IS_DIRECT(mb_type) && IS_SKIP(mb_type))
+        return 'd';
+    else if (IS_DIRECT(mb_type))
+        return 'D';
+    else if (IS_GMC(mb_type) && IS_SKIP(mb_type))
+        return 'g';
+    else if (IS_GMC(mb_type))
+        return 'G';
+    else if (IS_SKIP(mb_type))
+        return 'S';
+    else if (!USES_LIST(mb_type, 1))
+        return '>';
+    else if (!USES_LIST(mb_type, 0))
+        return '<';
+    else {
+        av_assert2(USES_LIST(mb_type, 0) && USES_LIST(mb_type, 1));
+        return 'X';
+    }
+}
+
+static char get_segmentation_char(int mb_type)
+{
+    if (IS_8X8(mb_type))
+        return '+';
+    else if (IS_16X8(mb_type))
+        return '-';
+    else if (IS_8X16(mb_type))
+        return '|';
+    else if (IS_INTRA(mb_type) || IS_16X16(mb_type))
+        return ' ';
+
+    return '?';
+}
+
+static char get_interlacement_char(int mb_type)
+{
+    if (IS_INTERLACED(mb_type))
+        return '=';
+    else
+        return ' ';
+}
+
 void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table,
                          uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2],
                          int mb_width, int mb_height, int mb_stride, int quarter_sample)
@@ -211,51 +264,11 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
                 }
                 if (avctx->debug & FF_DEBUG_MB_TYPE) {
                     int mb_type = mbtype_table[x + y * mb_stride];
-                    // Type & MV direction
-                    if (IS_PCM(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "P");
-                    else if (IS_INTRA(mb_type) && IS_ACPRED(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "A");
-                    else if (IS_INTRA4x4(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "i");
-                    else if (IS_INTRA16x16(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "I");
-                    else if (IS_DIRECT(mb_type) && IS_SKIP(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "d");
-                    else if (IS_DIRECT(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "D");
-                    else if (IS_GMC(mb_type) && IS_SKIP(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "g");
-                    else if (IS_GMC(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "G");
-                    else if (IS_SKIP(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "S");
-                    else if (!USES_LIST(mb_type, 1))
-                        av_log(avctx, AV_LOG_DEBUG, ">");
-                    else if (!USES_LIST(mb_type, 0))
-                        av_log(avctx, AV_LOG_DEBUG, "<");
-                    else {
-                        av_assert2(USES_LIST(mb_type, 0) && USES_LIST(mb_type, 1));
-                        av_log(avctx, AV_LOG_DEBUG, "X");
-                    }
-
-                    // segmentation
-                    if (IS_8X8(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "+");
-                    else if (IS_16X8(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "-");
-                    else if (IS_8X16(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "|");
-                    else if (IS_INTRA(mb_type) || IS_16X16(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, " ");
-                    else
-                        av_log(avctx, AV_LOG_DEBUG, "?");
-
 
-                    if (IS_INTERLACED(mb_type))
-                        av_log(avctx, AV_LOG_DEBUG, "=");
-                    else
-                        av_log(avctx, AV_LOG_DEBUG, " ");
+                    av_log(avctx, AV_LOG_DEBUG, "%c%c%c",
+                           get_type_mv_char(mb_type),
+                           get_segmentation_char(mb_type),
+                           get_interlacement_char(mb_type));
                 }
             }
             av_log(avctx, AV_LOG_DEBUG, "\n");
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 3/9] avcodec/mpegutils: Constify ff_print_debug_info2, ff_draw_horiz_band
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 2/9] avcodec/mpegutils: Combine multiple av_log statements Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 4/9] avcodec/mpegpicture: Remove always-true checks Andreas Rheinhardt
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegutils.c | 11 ++++++-----
 libavcodec/mpegutils.h |  9 +++++----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index 395bd38ff5..ff9418232b 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -49,7 +49,7 @@ static int add_mb(AVMotionVector *mb, uint32_t mb_type,
 }
 
 void ff_draw_horiz_band(AVCodecContext *avctx,
-                        AVFrame *cur, AVFrame *last,
+                        const AVFrame *cur, const AVFrame *last,
                         int y, int h, int picture_structure,
                         int first_field, int low_delay)
 {
@@ -68,7 +68,7 @@ void ff_draw_horiz_band(AVCodecContext *avctx,
         return;
 
     if (avctx->draw_horiz_band) {
-        AVFrame *src;
+        const AVFrame *src;
         int offset[AV_NUM_DATA_POINTERS];
         int i;
 
@@ -153,9 +153,10 @@ static char get_interlacement_char(int mb_type)
         return ' ';
 }
 
-void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table,
-                         uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2],
-                         int mb_width, int mb_height, int mb_stride, int quarter_sample)
+void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
+                          const uint8_t *mbskip_table, const uint32_t *mbtype_table,
+                          const int8_t *qscale_table, int16_t (*const motion_val[2])[2],
+                          int mb_width, int mb_height, int mb_stride, int quarter_sample)
 {
     if ((avctx->export_side_data & AV_CODEC_EXPORT_DATA_MVS) && mbtype_table && motion_val[0]) {
         const int shift = 1 + quarter_sample;
diff --git a/libavcodec/mpegutils.h b/libavcodec/mpegutils.h
index c92f9192db..386110bb8c 100644
--- a/libavcodec/mpegutils.h
+++ b/libavcodec/mpegutils.h
@@ -127,15 +127,16 @@ enum OutputFormat {
  *
  * @param h is the normal height, this will be reduced automatically if needed
  */
-void ff_draw_horiz_band(AVCodecContext *avctx, AVFrame *cur, AVFrame *last,
+void ff_draw_horiz_band(AVCodecContext *avctx, const AVFrame *cur, const AVFrame *last,
                         int y, int h, int picture_structure, int first_field,
                         int low_delay);
 
 /**
  * Print debugging info for the given picture.
  */
-void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table,
-                         uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2],
-                         int mb_width, int mb_height, int mb_stride, int quarter_sample);
+void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
+                          const uint8_t *mbskip_table, const uint32_t *mbtype_table,
+                          const int8_t *qscale_table, int16_t (*const motion_val[2])[2],
+                          int mb_width, int mb_height, int mb_stride, int quarter_sample);
 
 #endif /* AVCODEC_MPEGUTILS_H */
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 4/9] avcodec/mpegpicture: Remove always-true checks
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 2/9] avcodec/mpegutils: Combine multiple av_log statements Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 3/9] avcodec/mpegutils: Constify ff_print_debug_info2, ff_draw_horiz_band Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 5/9] avutil/buffer: Never poison returned buffers Andreas Rheinhardt
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Of all the buffers that are made writable, three are always allocated
and the other four are allocated iff any one of them is allocated;
so one can replace the seven checks for existence with one.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegpicture.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index f32f8d061b..dc79662143 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -49,21 +49,22 @@ static void av_noinline free_picture_tables(Picture *pic)
 
 static int make_tables_writable(Picture *pic)
 {
-    int ret, i;
 #define MAKE_WRITABLE(table) \
 do {\
-    if (pic->table &&\
-       (ret = av_buffer_make_writable(&pic->table)) < 0)\
-    return ret;\
+    int ret = av_buffer_make_writable(&pic->table); \
+    if (ret < 0) \
+        return ret; \
 } while (0)
 
     MAKE_WRITABLE(mbskip_table_buf);
     MAKE_WRITABLE(qscale_table_buf);
     MAKE_WRITABLE(mb_type_buf);
 
-    for (i = 0; i < 2; i++) {
-        MAKE_WRITABLE(motion_val_buf[i]);
-        MAKE_WRITABLE(ref_index_buf[i]);
+    if (pic->motion_val_buf[0]) {
+        for (int i = 0; i < 2; i++) {
+            MAKE_WRITABLE(motion_val_buf[i]);
+            MAKE_WRITABLE(ref_index_buf[i]);
+        }
     }
 
     return 0;
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 5/9] avutil/buffer: Never poison returned buffers
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (2 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 4/9] avcodec/mpegpicture: Remove always-true checks Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 6/9] avcodec/mpegpicture: Move encoding_error and mb_var_sum to MpegEncCtx Andreas Rheinhardt
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Poisoning returned buffers is based around the implicit assumption
that the contents of said buffers are transient. Yet this is not true
for the buffer pools used by the various hardware contexts which store
important state in there that needs to be preserved.
Furthermore, the current code is also based on the assumption
that the complete buffer pointed to by AVBuffer->data coincides with
AVBufferRef->data; yet an implementation might store some data of its
own before the actual user-visible data (accessible via AVBufferRef)
which would be broken by the current code.

(This is of course yet more proof that the AVBuffer API is not the right
tool for the hardware contexts.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
I already sent this patch last October, but didn't apply it
due to lack of feedback. Future patches of mine depend upon
this and therefore I am sending it again.

 libavutil/buffer.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 54590be566..e4562a79b1 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -341,9 +341,6 @@ static void pool_release_buffer(void *opaque, uint8_t *data)
     BufferPoolEntry *buf = opaque;
     AVBufferPool *pool = buf->pool;
 
-    if(CONFIG_MEMORY_POISONING)
-        memset(buf->data, FF_MEMORY_POISON, pool->size);
-
     ff_mutex_lock(&pool->mutex);
     buf->next = pool->pool;
     pool->pool = buf;
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 6/9] avcodec/mpegpicture: Move encoding_error and mb_var_sum to MpegEncCtx
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (3 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 5/9] avutil/buffer: Never poison returned buffers Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 7/9] avcodec/mpegvideo_enc: Don't copy Picture unnecessarily Andreas Rheinhardt
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

These fields are only ever set by the encoder for the current picture
and for no other picture. So only one set of these values needs to
exist, so move them to MpegEncContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegpicture.c   |  5 -----
 libavcodec/mpegpicture.h   |  5 -----
 libavcodec/mpegvideo.h     |  5 ++++-
 libavcodec/mpegvideo_enc.c | 25 ++++++++++++-------------
 libavcodec/ratecontrol.c   | 17 ++++++++---------
 libavcodec/snowenc.c       |  8 ++++----
 6 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index dc79662143..c57f149752 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -376,16 +376,11 @@ int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src)
     }
 
     dst->field_picture           = src->field_picture;
-    dst->mb_var_sum              = src->mb_var_sum;
-    dst->mc_mb_var_sum           = src->mc_mb_var_sum;
     dst->b_frame_score           = src->b_frame_score;
     dst->needs_realloc           = src->needs_realloc;
     dst->reference               = src->reference;
     dst->shared                  = src->shared;
 
-    memcpy(dst->encoding_error, src->encoding_error,
-           sizeof(dst->encoding_error));
-
     return 0;
 fail:
     ff_mpeg_unref_picture(avctx, dst);
diff --git a/libavcodec/mpegpicture.h b/libavcodec/mpegpicture.h
index 62589595d0..a1455ee13c 100644
--- a/libavcodec/mpegpicture.h
+++ b/libavcodec/mpegpicture.h
@@ -71,16 +71,11 @@ typedef struct Picture {
 
     int field_picture;          ///< whether or not the picture was encoded in separate fields
 
-    int64_t mb_var_sum;         ///< sum of MB variance for current frame
-    int64_t mc_mb_var_sum;      ///< motion compensated MB variance for current frame
-
     int b_frame_score;
     int needs_realloc;          ///< Picture needs to be reallocated (eg due to a frame size change)
 
     int reference;
     int shared;
-
-    uint64_t encoding_error[MPEGVIDEO_MAX_PLANES];
 } Picture;
 
 /**
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 47619c1976..1ddf8034aa 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -236,10 +236,13 @@ typedef struct MpegEncContext {
     uint8_t (*p_field_select_table[2]);  ///< Only the first element is allocated
     uint8_t (*b_field_select_table[2][2]); ///< Only the first element is allocated
 
-    /* The following three arrays are encoder-only */
+    /* The following fields are encoder-only */
     uint16_t *mb_var;           ///< Table for MB variances
     uint16_t *mc_mb_var;        ///< Table for motion compensated MB variances
     uint8_t *mb_mean;           ///< Table for MB luminance
+    int64_t mb_var_sum;         ///< sum of MB variance for current frame
+    int64_t mc_mb_var_sum;      ///< motion compensated MB variance for current frame
+    uint64_t encoding_error[MPEGVIDEO_MAX_PLANES];
 
     int motion_est;                      ///< ME algorithm
     int me_penalty_compensation;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index a34fb66eac..d45e15a039 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1783,11 +1783,10 @@ vbv_retry:
             ff_write_pass1_stats(s);
 
         for (i = 0; i < 4; i++) {
-            s->current_picture_ptr->encoding_error[i] = s->current_picture.encoding_error[i];
-            avctx->error[i] += s->current_picture_ptr->encoding_error[i];
+            avctx->error[i] += s->encoding_error[i];
         }
         ff_side_data_set_encoder_stats(pkt, s->current_picture.f->quality,
-                                       s->current_picture_ptr->encoding_error,
+                                       s->encoding_error,
                                        (avctx->flags&AV_CODEC_FLAG_PSNR) ? MPEGVIDEO_MAX_PLANES : 0,
                                        s->pict_type);
 
@@ -2792,7 +2791,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
         /* note: quant matrix value (8) is implied here */
         s->last_dc[i] = 128 << s->intra_dc_precision;
 
-        s->current_picture.encoding_error[i] = 0;
+        s->encoding_error[i] = 0;
     }
     if(s->codec_id==AV_CODEC_ID_AMV){
         s->last_dc[0] = 128*8/13;
@@ -3370,13 +3369,13 @@ static int encode_thread(AVCodecContext *c, void *arg){
                 if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16;
                 if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16;
 
-                s->current_picture.encoding_error[0] += sse(
+                s->encoding_error[0] += sse(
                     s, s->new_picture->data[0] + s->mb_x*16 + s->mb_y*s->linesize*16,
                     s->dest[0], w, h, s->linesize);
-                s->current_picture.encoding_error[1] += sse(
+                s->encoding_error[1] += sse(
                     s, s->new_picture->data[1] + s->mb_x*8  + s->mb_y*s->uvlinesize*chr_h,
                     s->dest[1], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
-                s->current_picture.encoding_error[2] += sse(
+                s->encoding_error[2] += sse(
                     s, s->new_picture->data[2] + s->mb_x*8  + s->mb_y*s->uvlinesize*chr_h,
                     s->dest[2], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
             }
@@ -3416,9 +3415,9 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src)
     MERGE(i_count);
     MERGE(skip_count);
     MERGE(misc_bits);
-    MERGE(current_picture.encoding_error[0]);
-    MERGE(current_picture.encoding_error[1]);
-    MERGE(current_picture.encoding_error[2]);
+    MERGE(encoding_error[0]);
+    MERGE(encoding_error[1]);
+    MERGE(encoding_error[2]);
 
     if (dst->noise_reduction){
         for(i=0; i<64; i++){
@@ -3570,8 +3569,8 @@ static int encode_picture(MpegEncContext *s, int picture_number)
     for(i=1; i<context_count; i++){
         merge_context_after_me(s, s->thread_context[i]);
     }
-    s->current_picture.mc_mb_var_sum= s->current_picture_ptr->mc_mb_var_sum= s->me.mc_mb_var_sum_temp;
-    s->current_picture.   mb_var_sum= s->current_picture_ptr->   mb_var_sum= s->me.   mb_var_sum_temp;
+    s->mc_mb_var_sum = s->me.mc_mb_var_sum_temp;
+    s->mb_var_sum    = s->me.   mb_var_sum_temp;
     emms_c();
 
     if (s->me.scene_change_score > s->scenechange_threshold &&
@@ -3582,7 +3581,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
         if(s->msmpeg4_version >= 3)
             s->no_rounding=1;
         ff_dlog(s, "Scene change detected, encoding as I Frame %"PRId64" %"PRId64"\n",
-                s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
+                s->mb_var_sum, s->mc_mb_var_sum);
     }
 
     if(!s->umvplus){
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 53930f147b..4829172c2c 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -49,8 +49,8 @@ void ff_write_pass1_stats(MpegEncContext *s)
              s->misc_bits,
              s->f_code,
              s->b_code,
-             s->current_picture.mc_mb_var_sum,
-             s->current_picture.mb_var_sum,
+             s->mc_mb_var_sum,
+             s->mb_var_sum,
              s->i_count, s->skip_count,
              s->header_bits);
 }
@@ -880,7 +880,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
     double rate_factor;
     int64_t var;
     const int pict_type = s->pict_type;
-    Picture * const pic = &s->current_picture;
     emms_c();
 
     get_qminmax(&qmin, &qmax, s, pict_type);
@@ -929,7 +928,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
     if (br_compensation <= 0.0)
         br_compensation = 0.001;
 
-    var = pict_type == AV_PICTURE_TYPE_I ? pic->mb_var_sum : pic->mc_mb_var_sum;
+    var = pict_type == AV_PICTURE_TYPE_I ? s->mb_var_sum : s->mc_mb_var_sum;
 
     short_term_q = 0; /* avoid warning */
     if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
@@ -942,8 +941,8 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
     } else {
         rce->pict_type     =
         rce->new_pict_type = pict_type;
-        rce->mc_mb_var_sum = pic->mc_mb_var_sum;
-        rce->mb_var_sum    = pic->mb_var_sum;
+        rce->mc_mb_var_sum = s->mc_mb_var_sum;
+        rce->mb_var_sum    = s->mb_var_sum;
         rce->qscale        = FF_QP2LAMBDA * 2;
         rce->f_code        = s->f_code;
         rce->b_code        = s->b_code;
@@ -1003,7 +1002,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
                qmin, q, qmax, picture_number,
                wanted_bits / 1000, s->total_bits / 1000,
                br_compensation, short_term_q, s->frame_bits,
-               pic->mb_var_sum, pic->mc_mb_var_sum,
+               s->mb_var_sum, s->mc_mb_var_sum,
                s->bit_rate / 1000, (int)fps);
     }
 
@@ -1019,8 +1018,8 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
 
     if (!dry_run) {
         rcc->last_qscale        = q;
-        rcc->last_mc_mb_var_sum = pic->mc_mb_var_sum;
-        rcc->last_mb_var_sum    = pic->mb_var_sum;
+        rcc->last_mc_mb_var_sum = s->mc_mb_var_sum;
+        rcc->last_mb_var_sum    = s->mb_var_sum;
     }
     return q;
 }
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 72ed39c78c..a295ff8085 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1527,11 +1527,11 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
     coef_sum = (uint64_t)coef_sum * coef_sum >> 16;
 
     if(pict->pict_type == AV_PICTURE_TYPE_I){
-        s->m.current_picture.mb_var_sum= coef_sum;
-        s->m.current_picture.mc_mb_var_sum= 0;
+        s->m.mb_var_sum    = coef_sum;
+        s->m.mc_mb_var_sum = 0;
     }else{
-        s->m.current_picture.mc_mb_var_sum= coef_sum;
-        s->m.current_picture.mb_var_sum= 0;
+        s->m.mc_mb_var_sum = coef_sum;
+        s->m.mb_var_sum    = 0;
     }
 
     pict->quality= ff_rate_estimate_qscale(&s->m, 1);
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 7/9] avcodec/mpegvideo_enc: Don't copy Picture unnecessarily
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (4 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 6/9] avcodec/mpegpicture: Move encoding_error and mb_var_sum to MpegEncCtx Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 8/9] avcodec/mpegvideo_enc: Remove redundant check Andreas Rheinhardt
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Also add const where possible.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d45e15a039..2cd4db27bc 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1249,15 +1249,14 @@ static int estimate_best_b_count(MpegEncContext *s)
                FF_LAMBDA_SHIFT;
 
     for (i = 0; i < s->max_b_frames + 2; i++) {
-        Picture pre_input, *pre_input_ptr = i ? s->input_picture[i - 1] :
-                                                s->next_picture_ptr;
-        uint8_t *data[4];
+        const Picture *pre_input_ptr = i ? s->input_picture[i - 1] :
+                                           s->next_picture_ptr;
 
         if (pre_input_ptr && (!i || s->input_picture[i - 1])) {
-            pre_input = *pre_input_ptr;
+            const uint8_t *data[4];
             memcpy(data, pre_input_ptr->f->data, sizeof(data));
 
-            if (!pre_input.shared && i) {
+            if (!pre_input_ptr->shared && i) {
                 data[0] += INPLACE_OFFSET;
                 data[1] += INPLACE_OFFSET;
                 data[2] += INPLACE_OFFSET;
@@ -1266,17 +1265,17 @@ static int estimate_best_b_count(MpegEncContext *s)
             s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[0],
                                        s->tmp_frames[i]->linesize[0],
                                        data[0],
-                                       pre_input.f->linesize[0],
+                                       pre_input_ptr->f->linesize[0],
                                        width, height);
             s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[1],
                                        s->tmp_frames[i]->linesize[1],
                                        data[1],
-                                       pre_input.f->linesize[1],
+                                       pre_input_ptr->f->linesize[1],
                                        width >> 1, height >> 1);
             s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[2],
                                        s->tmp_frames[i]->linesize[2],
                                        data[2],
-                                       pre_input.f->linesize[2],
+                                       pre_input_ptr->f->linesize[2],
                                        width >> 1, height >> 1);
         }
     }
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 8/9] avcodec/mpegvideo_enc: Remove redundant check
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (5 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 7/9] avcodec/mpegvideo_enc: Don't copy Picture unnecessarily Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 9/9] avcodec/mpegvideo_enc: Remove redundant cast Andreas Rheinhardt
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 2cd4db27bc..4840d80fe8 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1252,7 +1252,7 @@ static int estimate_best_b_count(MpegEncContext *s)
         const Picture *pre_input_ptr = i ? s->input_picture[i - 1] :
                                            s->next_picture_ptr;
 
-        if (pre_input_ptr && (!i || s->input_picture[i - 1])) {
+        if (pre_input_ptr) {
             const uint8_t *data[4];
             memcpy(data, pre_input_ptr->f->data, sizeof(data));
 
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 9/9] avcodec/mpegvideo_enc: Remove redundant cast
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (6 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 8/9] avcodec/mpegvideo_enc: Remove redundant check Andreas Rheinhardt
@ 2022-08-09 18:34 ` Andreas Rheinhardt
  2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 10/11] avcodec/mpegvideo: Move setting mb_height to ff_mpv_init_context_frame Andreas Rheinhardt
  2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer Andreas Rheinhardt
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 18:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4840d80fe8..63fa0663d3 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1154,7 +1154,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
     for (i = flush_offset; i < MAX_PICTURE_COUNT /*s->encoding_delay + 1*/; i++)
         s->input_picture[i - flush_offset] = s->input_picture[i];
 
-    s->input_picture[encoding_delay] = (Picture*) pic;
+    s->input_picture[encoding_delay] = pic;
 
     return 0;
 }
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 10/11] avcodec/mpegvideo: Move setting mb_height to ff_mpv_init_context_frame
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (7 preceding siblings ...)
  2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 9/9] avcodec/mpegvideo_enc: Remove redundant cast Andreas Rheinhardt
@ 2022-08-09 19:55 ` Andreas Rheinhardt
  2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer Andreas Rheinhardt
  9 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 19:55 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

It is the proper place to set it, directly besides mb_width and
mb_stride. The reason for doing it the way it is done now seems
to be that the code does not create more slice contexts than necessary
(i.e. not more than one per row), so that this number needs to be
known before setting the number of slices. But this can always be
arranged by just moving the code that sets the number of slices.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Unfortunately, there is another place where these values are set:
ff_vc1_parse_frame_header_adv() sets mb_height; it might change it
by one.

 libavcodec/mpegvideo.c     | 32 ++++++++++++++++----------------
 libavcodec/mpegvideo_dec.c |  6 ------
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 1405176c06..ff08168362 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -526,6 +526,11 @@ int ff_mpv_init_context_frame(MpegEncContext *s)
 {
     int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y;
 
+    if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
+        s->mb_height = (s->height + 31) / 32 * 2;
+    else
+        s->mb_height = (s->height + 15) / 16;
+
     s->mb_width   = (s->width + 15) / 16;
     s->mb_stride  = s->mb_width + 1;
     s->b8_stride  = s->mb_width * 2 + 1;
@@ -747,28 +752,12 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
     if (s->encoding && s->avctx->slices)
         nb_slices = s->avctx->slices;
 
-    if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
-        s->mb_height = (s->height + 31) / 32 * 2;
-    else
-        s->mb_height = (s->height + 15) / 16;
-
     if (s->avctx->pix_fmt == AV_PIX_FMT_NONE) {
         av_log(s->avctx, AV_LOG_ERROR,
                "decoding to AV_PIX_FMT_NONE is not supported.\n");
         return AVERROR(EINVAL);
     }
 
-    if (nb_slices > MAX_THREADS || (nb_slices > s->mb_height && s->mb_height)) {
-        int max_slices;
-        if (s->mb_height)
-            max_slices = FFMIN(MAX_THREADS, s->mb_height);
-        else
-            max_slices = MAX_THREADS;
-        av_log(s->avctx, AV_LOG_WARNING, "too many threads/slices (%d),"
-               " reducing to %d\n", nb_slices, max_slices);
-        nb_slices = max_slices;
-    }
-
     if ((s->width || s->height) &&
         av_image_check_size(s->width, s->height, 0, s->avctx))
         return AVERROR(EINVAL);
@@ -799,6 +788,17 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
     if ((ret = ff_mpv_init_context_frame(s)))
         goto fail;
 
+    if (nb_slices > MAX_THREADS || (nb_slices > s->mb_height && s->mb_height)) {
+        int max_slices;
+        if (s->mb_height)
+            max_slices = FFMIN(MAX_THREADS, s->mb_height);
+        else
+            max_slices = MAX_THREADS;
+        av_log(s->avctx, AV_LOG_WARNING, "too many threads/slices (%d),"
+               " reducing to %d\n", nb_slices, max_slices);
+        nb_slices = max_slices;
+    }
+
 #if FF_API_FLAG_TRUNCATED
     s->parse_context.state = -1;
 #endif
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 7caaf0596d..93ba4e31b3 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -208,12 +208,6 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s)
     s->next_picture_ptr         =
     s->current_picture_ptr      = NULL;
 
-    // init
-    if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
-        s->mb_height = (s->height + 31) / 32 * 2;
-    else
-        s->mb_height = (s->height + 15) / 16;
-
     if ((s->width || s->height) &&
         (err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
         goto fail;
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer
  2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
                   ` (8 preceding siblings ...)
  2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 10/11] avcodec/mpegvideo: Move setting mb_height to ff_mpv_init_context_frame Andreas Rheinhardt
@ 2022-08-09 19:55 ` Andreas Rheinhardt
  2022-08-11  8:05   ` Andreas Rheinhardt
  9 siblings, 1 reply; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-09 19:55 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Codecs call ff_find_unused_picture() to get the index of
an unused picture; said picture may have buffers left
from using it previously (these buffers are intentionally
not unreferenced so that it might be possible to reuse them;
this is mpegvideo's version of a bufferpool). They should
not make any assumptions about which picture they get.
Yet somehow this is not true when decoding OBMC: Returning
random empty pictures (instead of the first one) leads
to nondeterministic results; similarly, explicitly
rezeroing the buffer before handing it over to the codec
changes the outcome of the h263-obmc tests, but it makes it
independent of the returned pictures. Therefore this commit
does so.

(No, this commit is not intended to be applied. I just hope
to arouse the interest of people familiar with H.263
to look at this issue.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegpicture.c               | 4 ++++
 tests/ref/vsynth/vsynth1-h263-obmc     | 4 ++--
 tests/ref/vsynth/vsynth2-h263-obmc     | 4 ++--
 tests/ref/vsynth/vsynth_lena-h263-obmc | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index c57f149752..2192f74cea 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -280,6 +280,10 @@ int ff_alloc_picture(AVCodecContext *avctx, Picture *pic, MotionEstContext *me,
         for (i = 0; i < 2; i++) {
             pic->motion_val[i] = (int16_t (*)[2])pic->motion_val_buf[i]->data + 4;
             pic->ref_index[i]  = pic->ref_index_buf[i]->data;
+            /* FIXME: The output of H.263 with OBMC depends upon
+             * the earlier content of the buffer; therefore we
+             * reset it here. */
+            memset(pic->motion_val_buf[i]->data, 0, pic->motion_val_buf[i]->size);
         }
     }
 
diff --git a/tests/ref/vsynth/vsynth1-h263-obmc b/tests/ref/vsynth/vsynth1-h263-obmc
index b7a267a8cb..aed283ed53 100644
--- a/tests/ref/vsynth/vsynth1-h263-obmc
+++ b/tests/ref/vsynth/vsynth1-h263-obmc
@@ -1,4 +1,4 @@
 7dec64380f375e5118b66f3baaaa1e24 *tests/data/fate/vsynth1-h263-obmc.avi
 657320 tests/data/fate/vsynth1-h263-obmc.avi
-844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
-stddev:    8.16 PSNR: 29.89 MAXDIFF:  113 bytes:  7603200/  7603200
+2a69f6b37378aa34418dfd04ec98c1c8 *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
+stddev:    8.38 PSNR: 29.66 MAXDIFF:  116 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-h263-obmc b/tests/ref/vsynth/vsynth2-h263-obmc
index 2cef7f551b..c0dcc3239e 100644
--- a/tests/ref/vsynth/vsynth2-h263-obmc
+++ b/tests/ref/vsynth/vsynth2-h263-obmc
@@ -1,4 +1,4 @@
 2d8a58b295e03f94e6a41468b2d3909e *tests/data/fate/vsynth2-h263-obmc.avi
 208522 tests/data/fate/vsynth2-h263-obmc.avi
-4a939ef99fc759293f2e609bfcacd2a4 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
-stddev:    6.10 PSNR: 32.41 MAXDIFF:   90 bytes:  7603200/  7603200
+3500b4227c1e6309ca5213414599266f *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
+stddev:    6.19 PSNR: 32.29 MAXDIFF:  111 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth_lena-h263-obmc b/tests/ref/vsynth/vsynth_lena-h263-obmc
index 5b963107f6..78d7cc7277 100644
--- a/tests/ref/vsynth/vsynth_lena-h263-obmc
+++ b/tests/ref/vsynth/vsynth_lena-h263-obmc
@@ -1,4 +1,4 @@
 3c6946f808412ac320be9e0c36051ea2 *tests/data/fate/vsynth_lena-h263-obmc.avi
 154730 tests/data/fate/vsynth_lena-h263-obmc.avi
-588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo
-stddev:    5.39 PSNR: 33.49 MAXDIFF:   82 bytes:  7603200/  7603200
+737af7fb166e2260ba049ae6bc30673d *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo
+stddev:    5.42 PSNR: 33.44 MAXDIFF:   77 bytes:  7603200/  7603200
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer
  2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer Andreas Rheinhardt
@ 2022-08-11  8:05   ` Andreas Rheinhardt
  0 siblings, 0 replies; 12+ messages in thread
From: Andreas Rheinhardt @ 2022-08-11  8:05 UTC (permalink / raw)
  To: ffmpeg-devel

Andreas Rheinhardt:
> Codecs call ff_find_unused_picture() to get the index of
> an unused picture; said picture may have buffers left
> from using it previously (these buffers are intentionally
> not unreferenced so that it might be possible to reuse them;
> this is mpegvideo's version of a bufferpool). They should
> not make any assumptions about which picture they get.
> Yet somehow this is not true when decoding OBMC: Returning
> random empty pictures (instead of the first one) leads
> to nondeterministic results; similarly, explicitly
> rezeroing the buffer before handing it over to the codec
> changes the outcome of the h263-obmc tests, but it makes it
> independent of the returned pictures. Therefore this commit
> does so.
> 
> (No, this commit is not intended to be applied. I just hope
> to arouse the interest of people familiar with H.263
> to look at this issue.)
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---

Will apply this patchset minus this patch tomorrow unless there are
objections. And I would really like anybody with knowledge about H.263
to take a look at the obmc code to see what is wrong with it.

>  libavcodec/mpegpicture.c               | 4 ++++
>  tests/ref/vsynth/vsynth1-h263-obmc     | 4 ++--
>  tests/ref/vsynth/vsynth2-h263-obmc     | 4 ++--
>  tests/ref/vsynth/vsynth_lena-h263-obmc | 4 ++--
>  4 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
> index c57f149752..2192f74cea 100644
> --- a/libavcodec/mpegpicture.c
> +++ b/libavcodec/mpegpicture.c
> @@ -280,6 +280,10 @@ int ff_alloc_picture(AVCodecContext *avctx, Picture *pic, MotionEstContext *me,
>          for (i = 0; i < 2; i++) {
>              pic->motion_val[i] = (int16_t (*)[2])pic->motion_val_buf[i]->data + 4;
>              pic->ref_index[i]  = pic->ref_index_buf[i]->data;
> +            /* FIXME: The output of H.263 with OBMC depends upon
> +             * the earlier content of the buffer; therefore we
> +             * reset it here. */
> +            memset(pic->motion_val_buf[i]->data, 0, pic->motion_val_buf[i]->size);
>          }
>      }
>  
> diff --git a/tests/ref/vsynth/vsynth1-h263-obmc b/tests/ref/vsynth/vsynth1-h263-obmc
> index b7a267a8cb..aed283ed53 100644
> --- a/tests/ref/vsynth/vsynth1-h263-obmc
> +++ b/tests/ref/vsynth/vsynth1-h263-obmc
> @@ -1,4 +1,4 @@
>  7dec64380f375e5118b66f3baaaa1e24 *tests/data/fate/vsynth1-h263-obmc.avi
>  657320 tests/data/fate/vsynth1-h263-obmc.avi
> -844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
> -stddev:    8.16 PSNR: 29.89 MAXDIFF:  113 bytes:  7603200/  7603200
> +2a69f6b37378aa34418dfd04ec98c1c8 *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
> +stddev:    8.38 PSNR: 29.66 MAXDIFF:  116 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth2-h263-obmc b/tests/ref/vsynth/vsynth2-h263-obmc
> index 2cef7f551b..c0dcc3239e 100644
> --- a/tests/ref/vsynth/vsynth2-h263-obmc
> +++ b/tests/ref/vsynth/vsynth2-h263-obmc
> @@ -1,4 +1,4 @@
>  2d8a58b295e03f94e6a41468b2d3909e *tests/data/fate/vsynth2-h263-obmc.avi
>  208522 tests/data/fate/vsynth2-h263-obmc.avi
> -4a939ef99fc759293f2e609bfcacd2a4 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
> -stddev:    6.10 PSNR: 32.41 MAXDIFF:   90 bytes:  7603200/  7603200
> +3500b4227c1e6309ca5213414599266f *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
> +stddev:    6.19 PSNR: 32.29 MAXDIFF:  111 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth_lena-h263-obmc b/tests/ref/vsynth/vsynth_lena-h263-obmc
> index 5b963107f6..78d7cc7277 100644
> --- a/tests/ref/vsynth/vsynth_lena-h263-obmc
> +++ b/tests/ref/vsynth/vsynth_lena-h263-obmc
> @@ -1,4 +1,4 @@
>  3c6946f808412ac320be9e0c36051ea2 *tests/data/fate/vsynth_lena-h263-obmc.avi
>  154730 tests/data/fate/vsynth_lena-h263-obmc.avi
> -588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo
> -stddev:    5.39 PSNR: 33.49 MAXDIFF:   82 bytes:  7603200/  7603200
> +737af7fb166e2260ba049ae6bc30673d *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo
> +stddev:    5.42 PSNR: 33.44 MAXDIFF:   77 bytes:  7603200/  7603200

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-11  8:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 18:28 [FFmpeg-devel] [PATCH 1/9] avcodec/wmv2dec: Zero mb_type array for I pictures Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 2/9] avcodec/mpegutils: Combine multiple av_log statements Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 3/9] avcodec/mpegutils: Constify ff_print_debug_info2, ff_draw_horiz_band Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 4/9] avcodec/mpegpicture: Remove always-true checks Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 5/9] avutil/buffer: Never poison returned buffers Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 6/9] avcodec/mpegpicture: Move encoding_error and mb_var_sum to MpegEncCtx Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 7/9] avcodec/mpegvideo_enc: Don't copy Picture unnecessarily Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 8/9] avcodec/mpegvideo_enc: Remove redundant check Andreas Rheinhardt
2022-08-09 18:34 ` [FFmpeg-devel] [PATCH 9/9] avcodec/mpegvideo_enc: Remove redundant cast Andreas Rheinhardt
2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 10/11] avcodec/mpegvideo: Move setting mb_height to ff_mpv_init_context_frame Andreas Rheinhardt
2022-08-09 19:55 ` [FFmpeg-devel] [PATCH 11/11] avcodec/mpegpicture: Always reset motion val buffer Andreas Rheinhardt
2022-08-11  8:05   ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git