Commit 90408eca authored by Fiona Glaser's avatar Fiona Glaser

Add full-recon API option

Fully reconstruct frames even without dump-yuv.
parent 5b2c62ae
......@@ -921,6 +921,9 @@ static int x264_validate_parameters( x264_t *h, int b_open )
h->param.i_nal_hrd = X264_NAL_HRD_VBR;
}
if( h->param.psz_dump_yuv )
h->param.b_full_recon = 1;
/* ensure the booleans are 0 or 1 so they can be used in math */
#define BOOLIFY(x) h->param.x = !!h->param.x
BOOLIFY( b_cabac );
......@@ -941,6 +944,7 @@ static int x264_validate_parameters( x264_t *h, int b_open )
BOOLIFY( b_fake_interlaced );
BOOLIFY( b_open_gop );
BOOLIFY( b_bluray_compat );
BOOLIFY( b_full_recon );
BOOLIFY( analyse.b_transform_8x8 );
BOOLIFY( analyse.b_weighted_bipred );
BOOLIFY( analyse.b_chroma_me );
......@@ -1839,7 +1843,7 @@ static void x264_fdec_filter_row( x264_t *h, int mb_y, int b_inloop )
* above each MB, as bS=4 doesn't happen for the top of interlaced mbpairs. */
int minpix_y = min_y*16 - 4 * !b_start;
int maxpix_y = mb_y*16 - 4 * !b_end;
b_deblock &= b_hpel || h->param.psz_dump_yuv;
b_deblock &= b_hpel || h->param.b_full_recon;
if( h->param.b_sliced_threads && b_start && min_y && !b_inloop )
{
b_deblock = 0; /* We already deblocked on the inloop pass. */
......@@ -2144,7 +2148,7 @@ static int x264_slice_write( x264_t *h )
int orig_last_mb = h->sh.i_last_mb;
uint8_t *last_emu_check;
x264_bs_bak_t bs_bak[2];
b_deblock &= b_hpel || h->param.psz_dump_yuv;
b_deblock &= b_hpel || h->param.b_full_recon;
bs_realign( &h->out.bs );
/* Slice */
......
......@@ -41,7 +41,7 @@
#include "x264_config.h"
#define X264_BUILD 121
#define X264_BUILD 122
/* x264_t:
* opaque handler for encoder */
......@@ -323,6 +323,7 @@ typedef struct x264_param_t
void *p_log_private;
int i_log_level;
int b_visualize;
int b_full_recon; /* fully reconstruct frames, even when not necessary for encoding. Implied by psz_dump_yuv */
char *psz_dump_yuv; /* filename for reconstructed frames */
/* Encoder analyser parameters */
......@@ -727,7 +728,10 @@ typedef struct
of H.264 itself; in this case, the caller must force an IDR frame
if it needs the changed parameter to apply immediately. */
x264_param_t *param;
/* In: raw data */
/* In: raw image data */
/* Out: reconstructed image data. x264 may skip part of the reconstruction process,
e.g. deblocking, in frames where it isn't necessary. To force complete
reconstruction, at a small speed cost, set b_full_recon. */
x264_image_t img;
/* In: optional information to modify encoder decisions for this frame
* Out: information about the encoded frame */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment