Commit Graph

8 Commits

Author SHA1 Message Date
Andreas Rheinhardt e35dfe864d 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>
2023-08-07 09:50:29 +02:00
Hendrik Leppkes b3e938ef80
avcodec/nvdec_mpeg4: fix order of quant matrix coefficients
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
2023-05-15 18:30:43 +02:00
Andreas Rheinhardt 500bbd584d avcodec/mpeg4video: Factor non-codec stuff out into a header of its own
This avoids including mpegvideo.h in mpeg4_unpack_bframes_bsf.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-02 11:55:21 +02:00
Andreas Rheinhardt 746e7102be avcodec/mpegvideo: Move encoder-only stuff to a new header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 19:49:29 +01:00
Andreas Rheinhardt 1187765f3b avcodec/mpeg4video.h: Move decoder-only parts to a new header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 19:41:57 +01:00
Philip Langdale 83c7ac2e47 avcodec/nvdec: Explicitly mark codecs that support 444 output formats
With the introduction of HEVC 444 support, we technically have two
codecs that can handle 444 - HEVC and MJPEG. In the case of MJPEG,
it can decode, but can only output one of the semi-planar formats.

That means we need additional logic to decide whether to use a
444 output format or not.
2019-02-16 08:47:36 -08:00
Mark Thompson 3a71bcc213 lavc: Mark all AVHWAccel structures as const 2017-11-26 21:41:19 +00:00
Philip Langdale 6b77a10e43 avcodec: Implement mpeg4 nvdec hwaccel
This was predictably nightmarish, given how ridiculous mpeg4 is.
I had to stare at the cuvid parser output for a long time to work
out what each field was supposed to be, and even then, I still don't
fully understand some of them. Particularly:

vop_coded: If I'm reading the decoder correctly, this flag will always
           be 1 as the decoder will not pass the hwaccel any frame
           where it is not 1.
divx_flags: There's obviously no documentation on what the possible
            flags are. I simply observed that this is '0' for a
            normal bitstream and '5' for packed b-frames.
gmc_enabled: I had a number of guesses as to what this mapped to.
             I picked the condition I did based on when the cuvid
             parser was setting flag.

Also note that as with the vdpau hwaccel, the decoder needs to
consume the entire frame and not the slice.
2017-11-20 07:21:41 -08:00