mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
Add S5L8702 VPU-B initialization, reset, bitstream input, frame output, and cache maintenance to the iPod 6G target. Advertise it with HAVE_HW_H264 and append a capability-gated decoder interface to the plugin API. Keep MP4 parsing, AAC decode and mixer output, A/V synchronization, playback controls, resume state, and presentation in the multi-file h264_player plugin. The target layer exposes decoder operations only. Accept non-fragmented MP4/M4V containing Constrained Baseline H.264 through level 3.0, up to 640x480 at 30 fps, with optional AAC-LC audio. Validate codec configuration and all sample-table relationships before activating the hardware. Read MP4 tables in bulk, boost the CPU while preparing them, and report staged loading progress so long movies do not appear to hang during startup. Register the viewer and document its format limits and controls. The libm4a compatibility fixes needed by video-first containers remain in the preceding standalone change. Tested on an iPod Classic 6G through an isolated Rolo nightly runtime: H.264/AAC playback and M4V startup succeeded. Normal and isolated-runtime iPod 6G builds also complete, and git diff --check is clean. Change-Id: I1e96c65c7d0b4231a94f602f8052f1b26d6e4a80
39 lines
1.4 KiB
C
39 lines
1.4 KiB
C
/***************************************************************************
|
|
* Hardware H.264 decoder interface exposed to viewer plugins.
|
|
*
|
|
* Copyright (C) 2025-2026 David Cormier
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
****************************************************************************/
|
|
|
|
#ifndef HW_H264_H
|
|
#define HW_H264_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
struct vpu_h264;
|
|
|
|
/* The container, audio, synchronization, and UI layers live in the plugin.
|
|
* Only the target hardware decoder is exported by core. */
|
|
struct hw_h264_api
|
|
{
|
|
size_t (*buf_size)(int max_w, int max_h);
|
|
struct vpu_h264 *(*open)(void *buf, size_t buf_size,
|
|
int max_w, int max_h);
|
|
int (*configure)(struct vpu_h264 *decoder,
|
|
const uint8_t *avcc, int avcc_len);
|
|
int (*decode_sample)(struct vpu_h264 *decoder, const uint8_t *sample,
|
|
int sample_len, int nalu_len_size);
|
|
void (*get_frame)(const struct vpu_h264 *decoder,
|
|
const uint8_t **y, const uint8_t **cb,
|
|
const uint8_t **cr, int *w, int *h, int *stride);
|
|
void (*close)(struct vpu_h264 *decoder);
|
|
};
|
|
|
|
extern const struct hw_h264_api target_hw_h264_api;
|
|
|
|
#endif /* HW_H264_H */
|