From c3b67720f913d0d6be8369777b4cae86a6417bd1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 13 Jan 2013 21:46:44 -0800 Subject: [PATCH 1/7] h264: don't clobber mmco opcode tables for non-first slice headers. Clobbering these tables will temporarily clobber the template used as a basis for other threads to start decoding from. If the other decoding thread updates from the template right at that moment, subsequent threads will get invalid (or, usually, none at all) mmco tables. This leads to invalid reference lists and subsequent decode failures. Therefore, instead, decode the mmco tables only for the first slice in a field or frame. For other slices, decode the bits and ensure they are identical to the mmco tables in the first slice, but don't ever clobber the context state. This prevents other threads from using a clobbered/invalid template as starting point for decoding, and thus fixes decoding in these cases. This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with frame-multithreading enabled. (cherry picked from commit bad446e251405dc250c3cbee199072e083a1e4b9) Signed-off-by: Luca Barbato --- libavcodec/h264.c | 12 +++- libavcodec/h264.h | 5 +- libavcodec/h264_refs.c | 143 +++++++++++++++++++++++++++++------------ 3 files changed, 114 insertions(+), 46 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 366059722f..e8b3e723e1 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2904,7 +2904,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) s->current_picture_ptr->frame_num = h->prev_frame_num; ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0); ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 1); - ff_generate_sliding_window_mmcos(h); + ff_generate_sliding_window_mmcos(h, 1); if (ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index) < 0 && (s->avctx->err_recognition & AV_EF_EXPLODE)) return AVERROR_INVALIDDATA; @@ -3082,7 +3082,15 @@ static int decode_slice_header(H264Context *h, H264Context *h0) } } - if (h->nal_ref_idc && ff_h264_decode_ref_pic_marking(h0, &s->gb) < 0 && + // If frame-mt is enabled, only update mmco tables for the first slice + // in a field. Subsequent slices can temporarily clobber h->mmco_index + // or h->mmco, which will cause ref list mix-ups and decoding errors + // further down the line. This may break decoding if the first slice is + // corrupt, thus we only do this if frame-mt is enabled. + if (h->nal_ref_idc && + ff_h264_decode_ref_pic_marking(h0, &s->gb, + !(s->avctx->active_thread_type & FF_THREAD_FRAME) || + h0->current_slice == 0) < 0 && (s->avctx->err_recognition & AV_EF_EXPLODE)) return AVERROR_INVALIDDATA; diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 8596121aab..ad4732e1df 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -645,9 +645,10 @@ void ff_h264_remove_all_refs(H264Context *h); */ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count); -int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb); +int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, + int first_slice); -void ff_generate_sliding_window_mmcos(H264Context *h); +void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice); /** * Check if the top & left blocks are available if needed & change the diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 2a71ac1f06..62c2a5758e 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -476,23 +476,51 @@ static void print_long_term(H264Context *h) { } } -void ff_generate_sliding_window_mmcos(H264Context *h) { +static int check_opcodes(MMCO *mmco1, MMCO *mmco2, int n_mmcos) +{ + int i; + + for (i = 0; i < n_mmcos; i++) { + if (mmco1[i].opcode != mmco2[i].opcode) + return -1; + } + + return 0; +} + +void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice) +{ MpegEncContext * const s = &h->s; + MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp; + int mmco_index = 0, i; + assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); - h->mmco_index= 0; - if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && - !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->f.reference)) { - h->mmco[0].opcode= MMCO_SHORT2UNUSED; - h->mmco[0].short_pic_num= h->short_ref[ h->short_ref_count - 1 ]->frame_num; - h->mmco_index= 1; + if (h->short_ref_count && + h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && + !(FIELD_PICTURE && !s->first_field && + s->current_picture_ptr->f.reference)) { + mmco[0].opcode = MMCO_SHORT2UNUSED; + mmco[0].short_pic_num = h->short_ref[h->short_ref_count - 1]->frame_num; + mmco_index = 1; if (FIELD_PICTURE) { - h->mmco[0].short_pic_num *= 2; - h->mmco[1].opcode= MMCO_SHORT2UNUSED; - h->mmco[1].short_pic_num= h->mmco[0].short_pic_num + 1; - h->mmco_index= 2; + mmco[0].short_pic_num *= 2; + mmco[1].opcode = MMCO_SHORT2UNUSED; + mmco[1].short_pic_num = mmco[0].short_pic_num + 1; + mmco_index = 2; } } + + if (first_slice) { + h->mmco_index = mmco_index; + } else if (!first_slice && mmco_index >= 0 && + (mmco_index != h->mmco_index || + (i = check_opcodes(h->mmco, mmco_temp, mmco_index)))) { + av_log(h->s.avctx, AV_LOG_ERROR, + "Inconsistent MMCO state between slices [%d, %d, %d]\n", + mmco_index, h->mmco_index, i); + return AVERROR_INVALIDDATA; + } } int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ @@ -654,52 +682,83 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ return (h->s.avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; } -int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb){ +int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, + int first_slice) +{ MpegEncContext * const s = &h->s; int i; + MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp; + int mmco_index = 0; - h->mmco_index= 0; - if(h->nal_unit_type == NAL_IDR_SLICE){ //FIXME fields - s->broken_link= get_bits1(gb) -1; - if(get_bits1(gb)){ - h->mmco[0].opcode= MMCO_LONG; - h->mmco[0].long_arg= 0; - h->mmco_index= 1; + if (h->nal_unit_type == NAL_IDR_SLICE){ // FIXME fields + s->broken_link = get_bits1(gb) - 1; + if (get_bits1(gb)){ + mmco[0].opcode = MMCO_LONG; + mmco[0].long_arg = 0; + mmco_index = 1; } - }else{ - if(get_bits1(gb)){ // adaptive_ref_pic_marking_mode_flag - for(i= 0; immco[i].opcode= opcode; - if(opcode==MMCO_SHORT2UNUSED || opcode==MMCO_SHORT2LONG){ - h->mmco[i].short_pic_num= (h->curr_pic_num - get_ue_golomb(gb) - 1) & (h->max_pic_num - 1); -/* if(h->mmco[i].short_pic_num >= h->short_ref_count || h->short_ref[ h->mmco[i].short_pic_num ] == NULL){ - av_log(s->avctx, AV_LOG_ERROR, "illegal short ref in memory management control operation %d\n", mmco); - return -1; - }*/ - } - if(opcode==MMCO_SHORT2LONG || opcode==MMCO_LONG2UNUSED || opcode==MMCO_LONG || opcode==MMCO_SET_MAX_LONG){ - unsigned int long_arg= get_ue_golomb_31(gb); - if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){ - av_log(h->s.avctx, AV_LOG_ERROR, "illegal long ref in memory management control operation %d\n", opcode); + mmco[i].opcode = opcode; + if (opcode == MMCO_SHORT2UNUSED || opcode == MMCO_SHORT2LONG){ + mmco[i].short_pic_num = + (h->curr_pic_num - get_ue_golomb(gb) - 1) & + (h->max_pic_num - 1); +#if 0 + if (mmco[i].short_pic_num >= h->short_ref_count || + h->short_ref[ mmco[i].short_pic_num ] == NULL){ + av_log(s->avctx, AV_LOG_ERROR, + "illegal short ref in memory management control " + "operation %d\n", mmco); return -1; } - h->mmco[i].long_arg= long_arg; +#endif + } + if (opcode == MMCO_SHORT2LONG || opcode == MMCO_LONG2UNUSED || + opcode == MMCO_LONG || opcode == MMCO_SET_MAX_LONG) { + unsigned int long_arg = get_ue_golomb_31(gb); + if (long_arg >= 32 || + (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && + long_arg == 16) && + !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){ + av_log(h->s.avctx, AV_LOG_ERROR, + "illegal long ref in memory management control " + "operation %d\n", opcode); + return -1; + } + mmco[i].long_arg = long_arg; } - if(opcode > (unsigned)MMCO_LONG){ - av_log(h->s.avctx, AV_LOG_ERROR, "illegal memory management control operation %d\n", opcode); + if (opcode > (unsigned) MMCO_LONG){ + av_log(h->s.avctx, AV_LOG_ERROR, + "illegal memory management control operation %d\n", + opcode); return -1; } - if(opcode == MMCO_END) + if (opcode == MMCO_END) break; } - h->mmco_index= i; - }else{ - ff_generate_sliding_window_mmcos(h); + mmco_index = i; + } else { + if (first_slice) + ff_generate_sliding_window_mmcos(h, first_slice); + mmco_index = -1; } } + if (first_slice && mmco_index != -1) { + h->mmco_index = mmco_index; + } else if (!first_slice && mmco_index >= 0 && + (mmco_index != h->mmco_index || + (i = check_opcodes(h->mmco, mmco_temp, mmco_index)))) { + av_log(h->s.avctx, AV_LOG_ERROR, + "Inconsistent MMCO state between slices [%d, %d, %d]\n", + mmco_index, h->mmco_index, i); + return AVERROR_INVALIDDATA; + } + return 0; } From 6a4803a6a9ab892c33c38086bf86b5bf27bb9a25 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 14 Jan 2013 20:07:53 +0100 Subject: [PATCH 2/7] h264: fix ff_generate_sliding_window_mmcos() prototype. It's been returning an error value since bad446e251405dc250c3cbee199072e083a1e4b9 Also check for the errors it returns. (cherry picked from commit ea382767ad2191acbe97e90624059723e15f0e4b) Signed-off-by: Luca Barbato --- libavcodec/h264.c | 4 +++- libavcodec/h264.h | 2 +- libavcodec/h264_refs.c | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e8b3e723e1..ebf8d0b2ea 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2904,7 +2904,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0) s->current_picture_ptr->frame_num = h->prev_frame_num; ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0); ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 1); - ff_generate_sliding_window_mmcos(h, 1); + if ((ret = ff_generate_sliding_window_mmcos(h, 1)) < 0 && + s->avctx->err_recognition & AV_EF_EXPLODE) + return ret; if (ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index) < 0 && (s->avctx->err_recognition & AV_EF_EXPLODE)) return AVERROR_INVALIDDATA; diff --git a/libavcodec/h264.h b/libavcodec/h264.h index ad4732e1df..898ebf7b0a 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -648,7 +648,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count); int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, int first_slice); -void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice); +int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice); /** * Check if the top & left blocks are available if needed & change the diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 62c2a5758e..0e4bd76931 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -488,7 +488,7 @@ static int check_opcodes(MMCO *mmco1, MMCO *mmco2, int n_mmcos) return 0; } -void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice) +int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice) { MpegEncContext * const s = &h->s; MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp; @@ -521,6 +521,7 @@ void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice) mmco_index, h->mmco_index, i); return AVERROR_INVALIDDATA; } + return 0; } int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ @@ -686,7 +687,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, int first_slice) { MpegEncContext * const s = &h->s; - int i; + int i, ret; MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp; int mmco_index = 0; @@ -743,8 +744,11 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, } mmco_index = i; } else { - if (first_slice) - ff_generate_sliding_window_mmcos(h, first_slice); + if (first_slice) { + ret = ff_generate_sliding_window_mmcos(h, first_slice); + if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE) + return ret; + } mmco_index = -1; } } From 9d60f608af34a3ac9716c8ef210be23498e3bfba Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 15 Jan 2013 08:38:54 -0800 Subject: [PATCH 3/7] h264: add 3 pixels below for subpixel filter wait position If the motion vector is at a subpixel position, we need 3 pixels below the motion vector's wholepel position available, not 2, since the MC filter is a sixtap filter for the hpel position, and then a bilin filter for the qpel position. This patch fixes highly irreproducible (0.1%) fate failures in frame 2 and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field, last line of MB x=40,y=2 and second field and last lines of MBs x=39-40, y=3). These used pre-loopfilter instead of post-loopfilter data because the await_progress() waited for one line too little in that field, and the motion vector of these particular MBs happened to align exactly to a position where that demonstrates the bug. CC: libav-stable@libav.org (cherry picked from commit fb845ffdd335a1efd6dfd43e8adeb530397b348e) Signed-off-by: Luca Barbato --- libavcodec/h264.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ebf8d0b2ea..848d6a2d31 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -290,10 +290,11 @@ static inline int get_lowest_part_list_y(H264Context *h, Picture *pic, int n, int height, int y_offset, int list) { int raw_my = h->mv_cache[list][scan8[n]][1]; - int filter_height = (raw_my & 3) ? 2 : 0; + int filter_height_up = (raw_my & 3) ? 2 : 0; + int filter_height_down = (raw_my & 3) ? 3 : 0; int full_my = (raw_my >> 2) + y_offset; - int top = full_my - filter_height; - int bottom = full_my + filter_height + height; + int top = full_my - filter_height_up; + int bottom = full_my + filter_height_down + height; return FFMAX(abs(top), bottom); } From c749bec8c3ef88e3e12847a60d6e8e6d73c736d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 17 Jan 2013 16:03:36 +0200 Subject: [PATCH 4/7] theora: Skip zero-sized headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a regression since d9cf5f51/7a2ee770f5 with theora over RTP (possibly with other variants of theora as well). In theora over RTP, the second of the 3 headers turns out to be 0 bytes long, which prior to d9cf5f51 worked just fine. After d9cf5f51, reading from the bitstream reader fails (since the reader wasn't initialized but returned an error if initialized with 0 bits). CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit e33db35b4a91ad543d9dde3a981a89118ba68937) Signed-off-by: Martin Storsjö --- libavcodec/vp3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index bdd4289a49..0340c22bb2 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2339,6 +2339,8 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) } for(i=0;i<3;i++) { + if (header_len[i] <= 0) + continue; init_get_bits(&gb, header_start[i], header_len[i] * 8); ptype = get_bits(&gb, 8); From 21ca4ab9449f1165913fd971dc0eb7387b8fe5a8 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 17 Jan 2013 11:24:01 +0100 Subject: [PATCH 5/7] libcdio: support recent cdio-paranoia Upstream decided to split the paranoia interface and move the headers accordingly. (cherry picked from commit 57224e425c567a87798b66425acc383c6dd37331) Signed-off-by: Luca Barbato --- configure | 7 +++++-- libavdevice/libcdio.c | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8cc9cdc139..6a8990d162 100755 --- a/configure +++ b/configure @@ -1201,6 +1201,8 @@ HAVE_LIST=" asm_mod_y attribute_may_alias attribute_packed + cdio_paranoia_h + cdio_paranoia_paranoia_h closesocket cmov CommandLineToArgvW @@ -3551,8 +3553,9 @@ enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio -enabled libcdio && - check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio +if enabled libcdio; then + check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio +fi enabled x11grab && require X11 X11/Xlib.h XOpenDisplay -lX11 && diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c index e846ee635b..06ddb4a784 100644 --- a/libavdevice/libcdio.c +++ b/libavdevice/libcdio.c @@ -23,8 +23,15 @@ * libcdio CD grabbing */ +#include "config.h" + +#if HAVE_CDIO_PARANOIA_H #include #include +#elif HAVE_CDIO_PARANOIA_PARANOIA_H +#include +#include +#endif #include "libavutil/log.h" #include "libavutil/mem.h" From c3c1db7c5637c4e4d8dfdd748466a223f83fffa8 Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Thu, 17 Jan 2013 01:24:15 -0500 Subject: [PATCH 6/7] rv30: fix masking in rv30_loop_filter() The mask `x && (1 << y)' is incorrect and always yields true. The correct form should be `x & (1 << y)'. CC: libav-stable@libav.org Signed-off-by: Xi Wang (cherry picked from commit 783e37f7ef3b3cdcfe7aa927a25b4184ae46cd53) Signed-off-by: Luca Barbato --- libavcodec/rv30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index e4f3251047..3c3579b565 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -182,7 +182,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row) for(i = !mb_x; i < 2; i++, C += 4){ int ij = i + (j >> 1); loc_lim = 0; - if(cur_cbp && (1 << ij)) + if (cur_cbp & (1 << ij)) loc_lim = cur_lim; else if(!i && left_cbp & (1 << (ij + 1))) loc_lim = left_lim; @@ -224,7 +224,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row) for(i = 0; i < 2; i++, C += 4){ int ij = i + (j >> 1); loc_lim = 0; - if(r->cbp_chroma[mb_pos] && (1 << ij)) + if (r->cbp_chroma[mb_pos] & (1 << ij)) loc_lim = cur_lim; else if(!j && top_cbp & (1 << (ij + 2))) loc_lim = top_lim; From 0a837b631757a7407df038248eea5e9e79b1cb79 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 17 Jan 2013 23:06:46 +0100 Subject: [PATCH 7/7] fate: update ref after rv30_loop_filter fix (cherry picked from commit 56ef1ef1f7580f41d6819ac63081a02f52752903) Signed-off-by: Luca Barbato --- tests/ref/fate/filter-delogo | 164 +++++++++++++++++------------------ tests/ref/fate/rv30 | 164 +++++++++++++++++------------------ 2 files changed, 164 insertions(+), 164 deletions(-) diff --git a/tests/ref/fate/filter-delogo b/tests/ref/fate/filter-delogo index 00226982b2..1a1f4970da 100644 --- a/tests/ref/fate/filter-delogo +++ b/tests/ref/fate/filter-delogo @@ -8,13 +8,13 @@ 0, 200, 200, 0, 126720, 0x94a0f126 0, 233, 233, 0, 126720, 0x0250f106 0, 266, 266, 0, 126720, 0xcf6ab4bc -0, 300, 300, 0, 126720, 0x44aeb57c -0, 333, 333, 0, 126720, 0x33b0b5bc -0, 367, 367, 0, 126720, 0xc4bab591 +0, 300, 300, 0, 126720, 0x429eb57c +0, 333, 333, 0, 126720, 0x3bf0b5bc +0, 367, 367, 0, 126720, 0xcaedb591 0, 400, 400, 0, 126720, 0xa492b5ec -0, 433, 433, 0, 126720, 0x1459b85c -0, 467, 467, 0, 126720, 0x806fb8dc -0, 500, 500, 0, 126720, 0xd241b871 +0, 433, 433, 0, 126720, 0x2431b85c +0, 467, 467, 0, 126720, 0x8283b8dc +0, 500, 500, 0, 126720, 0xd71bb871 0, 533, 533, 0, 126720, 0x698eb5cc 0, 567, 567, 0, 126720, 0x4719aa98 0, 600, 600, 0, 126720, 0x9ca1962c @@ -28,83 +28,83 @@ 0, 867, 867, 0, 126720, 0x7af2ea86 0, 900, 900, 0, 126720, 0x40d4b4eb 0, 934, 934, 0, 126720, 0x49d00307 -0, 967, 967, 0, 126720, 0x44c8848e -0, 1000, 1000, 0, 126720, 0xc6990101 -0, 1034, 1034, 0, 126720, 0x2e01b963 +0, 967, 967, 0, 126720, 0x0654849c +0, 1000, 1000, 0, 126720, 0xe46d0107 +0, 1034, 1034, 0, 126720, 0xa483b963 0, 1067, 1067, 0, 126720, 0xd0e903f0 -0, 1101, 1101, 0, 126720, 0x3457d592 -0, 1134, 1134, 0, 126720, 0x4f1ddb3c -0, 1167, 1167, 0, 126720, 0x3980ace5 +0, 1101, 1101, 0, 126720, 0x964ed592 +0, 1134, 1134, 0, 126720, 0x23fbdb3c +0, 1167, 1167, 0, 126720, 0x59fdace5 0, 1201, 1201, 0, 126720, 0xb1e37954 -0, 1234, 1234, 0, 126720, 0x619fc554 -0, 1267, 1267, 0, 126720, 0x945fb39e -0, 1301, 1301, 0, 126720, 0xb1d5e0ce +0, 1234, 1234, 0, 126720, 0x8ed9c554 +0, 1267, 1267, 0, 126720, 0xe3c4b39f +0, 1301, 1301, 0, 126720, 0xfd17e0ce 0, 1334, 1334, 0, 126720, 0xf26e1dcc -0, 1368, 1368, 0, 126720, 0x04d5783e -0, 1401, 1401, 0, 126720, 0xbaa0479e -0, 1434, 1434, 0, 126720, 0x20d88b01 +0, 1368, 1368, 0, 126720, 0x13cc783c +0, 1401, 1401, 0, 126720, 0x47ad47a1 +0, 1434, 1434, 0, 126720, 0x427c8b0d 0, 1468, 1468, 0, 126720, 0x59d99901 -0, 1501, 1501, 0, 126720, 0x1c6e09f6 -0, 1534, 1534, 0, 126720, 0xeec50fc5 -0, 1568, 1568, 0, 126720, 0xb3a92827 -0, 1601, 1601, 0, 126720, 0xf62dd2b6 -0, 1634, 1634, 0, 126720, 0x75b1e619 -0, 1668, 1668, 0, 126720, 0x6bbce2c0 -0, 1701, 1701, 0, 126720, 0xd93e023c -0, 1735, 1735, 0, 126720, 0xbbe8e7c2 -0, 1768, 1768, 0, 126720, 0x2272ec17 -0, 1801, 1801, 0, 126720, 0xf5e4ee6e -0, 1835, 1835, 0, 126720, 0x751d2607 -0, 1868, 1868, 0, 126720, 0x44c499c9 -0, 1901, 1901, 0, 126720, 0xddccd842 -0, 1935, 1935, 0, 126720, 0x508dd214 -0, 1968, 1968, 0, 126720, 0x8eb10272 -0, 2001, 2001, 0, 126720, 0x7224b1c6 -0, 2035, 2035, 0, 126720, 0x50ff456c -0, 2068, 2068, 0, 126720, 0xa81e2731 -0, 2102, 2102, 0, 126720, 0x7e50456d -0, 2135, 2135, 0, 126720, 0x44802978 -0, 2168, 2168, 0, 126720, 0x86e88743 -0, 2202, 2202, 0, 126720, 0x0b1087d6 -0, 2235, 2235, 0, 126720, 0xb0227d21 -0, 2268, 2268, 0, 126720, 0x29d10bd2 -0, 2302, 2302, 0, 126720, 0x04b43afa -0, 2335, 2335, 0, 126720, 0xb48e9698 -0, 2369, 2369, 0, 126720, 0x75d760fb -0, 2402, 2402, 0, 126720, 0xa2ab1fdb -0, 2435, 2435, 0, 126720, 0xec30a5ee -0, 2469, 2469, 0, 126720, 0xbdab7c8c -0, 2502, 2502, 0, 126720, 0xac5c3f2c -0, 2535, 2535, 0, 126720, 0xce6350be -0, 2569, 2569, 0, 126720, 0xb109657a -0, 2602, 2602, 0, 126720, 0x723865a4 -0, 2635, 2635, 0, 126720, 0xa9869124 -0, 2669, 2669, 0, 126720, 0xc41af558 -0, 2702, 2702, 0, 126720, 0xcbe6a402 -0, 2736, 2736, 0, 126720, 0xb6735ecb -0, 2769, 2769, 0, 126720, 0xba3059f2 -0, 2802, 2802, 0, 126720, 0xe7d63b8d -0, 2836, 2836, 0, 126720, 0x8f115906 -0, 2869, 2869, 0, 126720, 0xaf6a8dcb -0, 2902, 2902, 0, 126720, 0xb73e846e -0, 2936, 2936, 0, 126720, 0xedd6380f -0, 2969, 2969, 0, 126720, 0xd9026acf -0, 3002, 3002, 0, 126720, 0xa03a650b -0, 3036, 3036, 0, 126720, 0x262765bc -0, 3069, 3069, 0, 126720, 0xaaa9ded1 -0, 3103, 3103, 0, 126720, 0xe4f42665 -0, 3136, 3136, 0, 126720, 0x78daf760 -0, 3169, 3169, 0, 126720, 0x3b0c6ef8 -0, 3203, 3203, 0, 126720, 0xb745df80 -0, 3236, 3236, 0, 126720, 0x08e57b90 -0, 3269, 3269, 0, 126720, 0x6f883ab0 -0, 3303, 3303, 0, 126720, 0x934b4dd5 -0, 3336, 3336, 0, 126720, 0x762f108f -0, 3370, 3370, 0, 126720, 0x91ee0f2b -0, 3403, 3403, 0, 126720, 0x9af6e5e8 -0, 3436, 3436, 0, 126720, 0xdcd95e0a -0, 3470, 3470, 0, 126720, 0x22c33a6e -0, 3503, 3503, 0, 126720, 0x21c1b7f4 -0, 3536, 3536, 0, 126720, 0x0a66a1ed -0, 3570, 3570, 0, 126720, 0x53fea81b -0, 3603, 3603, 0, 126720, 0x597f5567 +0, 1501, 1501, 0, 126720, 0xc40707da +0, 1534, 1534, 0, 126720, 0xcd060dce +0, 1568, 1568, 0, 126720, 0xed4024f6 +0, 1601, 1601, 0, 126720, 0x7decd2b4 +0, 1634, 1634, 0, 126720, 0xd1d2e730 +0, 1668, 1668, 0, 126720, 0x77cee457 +0, 1701, 1701, 0, 126720, 0xe78d02c0 +0, 1735, 1735, 0, 126720, 0xad0beb29 +0, 1768, 1768, 0, 126720, 0xc414eea2 +0, 1801, 1801, 0, 126720, 0x6a15f17d +0, 1835, 1835, 0, 126720, 0x516027f6 +0, 1868, 1868, 0, 126720, 0x4eda9dce +0, 1901, 1901, 0, 126720, 0x7d9bdba3 +0, 1935, 1935, 0, 126720, 0x7aa3d5c0 +0, 1968, 1968, 0, 126720, 0x7c7a04f9 +0, 2001, 2001, 0, 126720, 0x3e8fb6cc +0, 2035, 2035, 0, 126720, 0xd5474916 +0, 2068, 2068, 0, 126720, 0xf3f62bab +0, 2102, 2102, 0, 126720, 0x2f054987 +0, 2135, 2135, 0, 126720, 0x974c2e81 +0, 2168, 2168, 0, 126720, 0xe7e28a97 +0, 2202, 2202, 0, 126720, 0x45e38b41 +0, 2235, 2235, 0, 126720, 0x169c7f19 +0, 2268, 2268, 0, 126720, 0x91d90ee8 +0, 2302, 2302, 0, 126720, 0xdd653e24 +0, 2335, 2335, 0, 126720, 0x0da598c4 +0, 2369, 2369, 0, 126720, 0x687e62cc +0, 2402, 2402, 0, 126720, 0x7631232d +0, 2435, 2435, 0, 126720, 0xbd1ea826 +0, 2469, 2469, 0, 126720, 0xb55f7f4b +0, 2502, 2502, 0, 126720, 0x923f3fc9 +0, 2535, 2535, 0, 126720, 0x15515301 +0, 2569, 2569, 0, 126720, 0x9ee066e5 +0, 2602, 2602, 0, 126720, 0x7c21664b +0, 2635, 2635, 0, 126720, 0x36849100 +0, 2669, 2669, 0, 126720, 0x08b1f61a +0, 2702, 2702, 0, 126720, 0x5bfca6e2 +0, 2736, 2736, 0, 126720, 0x929f60e3 +0, 2769, 2769, 0, 126720, 0xa2b55c29 +0, 2802, 2802, 0, 126720, 0x68bd3ff3 +0, 2836, 2836, 0, 126720, 0x30db5b29 +0, 2869, 2869, 0, 126720, 0x00578f9b +0, 2902, 2902, 0, 126720, 0x18368642 +0, 2936, 2936, 0, 126720, 0xbcb83a80 +0, 2969, 2969, 0, 126720, 0x90f36b72 +0, 3002, 3002, 0, 126720, 0x85e46522 +0, 3036, 3036, 0, 126720, 0x2429660a +0, 3069, 3069, 0, 126720, 0xf283dfe2 +0, 3103, 3103, 0, 126720, 0x896b27dc +0, 3136, 3136, 0, 126720, 0x5af4f961 +0, 3169, 3169, 0, 126720, 0x31897085 +0, 3203, 3203, 0, 126720, 0x441ce33e +0, 3236, 3236, 0, 126720, 0x903f8009 +0, 3269, 3269, 0, 126720, 0xbdf33dba +0, 3303, 3303, 0, 126720, 0x8a364f36 +0, 3336, 3336, 0, 126720, 0xda5513f6 +0, 3370, 3370, 0, 126720, 0xd60012b3 +0, 3403, 3403, 0, 126720, 0x67bce7be +0, 3436, 3436, 0, 126720, 0x697e6174 +0, 3470, 3470, 0, 126720, 0xbe3e3e90 +0, 3503, 3503, 0, 126720, 0xf3e4bba6 +0, 3536, 3536, 0, 126720, 0x8124a679 +0, 3570, 3570, 0, 126720, 0x58d1acde +0, 3603, 3603, 0, 126720, 0xd8a15ba3 diff --git a/tests/ref/fate/rv30 b/tests/ref/fate/rv30 index 48834237e3..89a9d8c978 100644 --- a/tests/ref/fate/rv30 +++ b/tests/ref/fate/rv30 @@ -8,13 +8,13 @@ 0, 200, 200, 0, 126720, 0x5e6ff4d7 0, 233, 233, 0, 126720, 0xcc10f4b7 0, 266, 266, 0, 126720, 0x763ab817 -0, 300, 300, 0, 126720, 0xeb6fb8d7 -0, 333, 333, 0, 126720, 0xda71b917 -0, 367, 367, 0, 126720, 0x0967b8f7 +0, 300, 300, 0, 126720, 0xe95fb8d7 +0, 333, 333, 0, 126720, 0xe2b1b917 +0, 367, 367, 0, 126720, 0x11abb8f7 0, 400, 400, 0, 126720, 0x4b62b947 -0, 433, 433, 0, 126720, 0xbb1abbb7 -0, 467, 467, 0, 126720, 0x273fbc37 -0, 500, 500, 0, 126720, 0x16eebbd7 +0, 433, 433, 0, 126720, 0xcaf2bbb7 +0, 467, 467, 0, 126720, 0x2953bc37 +0, 500, 500, 0, 126720, 0x1dd9bbd7 0, 533, 533, 0, 126720, 0x105eb927 0, 567, 567, 0, 126720, 0x7fa3ae27 0, 600, 600, 0, 126720, 0x722e99f7 @@ -28,83 +28,83 @@ 0, 867, 867, 0, 126720, 0x6ddaef32 0, 900, 900, 0, 126720, 0xde1bb900 0, 934, 934, 0, 126720, 0xac6c071b -0, 967, 967, 0, 126720, 0x04e7897c -0, 1000, 1000, 0, 126720, 0x5eee050f -0, 1034, 1034, 0, 126720, 0xe675be59 +0, 967, 967, 0, 126720, 0x4a9f897c +0, 1000, 1000, 0, 126720, 0xd8fa050f +0, 1034, 1034, 0, 126720, 0x5d06be59 0, 1067, 1067, 0, 126720, 0xdc3e0837 -0, 1101, 1101, 0, 126720, 0x68cfda2b -0, 1134, 1134, 0, 126720, 0xe572dfc9 -0, 1167, 1167, 0, 126720, 0x582fb176 +0, 1101, 1101, 0, 126720, 0xcac6da2b +0, 1134, 1134, 0, 126720, 0x6672dfc9 +0, 1167, 1167, 0, 126720, 0x7491b176 0, 1201, 1201, 0, 126720, 0xa9477df0 -0, 1234, 1234, 0, 126720, 0xbc3cc34f -0, 1267, 1267, 0, 126720, 0xcf8cb0e2 -0, 1301, 1301, 0, 126720, 0xcff1db35 +0, 1234, 1234, 0, 126720, 0xe976c34f +0, 1267, 1267, 0, 126720, 0xdb7ab0e2 +0, 1301, 1301, 0, 126720, 0x1b42db35 0, 1334, 1334, 0, 126720, 0xc6e10f9f -0, 1368, 1368, 0, 126720, 0x75ae61b6 -0, 1401, 1401, 0, 126720, 0x12af3119 -0, 1434, 1434, 0, 126720, 0x85597543 +0, 1368, 1368, 0, 126720, 0x169d61b6 +0, 1401, 1401, 0, 126720, 0xc7623119 +0, 1434, 1434, 0, 126720, 0x5b9b7543 0, 1468, 1468, 0, 126720, 0x68c27aca -0, 1501, 1501, 0, 126720, 0x554fe3e4 -0, 1534, 1534, 0, 126720, 0x72ecea95 -0, 1568, 1568, 0, 126720, 0xf4d003d1 -0, 1601, 1601, 0, 126720, 0x9bf6a605 -0, 1634, 1634, 0, 126720, 0x5d00b5fe -0, 1668, 1668, 0, 126720, 0x93f7b040 -0, 1701, 1701, 0, 126720, 0x0d6ad154 -0, 1735, 1735, 0, 126720, 0x4be8b4ea -0, 1768, 1768, 0, 126720, 0xe39bba0d -0, 1801, 1801, 0, 126720, 0x9c21bad8 -0, 1835, 1835, 0, 126720, 0xa567f25b -0, 1868, 1868, 0, 126720, 0x7a82663a -0, 1901, 1901, 0, 126720, 0x72f2a47d -0, 1935, 1935, 0, 126720, 0x4f639ebe -0, 1968, 1968, 0, 126720, 0xab0fce83 -0, 2001, 2001, 0, 126720, 0x6cf87d39 -0, 2035, 2035, 0, 126720, 0x534a10cc -0, 2068, 2068, 0, 126720, 0x6bbcf44c -0, 2102, 2102, 0, 126720, 0xfdca11d3 -0, 2135, 2135, 0, 126720, 0x7e58f5a6 -0, 2168, 2168, 0, 126720, 0x5fd753d8 -0, 2202, 2202, 0, 126720, 0x0c735615 -0, 2235, 2235, 0, 126720, 0x2a034ebf -0, 2268, 2268, 0, 126720, 0xeaf3dd0b -0, 2302, 2302, 0, 126720, 0x0eaf0c1b -0, 2335, 2335, 0, 126720, 0xce5e6794 -0, 2369, 2369, 0, 126720, 0xf27c31c3 -0, 2402, 2402, 0, 126720, 0xb64af168 -0, 2435, 2435, 0, 126720, 0x14cf7974 -0, 2469, 2469, 0, 126720, 0x1c2a513d -0, 2502, 2502, 0, 126720, 0xa3f515ab -0, 2535, 2535, 0, 126720, 0xcfd62765 -0, 2569, 2569, 0, 126720, 0xbc513f2a -0, 2602, 2602, 0, 126720, 0xbc303fae -0, 2635, 2635, 0, 126720, 0x2f8f69b9 -0, 2669, 2669, 0, 126720, 0x0a22cc69 -0, 2702, 2702, 0, 126720, 0xd9f67585 -0, 2736, 2736, 0, 126720, 0x20403001 -0, 2769, 2769, 0, 126720, 0xf92b2a25 -0, 2802, 2802, 0, 126720, 0x3c170aad -0, 2836, 2836, 0, 126720, 0x3378251f -0, 2869, 2869, 0, 126720, 0xb3ed5911 -0, 2902, 2902, 0, 126720, 0x35d24ef8 -0, 2936, 2936, 0, 126720, 0x8da30275 -0, 2969, 2969, 0, 126720, 0xc15a3577 -0, 3002, 3002, 0, 126720, 0xf2942f53 -0, 3036, 3036, 0, 126720, 0x44d8304a -0, 3069, 3069, 0, 126720, 0xd688a932 -0, 3103, 3103, 0, 126720, 0x0a24f256 -0, 3136, 3136, 0, 126720, 0xfab9c45d -0, 3169, 3169, 0, 126720, 0x10e939ce -0, 3203, 3203, 0, 126720, 0x97fcaa3a -0, 3236, 3236, 0, 126720, 0x45464610 -0, 3269, 3269, 0, 126720, 0xfe2e057d -0, 3303, 3303, 0, 126720, 0x0b6718ae -0, 3336, 3336, 0, 126720, 0x5284da7b -0, 3370, 3370, 0, 126720, 0x23efdc35 -0, 3403, 3403, 0, 126720, 0xc387b2b3 -0, 3436, 3436, 0, 126720, 0xc9e92bf1 -0, 3470, 3470, 0, 126720, 0xfbf20a01 -0, 3503, 3503, 0, 126720, 0x4d888b2e -0, 3536, 3536, 0, 126720, 0xdd0d74df -0, 3570, 3570, 0, 126720, 0x49d07aa4 -0, 3603, 3603, 0, 126720, 0x08382b8e +0, 1501, 1501, 0, 126720, 0xa0e4e1c9 +0, 1534, 1534, 0, 126720, 0xbbdae87e +0, 1568, 1568, 0, 126720, 0xe67e00a1 +0, 1601, 1601, 0, 126720, 0x648ea605 +0, 1634, 1634, 0, 126720, 0x5becb718 +0, 1668, 1668, 0, 126720, 0xb79ab1da +0, 1701, 1701, 0, 126720, 0x0d52d1dc +0, 1735, 1735, 0, 126720, 0x1277b853 +0, 1768, 1768, 0, 126720, 0xc57cbc83 +0, 1801, 1801, 0, 126720, 0x2126bdc3 +0, 1835, 1835, 0, 126720, 0x4c1ef41f +0, 1868, 1868, 0, 126720, 0x185f6a2c +0, 1901, 1901, 0, 126720, 0xb2b5a7d3 +0, 1935, 1935, 0, 126720, 0x32d7a26d +0, 1968, 1968, 0, 126720, 0x0bffd118 +0, 2001, 2001, 0, 126720, 0x2eed823a +0, 2035, 2035, 0, 126720, 0xc4c0147c +0, 2068, 2068, 0, 126720, 0x1f8bf8ac +0, 2102, 2102, 0, 126720, 0xfcb715e8 +0, 2135, 2135, 0, 126720, 0xc3e9fa9c +0, 2168, 2168, 0, 126720, 0x9ad8572c +0, 2202, 2202, 0, 126720, 0x2800596d +0, 2235, 2235, 0, 126720, 0x3caa5094 +0, 2268, 2268, 0, 126720, 0x6162e000 +0, 2302, 2302, 0, 126720, 0x18200f2c +0, 2335, 2335, 0, 126720, 0x649e699f +0, 2369, 2369, 0, 126720, 0x5f513367 +0, 2402, 2402, 0, 126720, 0x71fbf4a8 +0, 2435, 2435, 0, 126720, 0x5bff7b97 +0, 2469, 2469, 0, 126720, 0xbad453d4 +0, 2502, 2502, 0, 126720, 0x56e6161d +0, 2535, 2535, 0, 126720, 0x524f2980 +0, 2569, 2569, 0, 126720, 0x0589405a +0, 2602, 2602, 0, 126720, 0x5c264043 +0, 2635, 2635, 0, 126720, 0x2394696f +0, 2669, 2669, 0, 126720, 0x1aa0cd15 +0, 2702, 2702, 0, 126720, 0xd6ec7840 +0, 2736, 2736, 0, 126720, 0xde5531f0 +0, 2769, 2769, 0, 126720, 0x03a42c3a +0, 2802, 2802, 0, 126720, 0xbdee0efb +0, 2836, 2836, 0, 126720, 0xa6012736 +0, 2869, 2869, 0, 126720, 0x448f5ae6 +0, 2902, 2902, 0, 126720, 0x8a2550c3 +0, 2936, 2936, 0, 126720, 0x143104e7 +0, 2969, 2969, 0, 126720, 0x75db363d +0, 3002, 3002, 0, 126720, 0x906d2f9d +0, 3036, 3036, 0, 126720, 0xfc7b30ab +0, 3069, 3069, 0, 126720, 0xd3edaa62 +0, 3103, 3103, 0, 126720, 0x6267f3fc +0, 3136, 3136, 0, 126720, 0x87b6c67f +0, 3169, 3169, 0, 126720, 0x84da3b79 +0, 3203, 3203, 0, 126720, 0x72fbae15 +0, 3236, 3236, 0, 126720, 0xb8474a80 +0, 3269, 3269, 0, 126720, 0xbeae088b +0, 3303, 3303, 0, 126720, 0x538b1a14 +0, 3336, 3336, 0, 126720, 0x07bbddcd +0, 3370, 3370, 0, 126720, 0x807ddf8f +0, 3403, 3403, 0, 126720, 0x325bb46d +0, 3436, 3436, 0, 126720, 0xd80c2f2a +0, 3470, 3470, 0, 126720, 0xfc1b0dec +0, 3503, 3503, 0, 126720, 0x46068ebc +0, 3536, 3536, 0, 126720, 0xcd987941 +0, 3570, 3570, 0, 126720, 0x52f37f2e +0, 3603, 3603, 0, 126720, 0xc96931a2