case PIPE_VIDEO_FORMAT_MPEG4:
return RUVD_CODEC_MPEG4;
- case PIPE_VIDEO_FORMAT_HEVC:
- return RUVD_CODEC_H265;
-
case PIPE_VIDEO_FORMAT_JPEG:
return RUVD_CODEC_MJPEG;
break;
}
- case PIPE_VIDEO_FORMAT_HEVC:
- if (dec->base.width * dec->base.height >= 4096*2000)
- max_references = MAX2(max_references, 8);
- else
- max_references = MAX2(max_references, 17);
-
- width = align (width, 16);
- height = align (height, 16);
- if (dec->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
- dpb_size = align((align(width, get_db_pitch_alignment(dec)) * height * 9) / 4, 256) * max_references;
- else
- dpb_size = align((align(width, get_db_pitch_alignment(dec)) * height * 3) / 2, 256) * max_references;
- break;
-
case PIPE_VIDEO_FORMAT_VC1:
// the firmware seems to allways assume a minimum of ref frames
max_references = MAX2(NUM_VC1_REFS, max_references);
result.direct_reflist[i][j] = pic->RefPicList[i][j];
}
- if (pic->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) {
- if (target->buffer_format == PIPE_FORMAT_P010 ||
- target->buffer_format == PIPE_FORMAT_P016) {
- result.p010_mode = 1;
- result.msb_mode = 1;
- } else {
- result.luma_10to8 = 5;
- result.chroma_10to8 = 5;
- result.sclr_luma10to8 = 4;
- result.sclr_chroma10to8 = 4;
- }
- }
-
/* TODO
result.highestTid;
result.isNonRef;
dec->msg->body.decode.codec.h264 = get_h264_msg(dec, (struct pipe_h264_picture_desc*)picture);
break;
- case PIPE_VIDEO_FORMAT_HEVC:
- dec->msg->body.decode.codec.h265 = get_h265_msg(dec, target, (struct pipe_h265_picture_desc*)picture);
- if (dec->ctx.res == NULL) {
- unsigned ctx_size;
- if (dec->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
- ctx_size = calc_ctx_size_h265_main10(dec, (struct pipe_h265_picture_desc*)picture);
- else
- ctx_size = calc_ctx_size_h265_main(dec);
- if (!rvid_create_buffer(dec->screen, &dec->ctx, ctx_size, PIPE_USAGE_DEFAULT)) {
- RVID_ERR("Can't allocated context buffer.\n");
- }
- rvid_clear_buffer(decoder->context, &dec->ctx);
- }
-
- if (dec->ctx.res)
- dec->msg->body.decode.dpb_reserved = dec->ctx.res->buf->size;
- break;
-
case PIPE_VIDEO_FORMAT_VC1:
dec->msg->body.decode.codec.vc1 = get_vc1_msg((struct pipe_vc1_picture_desc*)picture);
break;
case PIPE_VIDEO_CAP_MAX_HEIGHT:
return 1152;
case PIPE_VIDEO_CAP_PREFERED_FORMAT:
- if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
- return PIPE_FORMAT_P016;
- else
- return PIPE_FORMAT_NV12;
+ return PIPE_FORMAT_NV12;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
} else {
enum pipe_video_format format = u_reduce_video_profile(profile);
- if (format == PIPE_VIDEO_FORMAT_HEVC)
- return false; //The firmware doesn't support interlaced HEVC.
- else if (format == PIPE_VIDEO_FORMAT_JPEG)
+ if (format == PIPE_VIDEO_FORMAT_JPEG)
return false;
return true;
}
case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
return 41;
- case PIPE_VIDEO_PROFILE_HEVC_MAIN:
- case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
- return 186;
default:
return 0;
}
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint)
{
- /* HEVC 10 bit decoding should use P016 instead of NV12 if possible */
- if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
- return (format == PIPE_FORMAT_NV12) ||
- (format == PIPE_FORMAT_P016);
-
/* we can only handle this one with UVD */
if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
return format == PIPE_FORMAT_NV12;