aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-01 19:44:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-07 09:50:29 +0200
commite35dfe864d8fb1ee9e28684a5a93e4b75d0d8092 (patch)
treebbf1004fe094653f8dc00048137f17cc4cb06ab6 /libavcodec/h263dec.c
parentc48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (diff)
downloadffmpeg-e35dfe864d8fb1ee9e28684a5a93e4b75d0d8092.tar.gz
avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 68a618a7ed..52e51dd489 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -36,6 +36,7 @@
#include "flvdec.h"
#include "h263.h"
#include "h263dec.h"
+#include "hwaccel_internal.h"
#include "hwconfig.h"
#include "mpeg_er.h"
#include "mpeg4video.h"
@@ -190,7 +191,7 @@ static int decode_slice(MpegEncContext *s)
if (s->avctx->hwaccel) {
const uint8_t *start = s->gb.buffer + get_bits_count(&s->gb) / 8;
- ret = s->avctx->hwaccel->decode_slice(s->avctx, start, s->gb.buffer_end - start);
+ ret = FF_HW_CALL(s->avctx, decode_slice, start, s->gb.buffer_end - start);
// ensure we exit decode loop
s->mb_y = s->mb_height;
return ret;
@@ -568,8 +569,8 @@ retry:
ff_thread_finish_setup(avctx);
if (avctx->hwaccel) {
- ret = avctx->hwaccel->start_frame(avctx, s->gb.buffer,
- s->gb.buffer_end - s->gb.buffer);
+ ret = FF_HW_CALL(avctx, start_frame,
+ s->gb.buffer, s->gb.buffer_end - s->gb.buffer);
if (ret < 0 )
return ret;
}
@@ -624,7 +625,7 @@ frame_end:
ff_er_frame_end(&s->er);
if (avctx->hwaccel) {
- ret = avctx->hwaccel->end_frame(avctx);
+ ret = FF_HW_SIMPLE_CALL(avctx, end_frame);
if (ret < 0)
return ret;
}