On Fri, Aug 21, 2020 at 4:43 PM James Almer <jamr...@gmail.com> wrote:
> > +            s->tile_num =
> > +                raw_frame_header->tile_cols * raw_frame_header->tile_rows;
> > +            tile_group_offset = raw_tile_group->tile_data.data - pkt->data;
> > +            get_tiles_info(avctx, raw_tile_group, tile_group_offset);
> > +
> > +            ret = get_current_frame(avctx);
> > +            if (ret < 0) {
> > +                av_log(avctx, AV_LOG_DEBUG, "Get current frame 
> > error:%d.\n",
> > +                       ret);
> > +                goto end;
> > +            }
> > +            if (avctx->hwaccel) {
> > +                ret = avctx->hwaccel->decode_slice(avctx, pkt->data, 
> > pkt->size);
>
> Can't you pass raw_tile_group->tile_data.data or something less broad
> than the entire packet?
>

This should match whatever the most common hwaccel APIs want, that
said decode_slice should usually take actual slice/tile data, while
start_frame can be passed an entire packet. Thats how other APIs
currently work.
DXVA2 AV1 takes tile data, so I would assume that VAAPI does as well..

In fact, looking at the VAAPI AV1 mappings in the other patch, it
takes that packet and then breaks it apart into tiles. Ideally that
should be handled in the decoder and tiles passed to decode_slice
ready for the hardware.

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

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

Reply via email to