Path: blob/21.2-virgl/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
4570 views
/*1* Copyright 2011-2013 Maarten Lankhorst2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*/2122#include "nouveau_vp3_video.h"2324struct mpeg12_picparm_vp {25uint16_t width; // 00 in mb units26uint16_t height; // 02 in mb units2728uint32_t unk04; // 04 stride for Y?29uint32_t unk08; // 08 stride for CbCr?3031uint32_t ofs[6]; // 1c..20 ofs32uint32_t bucket_size; // 2433uint32_t inter_ring_data_size; // 2834uint16_t unk2c; // 2c35uint16_t alternate_scan; // 2e36uint16_t unk30; // 30 not seen set yet37uint16_t picture_structure; // 3238uint16_t pad2[3];39uint16_t unk3a; // 3a set on I frame?4041uint32_t f_code[4]; // 3c42uint32_t picture_coding_type; // 4c43uint32_t intra_dc_precision; // 5044uint32_t q_scale_type; // 5445uint32_t top_field_first; // 5846uint32_t full_pel_forward_vector; // 5c47uint32_t full_pel_backward_vector; // 6048uint8_t intra_quantizer_matrix[0x40]; // 6449uint8_t non_intra_quantizer_matrix[0x40]; // a450};5152struct mpeg4_picparm_vp {53uint32_t width; // 00 in normal units54uint32_t height; // 04 in normal units55uint32_t unk08; // stride 156uint32_t unk0c; // stride 257uint32_t ofs[6]; // 10..24 ofs58uint32_t bucket_size; // 2859uint32_t pad1; // 2c, pad60uint32_t pad2; // 3061uint32_t inter_ring_data_size; // 346263uint32_t trd[2]; // 38, 3c64uint32_t trb[2]; // 40, 4465uint32_t u48; // XXX codec selection? Should test with different values of VdpDecoderProfile66uint16_t f_code_fw; // 4c67uint16_t f_code_bw; // 4e68uint8_t interlaced; // 506970uint8_t quant_type; // bool, written to 52871uint8_t quarter_sample; // bool, written to 54872uint8_t short_video_header; // bool, negated written to 528 shifted by 173uint8_t u54; // bool, written to 0x74074uint8_t vop_coding_type; // 5575uint8_t rounding_control; // 5676uint8_t alternate_vertical_scan_flag; // 57 bool77uint8_t top_field_first; // bool, written to vuc7879uint8_t pad4[3]; // 59, 5a, 5b, contains garbage on blob8081uint32_t intra[0x10]; // 5c82uint32_t non_intra[0x10]; // 9c83uint32_t pad5[0x10]; // bc what does this do?84// udc..uff pad?85};8687// Full version, with data pumped from BSP88struct vc1_picparm_vp {89uint32_t bucket_size; // 0090uint32_t pad; // 049192uint32_t inter_ring_data_size; // 0893uint32_t unk0c; // stride 194uint32_t unk10; // stride 295uint32_t ofs[6]; // 14..28 ofs9697uint16_t width; // 2c98uint16_t height; // 2e99100uint8_t profile; // 30 0 = simple, 1 = main, 2 = advanced101uint8_t loopfilter; // 31 written into vuc102uint8_t fastuvmc; // 32, written into vuc103uint8_t dquant; // 33104105uint8_t overlap; // 34106uint8_t quantizer; // 35107uint8_t u36; // 36, bool108uint8_t pad2; // 37, to align to 0x38109};110111struct h264_picparm_vp { // 700..a00112uint16_t width, height;113uint32_t stride1, stride2; // 04 08114uint32_t ofs[6]; // 0c..24 in-image offset115116uint32_t tmp_stride;117uint32_t bucket_size; // 28 bucket size118uint32_t inter_ring_data_size; // 2c119120unsigned mb_adaptive_frame_field_flag : 1; // 0121unsigned direct_8x8_inference_flag : 1; // 1 0x02: into vuc ofs 56122unsigned weighted_pred_flag : 1; // 2 0x04123unsigned constrained_intra_pred_flag : 1; // 3 0x08: into vuc ofs 68124unsigned is_reference : 1; // 4125unsigned interlace : 1; // 5 field_pic_flag126unsigned bottom_field_flag : 1; // 6127unsigned second_field : 1; // 7 0x80: nfi yet128129signed log2_max_frame_num_minus4 : 4; // 31 0..3130unsigned chroma_format_idc : 2; // 31 4..5131unsigned pic_order_cnt_type : 2; // 31 6..7132signed pic_init_qp_minus26 : 6; // 32 0..5133signed chroma_qp_index_offset : 5; // 32 6..10134signed second_chroma_qp_index_offset : 5; // 32 11..15135136unsigned weighted_bipred_idc : 2; // 34 0..1137unsigned fifo_dec_index : 7; // 34 2..8138unsigned tmp_idx : 5; // 34 9..13139unsigned frame_number : 16; // 34 14..29140unsigned u34_3030 : 1; // 34 30..30 pp.u34[30:30]141unsigned u34_3131 : 1; // 34 31..31 pad?142143uint32_t field_order_cnt[2]; // 38, 3c144145struct { // 40146unsigned fifo_idx : 7; // 00 0..6147unsigned tmp_idx : 5; // 00 7..11148unsigned top_is_reference : 1; // 00 12149unsigned bottom_is_reference : 1; // 00 13150unsigned is_long_term : 1; // 00 14151unsigned notseenyet : 1; // 00 15 pad?152unsigned field_pic_flag : 1; // 00 16153unsigned top_field_marking : 4; // 00 17..20154unsigned bottom_field_marking : 4; // 00 21..24155unsigned pad : 7; // 00 d25..31156157uint32_t field_order_cnt[2]; // 04,08158uint32_t frame_idx; // 0c159} refs[0x10];160161uint8_t m4x4[6][16]; // 140162uint8_t m8x8[2][64]; // 1a0163uint32_t u220; // 220 number of extra reorder_list to append?164uint8_t u224[0x20]; // 224..244 reorder_list append ?165uint8_t nfi244[0xb0]; // add some pad to make sure nulls are read166};167168static void169nouveau_vp3_handle_references(struct nouveau_vp3_decoder *dec, struct nouveau_vp3_video_buffer *refs[16], unsigned seq, struct nouveau_vp3_video_buffer *target)170{171unsigned i, idx, empty_spot = ~0;172173for (i = 0; i < dec->base.max_references; ++i) {174if (!refs[i])175continue;176177idx = refs[i]->valid_ref;178//debug_printf("ref[%i] %p in slot %i\n", i, refs[i], idx);179180if (dec->refs[idx].vidbuf != refs[i]) {181debug_printf("%p is not a real ref\n", refs[i]);182// FIXME: Maybe do m2mf copy here if a application really depends on it?183continue;184}185186assert(dec->refs[idx].vidbuf == refs[i]);187dec->refs[idx].last_used = seq;188}189190if (dec->refs[target->valid_ref].vidbuf == target) {191dec->refs[target->valid_ref].last_used = seq;192return;193}194195/* Try to find a real empty spot first, there should be one..196*/197for (i = 0; i < dec->base.max_references + 1; ++i) {198if (dec->refs[i].vidbuf == target) {199empty_spot = i;200break;201} else if (!dec->refs[i].last_used) {202empty_spot = i;203} else if (empty_spot == ~0U && dec->refs[i].last_used != seq)204empty_spot = i;205}206207assert(empty_spot < dec->base.max_references+1);208dec->refs[empty_spot].last_used = seq;209// debug_printf("Kicked %p to add %p to slot %i\n", dec->refs[empty_spot].vidbuf, target, empty_spot);210dec->refs[empty_spot].vidbuf = target;211dec->refs[empty_spot].decoded_bottom = dec->refs[empty_spot].decoded_top = 0;212target->valid_ref = empty_spot;213}214215static uint32_t216nouveau_vp3_fill_picparm_mpeg12_vp(struct nouveau_vp3_decoder *dec,217struct pipe_mpeg12_picture_desc *desc,218struct nouveau_vp3_video_buffer *refs[16],219unsigned *is_ref,220char *map)221{222struct mpeg12_picparm_vp pic_vp_stub = {}, *pic_vp = &pic_vp_stub;223uint32_t i, ret = 0x01010, ring; // !async_shutdown << 16 | watchdog << 12 | irq_record << 4 | unk;224assert(!(dec->base.width & 0xf));225*is_ref = desc->picture_coding_type <= 2;226227if (dec->base.profile == PIPE_VIDEO_PROFILE_MPEG1)228pic_vp->picture_structure = 3;229else230pic_vp->picture_structure = desc->picture_structure;231232assert(desc->picture_structure != 4);233if (desc->picture_structure == 4) // Untested, but should work234ret |= 0x100;235pic_vp->width = mb(dec->base.width);236pic_vp->height = mb(dec->base.height);237pic_vp->unk08 = pic_vp->unk04 = (dec->base.width+0xf)&~0xf; // Stride238239nouveau_vp3_ycbcr_offsets(dec, &pic_vp->ofs[1], &pic_vp->ofs[3], &pic_vp->ofs[4]);240pic_vp->ofs[5] = pic_vp->ofs[3];241pic_vp->ofs[0] = pic_vp->ofs[2] = 0;242nouveau_vp3_inter_sizes(dec, 1, &ring, &pic_vp->bucket_size, &pic_vp->inter_ring_data_size);243244pic_vp->alternate_scan = desc->alternate_scan;245pic_vp->pad2[0] = pic_vp->pad2[1] = pic_vp->pad2[2] = 0;246pic_vp->unk30 = desc->picture_structure < 3 && (desc->picture_structure == 2 - desc->top_field_first);247pic_vp->unk3a = (desc->picture_coding_type == 1);248for (i = 0; i < 4; ++i)249pic_vp->f_code[i] = desc->f_code[i/2][i%2] + 1; // FU250pic_vp->picture_coding_type = desc->picture_coding_type;251pic_vp->intra_dc_precision = desc->intra_dc_precision;252pic_vp->q_scale_type = desc->q_scale_type;253pic_vp->top_field_first = desc->top_field_first;254pic_vp->full_pel_forward_vector = desc->full_pel_forward_vector;255pic_vp->full_pel_backward_vector = desc->full_pel_backward_vector;256memcpy(pic_vp->intra_quantizer_matrix, desc->intra_matrix, 0x40);257memcpy(pic_vp->non_intra_quantizer_matrix, desc->non_intra_matrix, 0x40);258memcpy(map, pic_vp, sizeof(*pic_vp));259refs[0] = (struct nouveau_vp3_video_buffer *)desc->ref[0];260refs[!!refs[0]] = (struct nouveau_vp3_video_buffer *)desc->ref[1];261return ret | (dec->base.profile != PIPE_VIDEO_PROFILE_MPEG1);262}263264static uint32_t265nouveau_vp3_fill_picparm_mpeg4_vp(struct nouveau_vp3_decoder *dec,266struct pipe_mpeg4_picture_desc *desc,267struct nouveau_vp3_video_buffer *refs[16],268unsigned *is_ref,269char *map)270{271struct mpeg4_picparm_vp pic_vp_stub = {}, *pic_vp = &pic_vp_stub;272uint32_t ring, ret = 0x01014; // !async_shutdown << 16 | watchdog << 12 | irq_record << 4 | unk;273*is_ref = desc->vop_coding_type <= 1;274275pic_vp->width = dec->base.width;276pic_vp->height = mb(dec->base.height)<<4;277pic_vp->unk0c = pic_vp->unk08 = mb(dec->base.width)<<4; // Stride278279nouveau_vp3_ycbcr_offsets(dec, &pic_vp->ofs[1], &pic_vp->ofs[3], &pic_vp->ofs[4]);280pic_vp->ofs[5] = pic_vp->ofs[3];281pic_vp->ofs[0] = pic_vp->ofs[2] = 0;282pic_vp->pad1 = pic_vp->pad2 = 0;283nouveau_vp3_inter_sizes(dec, 1, &ring, &pic_vp->bucket_size, &pic_vp->inter_ring_data_size);284285pic_vp->trd[0] = desc->trd[0];286pic_vp->trd[1] = desc->trd[1];287pic_vp->trb[0] = desc->trb[0];288pic_vp->trb[1] = desc->trb[1];289pic_vp->u48 = 0; // Codec?290pic_vp->pad1 = pic_vp->pad2 = 0;291pic_vp->f_code_fw = desc->vop_fcode_forward;292pic_vp->f_code_bw = desc->vop_fcode_backward;293pic_vp->interlaced = desc->interlaced;294pic_vp->quant_type = desc->quant_type;295pic_vp->quarter_sample = desc->quarter_sample;296pic_vp->short_video_header = desc->short_video_header;297pic_vp->u54 = 0;298pic_vp->vop_coding_type = desc->vop_coding_type;299pic_vp->rounding_control = desc->rounding_control;300pic_vp->alternate_vertical_scan_flag = desc->alternate_vertical_scan_flag;301pic_vp->top_field_first = desc->top_field_first;302303memcpy(pic_vp->intra, desc->intra_matrix, 0x40);304memcpy(pic_vp->non_intra, desc->non_intra_matrix, 0x40);305memcpy(map, pic_vp, sizeof(*pic_vp));306refs[0] = (struct nouveau_vp3_video_buffer *)desc->ref[0];307refs[!!refs[0]] = (struct nouveau_vp3_video_buffer *)desc->ref[1];308return ret;309}310311static uint32_t312nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,313const struct pipe_h264_picture_desc *d,314struct nouveau_vp3_video_buffer *refs[16],315unsigned *is_ref,316char *map)317{318struct h264_picparm_vp stub_h = {}, *h = &stub_h;319unsigned ring, i, j = 0;320assert(offsetof(struct h264_picparm_vp, u224) == 0x224);321*is_ref = d->is_reference;322dec->last_frame_num = d->frame_num;323324h->width = mb(dec->base.width);325h->height = mb(dec->base.height);326h->stride1 = h->stride2 = mb(dec->base.width)*16;327nouveau_vp3_ycbcr_offsets(dec, &h->ofs[1], &h->ofs[3], &h->ofs[4]);328h->ofs[5] = h->ofs[3];329h->ofs[0] = h->ofs[2] = 0;330h->tmp_stride = dec->tmp_stride >> 8;331assert(h->tmp_stride);332nouveau_vp3_inter_sizes(dec, d->slice_count, &ring, &h->bucket_size, &h->inter_ring_data_size);333334h->u220 = 0;335h->mb_adaptive_frame_field_flag = d->pps->sps->mb_adaptive_frame_field_flag;336h->direct_8x8_inference_flag = d->pps->sps->direct_8x8_inference_flag;337h->weighted_pred_flag = d->pps->weighted_pred_flag;338h->constrained_intra_pred_flag = d->pps->constrained_intra_pred_flag;339h->is_reference = d->is_reference;340h->interlace = d->field_pic_flag;341h->bottom_field_flag = d->bottom_field_flag;342h->second_field = 0; // set in nouveau_vp3_fill_picparm_h264_vp_refs343344h->log2_max_frame_num_minus4 = d->pps->sps->log2_max_frame_num_minus4;345h->chroma_format_idc = 1;346347h->pic_order_cnt_type = d->pps->sps->pic_order_cnt_type;348h->pic_init_qp_minus26 = d->pps->pic_init_qp_minus26;349h->chroma_qp_index_offset = d->pps->chroma_qp_index_offset;350h->second_chroma_qp_index_offset = d->pps->second_chroma_qp_index_offset;351h->weighted_bipred_idc = d->pps->weighted_bipred_idc;352h->tmp_idx = 0; // set in h264_vp_refs below353h->fifo_dec_index = 0; // always set to 0 to be fifo compatible with other codecs354h->frame_number = d->frame_num;355h->u34_3030 = h->u34_3131 = 0;356h->field_order_cnt[0] = d->field_order_cnt[0];357h->field_order_cnt[1] = d->field_order_cnt[1];358memcpy(h->m4x4, d->pps->ScalingList4x4, sizeof(h->m4x4));359memcpy(h->m8x8, d->pps->ScalingList8x8, sizeof(h->m8x8));360h->u220 = 0;361for (i = 0; i < d->num_ref_frames; ++i) {362if (!d->ref[i])363break;364refs[j] = (struct nouveau_vp3_video_buffer *)d->ref[i];365h->refs[j].fifo_idx = j + 1;366h->refs[j].tmp_idx = refs[j]->valid_ref;367assert(dec->refs[refs[j]->valid_ref].vidbuf == refs[j]);368h->refs[j].field_order_cnt[0] = d->field_order_cnt_list[i][0];369h->refs[j].field_order_cnt[1] = d->field_order_cnt_list[i][1];370h->refs[j].frame_idx = d->frame_num_list[i];371if (!dec->refs[refs[j]->valid_ref].field_pic_flag) {372h->refs[j].top_is_reference = d->top_is_reference[i];373h->refs[j].bottom_is_reference = d->bottom_is_reference[i];374}375h->refs[j].is_long_term = d->is_long_term[i];376h->refs[j].notseenyet = 0;377h->refs[j].field_pic_flag = dec->refs[refs[j]->valid_ref].field_pic_flag;378h->refs[j].top_field_marking =379dec->refs[refs[j]->valid_ref].decoded_top && d->top_is_reference[i] ?3801 + d->is_long_term[i] : 0;381h->refs[j].bottom_field_marking =382dec->refs[refs[j]->valid_ref].decoded_bottom && d->bottom_is_reference[i] ?3831 + d->is_long_term[i] : 0;384h->refs[j].pad = 0;385j++;386}387for (; i < 16; ++i)388assert(!d->ref[i]);389assert(d->num_ref_frames <= dec->base.max_references);390391for (; i < d->num_ref_frames; ++i)392h->refs[j].field_pic_flag = d->field_pic_flag;393*(struct h264_picparm_vp *)map = *h;394395return 0x1113;396}397398static void399nouveau_vp3_fill_picparm_h264_vp_refs(struct nouveau_vp3_decoder *dec,400struct pipe_h264_picture_desc *d,401struct nouveau_vp3_video_buffer *refs[16],402struct nouveau_vp3_video_buffer *target,403char *map)404{405struct h264_picparm_vp *h = (struct h264_picparm_vp *)map;406assert(dec->refs[target->valid_ref].vidbuf == target);407// debug_printf("Target: %p\n", target);408409if (!dec->refs[target->valid_ref].decoded_top &&410!dec->refs[target->valid_ref].decoded_bottom)411dec->refs[target->valid_ref].decoded_first = d->bottom_field_flag;412else if (dec->refs[target->valid_ref].decoded_first != d->bottom_field_flag)413h->second_field = 1;414415h->tmp_idx = target->valid_ref;416dec->refs[target->valid_ref].field_pic_flag = d->field_pic_flag;417if (!d->field_pic_flag || d->bottom_field_flag)418dec->refs[target->valid_ref].decoded_bottom = 1;419if (!d->field_pic_flag || !d->bottom_field_flag)420dec->refs[target->valid_ref].decoded_top = 1;421}422423static uint32_t424nouveau_vp3_fill_picparm_vc1_vp(struct nouveau_vp3_decoder *dec,425struct pipe_vc1_picture_desc *d,426struct nouveau_vp3_video_buffer *refs[16],427unsigned *is_ref,428char *map)429{430struct vc1_picparm_vp *vc = (struct vc1_picparm_vp *)map;431unsigned ring;432assert(dec->base.profile != PIPE_VIDEO_PROFILE_VC1_SIMPLE);433*is_ref = d->picture_type <= 1;434435nouveau_vp3_ycbcr_offsets(dec, &vc->ofs[1], &vc->ofs[3], &vc->ofs[4]);436vc->ofs[5] = vc->ofs[3];437vc->ofs[0] = vc->ofs[2] = 0;438vc->width = dec->base.width;439vc->height = mb(dec->base.height)<<4;440vc->unk0c = vc->unk10 = mb(dec->base.width)<<4; // Stride441vc->pad = vc->pad2 = 0;442nouveau_vp3_inter_sizes(dec, 1, &ring, &vc->bucket_size, &vc->inter_ring_data_size);443vc->profile = dec->base.profile - PIPE_VIDEO_PROFILE_VC1_SIMPLE;444vc->loopfilter = d->loopfilter;445vc->fastuvmc = d->fastuvmc;446vc->dquant = d->dquant;447vc->overlap = d->overlap;448vc->quantizer = d->quantizer;449vc->u36 = 0; // ? No idea what this one is..450refs[0] = (struct nouveau_vp3_video_buffer *)d->ref[0];451refs[!!refs[0]] = (struct nouveau_vp3_video_buffer *)d->ref[1];452return 0x12;453}454455void nouveau_vp3_vp_caps(struct nouveau_vp3_decoder *dec, union pipe_desc desc,456struct nouveau_vp3_video_buffer *target, unsigned comm_seq,457unsigned *caps, unsigned *is_ref,458struct nouveau_vp3_video_buffer *refs[16])459{460struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];461enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);462char *vp = bsp_bo->map + VP_OFFSET;463464switch (codec){465case PIPE_VIDEO_FORMAT_MPEG12:466*caps = nouveau_vp3_fill_picparm_mpeg12_vp(dec, desc.mpeg12, refs, is_ref, vp);467nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);468switch (desc.mpeg12->picture_structure) {469case PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP:470dec->refs[target->valid_ref].decoded_top = 1;471break;472case PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_BOTTOM:473dec->refs[target->valid_ref].decoded_bottom = 1;474break;475default:476dec->refs[target->valid_ref].decoded_top = 1;477dec->refs[target->valid_ref].decoded_bottom = 1;478break;479}480return;481case PIPE_VIDEO_FORMAT_MPEG4:482*caps = nouveau_vp3_fill_picparm_mpeg4_vp(dec, desc.mpeg4, refs, is_ref, vp);483nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);484// XXX: Correct?485if (!desc.mpeg4->interlaced) {486dec->refs[target->valid_ref].decoded_top = 1;487dec->refs[target->valid_ref].decoded_bottom = 1;488} else if (desc.mpeg4->top_field_first) {489if (!dec->refs[target->valid_ref].decoded_top)490dec->refs[target->valid_ref].decoded_top = 1;491else492dec->refs[target->valid_ref].decoded_bottom = 1;493} else {494if (!dec->refs[target->valid_ref].decoded_bottom)495dec->refs[target->valid_ref].decoded_bottom = 1;496else497dec->refs[target->valid_ref].decoded_top = 1;498}499return;500case PIPE_VIDEO_FORMAT_VC1: {501*caps = nouveau_vp3_fill_picparm_vc1_vp(dec, desc.vc1, refs, is_ref, vp);502nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);503if (desc.vc1->frame_coding_mode == 3)504debug_printf("Field-Interlaced possibly incorrectly handled\n");505dec->refs[target->valid_ref].decoded_top = 1;506dec->refs[target->valid_ref].decoded_bottom = 1;507return;508}509case PIPE_VIDEO_FORMAT_MPEG4_AVC: {510*caps = nouveau_vp3_fill_picparm_h264_vp(dec, desc.h264, refs, is_ref, vp);511nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);512nouveau_vp3_fill_picparm_h264_vp_refs(dec, desc.h264, refs, target, vp);513return;514}515default: assert(0); return;516}517}518519520