[FFmpeg-devel] [PATCH 2/2] avcodec: add av1 VAAPI decoder
James Almer
jamrial at gmail.com
Mon Aug 24 05:03:56 EEST 2020
On 8/21/2020 2:29 AM, Fei Wang wrote:
> +static int vaapi_av1_start_frame(AVCodecContext *avctx,
> + av_unused const uint8_t *buffer,
> + av_unused uint32_t size)
> +{
> + AV1DecContext *s = avctx->priv_data;
> + const AV1RawSequenceHeader *seq = &s->raw_seq;
> + const AV1RawFrameHeader *frame_header = &s->raw_frame_header;
> + VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;
> + VADecPictureParameterBufferAV1 pic_param;
> + int err, i, j;
> + uint8_t lr_type[4] = {AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ};
> +
> + pic->output_surface = vaapi_av1_surface_id(&s->cur_frame);
> +
> + memset(&pic_param, 0, sizeof(VADecPictureParameterBufferAV1));
> + pic_param = (VADecPictureParameterBufferAV1) {
> + .profile = seq->seq_profile,
> + .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1,
> + .bit_depth_idx = vaapi_av1_get_bit_depth_idx(avctx),
> + .seq_info_fields.fields = {
> + .still_picture = seq->still_picture,
> + .use_128x128_superblock = seq->use_128x128_superblock,
> + .enable_filter_intra = seq->enable_filter_intra,
> + .enable_intra_edge_filter = seq->enable_intra_edge_filter,
> + .enable_interintra_compound = seq->enable_interintra_compound,
> + .enable_masked_compound = seq->enable_masked_compound,
> + .enable_dual_filter = seq->enable_dual_filter,
> + .enable_order_hint = seq->enable_order_hint,
> + .enable_jnt_comp = seq->enable_jnt_comp,
> + .enable_cdef = seq->enable_cdef,
> + .mono_chrome = seq->color_config.mono_chrome,
> + .color_range = seq->color_config.color_range,
> + .subsampling_x = seq->color_config.subsampling_x,
> + .subsampling_y = seq->color_config.subsampling_y,
> + .chroma_sample_position = seq->color_config.chroma_sample_position,
> + .film_grain_params_present = seq->film_grain_params_present,
> + },
> + .current_frame = pic->output_surface,
> + .current_display_picture = pic->output_surface,
> + .frame_width_minus1 = seq->max_frame_width_minus_1,
> + .frame_height_minus1 = seq->max_frame_height_minus_1,
Should be frame->frame_width_minus_1 and frame->frame_height_minus_1
(Both are now always filled even if not coded in the bitstream).
More information about the ffmpeg-devel
mailing list