[FFmpeg-devel] [PATCH 1/1] mpeg: add experimental support for PSMF audio.

Jan Ekström jeebjp at gmail.com
Thu Jan 4 08:22:36 EET 2018


On Mon, Jan 1, 2018 at 11:32 AM,  <misty at brew.sh> wrote:
> ...
> +        avctx->sample_rate    = ctx->sample_rate;
> +        avctx->block_align    = ctx->frame_size;
> +        avctx->bit_rate       = ctx->sample_rate * ctx->frame_size * 8 / 2048;
> +        avctx->channels       = oma_chid_to_num_channels[ctx->channel_id - 1];
> +        avctx->channel_layout = oma_chid_to_native_layout[ctx->channel_id - 1];
> +
> ...

Hi,

I had at one point looked into working on this after the initial patch
set failed to get merged as the AVCodecContext was modified in a
parser and people were afraid about threading issues. Is this no
longer an issue?

Currently this design of the parser is based on the ATRAC3+ decoder's
design, which is built upon the WAV-like OMA format. That, in part,
expects the demuxer to have filled all this information for it, and
basically it would have required to either insert the headers utilized
in the MPEG-PS encapsulation to every packet with OMA demux (and make
the decoder not require these values in the AVCodecContext) - which
would break any remuxing if such would take place unless those would
be removed in the muxer, or the decoder would have to have two modes.
One for the OMA-like (no header in packets), and the other for MPEG-PS
encapsulation (header in each packet). I had asked on the -devel IRC
channel regarding how to do it the best way a few times but never got
a nice answer.

> ...
> +    } else if (!memcmp("PSMF00", buffer, 6)) {
> +        m->sony_psmf = 1;
> ...

Games for the Sony PS3 seem to utilize the header "PAMF00" for the
same purpose. I can share a sample on IRC (poke JEEB).

Best regards,
Jan


More information about the ffmpeg-devel mailing list