[FFmpeg-devel] [PATCH 2/2] diracdec: Add HQ Profile support
Michael Niedermayer
michaelni at gmx.at
Tue Dec 8 22:25:53 CET 2015
On Tue, Dec 08, 2015 at 07:27:42PM +0000, Kieran Kunhya wrote:
[...]
> @@ -1057,29 +1129,19 @@ static int dirac_unpack_idwt_params(DiracContext *s)
>
> CHECKEDREAD(s->wavelet_depth, tmp > MAX_DWT_LEVELS || tmp < 1, "invalid number of DWT decompositions\n")
>
> - if (!s->low_delay) {
> - /* Codeblock parameters (core syntax only) */
> - if (get_bits1(gb)) {
> - for (i = 0; i <= s->wavelet_depth; i++) {
> - CHECKEDREAD(s->codeblock[i].width , tmp < 1 || tmp > (s->avctx->width >>s->wavelet_depth-i), "codeblock width invalid\n")
> - CHECKEDREAD(s->codeblock[i].height, tmp < 1 || tmp > (s->avctx->height>>s->wavelet_depth-i), "codeblock height invalid\n")
> + if (s->low_delay) {
> + s->num_x = svq3_get_ue_golomb(gb);
> + s->num_y = svq3_get_ue_golomb(gb);
> + if (s->ld_picture) {
> + s->lowdelay.bytes.num = svq3_get_ue_golomb(gb);
> + s->lowdelay.bytes.den = svq3_get_ue_golomb(gb);
> + if (s->lowdelay.bytes.den <= 0) {
> + av_log(s->avctx,AV_LOG_ERROR,"Invalid lowdelay.bytes.den\n");
> + return AVERROR_INVALIDDATA;
> }
> -
> - CHECKEDREAD(s->codeblock_mode, tmp > 1, "unknown codeblock mode\n")
> - } else
> - for (i = 0; i <= s->wavelet_depth; i++)
> - s->codeblock[i].width = s->codeblock[i].height = 1;
> - } else {
> - /* Slice parameters + quantization matrix*/
> - /*[DIRAC_STD] 11.3.4 Slice coding Parameters (low delay syntax only). slice_parameters() */
> - s->lowdelay.num_x = svq3_get_ue_golomb(gb);
> - s->lowdelay.num_y = svq3_get_ue_golomb(gb);
> - s->lowdelay.bytes.num = svq3_get_ue_golomb(gb);
> - s->lowdelay.bytes.den = svq3_get_ue_golomb(gb);
> -
> - if (s->lowdelay.bytes.den <= 0) {
> - av_log(s->avctx,AV_LOG_ERROR,"Invalid lowdelay.bytes.den\n");
> - return AVERROR_INVALIDDATA;
> + } else if (s->hq_picture) {
> + s->highquality.prefix_bytes = svq3_get_ue_golomb(gb);
> + s->highquality.size_scaler = svq3_get_ue_golomb(gb);
> }
>
> /* [DIRAC_STD] 11.3.5 Quantisation matrices (low-delay syntax). quant_matrix() */
Can this patch be split into independant changes ?
it seems some parts are reindented differntly and some fields are
moved like s->lowdelay.num_* -> s->num_*
this should make it easier to review
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151208/f6d33626/attachment.sig>
More information about the ffmpeg-devel
mailing list